From: Sage Weil Date: Sat, 31 Aug 2013 00:15:56 +0000 (-0700) Subject: osd/PG: only raise PG's last_user_version if entry is > X-Git-Tag: v0.69~21^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7d72e559b197326da51c644a33c38a43021f686d;p=ceph.git osd/PG: only raise PG's last_user_version if entry is > We may have pg entries that do not increase the user_version at all (i.e., they may be 0). Do not update the last_user_version in that case as we need it to remain an upper bound. Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index ef64fe379198..2b81856b202a 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2306,7 +2306,11 @@ void PG::add_log_entry(pg_log_entry_t& e, bufferlist& log_bl) // raise last_update. assert(e.version > info.last_update); info.last_update = e.version; - info.last_user_version = e.user_version; + + // raise user_version, if it increased (it may have not get bumped + // by all logged updates) + if (e.user_version > info.last_user_version) + info.last_user_version = e.user_version; // log mutation pg_log.add(e);