linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v14 05/17] overlayfs: Implement splice-read
       [not found] <20230214171330.2722188-1-dhowells@redhat.com>
@ 2023-02-14 17:13 ` David Howells
  2023-02-15 14:21   ` Miklos Szeredi
                     ` (2 more replies)
  2023-02-14 17:13 ` [PATCH v14 06/17] coda: " David Howells
  1 sibling, 3 replies; 12+ messages in thread
From: David Howells @ 2023-02-14 17:13 UTC (permalink / raw)
  To: Jens Axboe, Al Viro, Christoph Hellwig
  Cc: David Howells, Matthew Wilcox, Jan Kara, Jeff Layton,
	David Hildenbrand, Jason Gunthorpe, Logan Gunthorpe,
	Hillf Danton, linux-fsdevel, linux-block, linux-kernel, linux-mm,
	Christoph Hellwig, John Hubbard, Miklos Szeredi, linux-unionfs

Implement splice-read for overlayfs by passing the request down a layer
rather than going through generic_file_splice_read() which is going to be
changed to assume that ->read_folio() is present on buffered files.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Christoph Hellwig <hch@lst.de>
cc: Jens Axboe <axboe@kernel.dk>
cc: Al Viro <viro@zeniv.linux.org.uk>
cc: John Hubbard <jhubbard@nvidia.com>
cc: David Hildenbrand <david@redhat.com>
cc: Matthew Wilcox <willy@infradead.org>
cc: Miklos Szeredi <miklos@szeredi.hu>
cc: linux-unionfs@vger.kernel.org
cc: linux-block@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
---
 fs/overlayfs/file.c | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
index c9d0c362c7ef..267b61df6fcd 100644
--- a/fs/overlayfs/file.c
+++ b/fs/overlayfs/file.c
@@ -419,6 +419,40 @@ static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter)
 	return ret;
 }
 
+static ssize_t ovl_splice_read(struct file *in, loff_t *ppos,
+			       struct pipe_inode_info *pipe, size_t len,
+			       unsigned int flags)
+{
+	const struct cred *old_cred;
+	struct fd real;
+	ssize_t ret;
+
+	ret = ovl_real_fdget(in, &real);
+	if (ret)
+		return ret;
+
+	ret = -EINVAL;
+	if (in->f_flags & O_DIRECT &&
+	    !(real.file->f_mode & FMODE_CAN_ODIRECT))
+		goto out_fdput;
+	if (!real.file->f_op->splice_read)
+		goto out_fdput;
+
+	ret = rw_verify_area(READ, in, ppos, len);
+	if (unlikely(ret < 0))
+		return ret;
+
+	old_cred = ovl_override_creds(file_inode(in)->i_sb);
+	ret = real.file->f_op->splice_read(real.file, ppos, pipe, len, flags);
+
+	revert_creds(old_cred);
+	ovl_file_accessed(in);
+out_fdput:
+	fdput(real);
+
+	return ret;
+}
+
 /*
  * Calling iter_file_splice_write() directly from overlay's f_op may deadlock
  * due to lock order inversion between pipe->mutex in iter_file_splice_write()
@@ -695,7 +729,7 @@ const struct file_operations ovl_file_operations = {
 	.fallocate	= ovl_fallocate,
 	.fadvise	= ovl_fadvise,
 	.flush		= ovl_flush,
-	.splice_read    = generic_file_splice_read,
+	.splice_read    = ovl_splice_read,
 	.splice_write   = ovl_splice_write,
 
 	.copy_file_range	= ovl_copy_file_range,


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v14 06/17] coda: Implement splice-read
       [not found] <20230214171330.2722188-1-dhowells@redhat.com>
  2023-02-14 17:13 ` [PATCH v14 05/17] overlayfs: Implement splice-read David Howells
@ 2023-02-14 17:13 ` David Howells
  2023-02-14 18:04   ` Jan Harkes
  1 sibling, 1 reply; 12+ messages in thread
From: David Howells @ 2023-02-14 17:13 UTC (permalink / raw)
  To: Jens Axboe, Al Viro, Christoph Hellwig
  Cc: David Howells, Matthew Wilcox, Jan Kara, Jeff Layton,
	David Hildenbrand, Jason Gunthorpe, Logan Gunthorpe,
	Hillf Danton, linux-fsdevel, linux-block, linux-kernel, linux-mm,
	Christoph Hellwig, John Hubbard, Jan Harkes, coda, codalist,
	linux-unionfs

Implement splice-read for coda by passing the request down a layer rather
than going through generic_file_splice_read() which is going to be changed
to assume that ->read_folio() is present on buffered files.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Christoph Hellwig <hch@lst.de>
cc: Jens Axboe <axboe@kernel.dk>
cc: Al Viro <viro@zeniv.linux.org.uk>
cc: John Hubbard <jhubbard@nvidia.com>
cc: David Hildenbrand <david@redhat.com>
cc: Matthew Wilcox <willy@infradead.org>
cc: Jan Harkes <jaharkes@cs.cmu.edu>
cc: coda@cs.cmu.edu
cc: codalist@coda.cs.cmu.edu
cc: linux-unionfs@vger.kernel.org
cc: linux-block@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
---
 fs/coda/file.c | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/fs/coda/file.c b/fs/coda/file.c
index 3f3c81e6b1ab..33cd7880d30e 100644
--- a/fs/coda/file.c
+++ b/fs/coda/file.c
@@ -23,6 +23,7 @@
 #include <linux/slab.h>
 #include <linux/uaccess.h>
 #include <linux/uio.h>
+#include <linux/splice.h>
 
 #include <linux/coda.h>
 #include "coda_psdev.h"
@@ -94,6 +95,39 @@ coda_file_write_iter(struct kiocb *iocb, struct iov_iter *to)
 	return ret;
 }
 
+static ssize_t
+coda_file_splice_read(struct file *coda_file, loff_t *ppos,
+		      struct pipe_inode_info *pipe,
+		      size_t len, unsigned int flags)
+{
+	struct inode *coda_inode = file_inode(coda_file);
+	struct coda_file_info *cfi = coda_ftoc(coda_file);
+	struct file *in = cfi->cfi_container;
+	loff_t ki_pos = *ppos;
+	ssize_t ret;
+
+	if (!in->f_op->splice_read)
+		return -EINVAL;
+
+	ret = rw_verify_area(READ, in, ppos, len);
+	if (unlikely(ret < 0))
+		return ret;
+
+	ret = venus_access_intent(coda_inode->i_sb, coda_i2f(coda_inode),
+				  &cfi->cfi_access_intent,
+				  len, ki_pos, CODA_ACCESS_TYPE_READ);
+	if (ret)
+		goto finish_read;
+
+	ret = in->f_op->splice_read(in, ppos, pipe, len, flags);
+
+finish_read:
+	venus_access_intent(coda_inode->i_sb, coda_i2f(coda_inode),
+			    &cfi->cfi_access_intent,
+			    len, ki_pos, CODA_ACCESS_TYPE_READ_FINISH);
+	return ret;
+}
+
 static void
 coda_vm_open(struct vm_area_struct *vma)
 {
@@ -302,5 +336,5 @@ const struct file_operations coda_file_operations = {
 	.open		= coda_open,
 	.release	= coda_release,
 	.fsync		= coda_fsync,
-	.splice_read	= generic_file_splice_read,
+	.splice_read	= coda_file_splice_read,
 };


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v14 06/17] coda: Implement splice-read
  2023-02-14 17:13 ` [PATCH v14 06/17] coda: " David Howells
@ 2023-02-14 18:04   ` Jan Harkes
  0 siblings, 0 replies; 12+ messages in thread
From: Jan Harkes @ 2023-02-14 18:04 UTC (permalink / raw)
  To: David Howells
  Cc: Jens Axboe, Al Viro, Christoph Hellwig, Matthew Wilcox, Jan Kara,
	Jeff Layton, David Hildenbrand, Jason Gunthorpe, Logan Gunthorpe,
	Hillf Danton, linux-fsdevel, linux-block, linux-kernel, linux-mm,
	Christoph Hellwig, John Hubbard, linux-unionfs

On Tue, Feb 14, 2023 at 05:13:19PM +0000, David Howells wrote:
> Implement splice-read for coda by passing the request down a layer rather
> than going through generic_file_splice_read() which is going to be changed
> to assume that ->read_folio() is present on buffered files.
> 
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Christoph Hellwig <hch@lst.de>
> cc: Jens Axboe <axboe@kernel.dk>
> cc: Al Viro <viro@zeniv.linux.org.uk>
> cc: John Hubbard <jhubbard@nvidia.com>
> cc: David Hildenbrand <david@redhat.com>
> cc: Matthew Wilcox <willy@infradead.org>
> cc: Jan Harkes <jaharkes@cs.cmu.edu>
> cc: coda@cs.cmu.edu
> cc: codalist@coda.cs.cmu.edu
> cc: linux-unionfs@vger.kernel.org
> cc: linux-block@vger.kernel.org
> cc: linux-fsdevel@vger.kernel.org
> cc: linux-mm@kvack.org
> ---

Acked-by: Jan Harkes <jaharkes@cs.cmu.edu>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v14 05/17] overlayfs: Implement splice-read
  2023-02-14 17:13 ` [PATCH v14 05/17] overlayfs: Implement splice-read David Howells
@ 2023-02-15 14:21   ` Miklos Szeredi
  2023-02-15 15:03   ` David Howells
  2023-02-15 15:40   ` [PATCH v15 " David Howells
  2 siblings, 0 replies; 12+ messages in thread
From: Miklos Szeredi @ 2023-02-15 14:21 UTC (permalink / raw)
  To: David Howells
  Cc: Jens Axboe, Al Viro, Christoph Hellwig, Matthew Wilcox, Jan Kara,
	Jeff Layton, David Hildenbrand, Jason Gunthorpe, Logan Gunthorpe,
	Hillf Danton, linux-fsdevel, linux-block, linux-kernel, linux-mm,
	Christoph Hellwig, John Hubbard, linux-unionfs

On Tue, 14 Feb 2023 at 18:14, David Howells <dhowells@redhat.com> wrote:
>
> Implement splice-read for overlayfs by passing the request down a layer
> rather than going through generic_file_splice_read() which is going to be
> changed to assume that ->read_folio() is present on buffered files.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Christoph Hellwig <hch@lst.de>
> cc: Jens Axboe <axboe@kernel.dk>
> cc: Al Viro <viro@zeniv.linux.org.uk>
> cc: John Hubbard <jhubbard@nvidia.com>
> cc: David Hildenbrand <david@redhat.com>
> cc: Matthew Wilcox <willy@infradead.org>
> cc: Miklos Szeredi <miklos@szeredi.hu>
> cc: linux-unionfs@vger.kernel.org
> cc: linux-block@vger.kernel.org
> cc: linux-fsdevel@vger.kernel.org
> cc: linux-mm@kvack.org
> ---
>  fs/overlayfs/file.c | 36 +++++++++++++++++++++++++++++++++++-
>  1 file changed, 35 insertions(+), 1 deletion(-)
>
> diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
> index c9d0c362c7ef..267b61df6fcd 100644
> --- a/fs/overlayfs/file.c
> +++ b/fs/overlayfs/file.c
> @@ -419,6 +419,40 @@ static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter)
>         return ret;
>  }
>
> +static ssize_t ovl_splice_read(struct file *in, loff_t *ppos,
> +                              struct pipe_inode_info *pipe, size_t len,
> +                              unsigned int flags)
> +{
> +       const struct cred *old_cred;
> +       struct fd real;
> +       ssize_t ret;
> +
> +       ret = ovl_real_fdget(in, &real);
> +       if (ret)
> +               return ret;
> +
> +       ret = -EINVAL;
> +       if (in->f_flags & O_DIRECT &&
> +           !(real.file->f_mode & FMODE_CAN_ODIRECT))
> +               goto out_fdput;

This is unnecessary, as it was already done in ovl_real_fdget() ->
ovl_real_fdget_meta() -> ovl_change_flags().

> +       if (!real.file->f_op->splice_read)
> +               goto out_fdput;
> +
> +       ret = rw_verify_area(READ, in, ppos, len);

Should be on real.file.

> +       if (unlikely(ret < 0))
> +               return ret;

Leaks fd.

> +
> +       old_cred = ovl_override_creds(file_inode(in)->i_sb);
> +       ret = real.file->f_op->splice_read(real.file, ppos, pipe, len, flags);
> +
> +       revert_creds(old_cred);
> +       ovl_file_accessed(in);
> +out_fdput:
> +       fdput(real);
> +
> +       return ret;
> +}
> +
>  /*
>   * Calling iter_file_splice_write() directly from overlay's f_op may deadlock
>   * due to lock order inversion between pipe->mutex in iter_file_splice_write()
> @@ -695,7 +729,7 @@ const struct file_operations ovl_file_operations = {
>         .fallocate      = ovl_fallocate,
>         .fadvise        = ovl_fadvise,
>         .flush          = ovl_flush,
> -       .splice_read    = generic_file_splice_read,
> +       .splice_read    = ovl_splice_read,
>         .splice_write   = ovl_splice_write,
>
>         .copy_file_range        = ovl_copy_file_range,
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v14 05/17] overlayfs: Implement splice-read
  2023-02-14 17:13 ` [PATCH v14 05/17] overlayfs: Implement splice-read David Howells
  2023-02-15 14:21   ` Miklos Szeredi
@ 2023-02-15 15:03   ` David Howells
  2023-02-15 15:32     ` Miklos Szeredi
  2023-02-15 15:40   ` [PATCH v15 " David Howells
  2 siblings, 1 reply; 12+ messages in thread
From: David Howells @ 2023-02-15 15:03 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: dhowells, Jens Axboe, Al Viro, Christoph Hellwig, Matthew Wilcox,
	Jan Kara, Jeff Layton, David Hildenbrand, Jason Gunthorpe,
	Logan Gunthorpe, Hillf Danton, linux-fsdevel, linux-block,
	linux-kernel, linux-mm, Christoph Hellwig, John Hubbard,
	linux-unionfs

Miklos Szeredi <miklos@szeredi.hu> wrote:

> > +       ret = -EINVAL;
> > +       if (in->f_flags & O_DIRECT &&
> > +           !(real.file->f_mode & FMODE_CAN_ODIRECT))
> > +               goto out_fdput;
> 
> This is unnecessary, as it was already done in ovl_real_fdget() ->
> ovl_real_fdget_meta() -> ovl_change_flags().

Does that mean ovl_read_iter() and ovl_write_iter() shouldn't be doing it,
then?

David


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v14 05/17] overlayfs: Implement splice-read
  2023-02-15 15:03   ` David Howells
@ 2023-02-15 15:32     ` Miklos Szeredi
  0 siblings, 0 replies; 12+ messages in thread
From: Miklos Szeredi @ 2023-02-15 15:32 UTC (permalink / raw)
  To: David Howells
  Cc: Jens Axboe, Al Viro, Christoph Hellwig, Matthew Wilcox, Jan Kara,
	Jeff Layton, David Hildenbrand, Jason Gunthorpe, Logan Gunthorpe,
	Hillf Danton, linux-fsdevel, linux-block, linux-kernel, linux-mm,
	Christoph Hellwig, John Hubbard, linux-unionfs

On Wed, 15 Feb 2023 at 16:04, David Howells <dhowells@redhat.com> wrote:
>
> Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> > > +       ret = -EINVAL;
> > > +       if (in->f_flags & O_DIRECT &&
> > > +           !(real.file->f_mode & FMODE_CAN_ODIRECT))
> > > +               goto out_fdput;
> >
> > This is unnecessary, as it was already done in ovl_real_fdget() ->
> > ovl_real_fdget_meta() -> ovl_change_flags().
>
> Does that mean ovl_read_iter() and ovl_write_iter() shouldn't be doing it,
> then?

That's a different thing, because ovl_*_iter() are checking on
ki->flags, not f_flags.

Thanks,
Miklos

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v15 05/17] overlayfs: Implement splice-read
  2023-02-14 17:13 ` [PATCH v14 05/17] overlayfs: Implement splice-read David Howells
  2023-02-15 14:21   ` Miklos Szeredi
  2023-02-15 15:03   ` David Howells
@ 2023-02-15 15:40   ` David Howells
  2023-02-15 15:50     ` Miklos Szeredi
  2023-02-15 15:58     ` David Howells
  2 siblings, 2 replies; 12+ messages in thread
From: David Howells @ 2023-02-15 15:40 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: dhowells, Jens Axboe, Al Viro, Christoph Hellwig, Matthew Wilcox,
	Jan Kara, Jeff Layton, David Hildenbrand, Jason Gunthorpe,
	Logan Gunthorpe, Hillf Danton, linux-fsdevel, linux-block,
	linux-kernel, linux-mm, Christoph Hellwig, John Hubbard,
	linux-unionfs

How about the attached then?

David
---
overlayfs: Implement splice-read

Implement splice-read for overlayfs by passing the request down a layer
rather than going through generic_file_splice_read() which is going to be
changed to assume that ->read_folio() is present on buffered files.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Christoph Hellwig <hch@lst.de>
cc: Jens Axboe <axboe@kernel.dk>
cc: Al Viro <viro@zeniv.linux.org.uk>
cc: John Hubbard <jhubbard@nvidia.com>
cc: David Hildenbrand <david@redhat.com>
cc: Matthew Wilcox <willy@infradead.org>
cc: Miklos Szeredi <miklos@szeredi.hu>
cc: linux-unionfs@vger.kernel.org
cc: linux-block@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
---
Notes:
    ver #15)
     - Remove redundant FMODE_CAN_ODIRECT check on real file.
     - Do rw_verify_area() on the real file, not the overlay file.
     - Fix a file leak.

 fs/overlayfs/file.c |   33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
index c9d0c362c7ef..72a545da51a2 100644
--- a/fs/overlayfs/file.c
+++ b/fs/overlayfs/file.c
@@ -419,6 +419,37 @@ static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter)
 	return ret;
 }
 
+static ssize_t ovl_splice_read(struct file *in, loff_t *ppos,
+			       struct pipe_inode_info *pipe, size_t len,
+			       unsigned int flags)
+{
+	const struct cred *old_cred;
+	struct fd real;
+	ssize_t ret;
+
+	ret = ovl_real_fdget(in, &real);
+	if (ret)
+		return ret;
+
+	ret = -EINVAL;
+	if (!real.file->f_op->splice_read)
+		goto out_fdput;
+
+	ret = rw_verify_area(READ, real.file, ppos, len);
+	if (unlikely(ret < 0))
+		goto out_fdput;
+
+	old_cred = ovl_override_creds(file_inode(in)->i_sb);
+	ret = real.file->f_op->splice_read(real.file, ppos, pipe, len, flags);
+
+	revert_creds(old_cred);
+	ovl_file_accessed(in);
+out_fdput:
+	fdput(real);
+
+	return ret;
+}
+
 /*
  * Calling iter_file_splice_write() directly from overlay's f_op may deadlock
  * due to lock order inversion between pipe->mutex in iter_file_splice_write()
@@ -695,7 +726,7 @@ const struct file_operations ovl_file_operations = {
 	.fallocate	= ovl_fallocate,
 	.fadvise	= ovl_fadvise,
 	.flush		= ovl_flush,
-	.splice_read    = generic_file_splice_read,
+	.splice_read    = ovl_splice_read,
 	.splice_write   = ovl_splice_write,
 
 	.copy_file_range	= ovl_copy_file_range,


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v15 05/17] overlayfs: Implement splice-read
  2023-02-15 15:40   ` [PATCH v15 " David Howells
@ 2023-02-15 15:50     ` Miklos Szeredi
  2023-02-15 15:53       ` Matthew Wilcox
  2023-02-15 15:58     ` David Howells
  1 sibling, 1 reply; 12+ messages in thread
From: Miklos Szeredi @ 2023-02-15 15:50 UTC (permalink / raw)
  To: David Howells
  Cc: Jens Axboe, Al Viro, Christoph Hellwig, Matthew Wilcox, Jan Kara,
	Jeff Layton, David Hildenbrand, Jason Gunthorpe, Logan Gunthorpe,
	Hillf Danton, linux-fsdevel, linux-block, linux-kernel, linux-mm,
	Christoph Hellwig, John Hubbard, linux-unionfs

On Wed, 15 Feb 2023 at 16:41, David Howells <dhowells@redhat.com> wrote:
>
> How about the attached then?
>
> David
> ---
> overlayfs: Implement splice-read
>
> Implement splice-read for overlayfs by passing the request down a layer
> rather than going through generic_file_splice_read() which is going to be
> changed to assume that ->read_folio() is present on buffered files.

Looks good.  One more suggestion: add a vfs_splice() helper and use
that from do_splice_to() as well.

Thanks,
Miklos

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v15 05/17] overlayfs: Implement splice-read
  2023-02-15 15:50     ` Miklos Szeredi
@ 2023-02-15 15:53       ` Matthew Wilcox
  2023-02-15 16:38         ` Christoph Hellwig
  2023-02-15 16:40         ` Miklos Szeredi
  0 siblings, 2 replies; 12+ messages in thread
From: Matthew Wilcox @ 2023-02-15 15:53 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: David Howells, Jens Axboe, Al Viro, Christoph Hellwig, Jan Kara,
	Jeff Layton, David Hildenbrand, Jason Gunthorpe, Logan Gunthorpe,
	Hillf Danton, linux-fsdevel, linux-block, linux-kernel, linux-mm,
	Christoph Hellwig, John Hubbard, linux-unionfs

On Wed, Feb 15, 2023 at 04:50:04PM +0100, Miklos Szeredi wrote:
> Looks good.  One more suggestion: add a vfs_splice() helper and use
> that from do_splice_to() as well.

I really hate call_read_iter() etc.  Please don't perpetuate that
pattern.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v15 05/17] overlayfs: Implement splice-read
  2023-02-15 15:40   ` [PATCH v15 " David Howells
  2023-02-15 15:50     ` Miklos Szeredi
@ 2023-02-15 15:58     ` David Howells
  1 sibling, 0 replies; 12+ messages in thread
From: David Howells @ 2023-02-15 15:58 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: dhowells, Jens Axboe, Al Viro, Christoph Hellwig, Matthew Wilcox,
	Jan Kara, Jeff Layton, David Hildenbrand, Jason Gunthorpe,
	Logan Gunthorpe, Hillf Danton, linux-fsdevel, linux-block,
	linux-kernel, linux-mm, Christoph Hellwig, John Hubbard,
	linux-unionfs

Miklos Szeredi <miklos@szeredi.hu> wrote:

> Looks good.

Can I put that down as an Acked-by?

Thanks,
David


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v15 05/17] overlayfs: Implement splice-read
  2023-02-15 15:53       ` Matthew Wilcox
@ 2023-02-15 16:38         ` Christoph Hellwig
  2023-02-15 16:40         ` Miklos Szeredi
  1 sibling, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2023-02-15 16:38 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Miklos Szeredi, David Howells, Jens Axboe, Al Viro,
	Christoph Hellwig, Jan Kara, Jeff Layton, David Hildenbrand,
	Jason Gunthorpe, Logan Gunthorpe, Hillf Danton, linux-fsdevel,
	linux-block, linux-kernel, linux-mm, Christoph Hellwig,
	John Hubbard, linux-unionfs

On Wed, Feb 15, 2023 at 03:53:23PM +0000, Matthew Wilcox wrote:
> On Wed, Feb 15, 2023 at 04:50:04PM +0100, Miklos Szeredi wrote:
> > Looks good.  One more suggestion: add a vfs_splice() helper and use
> > that from do_splice_to() as well.
> 
> I really hate call_read_iter() etc.  Please don't perpetuate that
> pattern.

I think it's time to kill it.  I'll prepare a patch for it.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v15 05/17] overlayfs: Implement splice-read
  2023-02-15 15:53       ` Matthew Wilcox
  2023-02-15 16:38         ` Christoph Hellwig
@ 2023-02-15 16:40         ` Miklos Szeredi
  1 sibling, 0 replies; 12+ messages in thread
From: Miklos Szeredi @ 2023-02-15 16:40 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: David Howells, Jens Axboe, Al Viro, Christoph Hellwig, Jan Kara,
	Jeff Layton, David Hildenbrand, Jason Gunthorpe, Logan Gunthorpe,
	Hillf Danton, linux-fsdevel, linux-block, linux-kernel, linux-mm,
	Christoph Hellwig, John Hubbard, linux-unionfs

On Wed, 15 Feb 2023 at 16:53, Matthew Wilcox <willy@infradead.org> wrote:
>
> On Wed, Feb 15, 2023 at 04:50:04PM +0100, Miklos Szeredi wrote:
> > Looks good.  One more suggestion: add a vfs_splice() helper and use
> > that from do_splice_to() as well.
>
> I really hate call_read_iter() etc.  Please don't perpetuate that
> pattern.

I didn't suggest call_splice_read().  vfs_splice_read() would have the
rw_verify_area() as well as the check for non-null ->splice_read().

Doing it that way from the start would have prevented two of the bugs
that David introduced in the first version.

Thanks,
Miklos

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-02-15 16:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230214171330.2722188-1-dhowells@redhat.com>
2023-02-14 17:13 ` [PATCH v14 05/17] overlayfs: Implement splice-read David Howells
2023-02-15 14:21   ` Miklos Szeredi
2023-02-15 15:03   ` David Howells
2023-02-15 15:32     ` Miklos Szeredi
2023-02-15 15:40   ` [PATCH v15 " David Howells
2023-02-15 15:50     ` Miklos Szeredi
2023-02-15 15:53       ` Matthew Wilcox
2023-02-15 16:38         ` Christoph Hellwig
2023-02-15 16:40         ` Miklos Szeredi
2023-02-15 15:58     ` David Howells
2023-02-14 17:13 ` [PATCH v14 06/17] coda: " David Howells
2023-02-14 18:04   ` Jan Harkes

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).