[libvirt] [PATCH v7 6/6] block: Enable qemu_open/close to work with fd sets
Stefan Hajnoczi
stefanha at linux.vnet.ibm.com
Wed Aug 8 13:02:52 UTC 2012
On Tue, Aug 07, 2012 at 11:58:28AM -0400, Corey Bryant wrote:
> @@ -2566,6 +2567,92 @@ FdsetInfoList *qmp_query_fdsets(Error **errp)
> return fdset_list;
> }
>
> +int monitor_fdset_get_fd(int64_t fdset_id, int flags)
> +{
> + mon_fdset_t *mon_fdset;
> + mon_fdset_fd_t *mon_fdset_fd;
> + int mon_fd_flags;
> +
> + QLIST_FOREACH(mon_fdset, &mon_fdsets, next) {
> + if (mon_fdset->id != fdset_id) {
> + continue;
> + }
> + QLIST_FOREACH(mon_fdset_fd, &mon_fdset->fds, next) {
> + if (mon_fdset_fd->removed) {
> + continue;
> + }
This makes me wonder about immediately closing in remove-fd and drop the
removed field. This way, code using mon_fdset->fds does not need to
worry about removed=true fds.
More information about the libvir-list
mailing list