From: Samuel Just Date: Fri, 22 Mar 2013 01:06:59 +0000 (-0700) Subject: ReplicatedPG: add debug flag to skip full check at reservation X-Git-Tag: v0.62~184^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F136%2Fhead;p=ceph.git ReplicatedPG: add debug flag to skip full check at reservation This will make it easier to test the check in do_scan. Signed-off-by: Samuel Just --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index f012091f870d..46e47ce153e3 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -419,6 +419,7 @@ OPTION(osd_debug_drop_pg_create_duration, OPT_INT, 1) OPTION(osd_debug_drop_op_probability, OPT_DOUBLE, 0) // probability of stalling/dropping a client op OPTION(osd_debug_op_order, OPT_BOOL, false) OPTION(osd_debug_verify_snaps_on_info, OPT_BOOL, false) +OPTION(osd_debug_skip_full_check_in_backfill_reservation, OPT_BOOL, false) OPTION(osd_op_history_size, OPT_U32, 20) // Max number of completed ops to track OPTION(osd_op_history_duration, OPT_U32, 600) // Oldest completed op to track OPTION(osd_target_transaction_size, OPT_INT, 30) // to adjust various transactions that batch smaller items diff --git a/src/osd/PG.cc b/src/osd/PG.cc index c7afee9b7473..d54faed88622 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -6076,7 +6076,8 @@ PG::RecoveryState::RepWaitBackfillReserved::RepWaitBackfillReserved(my_context c PG *pg = context< RecoveryMachine >().pg; double ratio, max_ratio; - if (pg->osd->too_full_for_backfill(&ratio, &max_ratio)) { + if (pg->osd->too_full_for_backfill(&ratio, &max_ratio) && + !g_conf->osd_debug_skip_full_check_in_backfill_reservation) { dout(10) << "backfill reservation rejected: full ratio is " << ratio << ", which is greater than max allowed ratio " << max_ratio << dendl;