All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: Pieter Smith <pieter@boesman.nl>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	Jeff Layton <jlayton@poochiereds.net>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	"open list:FUSE: FILESYSTEM..."
	<fuse-devel@lists.sourceforge.net>,
	open list <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 4/6] fs/fuse: support compiling out splice
Date: Sat, 22 Nov 2014 13:44:45 -0800	[thread overview]
Message-ID: <20141122214445.GA23711@thin> (raw)
In-Reply-To: <1416690001-20817-5-git-send-email-pieter@boesman.nl>

On Sat, Nov 22, 2014 at 09:59:59PM +0100, Pieter Smith wrote:
> Compile out splice support from fuse when the splice-family of syscalls is not
> supported by the system (i.e. CONFIG_SYSCALL_SPLICE is undefined).

This patch needs some additional explanation.  Could you explain in the
commit message why this particular splice_read function (and only the
splice_read function, not the splice_write function) needs compiling
out, when others do not?

- Josh Triplett

> Signed-off-by: Pieter Smith <pieter@boesman.nl>
> ---
>  fs/fuse/dev.c      | 4 ++--
>  include/linux/fs.h | 6 ++++++
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
> index ca88731..f8f92a4 100644
> --- a/fs/fuse/dev.c
> +++ b/fs/fuse/dev.c
> @@ -1291,7 +1291,7 @@ static ssize_t fuse_dev_read(struct kiocb *iocb, const struct iovec *iov,
>  	return fuse_dev_do_read(fc, file, &cs, iov_length(iov, nr_segs));
>  }
>  
> -static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos,
> +static ssize_t __maybe_unused fuse_dev_splice_read(struct file *in, loff_t *ppos,
>  				    struct pipe_inode_info *pipe,
>  				    size_t len, unsigned int flags)
>  {
> @@ -2144,7 +2144,7 @@ const struct file_operations fuse_dev_operations = {
>  	.llseek		= no_llseek,
>  	.read		= do_sync_read,
>  	.aio_read	= fuse_dev_read,
> -	.splice_read	= fuse_dev_splice_read,
> +	.splice_read	= __splice_p(fuse_dev_splice_read),
>  	.write		= do_sync_write,
>  	.aio_write	= fuse_dev_write,
>  	.splice_write	= fuse_dev_splice_write,
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index a957d43..04c0975 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -2443,6 +2443,12 @@ extern int blkdev_fsync(struct file *filp, loff_t start, loff_t end,
>  			int datasync);
>  extern void block_sync_page(struct page *page);
>  
> +#ifdef CONFIG_SYSCALL_SPLICE
> +#define __splice_p(x) x
> +#else
> +#define __splice_p(x) NULL
> +#endif
> +
>  /* fs/splice.c */
>  extern ssize_t generic_file_splice_read(struct file *, loff_t *,
>  		struct pipe_inode_info *, size_t, unsigned int);
> -- 
> 1.9.1
> 

  reply	other threads:[~2014-11-22 21:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1416690001-20817-1-git-send-email-pieter@boesman.nl>
2014-11-22 20:59 ` [PATCH 1/6] fs: move sendfile syscall into fs/splice Pieter Smith
2014-11-22 20:59 ` [PATCH 2/6] fs: moved kernel_write to fs/read_write Pieter Smith
     [not found] ` <1416690001-20817-1-git-send-email-pieter-qeJ+1H9vRZbz+pZb47iToQ@public.gmane.org>
2014-11-22 20:59   ` [PATCH 3/6] fs/splice: support compiling out splice-family syscalls Pieter Smith
2014-11-22 20:59     ` Pieter Smith
2014-11-22 20:59     ` Pieter Smith
     [not found]     ` <1416690001-20817-4-git-send-email-pieter-qeJ+1H9vRZbz+pZb47iToQ@public.gmane.org>
2014-11-22 21:50       ` Josh Triplett
2014-11-22 21:50         ` Josh Triplett
2014-11-22 20:59   ` [PATCH 4/6] fs/fuse: support compiling out splice Pieter Smith
2014-11-22 20:59     ` Pieter Smith
2014-11-22 21:44     ` Josh Triplett [this message]
2014-11-22 21:00 ` [PATCH 5/6] net/core: " Pieter Smith
2014-11-22 21:48   ` Josh Triplett
     [not found]     ` <CAPho-_+GV+2sVVxGsPSjvE3heEoGa4chbqrmnxLAr_p7RU=TDQ@mail.gmail.com>
2014-11-22 23:07       ` Josh Triplett
2014-11-22 21:00 ` [PATCH 6/6] fs/splice: full support for " Pieter Smith
2014-11-22 21:53   ` Josh Triplett
2014-11-23 14:20 [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile) Pieter Smith
2014-11-23 14:20 ` [PATCH 4/6] fs/fuse: support compiling out splice Pieter Smith
2014-11-23 14:20   ` Pieter Smith
2014-11-23 14:20   ` Pieter Smith

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=20141122214445.GA23711@thin \
    --to=josh@joshtriplett.org \
    --cc=bfields@fieldses.org \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=jlayton@poochiereds.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=pieter@boesman.nl \
    /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 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.