All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] ovl: concurrent copy up
@ 2017-01-15 13:57 Amir Goldstein
  2017-01-15 13:57 ` [PATCH 1/6] vfs: create vfs helper vfs_tmpfile() Amir Goldstein
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Amir Goldstein @ 2017-01-15 13:57 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Al Viro, linux-unionfs, linux-fsdevel

Miklos,

This is my 2nd attempt to implement concurrent copy up
in overlayfs (3rd if you count the DCACHE_DELETE_LOCK flop).

It's not tagged as V2, because there is nothing in common
between the previous attempt and this one.

This work is based on Al's suggestion to use O_TMPFILE
for regular files and your very helpful waitqueue patch.

Patches 1-4 implement copy up of regular file using O_TMPFILE.
Since there is more common then different code wrt O_TMPFILE
vs. workdir+rename, I opted to keep ovl_copy_up_one() and
copy_up_one_locked() functions with a few 'if (tmpfile) else'
sprinkled around. It may be better to clone copy_up_one_locked()?

Patch 5 is the waitqueue patch you sent me. My only additions are
init_waitqueue_head() and wake_up_lock(), so I kept you as author.

Patch 6 puts it all together. Once again, in an attempt to keep
more common code, I added a few 'if (tmpfile)' and kept the locking
code generic, by assigning workdir = upperdir. I thought you may not
approve with this trick, but couldn't resist trying.

Beyond this simple test:
$ touch /lower/{empty,4g}
$ truncate -s 4g /lower/4g
$ touch /mnt/4g &  # takes a while
$ touch /mnt/empty # exits immediately
$ touch /mnt/4g    # blocks until %1 completes and can be interrupted

I also wrote xfstest overlay/021 which exercises concurrent copy up
using 8 processes on 4 directories and 4K files.

Amir.

Amir Goldstein (5):
  vfs: create vfs helper vfs_tmpfile()
  ovl: check if upperdir fs supports O_TMPFILE
  ovl: rearrange code in ovl_copy_up_locked()
  ovl: copy up regular file using O_TMPFILE
  ovl: concurrent copy up of regular files

Miklos Szeredi (1):
  ovl: introduce copy up waitqueue

 fs/namei.c               | 26 +++++++++-------
 fs/overlayfs/copy_up.c   | 78 +++++++++++++++++++++++++++++++++++-------------
 fs/overlayfs/overlayfs.h | 13 ++++++++
 fs/overlayfs/ovl_entry.h |  3 ++
 fs/overlayfs/super.c     | 11 +++++++
 fs/overlayfs/util.c      | 68 +++++++++++++++++++++++++++++++++++++++++
 include/linux/fs.h       |  1 +
 7 files changed, 170 insertions(+), 30 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2017-01-16 14:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-15 13:57 [PATCH 0/6] ovl: concurrent copy up Amir Goldstein
2017-01-15 13:57 ` [PATCH 1/6] vfs: create vfs helper vfs_tmpfile() Amir Goldstein
2017-01-16 11:00   ` Miklos Szeredi
2017-01-16 11:19     ` Amir Goldstein
2017-01-16 13:22       ` Miklos Szeredi
2017-01-16 14:04         ` Amir Goldstein
2017-01-16 14:15           ` Miklos Szeredi
2017-01-15 13:57 ` [PATCH 2/6] ovl: check if upperdir fs supports O_TMPFILE Amir Goldstein
2017-01-16 14:02   ` Miklos Szeredi
2017-01-16 14:16     ` Amir Goldstein
2017-01-16 14:29       ` Miklos Szeredi
2017-01-15 13:57 ` [PATCH 3/6] ovl: rearrange code in ovl_copy_up_locked() Amir Goldstein
2017-01-15 13:57 ` [PATCH 4/6] ovl: copy up regular file using O_TMPFILE Amir Goldstein
2017-01-15 13:57 ` [PATCH 5/6] ovl: introduce copy up waitqueue Amir Goldstein
2017-01-15 13:57 ` [PATCH 6/6] ovl: concurrent copy up of regular files Amir Goldstein
2017-01-16 11:05   ` Miklos Szeredi
2017-01-16 11:31     ` Amir Goldstein
2017-01-16 11:58   ` [PATCH v2 " Amir Goldstein
2017-01-16 13:29     ` Miklos Szeredi

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.