diff options
author | Csaba Henk <csaba@redhat.com> | 2018-01-05 15:29:13 +0100 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2018-01-07 10:53:36 +0000 |
commit | 013e06bf99ee1e0e374d140bef5ddc92d62b4418 (patch) | |
tree | 6d2d77f6471d56bdc3bad3f1c6211d6b62d328de /xlators/mgmt | |
parent | edf8224ab41c262098d18897337e9a809b480f12 (diff) |
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 <csaba@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-set.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 */ |