diff options
| author | Susant Palai <spalai@redhat.com> | 2019-07-22 15:20:43 +0530 |
|---|---|---|
| committer | Rinku Kothiya <rkothiya@redhat.com> | 2019-08-21 06:13:23 +0000 |
| commit | d89199919265480e43172dd3883c20ee24d46bde (patch) | |
| tree | fcd3e559621af4d8ceaf1c5913eb48848bd1c002 /xlators/features/locks/src/common.c | |
| parent | b4fe161741ba911cc2559a6b09cc20bc424880d7 (diff) | |
locks/fencing: Address hang while lock preemption
The fop_wind_count can go negative when fencing is enabled
on unwind path of the IO leading to hang.
Also changed code so that fop_wind_count needs to be maintained only
till fencing is enabled on the file.
> updates: bz#1717824
> Change-Id: Icd04b42bc16cd3d50eaa581ee57233910194f480
> signed-off-by: Susant Palai <spalai@redhat.com>
(backport of https://review.gluster.org/#/c/glusterfs/+/23088/)
fixes: bz#1740077
Change-Id: Icd04b42bc16cd3d50eaa581ee57233910194f480
Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/features/locks/src/common.c')
| -rw-r--r-- | xlators/features/locks/src/common.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c index 429ce32803e..4b895256c29 100644 --- a/xlators/features/locks/src/common.c +++ b/xlators/features/locks/src/common.c @@ -1189,13 +1189,6 @@ pl_lock_preempt(pl_inode_t *pl_inode, posix_lock_t *reqlock) list_del_init(&rw->list); list_add(&rw->list, &unwind_rw_list); } - - while (pl_inode->fop_wind_count != 0) { - gf_msg(THIS->name, GF_LOG_TRACE, 0, 0, - "waiting for fops to be drained"); - pthread_cond_wait(&pl_inode->check_fop_wind_count, - &pl_inode->mutex); - } } pthread_mutex_unlock(&pl_inode->mutex); |
