mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Prevent "zpool destroy|export" when suspended
Cleanly destroying or exporting a pool requires that the pool not be suspended. Therefore, set the POOL_CHECK_SUSPENDED flag for these ioctls so the utilities will output a descriptive error message rather than block. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #2878
This commit is contained in:
parent
fdc5d98253
commit
87a63dd702
@ -5450,9 +5450,9 @@ zfs_ioctl_init(void)
|
|||||||
* does the logging of those commands.
|
* does the logging of those commands.
|
||||||
*/
|
*/
|
||||||
zfs_ioctl_register_pool(ZFS_IOC_POOL_DESTROY, zfs_ioc_pool_destroy,
|
zfs_ioctl_register_pool(ZFS_IOC_POOL_DESTROY, zfs_ioc_pool_destroy,
|
||||||
zfs_secpolicy_config, B_FALSE, POOL_CHECK_NONE);
|
zfs_secpolicy_config, B_FALSE, POOL_CHECK_SUSPENDED);
|
||||||
zfs_ioctl_register_pool(ZFS_IOC_POOL_EXPORT, zfs_ioc_pool_export,
|
zfs_ioctl_register_pool(ZFS_IOC_POOL_EXPORT, zfs_ioc_pool_export,
|
||||||
zfs_secpolicy_config, B_FALSE, POOL_CHECK_NONE);
|
zfs_secpolicy_config, B_FALSE, POOL_CHECK_SUSPENDED);
|
||||||
|
|
||||||
zfs_ioctl_register_pool(ZFS_IOC_POOL_STATS, zfs_ioc_pool_stats,
|
zfs_ioctl_register_pool(ZFS_IOC_POOL_STATS, zfs_ioc_pool_stats,
|
||||||
zfs_secpolicy_read, B_FALSE, POOL_CHECK_NONE);
|
zfs_secpolicy_read, B_FALSE, POOL_CHECK_NONE);
|
||||||
|
Loading…
Reference in New Issue
Block a user