Skip to content

Commit

Permalink
FreeBSD: Use ashift in vdev_check_boot_reserve()
Browse files Browse the repository at this point in the history
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.

Signed-off-by:	Alexander Motin <[email protected]>
Sponsored by:	iXsystems, Inc.
  • Loading branch information
amotin committed Jan 10, 2025
1 parent b8e09c7 commit 4c65639
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/os/freebsd/zfs/vdev_label_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4c65639

Please sign in to comment.