summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/xdr4.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-12-04 18:03:46 -0500
committerJ. Bruce Fields <bfields@redhat.com>2012-12-17 16:02:41 -0500
commit9b3234b9220aae5387b60bc35a424ab6748b2b59 (patch)
treeeeaf7761a957cd3acdd6c55a91587b28998d0bd9 /fs/nfsd/xdr4.h
parent3a28e331115be5130fe061e6b4183b29385116a6 (diff)
downloadlinux-9b3234b9220aae5387b60bc35a424ab6748b2b59.tar.bz2
nfsd4: disable zero-copy on non-final read ops
To ensure ordering of read data with any following operations, turn off zero copy if the read is not the final operation in the compound. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r--fs/nfsd/xdr4.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index 331f8a3277ab..0889bfb43dc9 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -528,6 +528,14 @@ static inline bool nfsd4_not_cached(struct nfsd4_compoundres *resp)
|| nfsd4_is_solo_sequence(resp);
}
+static inline bool nfsd4_last_compound_op(struct svc_rqst *rqstp)
+{
+ struct nfsd4_compoundres *resp = rqstp->rq_resp;
+ struct nfsd4_compoundargs *argp = rqstp->rq_argp;
+
+ return argp->opcnt == resp->opcnt;
+}
+
#define NFS4_SVC_XDRSIZE sizeof(struct nfsd4_compoundargs)
static inline void