]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PGLog::claim_log_and_clear_rollback_info: fix rollback_info_trimmed_to
authorSamuel Just <sam.just@inktank.com>
Mon, 15 Sep 2014 22:44:11 +0000 (15:44 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 18 Sep 2014 16:47:02 +0000 (09:47 -0700)
We have been setting it to the old head value.  This is usually
harmless since the new head will virtually always be ahead of the
old head for claim_log_and_clear_rollback_info, but can cause trouble
in some edge cases.

Fixes: #9481
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 0769310ccd4e0dceebd8ea601e8eb5c0928e0603)

src/osd/PGLog.h

index 20021896f385402b074349f52ebddb7743731dac..1744cc8f49cca67c6f8cc132ab1b819a5db1a2ec 100644 (file)
@@ -88,8 +88,8 @@ struct PGLog {
       assert(rollback_info_trimmed_to_riter == log.rbegin());
 
       log = o.log;
-      rollback_info_trimmed_to = head;
       head = o.head;
+      rollback_info_trimmed_to = head;
       tail = o.tail;
       index();
     }