diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-12-23 23:21:47 +0300 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-12-23 23:21:47 +0300 |
commit | 707fb4b324371f1b4bea5eb29e39d265c66086ae (patch) | |
tree | fdd11b731073e0eda3966390c263e31af9ef5a5d /fs/nfs/delegation.c | |
parent | 515d86117724abe39d7d57d7ccc7cc5c44480529 (diff) | |
download | linux-707fb4b324371f1b4bea5eb29e39d265c66086ae.tar.xz |
NFSv4: Clean up NFS4ERR_CB_PATH_DOWN error management...
Add a delegation cleanup phase to the state management loop, and do the
NFS4ERR_CB_PATH_DOWN recovery there.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r-- | fs/nfs/delegation.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index bc9d4f9a788d..ff2c1585d23f 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -258,7 +258,7 @@ static int __nfs_inode_return_delegation(struct inode *inode, struct nfs_delegat /* * Return all delegations that have been marked for return */ -static void nfs_client_return_marked_delegations(struct nfs_client *clp) +void nfs_client_return_marked_delegations(struct nfs_client *clp) { struct nfs_delegation *delegation; struct inode *inode; @@ -342,15 +342,16 @@ void nfs_super_return_all_delegations(struct super_block *sb) nfs_client_return_marked_delegations(clp); } -static void nfs_client_return_all_delegations(struct nfs_client *clp) +static void nfs_client_mark_return_all_delegations(struct nfs_client *clp) { struct nfs_delegation *delegation; rcu_read_lock(); - list_for_each_entry_rcu(delegation, &clp->cl_delegations, super_list) + list_for_each_entry_rcu(delegation, &clp->cl_delegations, super_list) { set_bit(NFS_DELEGATION_RETURN, &delegation->flags); + set_bit(NFS4CLNT_DELEGRETURN, &clp->cl_state); + } rcu_read_unlock(); - nfs_client_return_marked_delegations(clp); } static int nfs_do_expire_all_delegations(void *ptr) @@ -363,7 +364,8 @@ static int nfs_do_expire_all_delegations(void *ptr) goto out; if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) == 0) goto out; - nfs_client_return_all_delegations(clp); + nfs_client_mark_return_all_delegations(clp); + nfs_client_return_marked_delegations(clp); out: nfs_put_client(clp); module_put_and_exit(0); @@ -392,7 +394,7 @@ void nfs_handle_cb_pathdown(struct nfs_client *clp) { if (clp == NULL) return; - nfs_client_return_all_delegations(clp); + nfs_client_mark_return_all_delegations(clp); } struct recall_threadargs { |