From 7a387f97315f55e1c741d6ad749fb5621f067de0 Mon Sep 17 00:00:00 2001 From: Xavi Hernandez Date: Thu, 9 May 2019 11:07:18 +0200 Subject: cluster/ec: honor contention notifications for partially acquired locks EC was ignoring lock contention notifications received while a lock was being acquired. When a lock is partially acquired (some bricks have granted the lock but some others not yet) we can receive notifications from acquired bricks, which should be honored, since we may not receive more notifications after that. Since EC was ignoring them, once the lock was acquired, it was not released until the eager-lock timeout, causing unnecessary delays on other clients. This fix takes into consideration the notifications received before having completed the full lock acquisition. After that, the lock will be releaed as soon as possible. Backport of: > BUG: bz#1708156 > Change-Id: I2a306dbdb29fb557dcab7788a258bd75d826cc12 > Signed-off-by: Xavi Hernandez Fixes: bz#1714172 Change-Id: I2a306dbdb29fb557dcab7788a258bd75d826cc12 Signed-off-by: Xavi Hernandez --- xlators/cluster/ec/src/ec-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster') diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c index b1ba5e96d3e..e85aa8bf43f 100644 --- a/xlators/cluster/ec/src/ec-common.c +++ b/xlators/cluster/ec/src/ec-common.c @@ -2497,7 +2497,7 @@ ec_lock_release(ec_t *ec, inode_t *inode) goto done; } lock = ctx->inode_lock; - if ((lock == NULL) || !lock->acquired || lock->release) { + if ((lock == NULL) || lock->release) { goto done; } -- cgit