mirror_zfs/include/os/linux/kernel/linux
Aleksa Sarai dbf6108b4d zfs_rename: support RENAME_* flags
Implement support for Linux's RENAME_* flags (for renameat2). Aside from
being quite useful for userspace (providing race-free ways to exchange
paths and implement mv --no-clobber), they are used by overlayfs and are
thus required in order to use overlayfs-on-ZFS.

In order for us to represent the new renameat2(2) flags in the ZIL, we
create two new transaction types for the two flags which need
transactional-level support (RENAME_EXCHANGE and RENAME_WHITEOUT).
RENAME_NOREPLACE does not need any ZIL support because we know that if
the operation succeeded before creating the ZIL entry, there was no file
to be clobbered and thus it can be treated as a regular TX_RENAME.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Pavel Snajdr <snajpa@snajpa.net>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Closes #12209
Closes #14070
2022-10-28 09:49:20 -07:00
..
blkdev_compat.h zed: mark disks as REMOVED when they are removed 2022-09-28 09:48:46 -07:00
compiler_compat.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
dcache_compat.h Remove zpl_revalidate: fix snapshot rollback 2022-10-28 09:47:19 -07:00
kmap_compat.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
mod_compat.h Cleanup: 64-bit kernel module parameters should use fixed width types 2022-10-13 10:03:29 -07:00
page_compat.h Linux 5.9 compat: NR_SLAB_RECLAIMABLE 2020-08-29 20:57:45 -07:00
percpu_compat.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
simd_aarch64.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
simd_powerpc.h Add PPC cpu feature tests for FreeBSD and Linux 2022-09-16 14:25:53 -07:00
simd_x86.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
simd.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
utsname_compat.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
vfs_compat.h zfs_rename: support RENAME_* flags 2022-10-28 09:49:20 -07:00
xattr_compat.h Add xattr_handler support for Android kernels 2022-09-06 10:02:18 -07:00