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 <mahrens@delphix.com>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Closes #14804
This commit is contained in:
Serapheim Dimitropoulos 2023-05-01 17:18:42 -07:00 committed by GitHub
parent 5a83f761c7
commit 0c93d86f01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -1370,9 +1370,10 @@ vdev_indirect_io_start(zio_t *zio)
is != NULL; is = list_next(&iv->iv_splits, is)) { is != NULL; is = list_next(&iv->iv_splits, is)) {
zio_nowait(zio_vdev_child_io(zio, NULL, zio_nowait(zio_vdev_child_io(zio, NULL,
is->is_vdev, is->is_target_offset, is->is_vdev, is->is_target_offset,
abd_get_offset(zio->io_abd, abd_get_offset_size(zio->io_abd,
is->is_split_offset), is->is_size, is->is_split_offset, is->is_size),
zio->io_type, zio->io_priority, 0, is->is_size, zio->io_type,
zio->io_priority, 0,
vdev_indirect_child_io_done, zio)); vdev_indirect_child_io_done, zio));
} }