Whamcloud - gitweb
LU-11121 mdt: take discard lock at cleanup stage 30/29930/21
authorMikhal Pershin <mike.pershin@intel.com>
Fri, 3 Nov 2017 09:38:04 +0000 (12:38 +0300)
committerOleg Drokin <green@whamcloud.com>
Sat, 18 Aug 2018 02:23:16 +0000 (02:23 +0000)
commit2506fa2a42b7ae542fae9346a9cc8a6ae271f5de
tree74ec9ebe6314323784423822e5bdeedd452b0e08
parent5874da0b670b7d48c9ddae38f2f9275db50dcbc5
LU-11121 mdt: take discard lock at cleanup stage

Call mdt_dom_check_and_discard() after mdt_object_unlock() to
avoid possible deadlock if some third lock is conflicting with
both like in the scenario below:
 thread1: mdt_object_lock() with some bits
 thread2: take conflicting lock and wait
 thread1: mdt_dom_check_and_discard() with bits conflicting
          with thread2 causes deadlock.

Patch enables dom layout in racer to test it on regular basis
Another minor update uses 'trap' in related tests.

Test-Parameters: mdssizegb=20 mdtcount=1 mdscount=1 testlist=sanity-dom,dom-performance,racer,racer,racer
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I63bedabb4a82cfa2f01e126d35dc8c2a89d64f56
Reviewed-on: https://review.whamcloud.com/29930
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_reint.c
lustre/tests/racer.sh
lustre/tests/sanityn.sh