linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 00/13] overlayfs stable inodes
@ 2017-04-16 23:59 Amir Goldstein
  2017-04-16 23:59 ` [RFC][PATCH 01/13] ovl: check if all layers are on the same fs Amir Goldstein
                   ` (13 more replies)
  0 siblings, 14 replies; 43+ messages in thread
From: Amir Goldstein @ 2017-04-16 23:59 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Al Viro, linux-unionfs, linux-fsdevel

Overlayfs inodes are considered unstable in several aspects,
because on a copy up event:
1. st_ino can change
2. st_dev can change
3. hardlinks are broken
4. NFS handle would become stale
5. content of read-only file descriptor would become stale

This patch set 'stabilizes' overlayfs inodes w.r.t. st_ino/st_dev
and takes some big steps in the direction of stabilizing hardlinks
and NFS handles.

The full work is available at [1] and includes also an untested
WIP for NFS export support.

This work relies heavily on inode and dentry cache - so long as
the overlayfs dcache is fully populated, hardlinks should never be
broken and NFS handles should never become stale on copy up.

The missing piece of the puzzle is a persistent mapping from
lower entries to upper entries, so that overlay entries could be
reconstructed from their stable (lower) unique identifier.

But the work has merit even without the missing piece, because it
stabilizes st_ino/st_dev and prevents breaking hardlinks in many
use cases.

[1] https://github.com/amir73il/linux/commits/ovl-nfs-export

Amir Goldstein (13):
  ovl: check if all layers are on the same fs
  ovl: redirect dir by file handle on copy up
  ovl: lookup redirect by file handle
  ovl: store file handle of stable inode
  ovl: lookup stable inode by file handle
  ovl: move inode helpers to inode.c
  ovl: create helpers for initializing hashed inode
  ovl: allow hashing non upper inodes
  ovl: inherit overlay inode ino/generation from real inode
  ovl: hash overlay inodes by stable inode
  ovl: fix du --one-file-system on overlay mount
  ovl: constant ino across copy up
  ovl: try to hardlink upper on copy up of lower hardlinks

 fs/overlayfs/Kconfig     |  16 ++++
 fs/overlayfs/copy_up.c   | 130 ++++++++++++++++++++++++++-
 fs/overlayfs/dir.c       |   2 +-
 fs/overlayfs/inode.c     | 106 ++++++++++++++++++++--
 fs/overlayfs/namei.c     | 226 ++++++++++++++++++++++++++++++++++++++++++-----
 fs/overlayfs/overlayfs.h |  40 +++++++--
 fs/overlayfs/ovl_entry.h |   4 +-
 fs/overlayfs/readdir.c   |  85 ++++++++++++++++--
 fs/overlayfs/super.c     |  37 +++++++-
 fs/overlayfs/util.c      |  51 +++++++----
 10 files changed, 633 insertions(+), 64 deletions(-)

-- 
2.7.4

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

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

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-16 23:59 [RFC][PATCH 00/13] overlayfs stable inodes Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 01/13] ovl: check if all layers are on the same fs Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 02/13] ovl: redirect dir by file handle on copy up Amir Goldstein
2017-04-17 13:33   ` Rock Lee
2017-04-17 14:03     ` Amir Goldstein
2017-04-17 19:49   ` Vivek Goyal
2017-04-17 21:14     ` Amir Goldstein
2017-04-19 15:16   ` Miklos Szeredi
2017-04-19 15:27     ` Amir Goldstein
2017-04-19 15:33       ` Miklos Szeredi
2017-04-19 15:43         ` Amir Goldstein
2017-04-20  8:55       ` Amir Goldstein
2017-04-21 15:02         ` Miklos Szeredi
2017-04-21 15:29           ` Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 03/13] ovl: lookup redirect by file handle Amir Goldstein
2017-04-18 13:05   ` Vivek Goyal
2017-04-18 14:05     ` Amir Goldstein
2017-04-18 18:32       ` Vivek Goyal
2017-04-18 18:57         ` Amir Goldstein
2017-04-19 15:21           ` Miklos Szeredi
2017-04-19 15:35             ` Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 04/13] ovl: store file handle of stable inode Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 05/13] ovl: lookup stable inode by file handle Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 06/13] ovl: move inode helpers to inode.c Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 07/13] ovl: create helpers for initializing hashed inode Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 08/13] ovl: allow hashing non upper inodes Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 09/13] ovl: inherit overlay inode ino/generation from real inode Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 10/13] ovl: hash overlay inodes by stable inode Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 11/13] ovl: fix du --one-file-system on overlay mount Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 12/13] ovl: constant ino across copy up Amir Goldstein
2017-04-16 23:59 ` [RFC][PATCH 13/13] ovl: try to hardlink upper on copy up of lower hardlinks Amir Goldstein
2017-04-18 18:37 ` [RFC][PATCH 00/13] overlayfs stable inodes Amir Goldstein
2017-04-19  9:16   ` Miklos Szeredi
2017-04-19 10:37     ` Amir Goldstein
2017-04-19 13:52       ` Miklos Szeredi
2017-04-19 14:46         ` Amir Goldstein
2017-04-19 15:01           ` Miklos Szeredi
2017-04-19 15:17             ` Amir Goldstein
2017-04-19 22:58               ` Darrick J. Wong
2017-04-19 23:15                 ` Andreas Dilger
2017-04-20  5:43                   ` Amir Goldstein
2017-04-20  8:45                   ` Miklos Szeredi
2017-04-20  8:47                     ` 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).