]> git.proxmox.com Git - mirror_zfs.git/commit
Add explicit error for device_rebuild being disabled
authorRich Ercolani <214141+rincebrain@users.noreply.github.com>
Fri, 29 Oct 2021 22:55:22 +0000 (18:55 -0400)
committerGitHub <noreply@github.com>
Fri, 29 Oct 2021 22:55:22 +0000 (15:55 -0700)
commit1139e170d49a96bd228b0c86035129bc38a89989
tree3e47319c2e1267e1ab35e42a6a08b46e77b73f6e
parent4476ccd906a3ee32af4741b9b0b58241739e3c7d
Add explicit error for device_rebuild being disabled

Currently, you get back "can only attach to mirrors and top-level disks"
unconditionally if zpool attach returns ENOTSUP, but that also happens
if, say, feature@device_rebuild=disabled and you tried attach -s.

So let's print an error for that case, lest people go down a rabbit hole
looking into what they did wrong.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #11414
Closes #12680
lib/libzfs/libzfs_pool.c