All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] ovl: consistent_fd feature
@ 2017-03-29 14:36 Amir Goldstein
  2017-03-29 14:36 ` [PATCH 1/6] ovl: store path type in dentry Amir Goldstein
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Amir Goldstein @ 2017-03-29 14:36 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: linux-unionfs

Mikos,

This patch set implement the 'simple' solution we discussed on LSF.
For the special case of all overlays on the same fs with clone support,
files are copied up on open for read (as O_TMPFILE) and linked to
upperdir on first open for write.

- Patches 1-2 are the refactoring I sent you earlier.  They are not
  strictly needed for the consistent_fd feature - up to you.
- Patches 3-4 test 'samefs' and 'cloneup' properties of underlying fs.
- Patch 5 copies up open for read (for the special case).
- Patch 6 defers linking the tmpfile to first open for write.

Some of the design choices for patch 6 are questionable:
the storing of tempfile in ovl_dentry_update(),
temp dentry is freed only on overlay dentry release.
awaiting your feedback about those choises.

xfstests run of ./check -overlay -g quick passed on
both ext4 (no clone) and xfs+reflink (yes clone).
test overlay/016 ("Test ro/rw fd data inconsistecies")
passes with xfs+reflink.
test overlay/013 ("Test truncate running executable...")
fails with xfs+reflink, because test expects the inconsistency.

I also modified unionmount-testsuite and added ./run --ov --samefs
to setup lower+upper on same base fs of your choise [1].
It passes with base fs tmpfs (no clone) and base fs xfs+reflink.

Amir.

[1] https://github.com/amir73il/unionmount-testsuite/commits/overlayfs-devel

Amir Goldstein (6):
  ovl: store path type in dentry
  ovl: cram opaque boolean into type flags
  ovl: check if all layers are on the same fs
  ovl: check if clone from lower to upper is supported
  ovl: copy on read with consistent_fd feature
  ovl: link upper tempfile on open for write

 Documentation/filesystems/vfs.txt | 13 +++---
 fs/overlayfs/Kconfig              | 18 ++++++++
 fs/overlayfs/copy_up.c            | 97 ++++++++++++++++++++++++++++++++-------
 fs/overlayfs/inode.c              | 41 ++++++++++++-----
 fs/overlayfs/namei.c              | 10 ++--
 fs/overlayfs/overlayfs.h          | 12 ++++-
 fs/overlayfs/ovl_entry.h          | 20 ++++++--
 fs/overlayfs/super.c              | 59 ++++++++++++++++++++++--
 fs/overlayfs/util.c               | 69 +++++++++++++++++++++++-----
 9 files changed, 277 insertions(+), 62 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2017-04-08  3:03 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-29 14:36 [PATCH 0/6] ovl: consistent_fd feature Amir Goldstein
2017-03-29 14:36 ` [PATCH 1/6] ovl: store path type in dentry Amir Goldstein
2017-03-29 14:36 ` [PATCH 2/6] ovl: cram opaque boolean into type flags Amir Goldstein
2017-03-29 14:36 ` [PATCH 3/6] ovl: check if all layers are on the same fs Amir Goldstein
2017-03-29 14:36 ` [PATCH 4/6] ovl: check if clone from lower to upper is supported Amir Goldstein
2017-03-29 14:36 ` [PATCH 5/6] ovl: copy on read with consistent_fd feature Amir Goldstein
2017-03-30 11:28   ` Amir Goldstein
2017-03-31 17:58   ` Vivek Goyal
2017-04-01  9:27     ` Amir Goldstein
2017-04-05 13:20       ` Amir Goldstein
2017-03-29 14:36 ` [PATCH 6/6] ovl: link upper tempfile on open for write Amir Goldstein
2017-03-30 11:26 ` [PATCH 7/7] ovl: prevent copy on read if no upper/work dir Amir Goldstein
2017-03-30 11:34 ` [PATCH 0/6] ovl: consistent_fd feature Amir Goldstein
2017-04-06 15:20   ` Miklos Szeredi
2017-04-06 15:37     ` Miklos Szeredi
2017-04-06 16:25       ` Amir Goldstein
2017-04-07  9:32         ` Miklos Szeredi
2017-04-07  9:56           ` Miklos Szeredi
2017-04-07 10:47             ` Amir Goldstein
2017-04-07 13:03               ` Miklos Szeredi
2017-04-07 15:07                 ` Amir Goldstein
2017-04-06 16:46     ` Amir Goldstein
2017-04-07  9:43       ` Miklos Szeredi
2017-04-07 11:04         ` Amir Goldstein
2017-04-08  3:03     ` J. R. Okajima

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.