Skip to content

Commit ec011fe

Browse files
chuckleverTrond Myklebust
authored andcommitted
NFS: Introduce a vector of migration recovery ops
The differences between minor version 0 and minor version 1 migration will be abstracted by the addition of a set of migration recovery ops. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 800c06a commit ec011fe

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

fs/nfs/nfs4_fs.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ struct nfs4_minor_version_ops {
5050
const struct nfs4_state_recovery_ops *reboot_recovery_ops;
5151
const struct nfs4_state_recovery_ops *nograce_recovery_ops;
5252
const struct nfs4_state_maintenance_ops *state_renewal_ops;
53+
const struct nfs4_mig_recovery_ops *mig_recovery_ops;
5354
};
5455

5556
#define NFS_SEQID_CONFIRMED 1
@@ -203,6 +204,9 @@ struct nfs4_state_maintenance_ops {
203204
int (*renew_lease)(struct nfs_client *, struct rpc_cred *);
204205
};
205206

207+
struct nfs4_mig_recovery_ops {
208+
};
209+
206210
extern const struct dentry_operations nfs4_dentry_operations;
207211

208212
/* dir.c */

fs/nfs/nfs4proc.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7881,6 +7881,14 @@ static const struct nfs4_state_maintenance_ops nfs41_state_renewal_ops = {
78817881
};
78827882
#endif
78837883

7884+
static const struct nfs4_mig_recovery_ops nfs40_mig_recovery_ops = {
7885+
};
7886+
7887+
#if defined(CONFIG_NFS_V4_1)
7888+
static const struct nfs4_mig_recovery_ops nfs41_mig_recovery_ops = {
7889+
};
7890+
#endif /* CONFIG_NFS_V4_1 */
7891+
78847892
static const struct nfs4_minor_version_ops nfs_v4_0_minor_ops = {
78857893
.minor_version = 0,
78867894
.init_caps = NFS_CAP_READDIRPLUS
@@ -7896,6 +7904,7 @@ static const struct nfs4_minor_version_ops nfs_v4_0_minor_ops = {
78967904
.reboot_recovery_ops = &nfs40_reboot_recovery_ops,
78977905
.nograce_recovery_ops = &nfs40_nograce_recovery_ops,
78987906
.state_renewal_ops = &nfs40_state_renewal_ops,
7907+
.mig_recovery_ops = &nfs40_mig_recovery_ops,
78997908
};
79007909

79017910
#if defined(CONFIG_NFS_V4_1)
@@ -7916,6 +7925,7 @@ static const struct nfs4_minor_version_ops nfs_v4_1_minor_ops = {
79167925
.reboot_recovery_ops = &nfs41_reboot_recovery_ops,
79177926
.nograce_recovery_ops = &nfs41_nograce_recovery_ops,
79187927
.state_renewal_ops = &nfs41_state_renewal_ops,
7928+
.mig_recovery_ops = &nfs41_mig_recovery_ops,
79197929
};
79207930
#endif
79217931

0 commit comments

Comments
 (0)