Whamcloud - gitweb
EX-8190 quota: fix race in qmt_seed_glbe
authorHongchao Zhang <hongchao@whamcloud.com>
Thu, 13 Jul 2023 02:56:58 +0000 (10:56 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 14 Sep 2023 07:25:31 +0000 (07:25 +0000)
commit904d853783e7232c6519df5078babebc12455638
treecdb56f709cbbbbbd14400bd2651a2ebe89ff3e9b
parente07115c36ab5173294016fc7f21c5875e959daa3
EX-8190 quota: fix race in qmt_seed_glbe

There is a deadlock in qmt_pool_recalc:
The rw_semaphore "qmt_pool_info.qpi_sarr.osts.op_rw_sem" has been
acquired in qmt_pool_recalc (read mode), but it is acquired once
more in qmt_seed_glbe_all (read mode), and it will be stuck if
there is pending write mode lock acquisition.

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Ib7db17700a90feaa9bfe8300bab509567ac1ed21
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52346
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/quota/qmt_entry.c
lustre/quota/qmt_handler.c
lustre/quota/qmt_internal.h
lustre/quota/qmt_pool.c