Re: [Qemu-devel] [PATCH v7 6/6] block: Enable qemu_open/close to work with fd sets

2012-08-08 Thread Stefan Hajnoczi
On Wed, Aug 8, 2012 at 2:54 PM, Corey Bryant wrote: > > > On 08/08/2012 09:02 AM, Stefan Hajnoczi wrote: >> >> 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; >>> } >>> >>> +in

Re: [Qemu-devel] [PATCH v7 6/6] block: Enable qemu_open/close to work with fd sets

2012-08-08 Thread Corey Bryant
On 08/08/2012 09:02 AM, Stefan Hajnoczi wrote: 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;

Re: [Qemu-devel] [PATCH v7 6/6] block: Enable qemu_open/close to work with fd sets

2012-08-08 Thread Stefan Hajnoczi
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; >

[Qemu-devel] [PATCH v7 6/6] block: Enable qemu_open/close to work with fd sets

2012-08-07 Thread Corey Bryant
When qemu_open is passed a filename of the "/dev/fdset/nnn" format (where nnn is the fdset ID), an fd with matching access mode flags will be searched for within the specified monitor fd set. If the fd is found, a dup of the fd will be returned from qemu_open. Each fd set has a reference count.