]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
make ping verify we are connected
authorSage Weil <sage@redhat.com>
Sat, 8 Nov 2014 03:38:24 +0000 (19:38 -0800)
committerSage Weil <sage@redhat.com>
Thu, 4 Dec 2014 18:32:38 +0000 (10:32 -0800)
src/osd/ReplicatedPG.cc

index 7aaf07080fccd29c2efab06c5869970f64431c71..228b526ad98b90f2a7e071f3dd8061947ca3ead3 100644 (file)
@@ -4325,6 +4325,12 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
            result = -ENOTCONN;
            break;
          }
+         map<pair<uint64_t,entity_name_t>,WatchRef>::iterator p =
+           obc->watchers.find(make_pair(cookie, entity));
+         if (p == obc->watchers.end()) {
+           result = -ETIMEDOUT;
+           break;
+         }
          dout(10) << " found existing watch " << w << " by " << entity << dendl;
          result = 0;
         } else if (op.watch.op == CEPH_OSD_WATCH_OP_UNWATCH) {