All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pieter Smith <pieter@boesman.nl>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Josh Triplett <josh@joshtriplett.org>,
	fuse-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 4/7] fs/fuse: support compiling out splice
Date: Wed, 26 Nov 2014 08:44:35 +0100	[thread overview]
Message-ID: <20141126074435.GA15377@smipidev> (raw)
In-Reply-To: <20141125194242.GA21633@smipidev>

On Tue, Nov 25, 2014 at 08:42:42PM +0100, Pieter Smith wrote:
> On Tue, Nov 25, 2014 at 03:17:13PM +0100, Miklos Szeredi wrote:
> > [Trimming CC.  Please do the same for other patches.  I for one am not
> > interested in the general tinification discussion]
> > 
> > On Tue, Nov 25, 2014 at 08:19:39AM +0100, Pieter Smith 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 | 9 +++++++--
> > >  1 file changed, 7 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
> > > index ca88731..e984302 100644
> > > --- a/fs/fuse/dev.c
> > > +++ b/fs/fuse/dev.c
> > > @@ -1191,8 +1191,9 @@ __releases(fc->lock)
> > >   * request_end().  Otherwise add it to the processing list, and set
> > >   * the 'sent' flag.
> > >   */
> > > -static ssize_t fuse_dev_do_read(struct fuse_conn *fc, struct file *file,
> > > -				struct fuse_copy_state *cs, size_t nbytes)
> > > +static ssize_t __maybe_unused
> > > +fuse_dev_do_read(struct fuse_conn *fc, struct file *file,
> > > +		 struct fuse_copy_state *cs, size_t nbytes)
> > 
> > fuse_dev_do_read() is definitely going to remain used.  So no point in adding
> > __maybe_unused.
> 
> Off course, but at least gcc now also is aware that this is intentional and
> nicely refrains from nagging you with a warning.
> 
My apologies. My response was too hasty. You are right. This should not be
needed. I will revert this piece in v6 of this patch.
> > >  {
> > >  	int err;
> > >  	struct fuse_req *req;
> > > @@ -1291,6 +1292,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));
> > >  }
> > >  
> > > +#ifdef CONFIG_SYSCALL_SPLICE
> > >  static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos,
> > >  				    struct pipe_inode_info *pipe,
> > >  				    size_t len, unsigned int flags)
> > > @@ -1368,6 +1370,9 @@ out:
> > >  	kfree(bufs);
> > >  	return ret;
> > >  }
> > > +#else /* CONFIG_SYSCALL_SPLICE */
> > > +#define fuse_dev_splice_read NULL
> > > +#endif
> > 
> > This looks fine.
> > 
> > Thanks,
> > Miklos
> > 
> > >  
> > >  static int fuse_notify_poll(struct fuse_conn *fc, unsigned int size,
> > >  			    struct fuse_copy_state *cs)
> > > -- 
> > > 2.1.0
> > > 

  parent reply	other threads:[~2014-11-26  7:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25  7:19 [PATCH v5 0/7] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile) Pieter Smith
2014-11-25  7:19 ` Pieter Smith
2014-11-25  7:19 ` Pieter Smith
     [not found] ` <1416899996-21315-1-git-send-email-pieter-qeJ+1H9vRZbz+pZb47iToQ@public.gmane.org>
2014-11-25  7:19   ` [PATCH v5 1/7] fs: move sendfile syscall into fs/splice Pieter Smith
2014-11-25  7:19     ` Pieter Smith
2014-11-25  7:19     ` Pieter Smith
2014-11-25  7:19   ` [PATCH v5 2/7] fs: moved kernel_write to fs/read_write Pieter Smith
2014-11-25  7:19     ` Pieter Smith
2014-11-25  7:19   ` [PATCH v5 3/7] fs/splice: support compiling out splice-family syscalls Pieter Smith
2014-11-25  7:19     ` Pieter Smith
2014-11-25  7:19   ` [PATCH v5 5/7] net/core: support compiling out splice Pieter Smith
2014-11-25  7:19     ` Pieter Smith
2014-11-25  7:19   ` [PATCH v5 7/7] fs/splice: full support for " Pieter Smith
2014-11-25  7:19     ` Pieter Smith
2014-11-25  7:19 ` [PATCH v5 4/7] fs/fuse: support " Pieter Smith
2014-11-25  7:19   ` Pieter Smith
2014-11-25  7:19   ` Pieter Smith
2014-11-25 14:17   ` Miklos Szeredi
2014-11-25 19:42     ` Pieter Smith
2014-11-25 20:49       ` josh
2014-11-26  7:46         ` Pieter Smith
2014-11-26  7:44       ` Pieter Smith [this message]
2014-11-25  7:19 ` [PATCH v5 6/7] fs/nfsd: " Pieter Smith
2014-11-25  7:19   ` Pieter Smith
2014-11-25  7:19   ` 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=20141126074435.GA15377@smipidev \
    --to=pieter@boesman.nl \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=josh@joshtriplett.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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.