]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
CDir: Don't write out the header on a partial commit.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 3 Mar 2011 02:52:51 +0000 (18:52 -0800)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 3 Mar 2011 02:52:51 +0000 (18:52 -0800)
commit1ad48f12d8e252ea8c561460aafcbc6b627c8b6e
treeef90d5b48f14274931749992ccf3d2046f91f9d1
parenta7126649655ef7f6b1e067d68b54d555172f9341
CDir: Don't write out the header on a partial commit.

If we write out the header as part of a partial commit, and then
fail to complete a subsequent commit (network error, we crash, etc)
then the on-disk version of the directory is not correctly versioned.
The fact that some dentries are of a newer version than others
is okay because we will fix it up during journal replay, but if
the header says the directory is fully committed to the end of
the journal that won't happen!
So, take advantage of how messages between two daemons are strictly
ordered, and how messages for a given PG are strictly ordered, and
simply include the partial commit that contains the new header last.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/mds/CDir.cc