From: Samuel Just Date: Thu, 21 Mar 2013 20:43:03 +0000 (-0700) Subject: ReplicatedPG: replica should post BackfillTooFull in do_scan if full X-Git-Tag: v0.62~184^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=29a288f9938d5128b303c181bfbd2d17bdfd4a09;p=ceph.git ReplicatedPG: replica should post BackfillTooFull in do_scan if full Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 50318fc5869..dd836ec89cb 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1186,6 +1186,19 @@ void ReplicatedPG::do_scan(OpRequestRef op) switch (m->op) { case MOSDPGScan::OP_SCAN_GET_DIGEST: { + double ratio, full_ratio; + if (osd->too_full_for_backfill(&ratio, &full_ratio)) { + dout(1) << __func__ << ": Canceling backfill, current usage is " + << ratio << ", which exceeds " << full_ratio << dendl; + queue_peering_event( + CephPeeringEvtRef( + new CephPeeringEvt( + get_osdmap()->get_epoch(), + get_osdmap()->get_epoch(), + BackfillTooFull()))); + return; + } + BackfillInterval bi; osr->flush(); scan_range(m->begin, g_conf->osd_backfill_scan_min, g_conf->osd_backfill_scan_max, &bi);