FreeBSD: Use ashift in vdev_check_boot_reserve()

We should not hardcode 512-byte read size when checking for loader
in the boot area before RAIDZ expansion.  Disk might be unable to
handle that I/O as is, and the code zio_vdev_io_start() handling
the padding asserts doing it only for top-level vdev.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #16942
This commit is contained in:
Alexander Motin 2025-01-11 04:26:42 -05:00 committed by GitHub
parent b8e09c7007
commit fae4c664a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -96,7 +96,7 @@ vdev_check_boot_reserve(spa_t *spa, vdev_t *childvd)
{
ASSERT(childvd->vdev_ops->vdev_op_leaf);
size_t size = SPA_MINBLOCKSIZE;
size_t size = 1ULL << childvd->vdev_top->vdev_ashift;
abd_t *abd = abd_alloc_linear(size, B_FALSE);
zio_t *pio = zio_root(spa, NULL, NULL, 0);