summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2018-04-05 21:41:44 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2018-04-18 13:23:51 +0000
commitcd858f9c1789edf5e5fa02ddd906de1d89938980 (patch)
tree09ac3d8da5c8e109f0e2dd57943c950545a9fac1
parented3924b81491a79a08503661f55ab90d70b0d578 (diff)
cluster/dht: Wind open to all subvols
dht_opendir should wind the open to all subvols whether or not local->subvols is set. This is because dht_readdirp winds the calls to all subvols. Change-Id: I67a96b06dad14a08967c3721301e88555aa01017 updates: bz#1566820 Signed-off-by: N Balachandran <nbalacha@redhat.com> (cherry picked from commit c4251edec654b4e0127577e004923d9729bc323d)
-rw-r--r--xlators/cluster/dht/src/dht-common.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 999a43ed9dc..41382131e51 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -5067,16 +5067,11 @@ dht_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
"Failed to set dictionary value : key = %s",
conf->link_xattr_name);
- if ((conf->defrag && conf->defrag->cmd == GF_DEFRAG_CMD_START_TIER) ||
- (conf->defrag && conf->defrag->cmd ==
- GF_DEFRAG_CMD_START_DETACH_TIER) ||
- (!(conf->local_subvols_cnt) || !conf->defrag)) {
- call_count = local->call_cnt = conf->subvolume_cnt;
- subvolumes = conf->subvolumes;
- } else {
- call_count = local->call_cnt = conf->local_subvols_cnt;
- subvolumes = conf->local_subvols;
- }
+ /* dht_readdirp will wind to all subvols so open has to be sent to
+ * all subvols whether or not conf->local_subvols is set */
+
+ call_count = local->call_cnt = conf->subvolume_cnt;
+ subvolumes = conf->subvolumes;
for (i = 0; i < call_count; i++) {
if (conf->readdir_optimize == _gf_true) {