From: Pieter Smith <pieter@boesman.nl>
To: Josh Triplett <josh@joshtriplett.org>
Cc: "Richard Weinberger" <richard.weinberger@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Bertrand Jacquin" <beber@meleeweb.net>,
"Oleg Nesterov" <oleg@redhat.com>,
"J. Bruce Fields" <bfields@fieldses.org>,
"Eric Dumazet" <edumazet@google.com>,
蔡正龙 <zhenglong.cai@cs2c.com.cn>,
"Jeff Layton" <jlayton@poochiereds.net>,
"Tom Herbert" <therbert@google.com>,
"Alexei Starovoitov" <ast@plumgrid.com>,
"Miklos Szeredi" <miklos@szeredi.hu>,
"Peter Foley" <pefoley2@pefoley.com>,
"Hugh Dickins" <hughd@google.com>,
"Xiao Guangrong" <xiaoguangrong@linux.vnet.ibm.com>,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Mel Gorman" <mgorman@suse.de>,
"Matt Turner" <mattst88@gmail.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
"Alexander Duyck" <alexander.h.duyck@intel.com>,
"open list:FUSE: FILESYSTEM..."
<fuse-devel@lists.sourceforge.net>,
"Luis R. Rodriguez" <mcgrof@suse.com>
Subject: Re: [fuse-devel] [PATCH 4/6] fs/fuse: support compiling out splice
Date: Mon, 24 Nov 2014 10:49:31 +0100 [thread overview]
Message-ID: <20141124094931.GA1055@smipidev> (raw)
In-Reply-To: <20141123232302.GA12456@thin>
On Sun, Nov 23, 2014 at 03:23:02PM -0800, Josh Triplett wrote:
> On Sun, Nov 23, 2014 at 11:29:08PM +0100, Richard Weinberger wrote:
> > On Sun, Nov 23, 2014 at 3:20 PM, Pieter Smith <pieter@boesman.nl> wrote:
> > > To implement splice support, fs/fuse makes use of nosteal_pipe_buf_ops. This
> > > struct is exported by fs/splice. The goal of the larger patch set is to
> > > completely compile out fs/splice, so uses of the exported struct need to be
> > > compiled out along with fs/splice.
> > >
> > > This patch therefore compiles out splice support in fs/fuse when
> > > CONFIG_SYSCALL_SPLICE is undefined.
> > >
> > > 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
> > > +
> >
> > This needs to go into a different patch.
> > One logical change per patch please. :-)
>
> Easy enough to merge this one into the patch introducing
> CONFIG_SYSCALL_SPLICE, then.
>
> - Josh Triplett
The patch introducing CONFIG_SYSCALL_SPLICE (PATCH 3) only compiles out the
syscalls. PATCH 6 on the other hand, compiles out fs/splice.c. This patch
allows fs/fuse to be compiled when fs/splice.c is compiled out. If I am to
squash it, it would be logical to include it in PATCH 6, not 3.
Is this agreeable?
PATCH 5 does the same as this one for net/core. Should I still keep PATCH 5
separate from a maintainership perspective?
- Pieter Smith
next prev parent reply other threads:[~2014-11-24 9:49 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-23 14:20 [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile) Pieter Smith
[not found] ` <1416752468-1626-1-git-send-email-pieter-qeJ+1H9vRZbz+pZb47iToQ@public.gmane.org>
2014-11-23 14:20 ` [PATCH 1/6] fs: move sendfile syscall into fs/splice Pieter Smith
2014-11-23 14:20 ` [PATCH 5/6] net/core: support compiling out splice Pieter Smith
2014-11-23 14:20 ` [PATCH 6/6] fs/splice: full support for " Pieter Smith
2014-11-23 18:46 ` [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile) David Miller
[not found] ` <20141123.134623.2061031332250984539.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-11-23 19:43 ` Josh Triplett
2014-11-23 20:30 ` Pieter Smith
2014-11-23 23:36 ` Josh Triplett
2014-11-24 0:28 ` Jeff Layton
[not found] ` <20141123192810.682a223e-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2014-11-24 0:32 ` Josh Triplett
2014-11-24 10:01 ` Pieter Smith
2014-11-24 14:54 ` Josh Triplett
2014-11-24 8:38 ` Geert Uytterhoeven
[not found] ` <CAMuHMdW8gAiyFiPHu-N4Dg_+b6Qg9JXZZ3PqOn=VmZLcEH-Xkg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-24 9:00 ` Josh Triplett
2014-11-23 14:20 ` [PATCH 2/6] fs: moved kernel_write to fs/read_write Pieter Smith
2014-11-23 14:20 ` [PATCH 3/6] fs/splice: support compiling out splice-family syscalls Pieter Smith
2014-11-23 14:20 ` [PATCH 4/6] fs/fuse: support compiling out splice Pieter Smith
[not found] ` <1416752468-1626-5-git-send-email-pieter-qeJ+1H9vRZbz+pZb47iToQ@public.gmane.org>
2014-11-23 22:29 ` [fuse-devel] " Richard Weinberger
2014-11-23 23:23 ` Josh Triplett
2014-11-24 9:49 ` Pieter Smith [this message]
2014-11-24 16:05 ` Josh Triplett
2014-11-24 19:34 ` Greg KH
[not found] ` <20141124193412.GB31618-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2014-11-24 20:14 ` josh-iaAMLnmF4UmaiuxdJuQwMA
2014-11-24 20:22 ` Greg KH
[not found] ` <20141124202214.GA11362-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2014-11-24 21:49 ` 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=20141124094931.GA1055@smipidev \
--to=pieter@boesman.nl \
--cc=alexander.h.duyck@intel.com \
--cc=ast@plumgrid.com \
--cc=beber@meleeweb.net \
--cc=bfields@fieldses.org \
--cc=edumazet@google.com \
--cc=fuse-devel@lists.sourceforge.net \
--cc=geert@linux-m68k.org \
--cc=hughd@google.com \
--cc=jlayton@poochiereds.net \
--cc=josh@joshtriplett.org \
--cc=mattst88@gmail.com \
--cc=mcgrof@suse.com \
--cc=mgorman@suse.de \
--cc=miklos@szeredi.hu \
--cc=mst@redhat.com \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pefoley2@pefoley.com \
--cc=richard.weinberger@gmail.com \
--cc=therbert@google.com \
--cc=xiaoguangrong@linux.vnet.ibm.com \
--cc=zhenglong.cai@cs2c.com.cn \
/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).