diff options
| author | Trond Myklebust <trond.myklebust@fys.uio.no> | 2004-08-23 11:53:27 -0400 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@fys.uio.no> | 2004-08-23 11:53:27 -0400 |
| commit | 6d132c2fa923b97f8a1fab667c517c83b7c67c2a (patch) | |
| tree | cccb90b972378855b8765edc062164f26b161684 /include/linux | |
| parent | 477d40b4f634495287c5b717c9c7b99e212681de (diff) | |
NFSv4: Basic code for managing delegation state.
Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfs4.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 10 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 9 |
3 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 2b53e25f25f7..a77f81131bde 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h @@ -380,6 +380,7 @@ enum { NFSPROC4_CLNT_READLINK, NFSPROC4_CLNT_READDIR, NFSPROC4_CLNT_SERVER_CAPS, + NFSPROC4_CLNT_DELEGRETURN, }; #endif diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 0b9fb290b1b2..9954f66c0dac 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -28,6 +28,7 @@ #include <linux/nfs3.h> #include <linux/nfs4.h> #include <linux/nfs_xdr.h> +#include <linux/rwsem.h> #include <linux/workqueue.h> /* @@ -98,6 +99,11 @@ struct nfs_open_context { }; /* + * NFSv4 delegation + */ +struct nfs_delegation; + +/* * nfs fs inode data in memory */ struct nfs_inode { @@ -178,6 +184,8 @@ struct nfs_inode { #ifdef CONFIG_NFS_V4 /* NFSv4 state */ struct list_head open_states; + struct nfs_delegation *delegation; + struct rw_semaphore rwsem; #endif /* CONFIG_NFS_V4*/ struct inode vfs_inode; @@ -545,6 +553,7 @@ struct nfs4_client { */ struct rw_semaphore cl_sem; + struct list_head cl_delegations; struct list_head cl_state_owners; struct list_head cl_unused; int cl_nunused; @@ -592,6 +601,7 @@ struct nfs4_state_owner { struct rpc_cred *so_cred; /* Associated cred */ struct list_head so_states; + struct list_head so_delegations; }; /* diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 15f1c41b4f7a..5a1e67ffc728 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -122,6 +122,10 @@ struct nfs_openres { __u32 rflags; struct nfs_fattr * f_attr; const struct nfs_server *server; + int delegation_type; + nfs4_stateid delegation; + __u32 do_recall; + __u64 maxsize; }; /* @@ -224,6 +228,11 @@ struct nfs_lockres { const struct nfs_server * server; }; +struct nfs4_delegreturnargs { + const struct nfs_fh *fhandle; + const nfs4_stateid *stateid; +}; + /* * Arguments to the read call. */ |
