From: Samuel Just Date: Wed, 19 Nov 2014 01:59:36 +0000 (-0800) Subject: osd/: don't block writes on degraded objects X-Git-Tag: v0.93~128^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f9abffbb2461b5988c0435ee2f7771eca028f29f;p=ceph.git osd/: don't block writes on degraded objects Signed-off-by: Samuel Just --- diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index b44bc2adecf3..501e4e3cefe5 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -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; diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 1278298ea238..576e646615f8 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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(); diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index e5a83af04434..49ef4b818263 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -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(