|
|
233933 |
From 310e09d46cdb293e4af2df0085b8ac45d5c17933 Mon Sep 17 00:00:00 2001
|
|
|
233933 |
From: Atin Mukherjee <amukherj@redhat.com>
|
|
|
233933 |
Date: Tue, 16 Apr 2019 17:20:34 +0530
|
|
|
233933 |
Subject: [PATCH 111/124] glusterd: fix loading ctime in client graph logic
|
|
|
233933 |
|
|
|
233933 |
Commit efbf8ab wasn't handling all the scenarios of toggling ctime
|
|
|
233933 |
option correctly and more over a ! had completely tossed up the logic.
|
|
|
233933 |
|
|
|
233933 |
> upstream patch : https://review.gluster.org/#/c/glusterfs/+/22578/
|
|
|
233933 |
|
|
|
233933 |
>Fixes: bz#1697907
|
|
|
233933 |
>Change-Id: If12e2f69045e59878992ee2cd0518cc0eabcce0d
|
|
|
233933 |
>Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
233933 |
|
|
|
233933 |
BUG: 1697820
|
|
|
233933 |
Change-Id: If12e2f69045e59878992ee2cd0518cc0eabcce0d
|
|
|
233933 |
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
233933 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/168048
|
|
|
233933 |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
233933 |
---
|
|
|
233933 |
xlators/mgmt/glusterd/src/glusterd-volgen.c | 12 +++++++++---
|
|
|
233933 |
1 file changed, 9 insertions(+), 3 deletions(-)
|
|
|
233933 |
|
|
|
233933 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
|
233933 |
index 324ec2f..da877aa 100644
|
|
|
233933 |
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
|
233933 |
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
|
233933 |
@@ -4358,9 +4358,15 @@ client_graph_builder(volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
|
|
|
233933 |
goto out;
|
|
|
233933 |
}
|
|
|
233933 |
}
|
|
|
233933 |
-
|
|
|
233933 |
- if (conf->op_version >= GD_OP_VERSION_5_0 &&
|
|
|
233933 |
- !dict_get_str_boolean(set_dict, "features.ctime", _gf_false)) {
|
|
|
233933 |
+ /* a. ret will be -1 if features.ctime is not set in the volinfo->dict which
|
|
|
233933 |
+ * means ctime should be loaded into the graph.
|
|
|
233933 |
+ * b. ret will be 1 if features.ctime is explicitly turned on through
|
|
|
233933 |
+ * volume set and in that case ctime should be loaded into the graph.
|
|
|
233933 |
+ * c. ret will be 0 if features.ctime is explicitly turned off and in that
|
|
|
233933 |
+ * case ctime shouldn't be loaded into the graph.
|
|
|
233933 |
+ */
|
|
|
233933 |
+ ret = dict_get_str_boolean(set_dict, "features.ctime", -1);
|
|
|
233933 |
+ if (conf->op_version >= GD_OP_VERSION_5_0 && ret) {
|
|
|
233933 |
xl = volgen_graph_add(graph, "features/utime", volname);
|
|
|
233933 |
if (!xl) {
|
|
|
233933 |
ret = -1;
|
|
|
233933 |
--
|
|
|
233933 |
1.8.3.1
|
|
|
233933 |
|