Lines Matching refs:req
613 struct xfs_exchmaps_req *req = &tx->req; in xrep_tempexch_prep_request() local
632 req->ip1 = sc->tempip; in xrep_tempexch_prep_request()
633 req->ip2 = sc->ip; in xrep_tempexch_prep_request()
634 req->startoff1 = off; in xrep_tempexch_prep_request()
635 req->startoff2 = off; in xrep_tempexch_prep_request()
638 req->flags |= XFS_EXCHMAPS_ATTR_FORK; in xrep_tempexch_prep_request()
643 req->flags |= XFS_EXCHMAPS_SET_SIZES; in xrep_tempexch_prep_request()
646 req->blockcount = len; in xrep_tempexch_prep_request()
661 struct xfs_exchmaps_req *req = &tx->req; in xrep_tempexch_estimate() local
664 int whichfork = xfs_exchmaps_reqfork(req); in xrep_tempexch_estimate()
683 return xfs_exchrange_estimate(req); in xrep_tempexch_estimate()
694 req->ip1_bcount = sc->tempip->i_nblocks; in xrep_tempexch_estimate()
695 req->ip2_bcount = 1; in xrep_tempexch_estimate()
696 req->nr_exchanges = 1 + tifp->if_nextents; in xrep_tempexch_estimate()
697 req->resblks = 1; in xrep_tempexch_estimate()
709 req->ip1_bcount = 1; in xrep_tempexch_estimate()
710 req->ip2_bcount = sc->ip->i_nblocks; in xrep_tempexch_estimate()
711 req->nr_exchanges = 1 + ifp->if_nextents; in xrep_tempexch_estimate()
712 req->resblks = 1; in xrep_tempexch_estimate()
724 req->ip1_bcount = 1; in xrep_tempexch_estimate()
725 req->ip2_bcount = 1; in xrep_tempexch_estimate()
726 req->nr_exchanges = 1; in xrep_tempexch_estimate()
727 req->resblks = 2; in xrep_tempexch_estimate()
731 return xfs_exchmaps_estimate_overhead(req); in xrep_tempexch_estimate()
746 const struct xfs_exchmaps_req *req = &tx->req; in xrep_tempexch_reserve_quota() local
754 if (!XFS_IS_QUOTA_ON(tp->t_mountp) || req->ip1 == req->ip2 || in xrep_tempexch_reserve_quota()
755 xfs_is_metadir_inode(req->ip1) || in xrep_tempexch_reserve_quota()
756 (req->ip1->i_udquot == req->ip2->i_udquot && in xrep_tempexch_reserve_quota()
757 req->ip1->i_gdquot == req->ip2->i_gdquot && in xrep_tempexch_reserve_quota()
758 req->ip1->i_pdquot == req->ip2->i_pdquot)) in xrep_tempexch_reserve_quota()
770 ddelta = max_t(int64_t, 0, req->ip2_bcount - req->ip1_bcount); in xrep_tempexch_reserve_quota()
771 rdelta = max_t(int64_t, 0, req->ip2_rtbcount - req->ip1_rtbcount); in xrep_tempexch_reserve_quota()
772 error = xfs_trans_reserve_quota_nblks(tp, req->ip1, in xrep_tempexch_reserve_quota()
773 ddelta + req->ip1_bcount, rdelta + req->ip1_rtbcount, in xrep_tempexch_reserve_quota()
778 ddelta = max_t(int64_t, 0, req->ip1_bcount - req->ip2_bcount); in xrep_tempexch_reserve_quota()
779 rdelta = max_t(int64_t, 0, req->ip1_rtbcount - req->ip2_rtbcount); in xrep_tempexch_reserve_quota()
780 return xfs_trans_reserve_quota_nblks(tp, req->ip2, in xrep_tempexch_reserve_quota()
781 ddelta + req->ip2_bcount, rdelta + req->ip2_rtbcount, in xrep_tempexch_reserve_quota()
816 error = xfs_exchmaps_estimate(&tx->req); in xrep_tempexch_trans_reserve()
820 error = xfs_trans_reserve_more(sc->tp, tx->req.resblks, 0); in xrep_tempexch_trans_reserve()
863 tx->req.resblks, 0, flags, &sc->tp); in xrep_tempexch_trans_alloc()
888 xfs_exchange_mappings(sc->tp, &tx->req); in xrep_tempexch_contents()
897 if (tx->req.flags & XFS_EXCHMAPS_SET_SIZES) { in xrep_tempexch_contents()