vserver 2.0 rc7
[linux-2.6.git] / include / linux / nfsd / xdr4.h
index ff18ed7..a1f5ad0 100644 (file)
 #ifndef _LINUX_NFSD_XDR4_H
 #define _LINUX_NFSD_XDR4_H
 
+#include <linux/nfs4.h>
+
 #define NFSD4_MAX_TAGLEN       128
 #define XDR_LEN(n)                     (((n) + 3) & ~3)
 
-typedef u32 delegation_zero_t;
-typedef u32 delegation_boot_t;
-typedef u64 delegation_id_t;
-
-typedef struct {
-       delegation_zero_t       ds_zero;
-       delegation_boot_t       ds_boot;
-       delegation_id_t         ds_id;
-} delegation_stateid_t;
-
 struct nfsd4_change_info {
        u32             atomic;
        u32             before_ctime_sec;
@@ -95,12 +87,17 @@ struct nfsd4_create {
        u32             cr_bmval[2];        /* request */
        struct iattr    cr_iattr;           /* request */
        struct nfsd4_change_info  cr_cinfo; /* response */
+       struct nfs4_acl *cr_acl;
 };
 #define cr_linklen     u.link.namelen
 #define cr_linkname    u.link.name
 #define cr_specdata1   u.dev.specdata1
 #define cr_specdata2   u.dev.specdata2
 
+struct nfsd4_delegreturn {
+       stateid_t       dr_stateid;
+};
+
 struct nfsd4_getattr {
        u32             ga_bmval[2];        /* request */
        struct svc_fh   *ga_fhp;            /* response */
@@ -113,6 +110,7 @@ struct nfsd4_link {
 };
 
 struct nfsd4_lock_denied {
+       clientid_t      ld_clientid;
        struct nfs4_stateowner   *ld_sop;
        u64             ld_start;
        u64             ld_length;
@@ -198,13 +196,13 @@ struct nfsd4_open {
        u32             op_claim_type;      /* request */
        struct xdr_netobj op_fname;         /* request - everything but CLAIM_PREV */
        u32             op_delegate_type;   /* request - CLAIM_PREV only */
-       delegation_stateid_t    op_delegate_stateid; /* request - CLAIM_DELEGATE_CUR only */
+       stateid_t       op_delegate_stateid; /* request - response */
        u32             op_create;          /* request */
        u32             op_createmode;      /* request */
        u32             op_bmval[2];        /* request */
        union {                             /* request */
-               struct iattr    iattr;                      /* UNCHECKED4,GUARDED4 */
-               nfs4_verifier   verf;                                /* EXCLUSIVE4 */
+               struct iattr    iattr;                      /* UNCHECKED4,GUARDED4 */
+               nfs4_verifier   verf;                                /* EXCLUSIVE4 */
        } u;
        clientid_t      op_clientid;        /* request */
        struct xdr_netobj op_owner;           /* request */
@@ -216,7 +214,7 @@ struct nfsd4_open {
        u32             op_rflags;          /* response */
        int             op_truncate;        /* used during processing */
        struct nfs4_stateowner *op_stateowner; /* used during processing */
-
+       struct nfs4_acl *op_acl;
 };
 #define op_iattr       u.iattr
 #define op_verf                u.verf
@@ -243,6 +241,7 @@ struct nfsd4_read {
        u32             rd_length;          /* request */
        struct kvec     rd_iov[RPCSVC_MAXPAGES];
        int             rd_vlen;
+       struct file     *rd_filp;
        
        struct svc_rqst *rd_rqstp;          /* response */
        struct svc_fh * rd_fhp;             /* response */
@@ -291,6 +290,7 @@ struct nfsd4_setattr {
        stateid_t       sa_stateid;         /* request */
        u32             sa_bmval[2];        /* request */
        struct iattr    sa_iattr;           /* request */
+       struct nfs4_acl *sa_acl;
 };
 
 struct nfsd4_setclientid {
@@ -340,6 +340,7 @@ struct nfsd4_op {
                struct nfsd4_close              close;
                struct nfsd4_commit             commit;
                struct nfsd4_create             create;
+               struct nfsd4_delegreturn        delegreturn;
                struct nfsd4_getattr            getattr;
                struct svc_fh *                 getfh;
                struct nfsd4_link               link;
@@ -451,6 +452,8 @@ extern int
 nfsd4_release_lockowner(struct svc_rqst *rqstp,
                struct nfsd4_release_lockowner *rlockowner);
 extern void nfsd4_release_compoundargs(struct nfsd4_compoundargs *);
+extern int nfsd4_delegreturn(struct svc_rqst *rqstp,
+               struct svc_fh *current_fh, struct nfsd4_delegreturn *dr);
 #endif
 
 /*