From: Samuel Just Date: Fri, 14 Jun 2013 17:51:03 +0000 (-0700) Subject: PGLog: check for dirty_to != eversion_t() and dirty_from != eversion_t::max() X-Git-Tag: v0.66~50^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f164a325e5a2572b42bdae18eec5652f0a9a10a1;p=ceph.git PGLog: check for dirty_to != eversion_t() and dirty_from != eversion_t::max() Signed-off-by: Samuel Just --- diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index 6a29a1d39550..d62991e06d67 100644 --- a/src/osd/PGLog.cc +++ b/src/osd/PGLog.cc @@ -572,11 +572,13 @@ void PGLog::_write_log( //dout(10) << "write_log, clearing up to " << dirty_to << dendl; if (touch_log) t.touch(coll_t(), log_oid); - t.omap_rmkeyrange( - coll_t(), log_oid, - eversion_t().get_key_name(), dirty_to.get_key_name()); - clear_up_to(log_keys_debug, dirty_to.get_key_name()); - if (dirty_to != eversion_t::max()) { + if (dirty_to != eversion_t()) { + t.omap_rmkeyrange( + coll_t(), log_oid, + eversion_t().get_key_name(), dirty_to.get_key_name()); + clear_up_to(log_keys_debug, dirty_to.get_key_name()); + } + if (dirty_to != eversion_t::max() && dirty_from != eversion_t::max()) { // dout(10) << "write_log, clearing from " << dirty_from << dendl; t.omap_rmkeyrange( coll_t(), log_oid,