nfs41: exchange_id operation
Implement the exchange_id operation conforming to http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-26 Unlike NFSv4.0, NFSv4.1 requires machine credentials. RPC_AUTH_GSS machine credentials will be passed into the kernel at mount time to be available for the exchange_id operation. RPC_AUTH_UNIX root mounts can use the UNIX root credential. Store the root credential in the nfs_client struct. Without a credential, NFSv4.1 state renewal fails. [nfs41: establish clientid via exchange id only if cred != NULL] Signed-off-by: Andy Adamson<andros@umich.edu> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfsd41: move nfstime4 from under CONFIG_NFS_V4_1] Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: do not wait a lease time in exchange id] Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: pass *session in seq_args and seq_res] Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> [nfs41: Ignoring impid in decode_exchange_id is missing a READ_BUF] Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: fix Xcode_exchange_id's xdr Xcoding pointer type] [nfs41: get rid of unused struct nfs41_exchange_id_res members] Signed-off-by: Benny Halevy <bhalevy@panasas.com>
This commit is contained in:
@@ -879,6 +879,46 @@ struct nfs4_fs_locations_res {
|
||||
|
||||
#endif /* CONFIG_NFS_V4 */
|
||||
|
||||
struct nfstime4 {
|
||||
u64 seconds;
|
||||
u32 nseconds;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_NFS_V4_1
|
||||
struct nfs_impl_id4 {
|
||||
u32 domain_len;
|
||||
char *domain;
|
||||
u32 name_len;
|
||||
char *name;
|
||||
struct nfstime4 date;
|
||||
};
|
||||
|
||||
#define NFS4_EXCHANGE_ID_LEN (48)
|
||||
struct nfs41_exchange_id_args {
|
||||
struct nfs_client *client;
|
||||
nfs4_verifier *verifier;
|
||||
unsigned int id_len;
|
||||
char id[NFS4_EXCHANGE_ID_LEN];
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
struct server_owner {
|
||||
uint64_t minor_id;
|
||||
uint32_t major_id_sz;
|
||||
char major_id[NFS4_OPAQUE_LIMIT];
|
||||
};
|
||||
|
||||
struct server_scope {
|
||||
uint32_t server_scope_sz;
|
||||
char server_scope[NFS4_OPAQUE_LIMIT];
|
||||
};
|
||||
|
||||
struct nfs41_exchange_id_res {
|
||||
struct nfs_client *client;
|
||||
u32 flags;
|
||||
};
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
|
||||
struct nfs_page;
|
||||
|
||||
#define NFS_PAGEVEC_SIZE (8U)
|
||||
|
Reference in New Issue
Block a user