Merge branch 'fixes' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
[pandora-kernel.git] / include / linux / nfsd / xdr4.h
index 45ca01b..27bd3e3 100644 (file)
 #define NFSD4_MAX_TAGLEN       128
 #define XDR_LEN(n)                     (((n) + 3) & ~3)
 
+struct nfsd4_compound_state {
+       struct svc_fh current_fh;
+       struct svc_fh save_fh;
+       struct nfs4_stateowner *replay_owner;
+};
+
 struct nfsd4_change_info {
        u32             atomic;
        u32             before_ctime_sec;
@@ -287,6 +293,12 @@ struct nfsd4_rename {
        struct nfsd4_change_info  rn_tinfo; /* response */
 };
 
+struct nfsd4_secinfo {
+       u32 si_namelen;                                 /* request */
+       char *si_name;                                  /* request */
+       struct svc_export *si_exp;                      /* response */
+};
+
 struct nfsd4_setattr {
        stateid_t       sa_stateid;         /* request */
        u32             sa_bmval[2];        /* request */
@@ -359,6 +371,7 @@ struct nfsd4_op {
                struct nfsd4_remove             remove;
                struct nfsd4_rename             rename;
                clientid_t                      renew;
+               struct nfsd4_secinfo            secinfo;
                struct nfsd4_setattr            setattr;
                struct nfsd4_setclientid        setclientid;
                struct nfsd4_setclientid_confirm setclientid_confirm;
@@ -415,8 +428,8 @@ set_change_info(struct nfsd4_change_info *cinfo, struct svc_fh *fhp)
        cinfo->atomic = 1;
        cinfo->before_ctime_sec = fhp->fh_pre_ctime.tv_sec;
        cinfo->before_ctime_nsec = fhp->fh_pre_ctime.tv_nsec;
-       cinfo->after_ctime_sec = fhp->fh_post_ctime.tv_sec;
-       cinfo->after_ctime_nsec = fhp->fh_post_ctime.tv_nsec;
+       cinfo->after_ctime_sec = fhp->fh_post_attr.ctime.tv_sec;
+       cinfo->after_ctime_nsec = fhp->fh_post_attr.ctime.tv_nsec;
 }
 
 int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *);
@@ -428,37 +441,41 @@ 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 *);
+                      u32 *bmval, struct svc_rqst *, int ignore_crossmnt);
 extern __be32 nfsd4_setclientid(struct svc_rqst *rqstp,
+               struct nfsd4_compound_state *,
                struct nfsd4_setclientid *setclid);
 extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
+               struct nfsd4_compound_state *,
                struct nfsd4_setclientid_confirm *setclientid_confirm);
 extern __be32 nfsd4_process_open1(struct nfsd4_open *open);
 extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp,
                struct svc_fh *current_fh, struct nfsd4_open *open);
 extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp,
-               struct svc_fh *current_fh, struct nfsd4_open_confirm *oc,
-               struct nfs4_stateowner **);
-extern __be32 nfsd4_close(struct svc_rqst *rqstp, struct svc_fh *current_fh,
-               struct nfsd4_close *close,
-               struct nfs4_stateowner **replay_owner);
+               struct nfsd4_compound_state *, struct nfsd4_open_confirm *oc);
+extern __be32 nfsd4_close(struct svc_rqst *rqstp,
+               struct nfsd4_compound_state *,
+               struct nfsd4_close *close);
 extern __be32 nfsd4_open_downgrade(struct svc_rqst *rqstp,
-               struct svc_fh *current_fh, struct nfsd4_open_downgrade *od,
-               struct nfs4_stateowner **replay_owner);
-extern __be32 nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh,
-               struct nfsd4_lock *lock,
-               struct nfs4_stateowner **replay_owner);
-extern __be32 nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh,
+               struct nfsd4_compound_state *,
+               struct nfsd4_open_downgrade *od);
+extern __be32 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *,
+               struct nfsd4_lock *lock);
+extern __be32 nfsd4_lockt(struct svc_rqst *rqstp,
+               struct nfsd4_compound_state *,
                struct nfsd4_lockt *lockt);
-extern __be32 nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh,
-               struct nfsd4_locku *locku,
-               struct nfs4_stateowner **replay_owner);
+extern __be32 nfsd4_locku(struct svc_rqst *rqstp,
+               struct nfsd4_compound_state *,
+               struct nfsd4_locku *locku);
 extern __be32
 nfsd4_release_lockowner(struct svc_rqst *rqstp,
+               struct nfsd4_compound_state *,
                struct nfsd4_release_lockowner *rlockowner);
 extern void nfsd4_release_compoundargs(struct nfsd4_compoundargs *);
 extern __be32 nfsd4_delegreturn(struct svc_rqst *rqstp,
-               struct svc_fh *current_fh, struct nfsd4_delegreturn *dr);
+               struct nfsd4_compound_state *, struct nfsd4_delegreturn *dr);
+extern __be32 nfsd4_renew(struct svc_rqst *rqstp,
+                         struct nfsd4_compound_state *, clientid_t *clid);
 #endif
 
 /*