]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: fix snap_trimmer log version bug
authorSamuel Just <samuel.just@dreamhost.com>
Fri, 21 Jan 2011 21:01:20 +0000 (13:01 -0800)
committerSamuel Just <samuel.just@dreamhost.com>
Fri, 21 Jan 2011 22:30:43 +0000 (14:30 -0800)
Previously, ctx->at_version would be the same as ctx->obs->oi.version
leading to the log entry having prior_version == version.
This bug was introduced in d1b85e06fb5ce1cfd5bbc74ba639811b92033909.

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

index 3959b6658f785569a63eb5fbd287b2efe9c5bfb7..4aa34ce56ce95c6bc2efa79c5e63f865a5955a41 100644 (file)
@@ -674,7 +674,7 @@ bool ReplicatedPG::snap_trimmer()
            t->collection_add(coll_t(info.pgid, newsnaps[newsnaps.size()-1]), coll_t(info.pgid), coid);
        }             
 
-       ctx->log.push_back(Log::Entry(Log::Entry::MODIFY, coid, ctx->at_version, ctx->obs->oi.version,
+       ctx->log.push_back(Log::Entry(Log::Entry::MODIFY, coid, coi.version, coi.prior_version,
                                      osd_reqid_t(), ctx->mtime));
        ctx->at_version.version++;
       }