]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix replies to dup/already-committed requests
authorSage Weil <sage@newdream.net>
Tue, 3 Aug 2010 18:07:58 +0000 (11:07 -0700)
committerSage Weil <sage@newdream.net>
Tue, 3 Aug 2010 18:07:58 +0000 (11:07 -0700)
We can safely reply if oldv is _older_ than what's on disk.  Otherwise the
request ends up on the list and never gets removed again.

Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/ReplicatedPG.cc

index fe416b31bccee9d27dc8ee8447894f5a0a599a9c..c7c299cfe991f3cf554d580fb15045b3e997c47a 100644 (file)
@@ -570,7 +570,7 @@ void ReplicatedPG::do_op(MOSDOp *op)
       dout(3) << "do_op dup " << ctx->reqid << " was " << oldv << dendl;
       delete ctx;
       put_object_context(obc);
-      if (oldv >= last_update_ondisk) {
+      if (oldv <= last_update_ondisk) {
        osd->reply_op_error(op, 0);
       } else {
        dout(10) << " waiting for " << oldv << " to commit" << dendl;