diff options
author | Sage Weil <sage@inktank.com> | 2013-08-31 02:15:56 +0200 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-09-01 17:42:56 +0200 |
commit | 7d72e559b197326da51c644a33c38a43021f686d (patch) | |
tree | 7126b15de70a1e8405e99971d621a00cb5071ef7 | |
parent | osd: debug user_versions a bit (diff) | |
download | ceph-7d72e559b197326da51c644a33c38a43021f686d.tar.xz ceph-7d72e559b197326da51c644a33c38a43021f686d.zip |
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.cc | 6 |
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); |