OPTION(osd_verify_sparse_read_holes, OPT_BOOL, false) // read fiemap-reported holes and verify they are zeros
OPTION(osd_debug_drop_ping_probability, OPT_DOUBLE, 0)
OPTION(osd_debug_drop_ping_duration, OPT_INT, 0)
+OPTION(osd_debug_drop_pg_create_probability, OPT_DOUBLE, 0)
+OPTION(osd_debug_drop_pg_create_duration, OPT_INT, 1)
OPTION(filestore, OPT_BOOL, false)
OPTION(filestore_debug_omap_check, OPT_BOOL, 0) // Expensive debugging check on sync
// Use omap for xattrs for attrs over
peering_wq(this, g_conf->osd_op_thread_timeout, &op_tp, 200),
map_lock("OSD::map_lock"),
peer_map_epoch_lock("OSD::peer_map_epoch_lock"),
+ debug_drop_pg_create_probability(g_conf->osd_debug_drop_pg_create_probability),
+ debug_drop_pg_create_duration(g_conf->osd_debug_drop_pg_create_duration),
+ debug_drop_pg_create_left(-1),
outstanding_pg_stats(false),
up_thru_wanted(0), up_thru_pending(0),
pg_stat_queue_lock("OSD::pg_stat_queue_lock"),
dout(10) << "handle_pg_create " << *m << dendl;
+ // drop the next N pg_creates in a row?
+ if (debug_drop_pg_create_left < 0 &&
+ g_conf->osd_debug_drop_pg_create_probability >
+ ((((double)(rand()%100))/100.0))) {
+ debug_drop_pg_create_left = debug_drop_pg_create_duration;
+ }
+ if (debug_drop_pg_create_left >= 0) {
+ --debug_drop_pg_create_left;
+ if (debug_drop_pg_create_left >= 0) {
+ dout(0) << "DEBUG dropping/ignoring pg_create, will drop the next "
+ << debug_drop_pg_create_left << " too" << dendl;
+ return;
+ }
+ }
+
if (!require_mon_peer(op->request)) {
// we have to hack around require_mon_peer's interface limits
op->request = NULL;
int split_bits;
};
hash_map<pg_t, create_pg_info> creating_pgs;
+ double debug_drop_pg_create_probability;
+ int debug_drop_pg_create_duration;
+ int debug_drop_pg_create_left; // 0 if we just dropped the last one, -1 if we can drop more
bool can_create_pg(pg_t pgid);
void handle_pg_create(OpRequestRef op);