zfs/lib
Rob Norris 7e4a9cbaee zpool_disable_datasets: on Linux, detach mounts when forcing export
On Linux, MNT_FORCE makes the kernel inform that fileystem that its
about to call its unmount method so it can begin to eject active IO,
making it more likely that the unmount will succeed. This however does
not arrange for the unmount method to always succeed; new IO between the
two filesystem calls can dirty the filesystem. This is very difficult to
lock out properly within ZFS, as not all operations that cause the
kernel to dirty the filesystem can easily locked out (eg zfs_lookup).

So, we add MNT_DETACH as well. This causes the kernel to first remove
the mount from the user namespace, giving the appearance that it has
been unmounted (ie no longer appears in /proc/mounts), so that userspace
can't reference the filesystem anymore. The unmount then proceeds in the
background.

Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
(cherry picked from commit d2e1634fc935288aa851b5915feaa670c791265c)
2023-07-05 13:27:30 +00:00
..
libavl cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libefi cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libicp cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libnvpair zfs: support force exporting pools 2023-07-05 13:27:30 +00:00
libshare freebsd/libshare: nfs: don't send SIGHUP to all processes 2022-02-03 15:28:01 -08:00
libspl FreeBSD: libspl: Add locking around statfs globals 2022-05-27 09:19:37 -07:00
libtpool cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libunicode cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libuutil zfs: support force exporting pools 2023-07-05 13:27:30 +00:00
libzfs zpool_disable_datasets: on Linux, detach mounts when forcing export 2023-07-05 13:27:30 +00:00
libzfs_core zfs: support force exporting pools 2023-07-05 13:27:30 +00:00
libzfsbootenv zfs: support force exporting pools 2023-07-05 13:27:30 +00:00
libzpool Add a JSON equivalent to zpool-status(8) 2023-07-05 13:27:30 +00:00
libzstd cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libzutil libzutil: zpool_find_config: remove unused variable 2022-05-02 15:42:58 -07:00
Makefile.am cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00