PCI: tegra: Add debugfs support
[firefly-linux-kernel-4.4.55.git] / fs / nfsd / xdr4.h
index d278a0d034968d3bdb57b7f942048af7e2ed6712..18cbb6d9c8a9e151ffe7b38893dd727fe2b4e41c 100644 (file)
@@ -58,7 +58,7 @@ struct nfsd4_compound_state {
        /* For sessions DRC */
        struct nfsd4_session    *session;
        struct nfsd4_slot       *slot;
-       __be32                  *datap;
+       int                     data_offset;
        size_t                  iovlen;
        u32                     minorversion;
        __be32                  status;
@@ -287,9 +287,8 @@ struct nfsd4_readdir {
        struct svc_fh * rd_fhp;             /* response */
 
        struct readdir_cd       common;
-       __be32 *                buffer;
-       int                     buflen;
-       __be32 *                offset;
+       struct xdr_stream       *xdr;
+       int                     cookie_offset;
 };
 
 struct nfsd4_release_lockowner {
@@ -506,9 +505,7 @@ struct nfsd4_compoundargs {
 
 struct nfsd4_compoundres {
        /* scratch variables for XDR encode */
-       __be32 *                        p;
-       __be32 *                        end;
-       struct xdr_buf *                xbuf;
+       struct xdr_stream               xdr;
        struct svc_rqst *               rqstp;
 
        u32                             taglen;
@@ -538,6 +535,9 @@ static inline bool nfsd4_last_compound_op(struct svc_rqst *rqstp)
        return argp->opcnt == resp->opcnt;
 }
 
+int nfsd4_max_reply(struct svc_rqst *rqstp, struct nfsd4_op *op);
+void warn_on_nonidempotent_op(struct nfsd4_op *op);
+
 #define NFS4_SVC_XDRSIZE               sizeof(struct nfsd4_compoundargs)
 
 static inline void
@@ -563,10 +563,11 @@ int nfs4svc_encode_compoundres(struct svc_rqst *, __be32 *,
                struct nfsd4_compoundres *);
 __be32 nfsd4_check_resp_size(struct nfsd4_compoundres *, u32);
 void nfsd4_encode_operation(struct nfsd4_compoundres *, struct nfsd4_op *);
-void nfsd4_encode_replay(struct nfsd4_compoundres *resp, struct nfsd4_op *op);
-__be32 nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
-                      struct dentry *dentry, __be32 **buffer, int countp,
-                      u32 *bmval, struct svc_rqst *, int ignore_crossmnt);
+void nfsd4_encode_replay(struct xdr_stream *xdr, struct nfsd4_op *op);
+__be32 nfsd4_encode_fattr_to_buf(__be32 **p, int words,
+               struct svc_fh *fhp, struct svc_export *exp,
+               struct dentry *dentry,
+               u32 *bmval, struct svc_rqst *, int ignore_crossmnt);
 extern __be32 nfsd4_setclientid(struct svc_rqst *rqstp,
                struct nfsd4_compound_state *,
                struct nfsd4_setclientid *setclid);
@@ -574,8 +575,6 @@ extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
                struct nfsd4_compound_state *,
                struct nfsd4_setclientid_confirm *setclientid_confirm);
 extern void nfsd4_store_cache_entry(struct nfsd4_compoundres *resp);
-extern __be32 nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp,
-               struct nfsd4_sequence *seq);
 extern __be32 nfsd4_exchange_id(struct svc_rqst *rqstp,
                struct nfsd4_compound_state *, struct nfsd4_exchange_id *);
 extern __be32 nfsd4_backchannel_ctl(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_backchannel_ctl *);