]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/: don't block writes on degraded objects
authorSamuel Just <sjust@redhat.com>
Wed, 19 Nov 2014 01:59:36 +0000 (17:59 -0800)
committerSamuel Just <sjust@redhat.com>
Fri, 30 Jan 2015 19:28:02 +0000 (11:28 -0800)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ECBackend.cc
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index b44bc2adecf3f55c8e457145a14565aacfb743bf..501e4e3cefe50e8721aa54951d013d2f0340aa8c 100644 (file)
@@ -805,7 +805,6 @@ void ECBackend::handle_sub_write(
 {
   if (msg)
     msg->mark_started();
-  assert(!get_parent()->get_log().get_missing().is_missing(op.soid));
   if (!get_parent()->pgb_is_primary())
     get_parent()->update_stats(op.stats);
   ObjectStore::Transaction *localt = new ObjectStore::Transaction;
index 1278298ea238cd24cbc65355d75a70ac72a42ec8..576e646615f8c7feae2069b889aa84aead99c56f 100644 (file)
@@ -1428,12 +1428,6 @@ void ReplicatedPG::do_op(OpRequestRef& op)
     return;
   }
 
-  // degraded object?
-  if (write_ordered && is_degraded_object(head)) {
-    wait_for_degraded_object(head, op);
-    return;
-  }
-
   // missing snapdir?
   hobject_t snapdir(m->get_oid(), m->get_object_locator().key,
                    CEPH_SNAPDIR, m->get_pg().ps(), info.pgid.pool(),
@@ -8429,9 +8423,6 @@ void ReplicatedBackend::sub_op_modify_impl(OpRequestRef op)
   // sanity checks
   assert(m->map_epoch >= get_info().history.same_interval_since);
   
-  // we better not be missing this.
-  assert(!parent->get_log().get_missing().is_missing(soid));
-
   int ackerosd = m->get_source().num();
   
   op->mark_started();
index e5a83af044340d6852ed2c7b794a9f65bfa82e0d..49ef4b818263fdcfb2f0fe47cf35b1788ca5d2c9 100644 (file)
@@ -416,11 +416,13 @@ public:
     if (peer == get_primary())
       return true;
     assert(peer_info.count(peer));
-    bool should_send = hoid.pool != (int64_t)info.pgid.pool() ||
+    bool should_send_backfill = hoid.pool != (int64_t)info.pgid.pool() ||
       hoid <= MAX(last_backfill_started, peer_info[peer].last_backfill);
-    if (!should_send)
+    if (!should_send_backfill)
       assert(is_backfill_targets(peer));
-    return should_send;
+
+    assert(peer_missing.count(peer));
+    return should_send_backfill && !peer_missing[peer].is_missing(hoid);
   }
   
   void update_peer_last_complete_ondisk(