All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Christoph Hellwig <hch@lst.de>, Jeff Layton <jlayton@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>,
	Josef Bacik <josef@toxicpanda.com>, Jan Kara <jack@suse.cz>,
	 David Howells <dhowells@redhat.com>,
	Jens Axboe <axboe@kernel.dk>,  Miklos Szeredi <miklos@szeredi.hu>,
	Al Viro <viro@zeniv.linux.org.uk>,
	 linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] fs: fork splice_file_range() from do_splice_direct()
Date: Mon, 4 Dec 2023 15:29:43 +0200	[thread overview]
Message-ID: <CAOQ4uxjZAjJSR-AUH+UQM3AX9Ota3DVxygFSVkpEQdxK15n_qQ@mail.gmail.com> (raw)
In-Reply-To: <20231204083849.GC32438@lst.de>

On Mon, Dec 4, 2023 at 10:38 AM Christoph Hellwig <hch@lst.de> wrote:
>
> On Mon, Dec 04, 2023 at 09:37:33AM +0100, Christoph Hellwig wrote:
> > >             put_rd_wr_caps(src_ci, src_got, dst_ci, dst_got);
> > > -           ret = do_splice_direct(src_file, &src_off, dst_file,
> > > -                                  &dst_off, src_objlen, flags);
> > > +           ret = splice_file_range(src_file, &src_off, dst_file, &dst_off,
> > > +                                   src_objlen);
> >
> > Shouldn't ceph be switched to use generic_copy_file_range?
> > That does the capping of the size which we want, and doesn't update
> > the file offsets, which would require recalculation in the ceph code.
> >

IDK. I did not want to change the logic of the ceph code.
I am not sure that we must impose MAX_RW_COUNT limit on ceph,
although, i_layout.object_size may already be limited? Jeff?

> > But this could avoid another exported API as splice_file_range could
> > simply be folded into generic_copy_file_range which should reduce
> > confusion.  And splice really is a mess for so many different layers
> > of the onion being exposed.  I've been wanting to reduce some of that
> > for a while but haven't found a really nice way yet.
>
> (and generic_copy_file_range really should be renamed to
> splice_copy_file_range and moved to splice.c)

That depends if we are keeping two helpers.
One with a cap of MAX_RW_COUNT and one without.
If we are going to keep two helpers, I'd rather keep things as they are.
If one helper, then I personally prefer splice_file_range() over
splice_copy_file_range() and other reviewers (Jan) liked this
name as well.

Thanks,
Amir.

  reply	other threads:[~2023-12-04 13:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30 14:16 [PATCH v2 0/3] Avert possible deadlock with splice() and fanotify Amir Goldstein
2023-11-30 14:16 ` [PATCH v2 1/3] fs: fork splice_file_range() from do_splice_direct() Amir Goldstein
2023-11-30 16:27   ` Jeff Layton
2023-12-04  8:37   ` Christoph Hellwig
2023-12-04  8:38     ` Christoph Hellwig
2023-12-04 13:29       ` Amir Goldstein [this message]
2023-12-04 14:07         ` Christoph Hellwig
2023-12-04 14:29           ` Amir Goldstein
2023-12-04 17:16             ` Jan Kara
2023-12-04 18:53               ` Amir Goldstein
2023-11-30 14:16 ` [PATCH v2 2/3] fs: move file_start_write() into direct_splice_actor() Amir Goldstein
2023-12-04  8:38   ` Christoph Hellwig
2023-11-30 14:16 ` [PATCH v2 3/3] fs: use do_splice_direct() for nfsd/ksmbd server-side-copy Amir Goldstein
2023-11-30 16:49   ` Jan Kara
2023-12-04  8:39   ` Christoph Hellwig
2023-12-04 13:19     ` Amir Goldstein
2023-12-04 14:02       ` Christoph Hellwig
2023-12-05  0:16   ` [PATCH] fs: read_write: make default in vfs_copy_file_range() reachable Bert Karwatzki
2023-12-05  3:45     ` Amir Goldstein
2023-12-05  5:01       ` Amir Goldstein
2023-12-05  9:50         ` Bert Karwatzki
2023-11-30 16:32 ` [PATCH v2 0/3] Avert possible deadlock with splice() and fanotify Jeff Layton
2023-12-01 10:40 ` Christian Brauner

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=CAOQ4uxjZAjJSR-AUH+UQM3AX9Ota3DVxygFSVkpEQdxK15n_qQ@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=viro@zeniv.linux.org.uk \
    /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.