freebsd-dev/lib
Mariusz Zaborski a57d3d45d6
Add option for forcible unmounting dataset while receiving snapshot.
Currently when the dataset is in use we can't receive snapshots.

    zfs send test/1@asd | zfs recv -FM test/2
    cannot unmount '/test/2': Device busy

This commits add option 'M' which attempts to forcibly unmount the
dataset.  Thanks to this we can enforce receiving snapshots in a
single step.

Note that this functionality is not supported on Linux because the
VFS will prevent active mounted filesystems from being unmounted,
even with the force option.  This is the intended VFS behavior.

Test cases were added to verify the expected behavior based on
the platform.

Discussed-with: Pawel Jakub Dawidek <pjd@FreeBSD.org>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Allan Jude <allanjude@freebsd.org>
External-issue: https://reviews.freebsd.org/D22306
Closes #9904
2020-03-17 10:08:32 -07:00
..
libavl OpenZFS restructuring - libspl 2019-10-02 10:39:48 -07:00
libefi cppcheck: (error) Memory leak: vtoc 2019-12-18 17:25:04 -08:00
libicp ICP: Improve AES-GCM performance 2020-02-10 12:59:50 -08:00
libnvpair Use correct format string when printing int8 2019-10-20 20:37:30 -07:00
libshare Fix static data to link with -fno-common 2020-02-06 09:25:29 -08:00
libspl Linux 5.6 compat: time_t 2020-02-27 09:31:02 -08:00
libtpool OpenZFS restructuring - libspl 2019-10-02 10:39:48 -07:00
libunicode OpenZFS restructuring - libspl 2019-10-02 10:39:48 -07:00
libuutil Remove unused headers from uu_string.c 2019-10-25 13:53:50 -07:00
libzfs Add option for forcible unmounting dataset while receiving snapshot. 2020-03-17 10:08:32 -07:00
libzfs_core Implement bookmark copying 2020-02-11 13:19:12 -08:00
libzpool Improve performance of zio_taskq_member 2020-03-03 10:29:38 -08:00
libzutil Add wrapper stub for zfs_cmd ioctl to libzpool 2019-11-12 10:40:39 -08:00
Makefile.am Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00