e7a346
From a263e2a308221de328eb5e0dc4cb9c0aed98ec37 Mon Sep 17 00:00:00 2001
e7a346
From: N Balachandran <nbalacha@redhat.com>
e7a346
Date: Thu, 5 Apr 2018 21:41:44 +0530
e7a346
Subject: [PATCH 216/236] cluster/dht: Wind open to all subvols
e7a346
e7a346
dht_opendir should wind the open to all subvols
e7a346
whether or not local->subvols is set. This is
e7a346
because dht_readdirp winds the calls to all subvols.
e7a346
e7a346
upstream master: https://review.gluster.org/19827
e7a346
e7a346
> Change-Id: I67a96b06dad14a08967c3721301e88555aa01017
e7a346
> updates: bz#1564198
e7a346
> Signed-off-by: N Balachandran <nbalacha@redhat.com>
e7a346
e7a346
Change-Id: Ibdb099c333bc23d0cb769a7636c949ab886b87e2
e7a346
BUG: 1553677
e7a346
Signed-off-by: N Balachandran <nbalacha@redhat.com>
e7a346
Reviewed-on: https://code.engineering.redhat.com/gerrit/135514
e7a346
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e7a346
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
e7a346
---
e7a346
 xlators/cluster/dht/src/dht-common.c | 15 +++++----------
e7a346
 1 file changed, 5 insertions(+), 10 deletions(-)
e7a346
e7a346
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
e7a346
index 2fd145d..3b8ba6d 100644
e7a346
--- a/xlators/cluster/dht/src/dht-common.c
e7a346
+++ b/xlators/cluster/dht/src/dht-common.c
e7a346
@@ -6315,16 +6315,11 @@ dht_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
e7a346
                         "Failed to set dictionary value : key = %s",
e7a346
                         conf->link_xattr_name);
e7a346
 
e7a346
-        if ((conf->defrag && conf->defrag->cmd == GF_DEFRAG_CMD_START_TIER) ||
e7a346
-            (conf->defrag && conf->defrag->cmd ==
e7a346
-             GF_DEFRAG_CMD_START_DETACH_TIER) ||
e7a346
-            (!(conf->local_subvols_cnt) || !conf->defrag)) {
e7a346
-                call_count = local->call_cnt = conf->subvolume_cnt;
e7a346
-                subvolumes = conf->subvolumes;
e7a346
-        } else {
e7a346
-                call_count = local->call_cnt = conf->local_subvols_cnt;
e7a346
-                subvolumes = conf->local_subvols;
e7a346
-        }
e7a346
+        /* dht_readdirp will wind to all subvols so open has to be sent to
e7a346
+         * all subvols whether or not conf->local_subvols is set */
e7a346
+
e7a346
+        call_count = local->call_cnt = conf->subvolume_cnt;
e7a346
+        subvolumes = conf->subvolumes;
e7a346
 
e7a346
         /* In case of parallel-readdir, the readdir-ahead will be loaded
e7a346
          * below dht, in this case, if we want to enable or disable SKIP_DIRs
e7a346
-- 
e7a346
1.8.3.1
e7a346