From: Nathan Cutler Date: Wed, 12 Jul 2017 06:40:13 +0000 (+0200) Subject: Revert "osdc/Journaler: avoid executing on_safe contexts prematurely" X-Git-Tag: v10.2.9~1^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3f89971e9edb88e313e1c190f7d05a83b52e6d91;p=ceph.git Revert "osdc/Journaler: avoid executing on_safe contexts prematurely" This reverts commit 06cf9f365033f7913051bdf4060f0bc6fc0444d7. Signed-off-by: Nathan Cutler --- diff --git a/src/osdc/Journaler.cc b/src/osdc/Journaler.cc index b2f179ad74e9..88208dcec008 100644 --- a/src/osdc/Journaler.cc +++ b/src/osdc/Journaler.cc @@ -594,11 +594,8 @@ uint64_t Journaler::append_entry(bufferlist& bl) ldout(cct, 10) << " flushing completed object(s) (su " << su << " wro " << write_obj << " flo " << flush_obj << ")" << dendl; _do_flush(write_buf.length() - write_off); - - // if _do_flush() skips flushing some data, it does not update next_safe_pos. - if (write_buf.length() > 0 && - write_buf.length() <= wrote) { // the unflushed data are within this entry - // set next_safe_pos to end of previous entry + if (write_off) { + // current entry isn't being flushed, set next_safe_pos to the end of previous entry next_safe_pos = write_pos - wrote; } }