Whamcloud - gitweb
LU-15907 mdt: fix the OBD_FAIL_MDS_REINT_OPEN2 race 06/47506/2
authorEtienne AUJAMES <etienne.aujames@cea.fr>
Wed, 1 Jun 2022 14:41:54 +0000 (16:41 +0200)
committerEtienne AUJAMES <etienne.aujames@cea.fr>
Wed, 1 Jun 2022 15:06:10 +0000 (17:06 +0200)
commita15b4e389aa6d2a30d9b79a20f0884e3725c70d7
treee2fe64d7e8566ee1fad8ce0eb6a060f03d088673
parent10a29ad7616aeaadabf6d96146f52ef348a3a6f1
LU-15907 mdt: fix the OBD_FAIL_MDS_REINT_OPEN2 race

This patch fixes the sanityn test_41i OBD_FAIL_MDS_REINT_OPEN2 race
scenario.

With the "LU-15546 mdt: mdt_reint_open lookup before locking" patch,
we have to force taking a LCK_PR for OBD_FAIL_MDS_REINT_OPEN2 to test
the full lock cycle:

- take PR parent lock
- lockup child (do not exist)
- take PW parent lock
- re-lookup
- create child

Otherwise cfs_race() timeouts because PW lock requests from the 2
threads conflict with each other.

Fixes: f14090e ("LU-15546 mdt: mdt_reint_open lookup before locking")
Test-Parameters: trivial testlist=sanityn
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: Ifb9a44dcad610281c9d7d2a90bb8704420379819
lustre/mdt/mdt_open.c