Upstream: unmount snapshots before destroying them on macOS

Add function zfs_destroy_snaps_nvl_os() call. The main issue is that
macOS needs to unmount any mounted snapshots before they can be
destroyed. Other platforms can handle this in the kernel, but sending
a storm of zed events to unmount seems undesirable when we can do it
in userland to start with.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Jorgen Lundman <lundman@lundman.net>
Co-authored-by: ilovezfs <ilovezfs@icloud.com>
Closes #12550
This commit is contained in:
Jorgen Lundman
2021-09-21 00:29:59 +09:00
committed by GitHub
parent 8a3fe59c03
commit 1d901c3ee5
5 changed files with 23 additions and 1 deletions
+6
View File
@@ -184,6 +184,12 @@ find_shares_object(differ_info_t *di)
return (0);
}
int
zfs_destroy_snaps_nvl_os(libzfs_handle_t *hdl, nvlist_t *snaps)
{
return (0);
}
/*
* Fill given version buffer with zfs kernel version read from ZFS_SYSFS_DIR
* Returns 0 on success, and -1 on error (with errno set)