Whamcloud - gitweb
LU-15529 mdt: optimize dir migration locking
Optimize dir migration locking and fix some deadlocks:
* don't lock all stripes of parent, but source and target parent
stripes only.
* use mdt_rename_source_lock() to lock source, because directory
stripes are not changed in migration.
* refactor migrate links locking code.
* pass spobj and tpobj to mdo_migrate() interface to avoid parsing
parent directory layout in MDD layer again.
* never lock the same FID twice, which may lead to deadlock:
. if link parent is local, don't hold local LOOKUP lock, but revoke
only, because later we need to lock other ibits of sobj.
. if sobj is plain directory, unlock sobj before locking tobj,
because sobj will become a stripe of tobj during migration.
* enable striped directory migration in racer test.
Also update sanityn 80b to migrate directory and access it for one
minute and verify filesystem is not broken, though both migration and
directory access may fail in this period.
Test-Parameters: env=SLOW=y mdscount=2 mdtcount=4 testlist=racer,racer,racer
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ie9859df244529c986c2f3f032a49e3f9c89a2747
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/40891
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 files changed: