diff options
author | Samuel Just <sam.just@inktank.com> | 2013-03-21 18:06:59 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-03-21 18:51:40 -0700 |
commit | 000310fd10d1b6727807e98056140c2dc0f314fc (patch) | |
tree | 2bf677801370bee2db4ce01e2287731117bb0b20 | |
parent | 29a288f9938d5128b303c181bfbd2d17bdfd4a09 (diff) | |
download | ceph-000310fd10d1b6727807e98056140c2dc0f314fc.tar.gz |
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 <sam.just@inktank.com>
-rw-r--r-- | src/common/config_opts.h | 1 | ||||
-rw-r--r-- | src/osd/PG.cc | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/common/config_opts.h b/src/common/config_opts.h index f012091f870..46e47ce153e 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 c7afee9b747..d54faed8862 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; |