diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2015-01-22 13:53:47 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-02-02 12:07:08 -0800 |
commit | c78998c39f0857ea7aacba360632c148afc54a55 (patch) | |
tree | 5eef9aa2f0ef7793312d0ccf4c1595d87064e2a3 /tests | |
parent | e9276230e13e2c67b9944c604e8d4485ee3e3a63 (diff) |
cluster/afr: When parent and entry read subvols are different, set entry->inode to NULL
That way a lookup would be forced on the entry, and its attributes will
always be selected from its read subvol.
Change-Id: Iaba25e2cd5f83e983fc8b1a1f48da3850808e6b8
BUG: 1179169
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/9477
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic/afr/resolve.t | 8 | ||||
-rw-r--r-- | tests/volume.rc | 7 |
2 files changed, 11 insertions, 4 deletions
diff --git a/tests/basic/afr/resolve.t b/tests/basic/afr/resolve.t index ce7ec841418..2d400563c2e 100644 --- a/tests/basic/afr/resolve.t +++ b/tests/basic/afr/resolve.t @@ -24,7 +24,7 @@ TEST kill_brick $V0 $H0 $B0/${V0}0 rm -rf $B0/${V0}0/.glusterfs $B0/${V0}0/a TEST $CLI volume start $V0 force -EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status $V0 0 +EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_meta $M0 $V0-replicate-0 0 #Test that the lookup returns ENOENT instead of ESTALE #If lookup returns ESTALE this command will fail with ESTALE TEST touch f @@ -44,8 +44,8 @@ echo jkl > $M1/b #gfid-mismatch happened. This should result in EIO TEST setfattr -x trusted.afr.$V0-client-0 $B0/${V0}1 TEST $CLI volume start $V0 force -EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status $V0 0 -# The kernel knows nothing about the tricks done to the volume, and the file +EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_meta $M0 $V0-replicate-0 0 +# The kernel knows nothing about the tricks done to the volume, and the file # may still be in page cache. Wait for timeout. -EXPECT_WITHIN 10 "" cat $M0/b +EXPECT_WITHIN 10 "^$" cat $M0/b cleanup diff --git a/tests/volume.rc b/tests/volume.rc index 36f1350b9bc..7e8810852f5 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -103,6 +103,13 @@ function _afr_child_up_status { echo "$up" } +function afr_child_up_status_meta { + local mnt=$1 + local repl=$2 + local child=$3 + grep "child_up\[$child\]" $mnt/.meta/graphs/active/$repl/private | awk '{print $3}' +} + function afr_child_up_status { local vol=$1 #brick_id is (brick-num in volume info - 1) |