From: "Daniel P. Berrangé" <berrange@redhat.com> To: Yury Kotov <yury-kotov@yandex-team.ru> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>, "yc-core@yandex-team.ru" <yc-core@yandex-team.ru>, Juan Quintela <quintela@redhat.com> Subject: Re: [Qemu-devel] [PATCH] migration: Fix handling fd protocol Date: Mon, 15 Apr 2019 11:11:01 +0100 [thread overview] Message-ID: <20190415101101.GF5718@redhat.com> (raw) In-Reply-To: <243191555321803@vla1-1374b6242101.qloud-c.yandex.net> On Mon, Apr 15, 2019 at 12:50:08PM +0300, Yury Kotov wrote: > Hi, > > Just to clarify. I see two possible solutions: > > 1) Since the migration code doesn't receive fd, it isn't responsible for > closing it. So, it may be better to use migrate_fd_param for both > incoming/outgoing and add dupping for migrate_fd_param. Thus, clients must > close the fd themselves. But existing clients will have a leak. We can't break existing clients in this way as they are correctly using the monitor with its current semantics. > 2) If we don't duplicate fd, then at least we should remove fd from > the corresponding list. Therefore, the solution is to fix qemu_close to find > the list and remove fd from it. But qemu_close is currently consistent with > qemu_open (which opens/dups fd), so adding additional logic might not be > a very good idea. qemu_close is not appropriate place to deal with something speciifc to the montor. > I don't see any other solution, but I might miss something. > What do you think? All callers of monitor_get_fd() will close() the FD they get back. Thus monitor_get_fd() should remove it from the list when it returns it, and we should add API docs to monitor_get_fd() to explain this. 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 :|
WARNING: multiple messages have this Message-ID (diff)
From: "Daniel P. Berrangé" <berrange@redhat.com> To: Yury Kotov <yury-kotov@yandex-team.ru> Cc: Juan Quintela <quintela@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, "yc-core@yandex-team.ru" <yc-core@yandex-team.ru>, "qemu-devel@nongnu.org" <qemu-devel@nongnu.org> Subject: Re: [Qemu-devel] [PATCH] migration: Fix handling fd protocol Date: Mon, 15 Apr 2019 11:11:01 +0100 [thread overview] Message-ID: <20190415101101.GF5718@redhat.com> (raw) Message-ID: <20190415101101.S5zZaoInlotLmAA6DTdh4mVFbtbDptDoSlB2br8BTbI@z> (raw) In-Reply-To: <243191555321803@vla1-1374b6242101.qloud-c.yandex.net> On Mon, Apr 15, 2019 at 12:50:08PM +0300, Yury Kotov wrote: > Hi, > > Just to clarify. I see two possible solutions: > > 1) Since the migration code doesn't receive fd, it isn't responsible for > closing it. So, it may be better to use migrate_fd_param for both > incoming/outgoing and add dupping for migrate_fd_param. Thus, clients must > close the fd themselves. But existing clients will have a leak. We can't break existing clients in this way as they are correctly using the monitor with its current semantics. > 2) If we don't duplicate fd, then at least we should remove fd from > the corresponding list. Therefore, the solution is to fix qemu_close to find > the list and remove fd from it. But qemu_close is currently consistent with > qemu_open (which opens/dups fd), so adding additional logic might not be > a very good idea. qemu_close is not appropriate place to deal with something speciifc to the montor. > I don't see any other solution, but I might miss something. > What do you think? All callers of monitor_get_fd() will close() the FD they get back. Thus monitor_get_fd() should remove it from the list when it returns it, and we should add API docs to monitor_get_fd() to explain this. 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:[~2019-04-15 10:11 UTC|newest] Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-10 9:26 [Qemu-devel] [PATCH] migration: Fix handling fd protocol Yury Kotov 2019-04-10 9:26 ` Yury Kotov 2019-04-10 10:13 ` no-reply 2019-04-10 10:13 ` no-reply 2019-04-10 13:57 ` Dr. David Alan Gilbert 2019-04-10 13:57 ` Dr. David Alan Gilbert 2019-04-10 14:16 ` Yury Kotov 2019-04-10 14:16 ` Yury Kotov 2019-04-11 12:04 ` Daniel P. Berrangé 2019-04-11 12:04 ` Daniel P. Berrangé 2019-04-11 12:31 ` Yury Kotov 2019-04-11 12:31 ` Yury Kotov 2019-04-11 12:39 ` Daniel P. Berrangé 2019-04-11 12:39 ` Daniel P. Berrangé 2019-04-11 12:50 ` Yury Kotov 2019-04-11 12:50 ` Yury Kotov 2019-04-15 9:50 ` Yury Kotov 2019-04-15 9:50 ` Yury Kotov 2019-04-15 10:11 ` Daniel P. Berrangé [this message] 2019-04-15 10:11 ` Daniel P. Berrangé 2019-04-15 10:17 ` Yury Kotov 2019-04-15 10:17 ` Yury Kotov 2019-04-15 10:24 ` Yury Kotov 2019-04-15 10:24 ` Yury Kotov 2019-04-15 10:25 ` Daniel P. Berrangé 2019-04-15 10:25 ` Daniel P. Berrangé 2019-04-15 10:33 ` Yury Kotov 2019-04-15 10:33 ` Yury Kotov 2019-04-15 10:47 ` Daniel P. Berrangé 2019-04-15 10:47 ` Daniel P. Berrangé 2019-04-15 11:15 ` Dr. David Alan Gilbert 2019-04-15 11:15 ` Dr. David Alan Gilbert 2019-04-15 11:19 ` Daniel P. Berrangé 2019-04-15 11:19 ` Daniel P. Berrangé 2019-04-15 11:30 ` Dr. David Alan Gilbert 2019-04-15 11:30 ` Dr. David Alan Gilbert 2019-04-15 12:20 ` Yury Kotov 2019-04-15 12:20 ` Yury Kotov 2019-04-16 9:27 ` Yury Kotov 2019-04-16 9:27 ` Yury Kotov 2019-04-16 11:01 ` Yury Kotov 2019-04-16 11:01 ` Yury Kotov 2019-04-18 14:19 ` Dr. David Alan Gilbert 2019-04-18 14:19 ` Dr. David Alan Gilbert 2019-04-18 15:36 ` Yury Kotov 2019-04-18 15:36 ` Yury Kotov 2019-04-18 16:03 ` Dr. David Alan Gilbert 2019-04-18 16:03 ` Dr. David Alan Gilbert 2019-04-18 16:25 ` Yury Kotov 2019-04-18 16:25 ` Yury Kotov 2019-04-18 17:01 ` Dr. David Alan Gilbert 2019-04-18 17:01 ` Dr. David Alan Gilbert 2019-04-18 17:46 ` Yury Kotov 2019-04-18 17:46 ` Yury Kotov 2019-05-14 9:36 ` Yury Kotov 2019-05-21 16:09 ` Yury Kotov
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=20190415101101.GF5718@redhat.com \ --to=berrange@redhat.com \ --cc=dgilbert@redhat.com \ --cc=qemu-devel@nongnu.org \ --cc=quintela@redhat.com \ --cc=yc-core@yandex-team.ru \ --cc=yury-kotov@yandex-team.ru \ /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: linkBe 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).