summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Goulet <mgoulet@fb.com>2017-08-24 11:34:42 -0700
committerJeff Darcy <jeff@pl.atyp.us>2017-09-14 20:22:51 +0000
commit4d80fcf5ec2098aa4f5aef07dec80ec9eb5ad602 (patch)
treedf9608c59cb80c190631dd0a1a978b524cdcd1a6
parentc071992e8d6fee2e5df4d8de19dc0ce1d84a10b8 (diff)
nfs: Correctly reconfigure NFS options
Summary: A mistake was made in D2519423 where `ret` wasn't being set to `0` at the end of `nfs3_init_subvolume_options` since code was inserted between the final `ret = 0` and the return, causing the function to return phony positive ret values. This causes the code to interpret the reconfigure function as a failure, meaning that changes can't be persisted. This only affects the `reconfigure` path and not the `init` path, since the `reconfigure` path fails when `ret != 0` and the init path only fails when `ret == -1`... Test Plan: See that volume options are actually being set when the `nfs` xlator is alive, instead of simply on init. Reviewers: jdarcy, kvigor, dph, sshreyas Reviewed By: sshreyas Subscribers: #posix_storage Differential Revision: https://phabricator.intern.facebook.com/D5699888 Change-Id: I89006ce3970f22a4206e58ca5630c21df536031c Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/18293 Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r--xlators/nfs/server/src/nfs3.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index 2426028ed2d..bd512200d4b 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -5684,12 +5684,6 @@ no_dvm:
if (exp->trusted_sync)
exp->trusted_write = 1;
- gf_msg_trace (GF_NFS3, 0, "%s: %s, %s, %s", exp->subvol->name,
- (exp->access == GF_NFS3_VOLACCESS_RO)?"read-only":"read-write",
- (exp->trusted_sync == 0)?"no trusted_sync":"trusted_sync",
- (exp->trusted_write == 0)?"no trusted_write":"trusted_write");
- ret = 0;
-
ret = snprintf (searchkey, 1024, "nfs.%s.exports-auth-enable", name);
if (ret < 0) {
gf_log (GF_NFS, GF_LOG_ERROR, "snprintf failed");
@@ -5718,6 +5712,12 @@ no_dvm:
}
}
+ gf_log (GF_NFS3, GF_LOG_TRACE, "%s: %s, %s, %s", exp->subvol->name,
+ (exp->access == GF_NFS3_VOLACCESS_RO)?"read-only":"read-write",
+ (exp->trusted_sync == 0)?"no trusted_sync":"trusted_sync",
+ (exp->trusted_write == 0)?"no trusted_write":"trusted_write");
+ ret = 0;
+
err:
return ret;
}