]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
FileJournal: adjust write_pos prior to unlocking write_lock
authorSamuel Just <sam.just@inktank.com>
Tue, 14 May 2013 23:35:48 +0000 (16:35 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 16 May 2013 18:14:37 +0000 (11:14 -0700)
commiteaf3abf3f9a7b13b81736aa558c9084a8f07fdbe
treec0ee6a2f2fafdbd64508819a3315a8acabb4745b
parent64871e093159ad06d84fb2a84c7808a81800dfc4
FileJournal: adjust write_pos prior to unlocking write_lock

In committed_thru, we use write_pos to reset the header.start value in cases
where seq is past the end of our journalq.  It is therefore important that the
journalq be updated atomically with write_pos (that is, under the write_lock).

The call to align_bl() is moved into do_write in order to ensure that write_pos
is adjusted correctly prior to write_bl().

Also, we adjust pos at the end of write_bl() such that pos \in [get_top(),
header.max_size) after write_bl().

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