[PATCH 0/2] Add support to RENAME_EXCHANGE flag to XFS V9
Carlos Maiolino
cmaiolino at redhat.com
Wed Dec 17 12:13:02 CST 2014
This patchset aims to implement RENAME_EXCHANGE support (from sys_renameat2) to
XFS.
For this to be achieved, XFS need to export a rename2() method, which I included
in the first patch.
The second patch is the real implementation of the RENAME_EXCHANGE flags, which
most of the work I based on xfs_rename().
This patchset passed the xfstests 23, 24 and 25 (specifically for
RENAME_EXCHANGE), and I also tested the projectID inheritance problem, where
both paths must be under the same projectID to be able to change (I'm going to
implement this test into the xfstests too).
Changelog
Make xfs_vn_rename compliant with renameat2() syscall
V2: Use xfs_vn_rename as-is, instead of rename it to xfs_vn_rename2
Add support to RENAME_EXCHANGE flag
V2: - refactor xfs_cross_rename() to not duplicate code from xfs_rename()
V3: - fix indentation to avoid 80 column crossing, decrease the amount of
arguments passed to xfs_cross_rename()
- Rebase patches over the latest linux code
v4: - use a label/goto statement instead of an if conditional after
xfs_cross_rename() return, to finish the rename operation
- Make xfs_cross_rename() static
- Fix some comments
V5: - Keep all the code under 80 columns
V6: - Ensure i_mode of both files are updated during exchange
V7: - Use struct names instead of typedefs in the xfs_cross_rename()
definition
V8: - Replace src/target names for better variable names
- Log and timestamp updates done in different places
- Fix missing space in comments
- get rid of {src,tgt}_is_directory and new_parent variables
V9: - Use flags to track down inode changes and update its timestamps
- Fix some comments
fs/xfs/xfs_inode.c | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
fs/xfs/xfs_inode.h | 2 +-
fs/xfs/xfs_iops.c | 21 ++++++---
3 files changed, 149 insertions(+), 8 deletions(-)
--
1.9.3
More information about the xfs
mailing list