]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: drop pg_op_must_wait check
authorSage Weil <sage@redhat.com>
Mon, 13 Feb 2017 16:51:51 +0000 (11:51 -0500)
committerSage Weil <sage@redhat.com>
Mon, 13 Feb 2017 16:51:51 +0000 (11:51 -0500)
This made us wait if the snapid != CEPH_NOSNAP and there were any missing
objects at all.  Objecter can't submit such ops, and we're dropping support
for listing at a specific snap anyway.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h

index 977a0dbca8d380adaa041940e4aa2552eb24a81c..006f5d5fd13c40ecf64db86b295abef639a45c13 100644 (file)
@@ -1022,21 +1022,6 @@ int PrimaryLogPG::do_command(
 
 // ==========================================================
 
-bool PrimaryLogPG::pg_op_must_wait(MOSDOp *op)
-{
-  if (pg_log.get_missing().get_items().empty())
-    return false;
-  for (vector<OSDOp>::iterator p = op->ops.begin(); p != op->ops.end(); ++p) {
-    if (p->op.op == CEPH_OSD_OP_PGLS || p->op.op == CEPH_OSD_OP_PGNLS ||
-       p->op.op == CEPH_OSD_OP_PGLS_FILTER || p->op.op == CEPH_OSD_OP_PGNLS_FILTER) {
-      if (op->get_snapid() != CEPH_NOSNAP) {
-       return true;
-      }
-    }
-  }
-  return false;
-}
-
 void PrimaryLogPG::do_pg_op(OpRequestRef op)
 {
   MOSDOp *m = static_cast<MOSDOp *>(op->get_req());
@@ -1825,10 +1810,6 @@ void PrimaryLogPG::do_op(OpRequestRef& op)
   }
 
   if (op->includes_pg_op()) {
-    if (pg_op_must_wait(m)) {
-      wait_for_all_missing(op);
-      return;
-    }
     return do_pg_op(op);
   }
 
index 69aa55d1d5f1b0fc40be2f3bb9b650d1fa89b3dd..b4db68fd148fc53ddb89b39201a94c2f77a0b9aa 100644 (file)
@@ -1354,7 +1354,6 @@ public:
   void do_op(OpRequestRef& op) override;
   void record_write_error(OpRequestRef op, const hobject_t &soid,
                          MOSDOpReply *orig_reply, int r);
-  bool pg_op_must_wait(MOSDOp *op);
   void do_pg_op(OpRequestRef op);
   void do_sub_op(OpRequestRef op) override;
   void do_sub_op_reply(OpRequestRef op) override;