summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2017-02-17 14:05:25 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-02-19 09:18:08 -0500
commitc76e6397f544a4f08c8762ad0455d7f52e95f94f (patch)
treef8f53b560c51f199b14a623aba9d6faba3b856db
parent62936feedb7f085259763594d11af34060a42fc9 (diff)
glusterd, readdir-ahead: Fix backward incompatibility
Backport of https://review.gluster.org/#/c/16657/ Issue: Any opion is spcified in two places: In the options[] of xlator itself and glusterd-volume-set.c. The default value of this option can be specified in both the places. If its specified only in xlator then the volfile generated will not have the option and default value, it will be assigned during graph initialization. With patch [1] the option rda-request-size was changed from INT to SIZET type, and default was changed from 131072 to 128KB, but was specified only in the readdir-ahead.c. Thus with this patch alone the volfile entry for readdir-ahead looks like: volume patchy-readdir-ahead type performance/readdir-ahead subvolumes patchy-read-ahead end-volume With patch [2], the default of option rda-request-size was specified in glusterd-volume-set.c as well(as it was necessary fr parallel readdir). With this patch the readdir entry in the volfile will look like: volume patchy-readdir-ahead type performance/readdir-ahead option rda-cache-limit 10MB option rda-request-size 128KB option parallel-readdir off subvolumes patchy-read-ahead end-volume Now consider the server has both these patches and client doesn't. Server will generate a volfile with entry: The old clients which thought the option rda-request-size is of type INT will now recieve the value 128KB which it willn't understand, and hence fail the mount. The issue is seen only with the combination of [1] and [2]. Solution: Instead of specifying 128KB as default in glusterd we specify 131072 so that the old clients will interpret as INT and new ones as 128KB Credits: Raghavendra G > Reviewed-on: https://review.gluster.org/16657 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Change-Id: I0c269a5890957fd8a38e9a05bdec088645a6688a BUG: 1423412 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: https://review.gluster.org/16658 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c2
-rw-r--r--xlators/performance/readdir-ahead/src/readdir-ahead.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 6ab4f7cc550..aca7135a2b2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -3098,7 +3098,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
{ .key = "performance.rda-request-size",
.voltype = "performance/readdir-ahead",
.option = "rda-request-size",
- .value = "128KB",
+ .value = "131072",
.flags = OPT_FLAG_CLIENT_OPT,
.type = DOC,
.op_version = GD_OP_VERSION_3_9_1,
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c
index c6b167725a5..9b0870e2b37 100644
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.c
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c
@@ -726,7 +726,7 @@ struct volume_options options[] = {
.type = GF_OPTION_TYPE_SIZET,
.min = 4096,
.max = 131072,
- .default_value = "128KB",
+ .default_value = "131072",
.description = "size of buffer in readdirp calls initiated by "
"readdir-ahead ",
},