public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Josef <[email protected]>, io-uring <[email protected]>
Cc: [email protected]
Subject: Re: SQPOLL fd close(2) question
Date: Fri, 25 Sep 2020 11:56:12 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAss7+rWKd7QCLaizuWa0dFETzzVajWR4Dw7g+ToC0LLHcA08w@mail.gmail.com>

On 9/25/20 10:21 AM, Josef wrote:
> Hi,
> 
> I implemented SQPOLL in netty for 5.8/5.9, to close a fd I need to
> delete the entry first, it seems to fail with error -EADDRINUSE when I
> remove the fd entry, close(2) it and the same socket(with the same
> address) is created again,, is that known?
> I assume that io_uring still has some reference to this, however
> io_uring_unregister_files works fine but the drawback would be that I
> need to wait until the ring is idle

If you have a file registered, that holds a reference to it. So when
you then otherwise close it in the app, it's similar to having done
a dup() on it and just closing the original. So yes, this is known and
expected, I'm afraid.

-- 
Jens Axboe


  reply	other threads:[~2020-09-25 17:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25 16:21 SQPOLL fd close(2) question Josef
2020-09-25 17:56 ` Jens Axboe [this message]
2020-09-25 23:40   ` Josef
2020-09-26 10:53     ` 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 \
    [email protected] \
    [email protected] \
    [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