forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zfs_rename: pick up and finish renameat2 flags support
Removing new txtypes in favor of compound ZIL operations, see comment in module/zfs/zfs_log.c. Other notable changes: - unlock after the inodes are updated - pass whiteout znode pointer to zfs_log_rename_whiteout - don't wrap code directly in ASSERT*(), it turn to noop on non-debug builds - update configure time tests for rename2 to support kernels from 3.5 to 4.8 Fixes openzfs#2256 Fixes openzfs#8648 Fixes openzfs#8774 Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
- Loading branch information
Showing
10 changed files
with
200 additions
and
81 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
dnl # | ||
dnl # iops->rename2() is supported since Linux 3.5 | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_HAS_RENAME2], [ | ||
ZFS_LINUX_TEST_SRC([inode_operations_rename], [ | ||
#include <linux/fs.h> | ||
int rename2_fn(struct inode *sip, struct dentry *sdp, | ||
struct inode *tip, struct dentry *tdp, | ||
unsigned int flags) { return 0; } | ||
static const struct inode_operations | ||
iops __attribute__ ((unused)) = { | ||
.rename2 = rename2_fn, | ||
}; | ||
],[]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_HAS_RENAME2], [ | ||
AC_MSG_CHECKING([whether iops->rename() wants flags]) | ||
ZFS_LINUX_TEST_RESULT([inode_operations_rename], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_RENAME2, 1, | ||
[iops->rename2() exists]) | ||
],[ | ||
AC_MSG_RESULT(no) | ||
]) | ||
]) | ||
|
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
Oops, something went wrong.