From fd8921b9eb03af69815bb2d7cff07b63048c2d5a Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Tue, 3 May 2016 14:43:20 +0530 Subject: dht:remember locked subvol and send unlock to the same During locking we send lock request to cached subvol, and normally we unlock to the cached subvol But with parallel fresh lookup on a directory, there is a race window where the cached subvol can change and the unlock can go into a different subvol from which we took lock. This will result in a stale lock held on one of the subvol. So we will store the details of subvol which we took the lock and will unlock from the same subvol back port of> >Change-Id: I47df99491671b10624eb37d1d17e40bacf0b15eb >BUG: 1311002 >Signed-off-by: Mohammed Rafi KC >Reviewed-on: http://review.gluster.org/13492 >Reviewed-by: N Balachandran >Smoke: Gluster Build System >NetBSD-regression: NetBSD Build System >Reviewed-by: Raghavendra G >CentOS-regression: Gluster Build System Change-Id: Ia847e7115d2296ae9811b14a956f3b6bf39bd86d BUG: 1333645 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/14236 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G --- xlators/cluster/dht/src/dht-common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/dht-common.c') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 87b3eee4d58..0cad65dee26 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -8397,7 +8397,10 @@ dht_entrylk_cbk (call_frame_t *frame, void *cookie, return 0; } - +/* TODO + * Sending entrylk to cached subvol can result in stale lock + * as described in the bug 1311002. + */ int dht_entrylk (call_frame_t *frame, xlator_t *this, const char *volume, loc_t *loc, const char *basename, -- cgit