From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: Fabiano Rosas <farosas@suse.de>, qemu-devel@nongnu.org
Subject: Re: [PATCH] migration/multifd: Don't fsync when closing QIOChannelFile
Date: Wed, 6 Mar 2024 09:25:24 +0000 [thread overview]
Message-ID: <Zeg2hN-mo53okbjL@redhat.com> (raw)
In-Reply-To: <Zee-WYQg9c19Up-T@x1n>
On Wed, Mar 06, 2024 at 08:52:41AM +0800, Peter Xu wrote:
> On Tue, Mar 05, 2024 at 05:49:33PM +0000, Daniel P. Berrangé wrote:
> > I don't think you should be removing this. Calling qio_channel_close()
> > remains recommended best practice, even with fdatasync() removed, as
> > it provides a strong guarantee that the FD is released which you don't
> > get if you rely on the ref count being correctly decremented in all
> > code paths.
>
> Hmm, I have the confusion on why ioc->fd is more special than the ioc
> itself when leaked. It'll be a bug anyway if we leak any of them? Leaking
> fds may also help us to find such issue easier (e.g. by seeing stale fds
> under /proc). From that POV I tend to agree on the original proposal.
Closing the FD would cause any registered I/O handlers callbacks to
get POLLNVAL and may well trigger cleanup that will prevent the leak.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2024-03-06 9:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 17:43 [PATCH] migration/multifd: Don't fsync when closing QIOChannelFile Fabiano Rosas
2024-03-05 17:49 ` Daniel P. Berrangé
2024-03-06 0:52 ` Peter Xu
2024-03-06 9:25 ` Daniel P. Berrangé [this message]
2024-03-06 9:53 ` Peter Xu
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=Zeg2hN-mo53okbjL@redhat.com \
--to=berrange@redhat.com \
--cc=farosas@suse.de \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.