NFSv41: Convert the various reboot recovery ops etc to minor version ops
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
97dc135947
commit
c48f4f3541
4 changed files with 18 additions and 38 deletions
|
@ -1122,8 +1122,7 @@ static void nfs4_state_end_reclaim_reboot(struct nfs_client *clp)
|
|||
if (!test_and_clear_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state))
|
||||
return;
|
||||
|
||||
nfs4_reclaim_complete(clp,
|
||||
nfs4_reboot_recovery_ops[clp->cl_minorversion]);
|
||||
nfs4_reclaim_complete(clp, clp->cl_mvops->reboot_recovery_ops);
|
||||
|
||||
for (pos = rb_first(&clp->cl_state_owners); pos != NULL; pos = rb_next(pos)) {
|
||||
sp = rb_entry(pos, struct nfs4_state_owner, so_client_node);
|
||||
|
@ -1213,8 +1212,8 @@ restart:
|
|||
static int nfs4_check_lease(struct nfs_client *clp)
|
||||
{
|
||||
struct rpc_cred *cred;
|
||||
struct nfs4_state_maintenance_ops *ops =
|
||||
nfs4_state_renewal_ops[clp->cl_minorversion];
|
||||
const struct nfs4_state_maintenance_ops *ops =
|
||||
clp->cl_mvops->state_renewal_ops;
|
||||
int status = -NFS4ERR_EXPIRED;
|
||||
|
||||
/* Is the client already known to have an expired lease? */
|
||||
|
@ -1237,8 +1236,8 @@ out:
|
|||
static int nfs4_reclaim_lease(struct nfs_client *clp)
|
||||
{
|
||||
struct rpc_cred *cred;
|
||||
struct nfs4_state_recovery_ops *ops =
|
||||
nfs4_reboot_recovery_ops[clp->cl_minorversion];
|
||||
const struct nfs4_state_recovery_ops *ops =
|
||||
clp->cl_mvops->reboot_recovery_ops;
|
||||
int status = -ENOENT;
|
||||
|
||||
cred = ops->get_clid_cred(clp);
|
||||
|
@ -1446,7 +1445,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
|
|||
/* First recover reboot state... */
|
||||
if (test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) {
|
||||
status = nfs4_do_reclaim(clp,
|
||||
nfs4_reboot_recovery_ops[clp->cl_minorversion]);
|
||||
clp->cl_mvops->reboot_recovery_ops);
|
||||
if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) ||
|
||||
test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state))
|
||||
continue;
|
||||
|
@ -1460,7 +1459,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
|
|||
/* Now recover expired state... */
|
||||
if (test_and_clear_bit(NFS4CLNT_RECLAIM_NOGRACE, &clp->cl_state)) {
|
||||
status = nfs4_do_reclaim(clp,
|
||||
nfs4_nograce_recovery_ops[clp->cl_minorversion]);
|
||||
clp->cl_mvops->nograce_recovery_ops);
|
||||
if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) ||
|
||||
test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state) ||
|
||||
test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue