From 4797cb1c9dbf3910952f9d28d8272ff83cd25e7b Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 8 Apr 2015 21:42:49 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/10165 Tested-by: Gluster Build System Reviewed-by: Xavier Hernandez --- tests/basic/ec/ec-readdir.t | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/basic/ec/ec-readdir.t (limited to 'tests/basic/ec/ec-readdir.t') 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 -- cgit