summaryrefslogtreecommitdiffstats
path: root/tests/basic/ec
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-04-08 21:42:49 +0530
committerVijay Bellur <vbellur@redhat.com>2015-04-11 09:11:15 +0000
commit4797cb1c9dbf3910952f9d28d8272ff83cd25e7b (patch)
tree8efcdc1b2057166fcd53101824d64a05f095aead /tests/basic/ec
parentaf569aaf6ee69ed77be8afc82b4c496041a7bd1b (diff)
cluster/ec: Fix readdir de-itransform
Problem: gf_deitransform returns the glbal client-id in the complete graph. So except for the first disperse subvolume under dht, all the other disperse subvolumes will return a client-id greater than ec->nodes, so readdir will always error out in those subvolumes. Fix: Get the client subvolume whose client-id matches the client-id returned by gf_deitransform of offset. Change-Id: I26aa17504352d48d7ff14b390b62f49d7ab2d699 BUG: 1209113 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/10165 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Diffstat (limited to 'tests/basic/ec')
-rw-r--r--tests/basic/ec/ec-readdir.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/basic/ec/ec-readdir.t b/tests/basic/ec/ec-readdir.t
new file mode 100644
index 00000000000..d57bb2869c7
--- /dev/null
+++ b/tests/basic/ec/ec-readdir.t
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+
+# This test checks that readdir works fine on distributed disperse volume
+
+cleanup
+TEST glusterd
+TEST pidof glusterd
+TEST $CLI volume create $V0 disperse 3 redundancy 1 $H0:$B0/${V0}{0..5}
+TEST $CLI volume start $V0
+
+TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0;
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "3" ec_child_up_count $V0 0
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "3" ec_child_up_count $V0 1
+
+TEST touch $M0/{1..100}
+EXPECT "100" echo $(ls $M0 | wc -l)
+cleanup