diff options
author | Susant Palai <spalai@redhat.com> | 2019-07-22 15:20:43 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-08-02 14:26:40 +0000 |
commit | d072dc09f5bc6431ba31244cf7e9eba1b6e85229 (patch) | |
tree | b7f0c4f10bf353d6c497ccafa18cc3600b5bf86c /xlators/features/locks/src/common.c | |
parent | 84f7794547522463841068063b22fd3a8d8fca2b (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>
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); |