mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
zinject: Introduce ready delay fault injection
This adds a pause to the ZIO pipeline in the ready stage for matching I/O (data, dnode, or raw bookmark). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Akash B <akash-b@hpe.com> Signed-off-by: Robert Evans <evansr@google.com> Closes #17787
This commit is contained in:
committed by
Tony Hutter
parent
073b34b3ee
commit
ead0fb736d
@@ -5305,6 +5305,16 @@ zio_ready(zio_t *zio)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (zio_injection_enabled) {
|
||||
hrtime_t target = zio_handle_ready_delay(zio);
|
||||
if (target != 0 && zio->io_target_timestamp == 0) {
|
||||
zio->io_stage >>= 1;
|
||||
zio->io_target_timestamp = target;
|
||||
zio_delay_interrupt(zio);
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (zio->io_ready) {
|
||||
ASSERT(IO_IS_ALLOCATING(zio));
|
||||
ASSERT(BP_GET_BIRTH(bp) == zio->io_txg ||
|
||||
|
||||
Reference in New Issue
Block a user