aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zdb
diff options
context:
space:
mode:
authorAlexander Motin <[email protected]>2023-10-25 18:22:25 -0400
committerGitHub <[email protected]>2023-10-25 15:22:25 -0700
commit3afdc97d91c24192db51b67762126a8d99d433db (patch)
tree9fece2b39d8953618a0a6808b3d71bfcbe584999 /cmd/zdb
parent05c4710e8958832afc2868102c9535a4f18115be (diff)
ZIO: Remove READY pipeline stage from root ZIOs
zio_root() has no arguments for ready callback or parent ZIO. Except one recent case in ZIL code if root ZIOs ever have a parent it is also a root ZIO. It means we do not need READY pipeline stage for them, which takes some time to process, but even more time to wait for the children and be woken by them, and both for no good reason. The most visible effect of this change is that it avoids one taskq wakeup per ZIL block written, previously used to run zio_ready() for lwb_root_zio and skipped now. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc. Closes #15398
Diffstat (limited to 'cmd/zdb')
-rw-r--r--cmd/zdb/zdb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index b39a0e882..3c282f3fc 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -8716,8 +8716,6 @@ zdb_read_block(char *thing, spa_t *spa)
BP_SET_CHECKSUM(bp, ck);
spa_config_enter(spa, SCL_STATE, FTAG, RW_READER);
czio = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL);
- czio->io_bp = bp;
-
if (vd == vd->vdev_top) {
zio_nowait(zio_read(czio, spa, bp, pabd, psize,
NULL, NULL,
@@ -8736,7 +8734,8 @@ zdb_read_block(char *thing, spa_t *spa)
}
error = zio_wait(czio);
if (error == 0 || error == ECKSUM) {
- zio_t *ck_zio = zio_root(spa, NULL, NULL, 0);
+ zio_t *ck_zio = zio_null(NULL, spa, NULL,
+ NULL, NULL, 0);
ck_zio->io_offset =
DVA_GET_OFFSET(&bp->blk_dva[0]);
ck_zio->io_bp = bp;