linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/16] overlayfs constant inode numbers
@ 2017-04-26 21:35 Amir Goldstein
  2017-04-26 21:35 ` [PATCH v3 01/16] ovl: store path type in dentry Amir Goldstein
                   ` (15 more replies)
  0 siblings, 16 replies; 21+ messages in thread
From: Amir Goldstein @ 2017-04-26 21:35 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Vivek Goyal, Al Viro, linux-unionfs, linux-fsdevel

Miklos,

This is v3 series of redirect by file handle and constant inode numbers.
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
- Consistent st_dev for all overlay objects

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 was instrumented to verify constant inode numbers
after rename/link and mount cycle [2].

Tested the following layer configurations:
 ./run --ov{,=0,=1} {,--samefs}

The following test fails the constant inode number verification of upper
hardlink in the non-same-lower-fs configuration:
 ./run --ov=1 hard-link

xfstest overlay/017 was added a check for constant and persistent inode
numbers across rename and mount cycle [3].
Tested also ./check -overlay -g quick.

Changes since v2:
- Storing uuid of lower origin (and root fh for now)
- Re-factor ovl_lookup_single() (per your comment)
- Verify uuid of same_lower_sb (allow zero uuid)
- Find layer by root fh (see how you feel about that)
- d_drop() ovl_link() target (please comment on that)
- Updated overlayfs.txt

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 (16):
  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: use an auxiliary var for overlay root entry
  ovl: factor out ovl_lookup_data()
  ovl: lookup redirect by file handle
  ovl: validate lower layer uuid and root on redirect by fh
  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
  ovl: persistent inode numbers for hardlinks
  ovl: update documentation w.r.t. constant inode numbers

 Documentation/filesystems/overlayfs.txt |  19 +-
 fs/overlayfs/copy_up.c                  | 142 +++++++++++++++
 fs/overlayfs/dir.c                      |  31 +++-
 fs/overlayfs/inode.c                    |  21 ++-
 fs/overlayfs/namei.c                    | 311 ++++++++++++++++++++++++++++----
 fs/overlayfs/overlayfs.h                |  37 ++++
 fs/overlayfs/ovl_entry.h                |   9 +-
 fs/overlayfs/super.c                    |  24 +++
 fs/overlayfs/util.c                     |  83 ++++++++-
 9 files changed, 622 insertions(+), 55 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2017-04-27 17:29 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-26 21:35 [PATCH v3 00/16] overlayfs constant inode numbers Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 01/16] ovl: store path type in dentry Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 02/16] ovl: cram opaque boolean into type flags Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 03/16] ovl: check if all layers are on the same fs Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 04/16] ovl: store file handle of lower inode on copy up Amir Goldstein
2017-04-27  7:23   ` Miklos Szeredi
2017-04-27  7:46     ` Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 05/16] ovl: use an auxiliary var for overlay root entry Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 06/16] ovl: factor out ovl_lookup_data() Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 07/16] ovl: lookup redirect by file handle Amir Goldstein
2017-04-27 17:28   ` kbuild test robot
2017-04-26 21:35 ` [PATCH v3 08/16] ovl: validate lower layer uuid and root on redirect by fh Amir Goldstein
2017-04-27  7:15   ` Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 09/16] ovl: lookup non-dir inode copy up origin Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 10/16] ovl: set the COPYUP type flag for non-dirs Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 11/16] ovl: redirect non-dir by path on rename Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 12/16] ovl: constant st_ino/st_dev across copy up Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 13/16] ovl: persistent inode number for directories Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 14/16] ovl: fix du --one-file-system on overlay mount Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 15/16] ovl: persistent inode numbers for hardlinks Amir Goldstein
2017-04-26 21:35 ` [PATCH v3 16/16] ovl: update documentation w.r.t. constant inode numbers Amir Goldstein

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).