aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfsd/state.h1
-rw-r--r--include/linux/nfsd/xdr4.h15
2 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h
index f063df7ad134..18dcffa57f77 100644
--- a/include/linux/nfsd/state.h
+++ b/include/linux/nfsd/state.h
@@ -110,6 +110,7 @@ struct nfsd4_cache_entry {
110 __be32 ce_status; 110 __be32 ce_status;
111 struct kvec ce_datav; /* encoded NFSv4.1 data in rq_res.head[0] */ 111 struct kvec ce_datav; /* encoded NFSv4.1 data in rq_res.head[0] */
112 struct page *ce_respages[NFSD_PAGES_PER_SLOT + 1]; 112 struct page *ce_respages[NFSD_PAGES_PER_SLOT + 1];
113 int ce_cachethis;
113 short ce_resused; 114 short ce_resused;
114 int ce_opcnt; 115 int ce_opcnt;
115 int ce_rpchdrlen; 116 int ce_rpchdrlen;
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h
index 9468829adb70..486188810a60 100644
--- a/include/linux/nfsd/xdr4.h
+++ b/include/linux/nfsd/xdr4.h
@@ -480,6 +480,18 @@ struct nfsd4_compoundres {
480 struct nfsd4_compound_state cstate; 480 struct nfsd4_compound_state cstate;
481}; 481};
482 482
483static inline bool nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp)
484{
485 struct nfsd4_compoundargs *args = resp->rqstp->rq_argp;
486 return args->opcnt == 1;
487}
488
489static inline bool nfsd4_not_cached(struct nfsd4_compoundres *resp)
490{
491 return !resp->cstate.slot->sl_cache_entry.ce_cachethis ||
492 nfsd4_is_solo_sequence(resp);
493}
494
483#define NFS4_SVC_XDRSIZE sizeof(struct nfsd4_compoundargs) 495#define NFS4_SVC_XDRSIZE sizeof(struct nfsd4_compoundargs)
484 496
485static inline void 497static inline void
@@ -510,7 +522,8 @@ extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
510 struct nfsd4_compound_state *, 522 struct nfsd4_compound_state *,
511 struct nfsd4_setclientid_confirm *setclientid_confirm); 523 struct nfsd4_setclientid_confirm *setclientid_confirm);
512extern void nfsd4_store_cache_entry(struct nfsd4_compoundres *resp); 524extern void nfsd4_store_cache_entry(struct nfsd4_compoundres *resp);
513extern __be32 nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp); 525extern __be32 nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp,
526 struct nfsd4_sequence *seq);
514extern __be32 nfsd4_exchange_id(struct svc_rqst *rqstp, 527extern __be32 nfsd4_exchange_id(struct svc_rqst *rqstp,
515 struct nfsd4_compound_state *, 528 struct nfsd4_compound_state *,
516struct nfsd4_exchange_id *); 529struct nfsd4_exchange_id *);