diff options
author | Xavier Hernandez <xhernandez@datalab.es> | 2015-01-13 10:50:06 +0100 |
---|---|---|
committer | Raghavendra Bhat <raghavendra@redhat.com> | 2015-02-11 01:40:11 -0800 |
commit | 258f38c76f5ad816450c826becfddbe3cc91f874 (patch) | |
tree | 941790a8594decba46f965485cbcb1a2b0c52f50 /tests | |
parent | 22035d5e37db748cbdee2596d99006cea6b5282e (diff) |
ec: Don't use inodelk on getxattr when clearing locks
When command 'clear-locks' from cli is executed, a getxattr request
is received by ec. This request was handled as usual, first locking
the inode. Once this request was processed by the bricks, all locks
were removed, including the lock used by ec.
When ec tried to unlock the previously acquired lock (which was
already released), caused a crash in glusterfsd.
This fix executes the getxattr request without any lock acquired
for the clear-locks command.
This is a backport of http://review.gluster.org/9440/
Change-Id: I77e550d13c4673d2468a1e13fe6e2fed20e233c6
BUG: 1181977
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/9444
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs/bug-1179050.t | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/bugs/bug-1179050.t b/tests/bugs/bug-1179050.t new file mode 100644 index 00000000000..be261cbc144 --- /dev/null +++ b/tests/bugs/bug-1179050.t @@ -0,0 +1,23 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup + +TEST glusterd +TEST pidof glusterd +TEST $CLI volume create $V0 redundancy 1 $H0:$B0/${V0}{0..2} +EXPECT "Created" volinfo_field $V0 'Status' +TEST $CLI volume start $V0 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Started" volinfo_field $V0 'Status' +TEST glusterfs --entry-timeout=0 --attribute-timeout=0 --volfile-id=/$V0 --volfile-server=$H0 $M0 +EXPECT_WITHIN $CHILD_UP_TIMEOUT "3" ec_child_up_count $V0 0 + +TEST $CLI volume clear-locks $V0 / kind all inode + +sleep 1 + +EXPECT "3" ec_child_up_count $V0 0 + +cleanup |