summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-08-30 17:15:56 -0700
committerSage Weil <sage@inktank.com>2013-09-01 08:42:56 -0700
commit7d72e559b197326da51c644a33c38a43021f686d (patch)
tree7126b15de70a1e8405e99971d621a00cb5071ef7
parent1610768d4a5373e57a0bde62e1a3365c2f5b0073 (diff)
downloadceph-7d72e559b197326da51c644a33c38a43021f686d.tar.gz
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 <sage@inktank.com>
-rw-r--r--src/osd/PG.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index ef64fe37919..2b81856b202 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);