diff options
author | Alexander Motin <mav@FreeBSD.org> | 2025-01-11 09:26:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-11 09:26:42 +0000 |
commit | fae4c664a4a67f51d13520ab432d96315d880af8 (patch) | |
tree | 1a77274c0fa1a448e9a6f1d4063cadbc7bff93c9 | |
parent | b8e09c7007a0733a497aebe734cb8ed23a0415ae (diff) |
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
-rw-r--r-- | module/os/freebsd/zfs/vdev_label_os.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/os/freebsd/zfs/vdev_label_os.c b/module/os/freebsd/zfs/vdev_label_os.c index 79732d9173e8..f1843807fd5d 100644 --- a/module/os/freebsd/zfs/vdev_label_os.c +++ b/module/os/freebsd/zfs/vdev_label_os.c @@ -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); |