aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorSerapheim Dimitropoulos <[email protected]>2023-05-01 17:18:42 -0700
committerGitHub <[email protected]>2023-05-01 17:18:42 -0700
commit0c93d86f01e509cdfab271fa285497cbda4e3a9f (patch)
treefe4f990a00363b6bf84410636e6144b02d30eede /module
parent5a83f761c7c7445dda39d3fd3c5aa2a7bcb353f1 (diff)
Correct ABD size for split block ZIOs
Currently when layering the ABD buffer of each split block on top of an indirect vdev's ZIO ABD we don't specify the split block's ABD. This results in those ABDs being incorrectly sized by inheriting the size of their parent ABD which is larger than what each split block needs. The above behavior isn't causing any bugs currently but can lead to unexpected ABD sizes for people analyzing and/or working on the ZIO codepath. This patch fixes this behavior by properly setting the ABD size for split block ZIOs. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Igor Kozhukhov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Mark Maybee <[email protected]> Reviewed-by: Brian Atkinson <[email protected]> Signed-off-by: Serapheim Dimitropoulos <[email protected]> Closes #14804
Diffstat (limited to 'module')
-rw-r--r--module/zfs/vdev_indirect.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/zfs/vdev_indirect.c b/module/zfs/vdev_indirect.c
index 8c11a574a..a16ad2f4e 100644
--- a/module/zfs/vdev_indirect.c
+++ b/module/zfs/vdev_indirect.c
@@ -1370,9 +1370,10 @@ vdev_indirect_io_start(zio_t *zio)
is != NULL; is = list_next(&iv->iv_splits, is)) {
zio_nowait(zio_vdev_child_io(zio, NULL,
is->is_vdev, is->is_target_offset,
- abd_get_offset(zio->io_abd,
- is->is_split_offset), is->is_size,
- zio->io_type, zio->io_priority, 0,
+ abd_get_offset_size(zio->io_abd,
+ is->is_split_offset, is->is_size),
+ is->is_size, zio->io_type,
+ zio->io_priority, 0,
vdev_indirect_child_io_done, zio));
}