From 013e06bf99ee1e0e374d140bef5ddc92d62b4418 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Fri, 5 Jan 2018 15:29:13 +0100 Subject: glusterd: fix up volume option flags In glusterd volfile generation code options should be ornamented with the VOLOPT_FLAG_* flags. However, some are ornamented with OPT_FLAG_* flags (which are to be used in xlator context). The impact is: the OPT_FLAG_* that occurs is OPT_FLAG_CLIENT_OPT, which has the same value as VOLOPT_FLAG_XLATOR_OPT, so what was meant is "option affects clients" and what was there means "option enables/disables xlators". Because of this semantic shift, op version might be incorrectly calculated for volumes and clients. (At this point it's a theoretical possibility. Actual occurrence might depend on connecting client & server versions; it's also possible that there exists a proof of concept scenario but it's irrealistic.) This commit eliminates the OPT_FLAG_* occurrences from glusterd code, and replaces them with the appropriate VOLOPT_FLAG_* flags. Change-Id: Ia4e6fbac738d5a8d889c0f5561c4dea6783250b1 Signed-off-by: Csaba Henk --- xlators/mgmt/glusterd/src/glusterd-volume-set.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 4f8e1e3be0e..da85cb5297f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -1814,13 +1814,13 @@ struct volopt_map_entry glusterd_volopt_map[] = { .voltype = "performance/write-behind", .option = "trickling-writes", .op_version = GD_OP_VERSION_3_13_1, - .flags = OPT_FLAG_CLIENT_OPT + .flags = VOLOPT_FLAG_CLIENT_OPT }, { .key = "performance.nfs.write-behind-trickling-writes", .voltype = "performance/write-behind", .option = "trickling-writes", .op_version = GD_OP_VERSION_3_13_1, - .flags = OPT_FLAG_CLIENT_OPT + .flags = VOLOPT_FLAG_CLIENT_OPT }, { .key = "performance.lazy-open", .voltype = "performance/open-behind", @@ -3616,7 +3616,7 @@ struct volopt_map_entry glusterd_volopt_map[] = { .voltype = "cluster/disperse", .type = NO_DOC, .op_version = GD_OP_VERSION_4_0_0, - .flags = OPT_FLAG_CLIENT_OPT + .flags = VOLOPT_FLAG_CLIENT_OPT }, /* Halo replication options */ -- cgit