Whamcloud - gitweb
LU-12125 mds: allow parallel directory rename 30/41230/3
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 14 Jan 2021 23:43:34 +0000 (16:43 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 Apr 2021 03:15:10 +0000 (03:15 +0000)
commit90979ab390a72a084f6a77cf7fdc29a4329adb41
tree89e2a8286dbe62ddf7871817103d1a918e9256e1
parentcb037f305c64cd5121fa308afc1e6b7d3df3f61a
LU-12125 mds: allow parallel directory rename

Allow rename of subdirectories in the same parent directory to be
done in parallel, by only taking the DLM lock on the parent FID,
without locking the global LUSTRE_BFL_FID (Big Filesystem Lock).

There will still be proper serialization from the parent directory
FID lock for other rename operations affecting that directory or the
subdirectories themselves.  Since the subdirectories are known to be
within the same parent, there is no concern of "finding the parent"
to determine locking order.

The same compatibility rules apply as with parallel file renames.

We no longer need the target file type in this case, since the
source and target file type are verfied to be the same under lock.
We may again need a file type check for regular file renames across
different parent directories/shards, so it may still be useful.

Test-Parameters: testlist=racer env=DURATION=3600
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I9db8acb515f5274fa09f5a5f3d18504d4d3ebbe5
Reviewed-on: https://review.whamcloud.com/41230
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdt/mdt_reint.c