mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
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 <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc. Closes #16942
This commit is contained in:
1 parent
b8e09c7007
commit
fae4c664a4
1 file changed
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user