mirror_zfs/include
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
..
os Improve performance of zio_taskq_member 2020-03-03 10:29:38 -08:00
sys dmu_objset_from_ds must be called with dp_config_rwlock held 2020-03-12 10:55:02 -07:00
.gitignore OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
libnvpair.h Add JSON output support to channel programs 2018-03-19 12:40:58 -07:00
libuutil_common.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
libuutil_impl.h Support custom build directories and move includes 2010-09-08 12:38:56 -07:00
libuutil.h Correct cppcheck errors 2017-09-19 12:17:29 -07:00
libzfs_core.h Add 'zfs send --saved' flag 2020-01-10 10:16:58 -08:00
libzfs_impl.h Add FreeBSD jail support hooks 2019-12-11 11:58:37 -08:00
libzfs.h Add option for forcible unmounting dataset while receiving snapshot. 2020-03-17 10:08:32 -07:00
libzutil.h Colorize zpool status output 2019-12-19 16:26:07 -08:00
Makefile.am OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
thread_pool.h Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
zfeature_common.h Disable EDONR on FreeBSD 2019-12-05 13:10:29 -08:00
zfs_comutil.h Fix "zpool add -n" for dedup, special and log devices 2020-01-06 15:40:06 -08:00
zfs_deleg.h Remove code for zfs remap 2019-06-24 16:44:01 -07:00
zfs_fletcher.h Add AVX512BW variant of fletcher 2019-10-30 12:26:14 -07:00
zfs_namecheck.h Implement bookmark copying 2020-02-11 13:19:12 -08:00
zfs_prop.h Add zfs module feature and property info to sysfs 2018-09-02 12:09:53 -07:00