]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: allow acquiring wrlock and remote wrlock at the same time
authorYan, Zheng <zheng.z.yan@intel.com>
Fri, 10 Jan 2014 02:58:41 +0000 (10:58 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 17 Feb 2014 01:37:50 +0000 (09:37 +0800)
commitd0df8413fb8d567ecc846f7653d410c097b053cb
tree54cd53f408c650afc6c25de72065470f4d54dc29
parent75675bc879f60308e66defac1101aba752600de5
mds: allow acquiring wrlock and remote wrlock at the same time

Rename may move file from one dirfrag to another dirfrag of the same
directory inode. If two dirfrags belong to different auth MDS, both
MDS should hold wrlocks on filelock/nestlock of the directory inode.
If a lock is in both wrlocks list and remote_wrlocks list, current
Locker::acquire_locks() only acquires the local wrlock. The auth MDS
of the source dirfrag doesn't have the wrlock, so slave request of
the operation may modify the dirfrag after fragstat/neststat of the
dirfrag have already been gathered. It corrupts the dirstat/neststat
accounting.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/Locker.cc
src/mds/MDCache.cc