diff options
author | Andy Adamson <andros@netapp.com> | 2009-04-01 09:22:47 -0400 |
---|---|---|
committer | Benny Halevy <bhalevy@panasas.com> | 2009-06-17 15:25:11 -0400 |
commit | 591d71cbde186cc498c0d9718dc17f2fadf7c643 (patch) | |
tree | 0cda78617611b2c3d3fb058af3cc0513ead80433 /fs/nfs/nfs4proc.c | |
parent | a7b721037f898b29a8083da59b1dccd3da385b07 (diff) |
nfs41: establish sessions-based clientid
nfsv4.1 clientid is established via EXCHANGE_ID rather than
SETCLIENTID{,_CONFIRM}
This is implemented using a new establish_clid method in
nfs4_state_recovery_ops.
nfs41: establish clientid via exchange id only if cred != NULL
>From 2.6.26 reclaimer() uses machine cred for setting up the client id
therefore it is never expected to be NULL.
Signed-off-by: Rahul Iyer <iyer@netapp.com>
[removed dprintk]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfs41: lease renewal]
[revamped patch for new nfs4_state_manager design]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index f862a66e5fb9..dd46339095ce 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -4780,19 +4780,41 @@ static int nfs41_proc_async_sequence(struct nfs_client *clp, | |||
4780 | 4780 | ||
4781 | #endif /* CONFIG_NFS_V4_1 */ | 4781 | #endif /* CONFIG_NFS_V4_1 */ |
4782 | 4782 | ||
4783 | struct nfs4_state_recovery_ops nfs4_reboot_recovery_ops = { | 4783 | struct nfs4_state_recovery_ops nfs40_reboot_recovery_ops = { |
4784 | .owner_flag_bit = NFS_OWNER_RECLAIM_REBOOT, | 4784 | .owner_flag_bit = NFS_OWNER_RECLAIM_REBOOT, |
4785 | .state_flag_bit = NFS_STATE_RECLAIM_REBOOT, | 4785 | .state_flag_bit = NFS_STATE_RECLAIM_REBOOT, |
4786 | .recover_open = nfs4_open_reclaim, | 4786 | .recover_open = nfs4_open_reclaim, |
4787 | .recover_lock = nfs4_lock_reclaim, | 4787 | .recover_lock = nfs4_lock_reclaim, |
4788 | .establish_clid = nfs4_init_clientid, | ||
4788 | }; | 4789 | }; |
4789 | 4790 | ||
4790 | struct nfs4_state_recovery_ops nfs4_nograce_recovery_ops = { | 4791 | #if defined(CONFIG_NFS_V4_1) |
4792 | struct nfs4_state_recovery_ops nfs41_reboot_recovery_ops = { | ||
4793 | .owner_flag_bit = NFS_OWNER_RECLAIM_REBOOT, | ||
4794 | .state_flag_bit = NFS_STATE_RECLAIM_REBOOT, | ||
4795 | .recover_open = nfs4_open_reclaim, | ||
4796 | .recover_lock = nfs4_lock_reclaim, | ||
4797 | .establish_clid = nfs4_proc_exchange_id, | ||
4798 | }; | ||
4799 | #endif /* CONFIG_NFS_V4_1 */ | ||
4800 | |||
4801 | struct nfs4_state_recovery_ops nfs40_nograce_recovery_ops = { | ||
4802 | .owner_flag_bit = NFS_OWNER_RECLAIM_NOGRACE, | ||
4803 | .state_flag_bit = NFS_STATE_RECLAIM_NOGRACE, | ||
4804 | .recover_open = nfs4_open_expired, | ||
4805 | .recover_lock = nfs4_lock_expired, | ||
4806 | .establish_clid = nfs4_init_clientid, | ||
4807 | }; | ||
4808 | |||
4809 | #if defined(CONFIG_NFS_V4_1) | ||
4810 | struct nfs4_state_recovery_ops nfs41_nograce_recovery_ops = { | ||
4791 | .owner_flag_bit = NFS_OWNER_RECLAIM_NOGRACE, | 4811 | .owner_flag_bit = NFS_OWNER_RECLAIM_NOGRACE, |
4792 | .state_flag_bit = NFS_STATE_RECLAIM_NOGRACE, | 4812 | .state_flag_bit = NFS_STATE_RECLAIM_NOGRACE, |
4793 | .recover_open = nfs4_open_expired, | 4813 | .recover_open = nfs4_open_expired, |
4794 | .recover_lock = nfs4_lock_expired, | 4814 | .recover_lock = nfs4_lock_expired, |
4815 | .establish_clid = nfs4_proc_exchange_id, | ||
4795 | }; | 4816 | }; |
4817 | #endif /* CONFIG_NFS_V4_1 */ | ||
4796 | 4818 | ||
4797 | struct nfs4_state_maintenance_ops nfs40_state_renewal_ops = { | 4819 | struct nfs4_state_maintenance_ops nfs40_state_renewal_ops = { |
4798 | .sched_state_renewal = nfs4_proc_async_renew, | 4820 | .sched_state_renewal = nfs4_proc_async_renew, |
@@ -4812,6 +4834,20 @@ struct nfs4_state_maintenance_ops nfs41_state_renewal_ops = { | |||
4812 | * Per minor version reboot and network partition recovery ops | 4834 | * Per minor version reboot and network partition recovery ops |
4813 | */ | 4835 | */ |
4814 | 4836 | ||
4837 | struct nfs4_state_recovery_ops *nfs4_reboot_recovery_ops[] = { | ||
4838 | &nfs40_reboot_recovery_ops, | ||
4839 | #if defined(CONFIG_NFS_V4_1) | ||
4840 | &nfs41_reboot_recovery_ops, | ||
4841 | #endif | ||
4842 | }; | ||
4843 | |||
4844 | struct nfs4_state_recovery_ops *nfs4_nograce_recovery_ops[] = { | ||
4845 | &nfs40_nograce_recovery_ops, | ||
4846 | #if defined(CONFIG_NFS_V4_1) | ||
4847 | &nfs41_nograce_recovery_ops, | ||
4848 | #endif | ||
4849 | }; | ||
4850 | |||
4815 | struct nfs4_state_maintenance_ops *nfs4_state_renewal_ops[] = { | 4851 | struct nfs4_state_maintenance_ops *nfs4_state_renewal_ops[] = { |
4816 | &nfs40_state_renewal_ops, | 4852 | &nfs40_state_renewal_ops, |
4817 | #if defined(CONFIG_NFS_V4_1) | 4853 | #if defined(CONFIG_NFS_V4_1) |