* io_close_prep returns EBADF if REQ_F_FIXED_FILE
@ 2021-05-21 18:28 Daniele Salvatore Albano
0 siblings, 0 replies; only message in thread
From: Daniele Salvatore Albano @ 2021-05-21 18:28 UTC (permalink / raw)
To: io-uring, Jens Axboe
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-21 18:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-21 18:28 io_close_prep returns EBADF if REQ_F_FIXED_FILE Daniele Salvatore Albano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox