linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Noah Goldstein <goldstein.w.n@gmail.com>
Cc: noah <goldstein.n@wustl.edu>, Jens Axboe <axboe@kernel.dk>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	"open list:IO_URING" <io-uring@vger.kernel.org>,
	"open list:FILESYSTEMS (VFS and infrastructure)" 
	<linux-fsdevel@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fs: io_uring.c: Add skip option for __io_sqe_files_update
Date: Tue, 26 Jan 2021 19:39:55 +0000	[thread overview]
Message-ID: <ce9aed17-3dfc-6b8d-49f8-136f03241914@gmail.com> (raw)
In-Reply-To: <CAFUsyfK8OSDzfNCCwVPD8O=Fp0XSHWQ+HRCiC36BA-rH+c9D7g@mail.gmail.com>

On 26/01/2021 18:43, Noah Goldstein wrote:
> On Tue, Jan 26, 2021 at 12:24 PM Pavel Begunkov <asml.silence@gmail.com> wrote:
>>
>> On 26/01/2021 17:14, Noah Goldstein wrote:
>>> On Tue, Jan 26, 2021 at 7:29 AM Pavel Begunkov <asml.silence@gmail.com> wrote:
>>>>
>>>> On 22/12/2020 02:10, Noah Goldstein wrote:
>>>>> On Sun, Dec 20, 2020 at 03:18:05PM +0000, Pavel Begunkov wrote:
>>>>>> On 20/12/2020 06:50, noah wrote:> From: noah <goldstein.n@wustl.edu>
>>>>>>>
>>>>>>> This patch makes it so that specify a file descriptor value of -2 will
>>>>>>> skip updating the corresponding fixed file index.
>>>>>>>
>>>>>>> This will allow for users to reduce the number of syscalls necessary
>>>>>>> to update a sparse file range when using the fixed file option.
>>>>>>
>>>>>> Answering the github thread -- it's indeed a simple change, I had it the
>>>>>> same day you posted the issue. See below it's a bit cleaner. However, I
>>>>>> want to first review "io_uring: buffer registration enhancements", and
>>>>>> if it's good, for easier merging/etc I'd rather prefer to let it go
>>>>>> first (even if partially).
>>>>
>>>> Noah, want to give it a try? I've just sent a prep patch, with it you
>>>> can implement it cleaner with one continue.
>>>
>>>  Absolutely. Will get on it ASAP.
>>
>> Perfect. Even better if you add a liburing test
> 
> Do you think the return value should not include files skipped?
> 
> i.e register fds[1, 2, 3, -1] with no errors returns 4. should fds[1,
> 2, -2, -1] return 3 or 4 do you think?
> 
> Personally think the latter makes more sense. Thoughts?

Let's just return @done, 4 in your case. Because otherwise locating which
index has failed would be hell. And it's consistent with delete (i.e. -1).

-- 
Pavel Begunkov

      reply	other threads:[~2021-01-26 22:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-20  6:50 [PATCH] fs: io_uring.c: Add skip option for __io_sqe_files_update noah
2020-12-20 15:18 ` Pavel Begunkov
2020-12-22  2:10   ` Noah Goldstein
2021-01-26 12:26     ` Pavel Begunkov
2021-01-26 17:14       ` Noah Goldstein
2021-01-26 17:20         ` Pavel Begunkov
2021-01-26 18:43           ` Noah Goldstein
2021-01-26 19:39             ` Pavel Begunkov [this message]

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=ce9aed17-3dfc-6b8d-49f8-136f03241914@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=goldstein.n@wustl.edu \
    --cc=goldstein.w.n@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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).