mirror of
https://github.com/ceph/ceph
synced 2024-12-26 21:43:10 +00:00
osd: add copyfrom error injection
Unfortunately it's nontrivial to inject this from the usual ceph_test_rados_api_* tests which need to run despite thrashing. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
f8c1d40169
commit
5d2d839dd9
@ -600,6 +600,7 @@ OPTION(osd_debug_verify_snaps_on_info, OPT_BOOL, false)
|
|||||||
OPTION(osd_debug_verify_stray_on_activate, OPT_BOOL, false)
|
OPTION(osd_debug_verify_stray_on_activate, OPT_BOOL, false)
|
||||||
OPTION(osd_debug_skip_full_check_in_backfill_reservation, OPT_BOOL, false)
|
OPTION(osd_debug_skip_full_check_in_backfill_reservation, OPT_BOOL, false)
|
||||||
OPTION(osd_debug_reject_backfill_probability, OPT_DOUBLE, 0)
|
OPTION(osd_debug_reject_backfill_probability, OPT_DOUBLE, 0)
|
||||||
|
OPTION(osd_debug_inject_copyfrom_error, OPT_BOOL, false) // inject failure during copyfrom completion
|
||||||
OPTION(osd_enable_op_tracker, OPT_BOOL, true) // enable/disable OSD op tracking
|
OPTION(osd_enable_op_tracker, OPT_BOOL, true) // enable/disable OSD op tracking
|
||||||
OPTION(osd_num_op_tracker_shard, OPT_U32, 32) // The number of shards for holding the ops
|
OPTION(osd_num_op_tracker_shard, OPT_U32, 32) // The number of shards for holding the ops
|
||||||
OPTION(osd_op_history_size, OPT_U32, 20) // Max number of completed ops to track
|
OPTION(osd_op_history_size, OPT_U32, 20) // Max number of completed ops to track
|
||||||
|
@ -6202,6 +6202,11 @@ void ReplicatedPG::process_copy_chunk(hobject_t oid, ceph_tid_t tid, int r)
|
|||||||
r = -EIO;
|
r = -EIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
if (g_conf->osd_debug_inject_copyfrom_error) {
|
||||||
|
derr << __func__ << " injecting copyfrom failure" << dendl;
|
||||||
|
r = -EIO;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
dout(20) << __func__ << " success; committing" << dendl;
|
dout(20) << __func__ << " success; committing" << dendl;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user