]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "osd/: don't block writes on degraded objects"
authorSamuel Just <sjust@redhat.com>
Mon, 23 Mar 2015 18:50:10 +0000 (11:50 -0700)
committerSamuel Just <sjust@redhat.com>
Mon, 23 Mar 2015 18:50:10 +0000 (11:50 -0700)
This reverts commit f9abffbb2461b5988c0435ee2f7771eca028f29f.

src/osd/ECBackend.cc
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index 951b249aaeb56084a070232118b375e119a2d0f1..6e1362ec44c48d04f8d4317e74e25bc0998ff839 100644 (file)
@@ -805,6 +805,7 @@ 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 a3cf228f8ed3fc9242f1c8b569304c62c52bb8ab..ebe118be27e329345d782d1030923d1d4ec99870 100644 (file)
@@ -1440,6 +1440,12 @@ 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(),
@@ -8487,6 +8493,9 @@ 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 8f7dfe5ea73baf9be8b26b00908292b236419d88..9785c276f1954ecc04adc8193105331c5c386c92 100644 (file)
@@ -415,13 +415,11 @@ public:
     if (peer == get_primary())
       return true;
     assert(peer_info.count(peer));
-    bool should_send_backfill = hoid.pool != (int64_t)info.pgid.pool() ||
+    bool should_send = hoid.pool != (int64_t)info.pgid.pool() ||
       hoid <= MAX(last_backfill_started, peer_info[peer].last_backfill);
-    if (!should_send_backfill)
+    if (!should_send)
       assert(is_backfill_targets(peer));
-
-    assert(peer_missing.count(peer));
-    return should_send_backfill && !peer_missing[peer].is_missing(hoid);
+    return should_send;
   }
   
   void update_peer_last_complete_ondisk(