mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Fix incorrect error report on vdev attach/replace
Report the correct error message in libzfs when attaching/replacing a vdev with a higher ashift. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Ameer Hamza <ahamza@ixsystems.com> Closes #16449
This commit is contained in:
+4
-2
@@ -7602,8 +7602,10 @@ spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *nvroot, int replacing,
|
||||
* The new device cannot have a higher alignment requirement
|
||||
* than the top-level vdev.
|
||||
*/
|
||||
if (newvd->vdev_ashift > oldvd->vdev_top->vdev_ashift)
|
||||
return (spa_vdev_exit(spa, newrootvd, txg, ENOTSUP));
|
||||
if (newvd->vdev_ashift > oldvd->vdev_top->vdev_ashift) {
|
||||
return (spa_vdev_exit(spa, newrootvd, txg,
|
||||
ZFS_ERR_ASHIFT_MISMATCH));
|
||||
}
|
||||
|
||||
/*
|
||||
* RAIDZ-expansion-specific checks.
|
||||
|
||||
Reference in New Issue
Block a user