All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/11] overlayfs constant inode numbers
@ 2017-04-24  9:14 Amir Goldstein
  2017-04-24  9:14 ` [PATCH v2 01/11] ovl: store path type in dentry Amir Goldstein
                   ` (14 more replies)
  0 siblings, 15 replies; 69+ messages in thread
From: Amir Goldstein @ 2017-04-24  9:14 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Vivek Goyal, Al Viro, linux-unionfs, linux-fsdevel

Miklos,

Following your comments on the 'stable inodes' series from last week,
this series fixes constant inode numbers for stat(2) with any layer
configuration.

For the case of all *lower* layers on same fs that supports NFS export,
redirect by file handle will be used to optimize the lookup of the copy
up origin of non-dir inode.

For the case of *all* layers on same fs, overlayfs also gains:
- Persistent inode numbers for directories
- Correct results for du -x

Consistcy of stat(2) st_ino with readdir(3) d_ino is NOT addressed by
this series. It will be addressed for the 'samefs' configuration by the
follow up 'stable inode' work, which is also going to address preserving
hardlinks on copy up.

This series is available for testing on [1].
unionmount-testsuite needs a small fix patch for layers_check() [2].
Tested the following layer configurations:
 ./run --ov{,=0,=10} {,--samefs}

Tested constant inode numbers with xfstest overlay/017 and added a check
for persistent directory inode numbers across mount cycle [3].

Most of the patches in this series you already reviewed at one time or another
and have your comments already addressed. Some other patches are trivial.
Probably the only patches you need to take a closer look at are the 2 lookup
patches (5-6).

The implementation of lookup of a merged dir with a combination of redirect
by fh from upper and redirect by name in mid layer is more complicated.
Because this case is not strictly needed for this series, I simplified
things a bit and restricted lookup by fh to those cases:
1. Non directory (lookup of copy up origin)
2. Merge directory when ofs->numlower == 1

This restriction may be relaxed later on if we want to handle lookup by fh
with fallback to lookup by path for merge dirs.

What do you say? ... Too late for v4.12?

Amir.

[1] https://github.com/amir73il/linux/commits/ovl-constino
[2] https://github.com/amir73il/unionmount-testsuite/commits/overlayfs-devel
[3] https://github.com/amir73il/xfstests/commits/overlayfs-devel

Amir Goldstein (11):
  ovl: store path type in dentry
  ovl: cram opaque boolean into type flags
  ovl: check if all layers are on the same fs
  ovl: store file handle of lower inode on copy up
  ovl: lookup redirect by file handle
  ovl: lookup non-dir inode copy up origin
  ovl: set the COPYUP type flag for non-dirs
  ovl: redirect non-dir by path on rename
  ovl: constant st_ino/st_dev across copy up
  ovl: persistent inode number for directories
  ovl: fix du --one-file-system on overlay mount

 fs/overlayfs/copy_up.c   |  98 +++++++++++++++++++++
 fs/overlayfs/dir.c       |  28 +++++-
 fs/overlayfs/inode.c     |  21 ++++-
 fs/overlayfs/namei.c     | 216 +++++++++++++++++++++++++++++++++++++++++------
 fs/overlayfs/overlayfs.h |  23 +++++
 fs/overlayfs/ovl_entry.h |   9 +-
 fs/overlayfs/super.c     |  21 +++++
 fs/overlayfs/util.c      |  83 ++++++++++++++++--
 8 files changed, 461 insertions(+), 38 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2017-04-28 10:45 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-24  9:14 [PATCH v2 00/11] overlayfs constant inode numbers Amir Goldstein
2017-04-24  9:14 ` [PATCH v2 01/11] ovl: store path type in dentry Amir Goldstein
2017-04-24 12:59   ` Vivek Goyal
2017-04-24 13:10     ` Amir Goldstein
2017-04-24 13:36       ` Vivek Goyal
2017-04-24 13:41         ` Amir Goldstein
2017-04-24  9:14 ` [PATCH v2 02/11] ovl: cram opaque boolean into type flags Amir Goldstein
2017-04-24  9:14 ` [PATCH v2 03/11] ovl: check if all layers are on the same fs Amir Goldstein
2017-04-24  9:14 ` [PATCH v2 04/11] ovl: store file handle of lower inode on copy up Amir Goldstein
2017-04-24 13:32   ` kbuild test robot
2017-04-24 13:57     ` Amir Goldstein
2017-04-25 14:53   ` Miklos Szeredi
2017-04-26  5:47     ` Amir Goldstein
2017-04-26  9:21       ` Miklos Szeredi
2017-04-26  9:27         ` Amir Goldstein
2017-04-26  9:35           ` Miklos Szeredi
2017-04-26  9:39   ` Miklos Szeredi
2017-04-26  9:53     ` Amir Goldstein
2017-04-26  9:57       ` Miklos Szeredi
2017-04-24  9:14 ` [PATCH v2 05/11] ovl: lookup redirect by file handle Amir Goldstein
2017-04-25  8:10   ` Amir Goldstein
2017-04-25 15:13   ` Miklos Szeredi
2017-04-25 17:41     ` Amir Goldstein
2017-04-25 19:11       ` Amir Goldstein
2017-04-26  9:06         ` Miklos Szeredi
2017-04-26  9:40           ` Amir Goldstein
2017-04-26  9:55             ` Miklos Szeredi
2017-04-26 10:17               ` Amir Goldstein
2017-04-26 12:15                 ` Miklos Szeredi
2017-04-26 14:51                   ` Amir Goldstein
2017-04-27  6:27                     ` Amir Goldstein
2017-04-27  7:48                       ` Miklos Szeredi
2017-04-27  9:22                         ` Amir Goldstein
2017-04-27  9:26                         ` Miklos Szeredi
     [not found]                           ` <CAOQ4uxiweaqzR3eT-StgtDFAHBuYhGRvAJE6v=XpH33MevpmoA@mail.gmail.com>
     [not found]                             ` <CAJfpegtTJmcLVrLOeQbhu4Q6sM0Mi_FRgr+vStF0k95QsWm5uQ@mail.gmail.com>
2017-04-27 13:53                               ` Amir Goldstein
2017-04-27 14:46                                 ` Miklos Szeredi
2017-04-27 16:08                                   ` Amir Goldstein
2017-04-28  7:25                                     ` Amir Goldstein
2017-04-28  7:55                                       ` Miklos Szeredi
2017-04-28  8:15                                         ` Amir Goldstein
2017-04-28  9:37                                           ` Miklos Szeredi
2017-04-28  9:57                                             ` Amir Goldstein
2017-04-28 10:05                                               ` Miklos Szeredi
2017-04-28 10:45                                                 ` Amir Goldstein
2017-04-27  7:40                     ` Miklos Szeredi
2017-04-24  9:14 ` [PATCH v2 06/11] ovl: lookup non-dir inode copy up origin Amir Goldstein
2017-04-24  9:14 ` [PATCH v2 07/11] ovl: set the COPYUP type flag for non-dirs Amir Goldstein
2017-04-26 14:40   ` Miklos Szeredi
2017-04-26 14:53     ` Miklos Szeredi
2017-04-26 15:02       ` Amir Goldstein
2017-04-26 18:51         ` Amir Goldstein
2017-04-27  9:32         ` Miklos Szeredi
2017-04-26 14:57     ` Amir Goldstein
2017-04-24  9:14 ` [PATCH v2 08/11] ovl: redirect non-dir by path on rename Amir Goldstein
2017-04-24  9:14 ` [PATCH v2 09/11] ovl: constant st_ino/st_dev across copy up Amir Goldstein
2017-04-24  9:14 ` [PATCH v2 10/11] ovl: persistent and constant inode number for directories Amir Goldstein
2017-04-24  9:14 ` [PATCH v2 11/11] ovl: fix du --one-file-system on overlay mount Amir Goldstein
2017-04-24 18:40 ` [PATCH v2 12/12] ovl: persistent inode numbers for hardlinks Amir Goldstein
2017-04-24 18:51 ` [PATCH v2 00/11] overlayfs constant inode numbers Amir Goldstein
2017-04-25 11:52 ` Vivek Goyal
2017-04-25 12:05   ` Amir Goldstein
2017-04-25 12:16 ` Vivek Goyal
2017-04-25 12:41   ` Amir Goldstein
2017-04-25 12:52     ` Vivek Goyal
2017-04-25 13:23       ` Amir Goldstein
2017-04-25 13:29         ` Vivek Goyal
2017-04-25 13:49           ` Amir Goldstein
2017-04-25 13:53             ` Vivek Goyal
2017-04-25 14:20               ` Amir Goldstein

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.