#include "xdr4.h"
#include "vfs.h"
#include "state.h"
+#include "cache.h"
#define NFSDDBG_FACILITY NFSDDBG_XDR
DECODE_HEAD;
struct nfsd4_op *op;
struct nfsd4_minorversion_ops *ops;
+ bool cachethis = false;
int i;
/*
argp->opcnt = i+1;
break;
}
+ /*
+ * We'll try to cache the result in the DRC if any one
+ * op in the compound wants to be cached:
+ */
+ cachethis |= nfsd4_cache_this_op(op);
}
+ /* Sessions make the DRC unnecessary: */
+ if (argp->minorversion)
+ cachethis = false;
+ argp->rqstp->rq_cachetype = cachethis ? RC_REPLBUFF : RC_NOCACHE;
DECODE_TAIL;
}