diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2019-08-20 13:27:24 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2019-09-12 06:36:47 +0000 |
commit | 6362999974cc4b55c4c42929b22a2f2f53321699 (patch) | |
tree | 8aa5377d797b1cd82c4d9a0c79853ac39d9e10a8 /libglusterfs/src/globals.c | |
parent | 880e20ca967d0001e0b6d2780bece8b635a090eb (diff) |
cluster/ec: Mark release only when it is acquired
Problem:
Mount-1 Mount-2
1)Tries to acquire lock on 'dir1' 1)Tries to acquire lock on 'dir1'
2)Lock is granted on brick-0 2)Lock gets EAGAIN on brick-0 and
leads to blocking lock on brick-0
3)Gets a lock-contention 3) Doesn't matter what happens on mount-2
notification, marks lock->release from here on.
to true.
4)New fop comes on 'dir1' which will
be put in frozen list as lock->release
is set to true.
5) Lock acquisition from step-2 fails because
3 bricks went down in 4+2 setup.
Fop on mount-1 which is put in frozen list will hang because no codepath will
move it from frozen list to any other list and the lock will not be retried.
Fix:
Don't set lock->release to true if lock is not acquired at the time of
lock-contention-notification
fixes: bz#1743573
Change-Id: Ie6630db8735ccf372cc54b873a3a3aed7a6082b7
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'libglusterfs/src/globals.c')
0 files changed, 0 insertions, 0 deletions