]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: write journal header by force when journal write close
authorXinze Chi <xmdxcxz@gmail.com>
Tue, 3 Mar 2015 11:24:50 +0000 (11:24 +0000)
committerDavid Zafman <dzafman@redhat.com>
Sat, 20 Feb 2016 00:56:00 +0000 (16:56 -0800)
commit4fb688d15c40a9b9d5a54700b3c7695a97ffd03b
tree5a10f16da4d1891dedc626568de2e336b29cb2df
parenta1fc101084c5aefeb64da344158783a186a28a93
osd: write journal header by force when journal write close

osd update the journal header when ceph call FileStore::sync_entry(
ApplyManager::commit_finish -> FileJournal::committed_thru).
But, it doesnot write the journal head until the next transaction
(calling do_write or do_aio_write).

So write jouranl header when journal write close, so that
committed_up_to in journal header is new enough. ceph may
not replay some transaction which has been writen to filestore.

Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
(cherry picked from commit 8f80ae3fbaba7b0e64b6e4df6c2dddd10ac50e5a)
src/os/FileJournal.cc
src/os/FileJournal.h