]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: fix stray creation/removal notification 14554/head
authorYan, Zheng <zyan@redhat.com>
Fri, 14 Apr 2017 12:22:39 +0000 (20:22 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 17 Apr 2017 10:48:22 +0000 (18:48 +0800)
commitdbe738298415da27fed12bfb5b9f6b33b2dece32
tree952d239770cf2785d4ad54fff29fa4def4b159ad
parentd51c02731179e6bc76818e221a8fd3f24f4bfd9a
mds: fix stray creation/removal notification

In MDCache::scan_stray_dir(), notify_stray_created() is called for
both null and non-null dentries. This is wrong, it should be called
only for non-null dentries.

Calling notify_stray_created() in MDCache::get_or_create_stray_dentry()
is racy too. MDS can create wrong stray dentry because target dentry
linkage can change before rmdir/rename lock the dentry lock.

Fixes: http://tracker.ceph.com/issues/19630
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/CDentry.cc
src/mds/CDentry.h
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/Server.cc
src/mds/StrayManager.cc
src/mds/StrayManager.h