Add zpool_disable_datasets_os() / zfs_unmount_os()

zpool_disable_datasets_os():
macOS needs to do a bunch of work to kick everything off zvols.

zfs_unmount_os():
This allows us to unmount any zvols that may be mounted. Like with
zfs destroy foo/vol

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Jorgen Lundman <lundman@lundman.net>
Closes #12436
This commit is contained in:
Jorgen Lundman
2021-09-01 00:56:00 +09:00
committed by GitHub
parent 3b89d9518d
commit 3e8d5e4ff3
5 changed files with 48 additions and 1 deletions
+4
View File
@@ -672,6 +672,8 @@ zfs_unmount(zfs_handle_t *zhp, const char *mountpoint, int flags)
}
}
zpool_disable_volume_os(zhp->zfs_name);
return (0);
}
@@ -1637,6 +1639,8 @@ zpool_disable_datasets(zpool_handle_t *zhp, boolean_t force)
remove_mountpoint(sets[i].dataset);
}
zpool_disable_datasets_os(zhp, force);
ret = 0;
out:
(void) fclose(mnttab);