From: Daniele Salvatore Albano <[email protected]>
To: io-uring <[email protected]>, Jens Axboe <[email protected]>
Subject: io_close_prep returns EBADF if REQ_F_FIXED_FILE
Date: Fri, 21 May 2021 21:28:01 +0300 [thread overview]
Message-ID: <CAKq9yRiD+OjL7ZqZSQdbZVgb8NMFeWeH3eoxfW9CybNvfC875g@mail.gmail.com> (raw)
Hi,
Is there any specific reason for which io_close_prep returns EBADF if
using REQ_F_FIXED_FILE?
I discovered my software was failing to close sockets when using fixed
files a while ago but I put it to the side, initially thinking it was
a bug I introduced in my code.
In recent days I picked it up again and after investigating it, it
looks like that, instead, that's the expected behaviour.
From what I see, although the behaviour was slightly changed with a
couple of commits (ie. with
https://github.com/torvalds/linux/commit/cf3040ca55f2085b0a372a620ee2cb93ae19b686
) the io_close_prep have had this behaviour from the very beginning
https://github.com/torvalds/linux/commit/b5dba59e0cf7e2cc4d3b3b1ac5fe81ddf21959eb
.
@Jens during my researches I have also found
https://lkml.org/lkml/2020/5/7/1575 where there is a patch that
allows, at least from what it looks like at a first glance, fixed
files with io_close_prep but seems that the email thread died there.
Shouldn't the close op match the behaviour of the other I/O related
ops when it comes to fds?
If there aren't specific reasons, happy to look into it and write a patch.
Thanks,
Daniele
reply other threads:[~2021-05-21 18:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CAKq9yRiD+OjL7ZqZSQdbZVgb8NMFeWeH3eoxfW9CybNvfC875g@mail.gmail.com \
[email protected] \
[email protected] \
[email protected] \
/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