diff options
author | Brian Behlendorf <[email protected]> | 2012-09-07 16:04:22 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-09-10 10:25:08 -0700 |
commit | 4ca9a43644cf651ed3bb533d183cf33525a9fc4a (patch) | |
tree | c05c95de037fd7c5d36206a0016e31777f35c579 /module/zfs | |
parent | 1ecc6d1265ccffe387780f13f33142fb0961cb0f (diff) |
Remove zvol device node
The 'zfs destroy' changes in 330d06f disrupted how zvol devices
get removed on ZoL. However, it basically boils down to the
fact that we are no longer reliably calling zvol_remove_minor()
via zfs_ioc_destroy_snaps().
Therefore we add the missing call and handle things similarly
to the existing zfs_unmount_snap() case. Ideally we would check
if this is of type DMU_OST_ZFS or DMU_OST_ZVOL and just do the
right thing as in zfs_ioc_destroy(). However, it looks like
it would be fairly expensive to get the type, and it's harmless
to simply attempt the umount and minor removal.
This is also an issue in the latest FreeBSD and Illumos code.
It was being tracked under the following issue, and we may want
to refresh our code when they settle on what they want to do
about it upstream.
https://www.illumos.org/issues/3170
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #903
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/zfs_ioctl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index 94c91e876..a382de780 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -3163,6 +3163,7 @@ zfs_ioc_destroy_snaps_nvl(zfs_cmd_t *zc) } (void) zfs_unmount_snap(name, NULL); + (void) zvol_remove_minor(name); } err = dmu_snapshots_destroy_nvl(nvl, zc->zc_defer_destroy, |