linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Valerie Aurora <vaurora@redhat.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	neilb@suse.de, viro@zeniv.linux.org.uk
Subject: Re: [PATCH 6/7 v3] overlay: hybrid overlay filesystem prototype
Date: Fri, 24 Sep 2010 16:33:05 +0200	[thread overview]
Message-ID: <4C9CB6A1.9010904@kernel.dk> (raw)
In-Reply-To: <20100922232110.GC26268@shell>

On 2010-09-23 01:21, Valerie Aurora wrote:
> On Mon, Sep 20, 2010 at 08:04:10PM +0200, Miklos Szeredi wrote:
>> From: Miklos Szeredi <mszeredi@suse.cz>
>>
>> This overlay filesystem is a hybrid of entirely filesystem based
>> (unionfs, aufs) and entierly VFS based (union mounts) solutions.
> 
> [...]
> 
>> +static int ovl_copy_up_data(struct path *old, struct path *new, loff_t len)
>> +{
>> +	struct file *old_file;
>> +	struct file *new_file;
>> +	int error = 0;
>> +
>> +	if (len == 0)
>> +		return 0;
>> +
>> +	old_file = path_open(old, O_RDONLY);
>> +	if (IS_ERR(old_file))
>> +		return PTR_ERR(old_file);
>> +
>> +	new_file = path_open(new, O_WRONLY);
>> +	if (IS_ERR(new_file)) {
>> +		error = PTR_ERR(new_file);
>> +		goto out_fput;
>> +	}
>> +
>> +	/* FIXME: copy up sparse files efficiently */
>> +	while (len) {
>> +		loff_t offset = new_file->f_pos;
>> +		size_t this_len = OVL_COPY_UP_CHUNK_SIZE;
>> +		long bytes;
>> +
>> +		if (len < this_len)
>> +			this_len = len;
>> +
>> +		if (signal_pending_state(TASK_KILLABLE, current))
>> +			return -EINTR;
>> +
>> +		bytes = do_splice_direct(old_file, &offset, new_file, this_len,
>> +				 SPLICE_F_MOVE);
> 
> Interruptible copyup is good.  But it looks like splice setup is kind
> of heavyweight and we should do it as seldom as possible.
> 
> What about implementing splice flag SPLICE_F_INTERRUPTIBLE instead?

The pipe alloc and such? That is lazily done and sticks around.

-- 
Jens Axboe

  reply	other threads:[~2010-09-24 14:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-20 18:04 [PATCH 0/7 v3] overlay filesystem prototype Miklos Szeredi
2010-09-20 18:04 ` [PATCH 1/7 v3] vfs: implement open "forwarding" Miklos Szeredi
2010-09-20 18:04 ` [PATCH 2/7 v3] vfs: make i_op->permission take a dentry instead of an inode Miklos Szeredi
2010-09-20 18:04 ` [PATCH 3/7 v3] vfs: add flag to allow rename to same inode Miklos Szeredi
2010-09-23 22:04   ` Valerie Aurora
2010-09-20 18:04 ` [PATCH 4/7 v3] vfs: export do_splice_direct() to modules Miklos Szeredi
2010-09-20 18:04 ` [PATCH 5/7 v3] vfs: fix possible use after free in finish_open() Miklos Szeredi
2010-09-23 20:19   ` Valerie Aurora
2010-09-20 18:04 ` [PATCH 6/7 v3] overlay: hybrid overlay filesystem prototype Miklos Szeredi
2010-09-22 23:21   ` Valerie Aurora
2010-09-24 14:33     ` Jens Axboe [this message]
2010-09-24 17:16       ` Valerie Aurora
2010-09-24 17:56   ` Valerie Aurora
2010-09-27  8:11     ` Miklos Szeredi
2010-09-27 11:49       ` Andreas Gruenbacher
2010-09-27 12:15         ` J. R. Okajima
2010-09-27 18:47       ` Valerie Aurora
2010-09-28  8:24         ` Andreas Gruenbacher
2010-09-30 21:51           ` Valerie Aurora
2010-10-01  9:34             ` Andreas Gruenbacher
2010-10-06 17:31               ` Valerie Aurora
2010-10-11  9:41                 ` Michal Suchanek
2010-10-11 13:51                 ` Scott James Remnant
2010-09-20 18:04 ` [PATCH 7/7 v3] overlay: overlay filesystem documentation Miklos Szeredi
2010-09-21  1:31 ` [PATCH 0/7 v3] overlay filesystem prototype Neil Brown
2010-09-22  9:50   ` Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C9CB6A1.9010904@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=neilb@suse.de \
    --cc=vaurora@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).