]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
NFS: Set EXCHGID4_FLAG_SUPP_MOVED_MIGR
authorChuck Lever <chuck.lever@oracle.com>
Thu, 17 Oct 2013 18:14:04 +0000 (14:14 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 28 Oct 2013 19:31:25 +0000 (15:31 -0400)
Broadly speaking, v4.1 migration is untested.  There are no servers
in the wild that support NFSv4.1 migration.  However, as server
implementations become available, we do want to enable testing by
developers, while leaving it disabled for environments for which
broken migration support would be an unpleasant surprise.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/Kconfig
fs/nfs/nfs4proc.c

index b5e80b0af315b065954fe42c2a832e85ff57b23f..38c1768b4142e6508a6805aaa1ff1067f8770381 100644 (file)
@@ -140,6 +140,17 @@ config NFS_V4_1_IMPLEMENTATION_ID_DOMAIN
          If the NFS client is unchanged from the upstream kernel, this
          option should be set to the default "kernel.org".
 
+config NFS_V4_1_MIGRATION
+       bool "NFSv4.1 client support for migration"
+       depends on NFS_V4_1
+       default n
+       help
+         This option makes the NFS client advertise to NFSv4.1 servers that
+          it can support NFSv4 migration.
+
+          The NFSv4.1 pieces of the Linux NFSv4 migration implementation are
+          still experimental.  If you are not an NFSv4 developer, say N here.
+
 config NFS_V4_SECURITY_LABEL
        bool
        depends on NFS_V4_2 && SECURITY
index 8aa8ff3fd5e769e30198b977534821f957e2562d..1463c71b086245c37fdbaa9b124c6a2ea1ab787f 100644 (file)
@@ -6596,8 +6596,14 @@ static int _nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred,
        struct nfs41_exchange_id_args args = {
                .verifier = &verifier,
                .client = clp,
+#ifdef CONFIG_NFS_V4_1_MIGRATION
                .flags = EXCHGID4_FLAG_SUPP_MOVED_REFER |
-                       EXCHGID4_FLAG_BIND_PRINC_STATEID,
+                        EXCHGID4_FLAG_BIND_PRINC_STATEID |
+                        EXCHGID4_FLAG_SUPP_MOVED_MIGR,
+#else
+               .flags = EXCHGID4_FLAG_SUPP_MOVED_REFER |
+                        EXCHGID4_FLAG_BIND_PRINC_STATEID,
+#endif
        };
        struct nfs41_exchange_id_res res = {
                0