mirror_zfs/lib
Ryan Moeller 7b4e27232d
Add 'zfs rename -u' to rename without remounting
Allow to rename file systems without remounting if it is possible.
It is possible for file systems with 'mountpoint' property set to
'legacy' or 'none' - we don't have to change mount directory for them.
Currently such file systems are unmounted on rename and not even
mounted back.

This introduces layering violation, as we need to update
'f_mntfromname' field in statfs structure related to mountpoint (for
the dataset we are renaming and all its children).

In my opinion it is worth it, as it allow to update FreeBSD in even
cleaner way - in ZFS-only configuration root file system is ZFS file
system with 'mountpoint' property set to 'legacy'. If root dataset is
named system/rootfs, we can snapshot it (system/rootfs@upgrade), clone
it (system/oldrootfs), update FreeBSD and if it doesn't boot we can
boot back from system/oldrootfs and rename it back to system/rootfs
while it is mounted as /. Before it was not possible, because
unmounting / was not possible.

Authored by: Pawel Jakub Dawidek <pjd@FreeBSD.org>
Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported by: Matt Macy <mmacy@freebsd.org>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10839
2020-09-01 16:14:16 -07:00
..
libavl Fixes for make dist 2020-06-26 14:20:02 -07:00
libefi Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libicp Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libnvpair Disable -Wl,-z,defs for ASAN builds 2020-07-14 12:17:44 -07:00
libshare Remove dependency on sharetab file and refactor sharing logic 2020-07-13 09:19:18 -07:00
libspl libspl: Provide platform-specific zone implementations 2020-08-31 19:43:30 -07:00
libtpool Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libunicode Fixes for make dist 2020-06-26 14:20:02 -07:00
libuutil Disable -Wl,-z,defs for ASAN builds 2020-07-14 12:17:44 -07:00
libzfs Add 'zfs rename -u' to rename without remounting 2020-09-01 16:14:16 -07:00
libzfs_core libzfs_core: Initialize fail_ioc_cmd to ZFS_IOC_LAST 2020-08-18 18:07:43 -07:00
libzpool Add 'zfs rename -u' to rename without remounting 2020-09-01 16:14:16 -07:00
libzstd Avoid symbol collision with in-kernel zstdlib 2020-08-24 12:20:41 -07:00
libzutil FreeBSD: zfs commands backward compatibility 2020-07-15 21:32:50 -07:00
Makefile.am Add zstd support to zfs 2020-08-20 10:30:06 -07:00