]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
FileJournal: introduce start_seq header entry
authorSamuel Just <sam.just@inktank.com>
Wed, 3 Apr 2013 22:44:39 +0000 (15:44 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 4 Apr 2013 19:48:44 +0000 (12:48 -0700)
commit6ef9d87a02872fc7312c1c8f48abf9b48457f6e4
tree15f757d381287ed349f56bbd305c0fb7184e6dd4
parentf12a5ed54690d5d3bc024a3f9e67c7ee7c7985ef
FileJournal: introduce start_seq header entry

FileStore::header_t::start_seq now encodes the op seq which may be
written at FileStore::header_t::start.  This way, FileStore::open()
can pass a valid sequence number to read_entry for validation.
Otherwise, read_entry has no way of knowing whether a failure of a
read at header.start indicates that the journal was empty, or that
the entry is corrupt.  With start_seq, read_entry can assume
corruption if start_seq <= committed_up_to.

Fixes: #4527
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/os/FileJournal.cc
src/os/FileJournal.h