mirror_zfs/include/os/linux/zfs/sys
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
..
Makefile.am Add 'zfs rename -u' to rename without remounting 2020-09-01 16:14:16 -07:00
policy.h filesystem_limit/snapshot_limit is incorrectly enforced against root 2020-07-11 17:18:02 -07:00
sha2.h Move sha2.h to platform code 2019-10-31 15:45:58 -07:00
trace_acl.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_arc.h Fix arc__wait__for__eviction tracepoint 2020-08-04 10:04:00 -07:00
trace_common.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_dbgmsg.h Enable use of DTRACE_PROBE* macros in "spl" module 2019-11-01 13:13:43 -07:00
trace_dbuf.h Factor out some dbuf subroutines and add state change tracing 2020-02-18 11:21:37 -08:00
trace_dmu.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_dnode.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_multilist.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_rrwlock.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_txg.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_vdev.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_zfs.h Enable use of DTRACE_PROBE* macros in "spl" module 2019-11-01 13:13:43 -07:00
trace_zil.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_zio.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_zrlock.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
zfs_context_os.h Refactor zfs_context.h to build on FreeBSD 2019-12-04 13:12:57 -08:00
zfs_ctldir.h OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
zfs_dir.h Eliminate Linux specific inode usage from common code 2019-12-11 11:53:57 -08:00
zfs_vfsops_os.h Add 'zfs rename -u' to rename without remounting 2020-09-01 16:14:16 -07:00
zfs_vnops.h Remove zfs_getattr and convoff dead code 2020-02-24 15:38:22 -08:00
zfs_znode_impl.h Eliminate Linux specific inode usage from common code 2019-12-11 11:53:57 -08:00
zpl.h Linux 5.6 compat: timestamp_truncate() 2020-02-07 11:04:32 -08:00