OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-4907-gf21e3ef
Gerrit Code Review
Tue, 25 Oct 2016 21:33:53 -0400
The following commit has been merged in the master branch:
Author: Mark Vitale <email@example.com>
Date: Fri Sep 16 19:01:19 2016 -0400
Linux 4.9: inode_operation rename now takes flags
In Linux 3.15 commit 520c8b16505236fc82daa352e6c5e73cd9870cff,
inode_operation rename2() was added. It takes the same arguments as
rename(), with an added flags argument supporting the following values:
RENAME_NOREPLACE: if "new" name exists, fail with -EEXIST. Without
this flag, the default behavior is to replace the "new" existing file.
RENAME_EXCHANGE: exchange source and target; both must exist.
OpenAFS never implemented a .rename2() routine because it was optional
when introduced at Linux v3.15.
In Linux 4.9-rc1 the following commits remove the last in-tree uses of
.rename() and converts .rename2() to .rename().
aadfa8019e81 vfs: add note about i_op->rename changes to porting
2773bf00aeb9 fs: rename "rename2" i_op to "rename"
18fc84dafaac vfs: remove unused i_op->rename
1cd66c93ba8c fs: make remaining filesystems use .rename2
e0e0be8a8355 libfs: support RENAME_NOREPLACE in simple_rename()
f03b8ad8d386 fs: support RENAME_NOREPLACE for local filesystems
With these changes, it is now mandatory for OpenAFS afs_linux_rename()
to accept a 5th flag argument.
Add an autoconfig test to determine the signature of .rename(). Use this
information to implement afs_linux_rename() with the appropriate number
of arguments. Implement "toleration support" for the flags option by
treating a zero flag as a normal rename; if any flags are specified,
return -EINVAL to indicate the OpenAFS filesystem does not yet support
Tested-by: BuildBot <firstname.lastname@example.org>
Reviewed-by: Benjamin Kaduk <email@example.com>
acinclude.m4 | 6 ++++++
src/afs/LINUX/osi_vnodeops.c | 11 ++++++++++-
2 files changed, 16 insertions(+), 1 deletions(-)
OpenAFS Master Repository