256ebe
From dab37dc78d21762ac3379ad505f8fc4ec996d0f7 Mon Sep 17 00:00:00 2001
256ebe
From: Atin Mukherjee <amukherj@redhat.com>
256ebe
Date: Tue, 9 Apr 2019 14:58:29 +0530
256ebe
Subject: [PATCH 094/124] glusterd: load ctime in the client graph only if it's
256ebe
 not turned off
256ebe
256ebe
Considering ctime is a client side feature, we can't blindly load ctime
256ebe
xlator into the client graph if it's explicitly turned off, that'd
256ebe
result into backward compatibility issue where an old client can't mount
256ebe
a volume configured on a server which is having ctime feature.
256ebe
256ebe
> Upstream patch : https://review.gluster.org/#/c/glusterfs/+/22536/
256ebe
>Fixes: bz#1697907
256ebe
>Change-Id: I6ae7b96d056073aa6746de9a449cf319786d45cc
256ebe
>Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
256ebe
256ebe
BUG: 1697820
256ebe
Change-Id: I6ae7b96d056073aa6746de9a449cf319786d45cc
256ebe
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
256ebe
Reviewed-on: https://code.engineering.redhat.com/gerrit/167815
256ebe
Tested-by: RHGS Build Bot <nigelb@redhat.com>
256ebe
Reviewed-by: Mohit Agrawal <moagrawa@redhat.com>
256ebe
Reviewed-by: Amar Tumballi Suryanarayan <amarts@redhat.com>
256ebe
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
256ebe
---
256ebe
 xlators/mgmt/glusterd/src/glusterd-volgen.c | 3 ++-
256ebe
 1 file changed, 2 insertions(+), 1 deletion(-)
256ebe
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
256ebe
index ed24858..012f38e 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
256ebe
@@ -4358,7 +4358,8 @@ client_graph_builder(volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
256ebe
         }
256ebe
     }
256ebe
 
256ebe
-    if (conf->op_version >= GD_OP_VERSION_5_0) {
256ebe
+    if (conf->op_version >= GD_OP_VERSION_5_0 &&
256ebe
+        !dict_get_str_boolean(set_dict, "features.ctime", _gf_false)) {
256ebe
         xl = volgen_graph_add(graph, "features/utime", volname);
256ebe
         if (!xl) {
256ebe
             ret = -1;
256ebe
-- 
256ebe
1.8.3.1
256ebe