]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG.cc: update coi version and prior_version to match log
authorSamuel Just <samuel.just@dreamhost.com>
Wed, 19 Jan 2011 22:02:27 +0000 (14:02 -0800)
committerSamuel Just <samuel.just@dreamhost.com>
Thu, 20 Jan 2011 01:44:55 +0000 (17:44 -0800)
Caused error where oi on clone would not get updated version when snaps
was updated.  oi.version would lag behind the missing item's need field
during recovery.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/osd/ReplicatedPG.cc

index eedf74aed34215a0a90eb844c36a6e3e91dfcc1b..59097656eb153c3e9bbf9c7ef249c50af59d4e86 100644 (file)
@@ -659,6 +659,8 @@ bool ReplicatedPG::snap_trimmer()
        // save adjusted snaps for this object
        dout(10) << coid << " snaps " << snaps << " -> " << newsnaps << dendl;
        coi.snaps.swap(newsnaps);
+       coi.prior_version = coi.version;
+       coi.version = ctx->at_version;
        bl.clear();
        ::encode(coi, bl);
        t->setattr(coll_t(info.pgid), coid, OI_ATTR, bl);