]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: fix 'force dirfrags' during journal replay
authorYan, Zheng <zheng.z.yan@intel.com>
Sat, 18 Jan 2014 13:34:47 +0000 (21:34 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 17 Feb 2014 01:37:51 +0000 (09:37 +0800)
commit4d5ceba531722907eb0f20c2b4768934a3b18f0e
treedf4c11cf01e8ee3337f8c81666e2f4b1de00dd5f
parentf3666ededcf52ef4a124aca768bd993cace4fdf6
mds: fix 'force dirfrags' during journal replay

For rename operation, null dentry is first replayed, it detaches
the inode from the FS hierarchy. Then primary dentry is replayed,
it updates the inode and re-attaches the inode to the FS hierarchy.
We may call CInode::force_dirfrag() when updating the inode. But
CInode::force_dirfrag() doesn't work well when inode is detached
from the FS hierarchy because adjusting fragments may also adjust
subtree map. The fix is don't detach the inode when replaying the
null dentry.

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