linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] cross rename v3
@ 2014-01-08 22:10 Miklos Szeredi
  2014-01-08 22:10 ` [PATCH 01/11] vfs: add d_is_dir() Miklos Szeredi
                   ` (11 more replies)
  0 siblings, 12 replies; 70+ messages in thread
From: Miklos Szeredi @ 2014-01-08 22:10 UTC (permalink / raw)
  To: viro
  Cc: torvalds, linux-fsdevel, linux-kernel, hch, akpm, dhowells, zab,
	jack, luto, mszeredi

[Only cosmetic changes from v2 based on Jan Kara's review]

This series adds a new syscall, renameat2(), which is the same as renameat() but
with a flags argument.

The purpose of extending rename is to add cross-rename, a symmetric variant of
rename, which exchanges the two files.  This allows interesting things, which
were not possible before, for example atomically replacing a directory tree with
a symlink, etc...  This also allows overlayfs and friends to operate on
whiteouts atomically.

Andy Lutomirski also suggested a "noreplace" flag, which disables the
overwriting behavior of rename.

These two flags, RENAME_EXCHANGE and RENAME_NOREPLACE are only implemented for
ext4 as an example and for testing.

Implementing RENAME_NOREPLACE for other local (disk or ram based) filesystems is
trivial: just don't fail with -EOPNOTSUPP, the rest is done by the VFS.  Network
filesystems need special treatment to avoid creation races.


Please consider for -next (3.14).

Git tree is here:

  git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git cross-rename

Thanks,
Miklos

---
Miklos Szeredi (11):
      vfs: add d_is_dir()
      vfs: rename: move d_move() up
      vfs: rename: use common code for dir and non-dir
      vfs: add renameat2 syscall
      vfs: add RENAME_NOREPLACE flag
      security: add flags to rename hooks
      vfs: add cross-rename
      ext4: rename: create ext4_renament structure for local vars
      ext4: rename: move EMLINK check up
      ext4: rename: split out helper functions
      ext4: add cross rename support

---
 Documentation/filesystems/Locking                  |   2 +-
 Documentation/filesystems/vfs.txt                  |   4 +-
 arch/x86/syscalls/syscall_64.tbl                   |   1 +
 .../lustre/lustre/include/linux/lustre_compat25.h  |   4 +-
 drivers/staging/lustre/lustre/llite/namei.c        |   7 +-
 drivers/staging/lustre/lustre/lvfs/lvfs_linux.c    |   2 +-
 fs/9p/v9fs.h                                       |   3 +-
 fs/9p/vfs_inode.c                                  |   7 +-
 fs/affs/affs.h                                     |   3 +-
 fs/affs/namei.c                                    |   6 +-
 fs/afs/dir.c                                       |   9 +-
 fs/bad_inode.c                                     |   3 +-
 fs/bfs/dir.c                                       |   6 +-
 fs/btrfs/inode.c                                   |   6 +-
 fs/cachefiles/namei.c                              |   4 +-
 fs/ceph/dir.c                                      |   6 +-
 fs/cifs/cifsfs.h                                   |   2 +-
 fs/cifs/inode.c                                    |   6 +-
 fs/coda/dir.c                                      |  11 +-
 fs/dcache.c                                        |  46 ++-
 fs/debugfs/inode.c                                 |   2 +-
 fs/ecryptfs/inode.c                                |   8 +-
 fs/exofs/namei.c                                   |   6 +-
 fs/ext2/namei.c                                    |   8 +-
 fs/ext3/namei.c                                    |   8 +-
 fs/ext4/namei.c                                    | 395 ++++++++++++++-------
 fs/f2fs/namei.c                                    |   6 +-
 fs/fat/namei_msdos.c                               |   6 +-
 fs/fat/namei_vfat.c                                |   6 +-
 fs/fuse/dir.c                                      |   9 +-
 fs/gfs2/inode.c                                    |   6 +-
 fs/hfs/dir.c                                       |   6 +-
 fs/hfsplus/dir.c                                   |   6 +-
 fs/hostfs/hostfs_kern.c                            |   8 +-
 fs/hpfs/namei.c                                    |   6 +-
 fs/jffs2/dir.c                                     |   8 +-
 fs/jfs/namei.c                                     |   5 +-
 fs/libfs.c                                         |   6 +-
 fs/logfs/dir.c                                     |   6 +-
 fs/minix/namei.c                                   |   8 +-
 fs/namei.c                                         | 316 +++++++++--------
 fs/ncpfs/dir.c                                     |   8 +-
 fs/nfs/dir.c                                       |   6 +-
 fs/nfs/internal.h                                  |   3 +-
 fs/nfsd/vfs.c                                      |   2 +-
 fs/nilfs2/namei.c                                  |   6 +-
 fs/ocfs2/namei.c                                   |   6 +-
 fs/omfs/dir.c                                      |   6 +-
 fs/reiserfs/namei.c                                |   6 +-
 fs/sysv/namei.c                                    |   8 +-
 fs/ubifs/dir.c                                     |   6 +-
 fs/udf/namei.c                                     |   6 +-
 fs/ufs/namei.c                                     |   6 +-
 fs/xfs/xfs_iops.c                                  |   6 +-
 include/linux/dcache.h                             |   8 +-
 include/linux/fs.h                                 |   6 +-
 include/linux/security.h                           |  12 +-
 include/uapi/linux/fs.h                            |   3 +
 kernel/cgroup.c                                    |   8 +-
 mm/shmem.c                                         |   5 +-
 security/security.c                                |  22 +-
 61 files changed, 746 insertions(+), 366 deletions(-)



^ permalink raw reply	[flat|nested] 70+ messages in thread

end of thread, other threads:[~2014-05-19 12:34 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-08 22:10 [PATCH 00/11] cross rename v3 Miklos Szeredi
2014-01-08 22:10 ` [PATCH 01/11] vfs: add d_is_dir() Miklos Szeredi
2014-01-08 22:10 ` [PATCH 02/11] vfs: rename: move d_move() up Miklos Szeredi
2014-01-08 22:10 ` [PATCH 03/11] vfs: rename: use common code for dir and non-dir Miklos Szeredi
2014-01-08 22:10 ` [PATCH 04/11] vfs: add renameat2 syscall Miklos Szeredi
2014-01-14 22:11   ` Tetsuo Handa
2014-01-15 10:30     ` Miklos Szeredi
2014-01-15 13:50       ` Miklos Szeredi
2014-01-18 10:40         ` Tetsuo Handa
2014-01-08 22:10 ` [PATCH 05/11] vfs: add RENAME_NOREPLACE flag Miklos Szeredi
2014-01-15 18:19   ` J. Bruce Fields
2014-01-15 18:26     ` Andy Lutomirski
2014-01-15 23:33       ` J. Bruce Fields
2014-01-16 10:45         ` Miklos Szeredi
2014-01-15 18:35     ` Miklos Szeredi
2014-01-15 23:31       ` J. Bruce Fields
2014-01-08 22:10 ` [PATCH 06/11] security: add flags to rename hooks Miklos Szeredi
2014-01-08 22:10 ` [PATCH 07/11] vfs: add cross-rename Miklos Szeredi
2014-01-13  7:52   ` Jan Kara
2014-01-14 10:31     ` Miklos Szeredi
2014-01-14 12:47       ` Jan Kara
2014-01-08 22:10 ` [PATCH 08/11] ext4: rename: create ext4_renament structure for local vars Miklos Szeredi
2014-01-08 22:10 ` [PATCH 09/11] ext4: rename: move EMLINK check up Miklos Szeredi
2014-01-08 22:10 ` [PATCH 10/11] ext4: rename: split out helper functions Miklos Szeredi
2014-01-08 22:10 ` [PATCH 11/11] ext4: add cross rename support Miklos Szeredi
2014-01-13 12:25   ` Jan Kara
2014-01-14 10:35     ` Miklos Szeredi
2014-01-15 18:23     ` J. Bruce Fields
2014-01-15 18:31       ` Miklos Szeredi
2014-01-16 10:54         ` Miklos Szeredi
2014-01-16 14:48           ` J. Bruce Fields
2014-01-17 10:53           ` Michael Kerrisk (man-pages)
2014-01-17 14:41             ` Miklos Szeredi
2014-04-19  9:08               ` Michael Kerrisk (man-pages)
2014-04-19 12:08                 ` Tetsuo Handa
2014-04-23 14:24                   ` Miklos Szeredi
2014-04-24 11:20                     ` [PATCH (for 3.15) 0/5] Fix cross rename race window for LSM Tetsuo Handa
2014-04-24 11:22                       ` [PATCH (for 3.15) 1/5] LSM: Pass the rename flags to each LSM module Tetsuo Handa
2014-04-25 20:49                         ` Casey Schaufler
2014-04-24 11:23                       ` [PATCH (for 3.15) 2/5] SELinux: Handle the rename flags Tetsuo Handa
2014-04-24 11:24                       ` [PATCH (for 3.15) 3/5] AppArmor: " Tetsuo Handa
2014-04-24 11:25                       ` [PATCH (for 3.15) 4/5] TOMOYO: " Tetsuo Handa
2014-04-24 11:26                       ` [PATCH (for 3.15) 5/5] LSM: Remove duplicated rename handling Tetsuo Handa
2014-05-01 11:58                       ` [PATCH (for 3.15) 0/5] Fix cross rename race window for LSM Tetsuo Handa
2014-05-05  5:49                         ` Tetsuo Handa
2014-05-11 15:53                           ` Tetsuo Handa
2014-05-12 13:21                             ` [PATCH (for 3.15) 0/5] Fix cross rename regressions " Tetsuo Handa
2014-05-12 13:22                               ` [PATCH (for 3.15) 1/5] LSM: Pass the rename flags to each LSM module Tetsuo Handa
2014-05-19 12:19                                 ` John Johansen
2014-05-12 13:23                               ` [PATCH (for 3.15) 2/5] SELinux: Handle the rename flags Tetsuo Handa
2014-05-12 13:24                               ` [PATCH (for 3.15) 3/5] AppArmor: " Tetsuo Handa
2014-05-19 12:28                                 ` John Johansen
2014-05-12 13:25                               ` [PATCH (for 3.15) 4/5] TOMOYO: " Tetsuo Handa
2014-05-12 13:25                               ` [PATCH (for 3.15) 5/5] LSM: Remove duplicated rename handling Tetsuo Handa
2014-05-19 12:34                                 ` John Johansen
2014-04-23 14:21                 ` [PATCH 11/11] ext4: add cross rename support Miklos Szeredi
2014-04-23 19:01                   ` Michael Kerrisk (man-pages)
2014-01-17 22:08             ` J. Bruce Fields
2014-01-18  6:49               ` Miklos Szeredi
2014-01-18 16:27                 ` J. Bruce Fields
2014-01-20 11:39                   ` Miklos Szeredi
2014-01-20 11:50                     ` Michael Kerrisk (man-pages)
2014-01-13 12:46 ` [PATCH 00/11] cross rename v3 Tetsuo Handa
2014-01-13 17:08   ` Miklos Szeredi
2014-01-13 22:03     ` Tetsuo Handa
2014-01-14  9:58       ` Miklos Szeredi
2014-01-14 13:03         ` Tetsuo Handa
2014-01-14 20:10           ` John Johansen
2014-01-14 20:53             ` Tetsuo Handa
2014-01-15 10:10               ` Miklos Szeredi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).