lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 22 Sep 2010 19:21:11 -0400
From:	Valerie Aurora <vaurora@...hat.com>
To:	Miklos Szeredi <miklos@...redi.hu>, Jens Axboe <axboe@...nel.dk>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	neilb@...e.de, viro@...iv.linux.org.uk
Subject: Re: [PATCH 6/7 v3] overlay: hybrid overlay filesystem prototype

On Mon, Sep 20, 2010 at 08:04:10PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@...e.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?

-VAL
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ