From 000310fd10d1b6727807e98056140c2dc0f314fc Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 21 Mar 2013 18:06:59 -0700 Subject: [PATCH] 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 --- src/common/config_opts.h | 1 + src/osd/PG.cc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index f012091f870dc..46e47ce153e3f 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 c7afee9b74739..d54faed88622d 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; -- 2.39.5