From bb1fb1e1614d2c1646e2d512779d723b66b2a766 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 5 Aug 2013 22:20:19 +0530 Subject: protocol/server: Relax lktable finodelk del_locker check Problem: Client xlator issues finodelk using anon-fd when the fd is not opened on the file. This can also happen between attempts to re-open the file after client disconnects. It can so happen that lock is taken using anon-fd and the file is now re-opened and unlock would come with re-opened fd. This will lead to leak in lk-table entry, which also holds reference to fd which leads to fd-leak on the brick. Fix: Don't check for fds to be equal for tracking finodelks. Since inodelk is identified by (gfid, connection, lk-owner) fd equality is not needed. Change-Id: I62152d84caef0b863c973845e618076d388e6848 BUG: 993247 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/5499 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- tests/bugs/bug-821056.t | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/bugs/bug-821056.t b/tests/bugs/bug-821056.t index 0c937cee5..5e81541ac 100644 --- a/tests/bugs/bug-821056.t +++ b/tests/bugs/bug-821056.t @@ -8,6 +8,7 @@ TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1} +TEST $CLI volume set $V0 eager-lock off TEST $CLI volume set $V0 cluster.self-heal-daemon off TEST $CLI volume set $V0 performance.quick-read off TEST $CLI volume set $V0 performance.open-behind off @@ -46,4 +47,6 @@ EXPECT_WITHIN 20 "Y" gf_check_file_opened_in_brick $V0 $H0 $B0/${V0}0 $B0/${V0}0 #close the fd exec 5>&- +#Check that anon-fd based file is not leaking. +EXPECT_WITHIN 20 "N" gf_check_file_opened_in_brick $V0 $H0 $B0/${V0}0 "$realpath" cleanup; -- cgit