|
@@ -88,6 +88,7 @@ enum {
|
|
|
Opt_sharecache, Opt_nosharecache,
|
|
|
Opt_resvport, Opt_noresvport,
|
|
|
Opt_fscache, Opt_nofscache,
|
|
|
+ Opt_migration, Opt_nomigration,
|
|
|
|
|
|
/* Mount options that take integer arguments */
|
|
|
Opt_port,
|
|
@@ -147,6 +148,8 @@ static const match_table_t nfs_mount_option_tokens = {
|
|
|
{ Opt_noresvport, "noresvport" },
|
|
|
{ Opt_fscache, "fsc" },
|
|
|
{ Opt_nofscache, "nofsc" },
|
|
|
+ { Opt_migration, "migration" },
|
|
|
+ { Opt_nomigration, "nomigration" },
|
|
|
|
|
|
{ Opt_port, "port=%s" },
|
|
|
{ Opt_rsize, "rsize=%s" },
|
|
@@ -676,6 +679,9 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
|
|
|
if (nfss->options & NFS_OPTION_FSCACHE)
|
|
|
seq_printf(m, ",fsc");
|
|
|
|
|
|
+ if (nfss->options & NFS_OPTION_MIGRATION)
|
|
|
+ seq_printf(m, ",migration");
|
|
|
+
|
|
|
if (nfss->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG) {
|
|
|
if (nfss->flags & NFS_MOUNT_LOOKUP_CACHE_NONE)
|
|
|
seq_printf(m, ",lookupcache=none");
|
|
@@ -1243,6 +1249,12 @@ static int nfs_parse_mount_options(char *raw,
|
|
|
kfree(mnt->fscache_uniq);
|
|
|
mnt->fscache_uniq = NULL;
|
|
|
break;
|
|
|
+ case Opt_migration:
|
|
|
+ mnt->options |= NFS_OPTION_MIGRATION;
|
|
|
+ break;
|
|
|
+ case Opt_nomigration:
|
|
|
+ mnt->options &= NFS_OPTION_MIGRATION;
|
|
|
+ break;
|
|
|
|
|
|
/*
|
|
|
* options that take numeric values
|
|
@@ -1535,6 +1547,10 @@ static int nfs_parse_mount_options(char *raw,
|
|
|
if (mnt->minorversion && mnt->version != 4)
|
|
|
goto out_minorversion_mismatch;
|
|
|
|
|
|
+ if (mnt->options & NFS_OPTION_MIGRATION &&
|
|
|
+ mnt->version != 4 && mnt->minorversion != 0)
|
|
|
+ goto out_migration_misuse;
|
|
|
+
|
|
|
/*
|
|
|
* verify that any proto=/mountproto= options match the address
|
|
|
* familiies in the addr=/mountaddr= options.
|
|
@@ -1572,6 +1588,10 @@ out_minorversion_mismatch:
|
|
|
printk(KERN_INFO "NFS: mount option vers=%u does not support "
|
|
|
"minorversion=%u\n", mnt->version, mnt->minorversion);
|
|
|
return 0;
|
|
|
+out_migration_misuse:
|
|
|
+ printk(KERN_INFO
|
|
|
+ "NFS: 'migration' not supported for this NFS version\n");
|
|
|
+ return 0;
|
|
|
out_nomem:
|
|
|
printk(KERN_INFO "NFS: not enough memory to parse option\n");
|
|
|
return 0;
|