-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 need to create a new transaction type (to be backwards-compatible). Since RENAME_EXCHANGE and RENAME_WHITEOUT are mutually exclusive they deserve separate types. We just re-use the logic of zfs_{log,replay}_rename() with the only change being the transaction types and the associate vfsflags passed to zfs_rename(). RENAME_NOREPLACE doesn't need an entry because if the renameat2(2) fails because of RENAME_NOREPLACE there won't be a ZIL entry for the operation (and if it succeeds then it should also succeed on-replay). Unfortunately, more work is required in order use overlayfs-on-ZFS (namely we have to remove our .d_revalidate hook, since overlayfs refuses to use a filesystem with d_revalidate as an upperdir). Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
- Loading branch information
Showing
7 changed files
with
166 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters