io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Subject: Re: [PATCH 5.15] io_uring: auto-removal for direct open/accept
Date: Tue, 14 Sep 2021 15:10:36 +0100	[thread overview]
Message-ID: <450eb78a-a714-c6d1-c844-dbe8424a1c1c@gmail.com> (raw)
In-Reply-To: <27718f96-30af-2ebc-3a53-8fb6bb7155ec@kernel.dk>

On 9/14/21 3:02 PM, Jens Axboe wrote:
> On 9/14/21 7:37 AM, Pavel Begunkov wrote:
>> It might be inconvenient that direct open/accept deviates from the
>> update semantics and fails if the slot is taken instead of removing a
>> file sitting there. Implement the auto-removal.
>>
>> Note that removal might need to allocate and so may fail. However, if an
>> empty slot is specified, it's guaraneed to not fail on the fd
>> installation side. It's needed for users that can't tolerate spuriously
>> closed files, e.g. accepts where the other end doesn't expect it.
> 
> I think this makes sense, just curious if this was driven by feedback
> from a user, or if it's something that came about thinking about the use
> cases? This is certainly more flexible and allows an application to open
> a new file in an existing slot, rather than needing to explicitly close
> it first.

Franz noticed that it would've been more convenient this way. Good idea
to add his suggested-by. I had been thinking to make it this way before
that, but without particular use cases, it just felt better.

-- 
Pavel Begunkov

  reply	other threads:[~2021-09-14 14:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 13:37 [PATCH 5.15] io_uring: auto-removal for direct open/accept Pavel Begunkov
2021-09-14 13:59 ` Pavel Begunkov
2021-09-14 14:02 ` Jens Axboe
2021-09-14 14:10   ` Pavel Begunkov [this message]
2021-09-14 14:18     ` Jens Axboe

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=450eb78a-a714-c6d1-c844-dbe8424a1c1c@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /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).