]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: refragment dirs when inode dirfragtree updates from journal
authorSage Weil <sage.weil@dreamhost.com>
Wed, 23 Feb 2011 21:01:08 +0000 (13:01 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Wed, 23 Feb 2011 21:01:08 +0000 (13:01 -0800)
commitf13e6a4bd797c61cafe3d346d3652bafaacc9b49
tree8a88ea05ea2e3b62e969e26cabb90207d9a55cfe
parentf6a926109a6eae71566766ae4ed1ada8fe20c204
mds: refragment dirs when inode dirfragtree updates from journal

Force dir fragmentation specified by dirfragtree when replayed from
the journal.

Example:
 mds0 is auth for /foo, mds1 is auth for /foo/bar.
 mds1 fragments /foo/bar.  journals etc.
 mds0 gets fragment notify and the in-memory inode's dirfragtree changes.
 mds0 journals the /foo/bar inode for some random reason.
 mds0 imports /foo/bar.

On replay, mds0 refragments upon first mention of the new fragtree in the
journal, so that the dirfragtree <-> dir frags always match.  Confusion is
avoided when we, say, import /foo/bar.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/include/frag.h
src/mds/CInode.cc
src/mds/CInode.h
src/mds/events/EMetaBlob.h
src/mds/journal.cc