[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work wi
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets |
Date: |
Wed, 25 Jul 2012 13:25:26 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
On 07/25/2012 02:22 AM, Kevin Wolf wrote:
>>> Hm, not a nice interface where qemu_close() needs the filename and
>>> (worse) could be given a wrong filename. Maybe it would be better to
>>> maintain a list of fd -> fdset mappings in qemu_open/close?
>>>
>>
>> I agree, I don't really like it either.
>>
>> We already have a list of fd -> fdset mappings (mon_fdset_fd_t ->
>> mon_fdset_t). Would it be too costly to loop through all the fdsets/fds
>> at the beginning of every qemu_close()?
>
> I don't think so. qemu_close() is not a fast path and happens almost
> never, and the list is short enough that searching it isn't a problem
> anyway.
I agree - just do the loop to do the reverse lookup yourself, rather
than making qemu_close() have a different signature than close().
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v5 0/6] file descriptor passing using fd sets, Corey Bryant, 2012/07/23
- [Qemu-devel] [PATCH v5 3/6] monitor: Clean up fd sets on monitor disconnect, Corey Bryant, 2012/07/23
- [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets, Corey Bryant, 2012/07/23
- Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets, Corey Bryant, 2012/07/23
- Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets, Kevin Wolf, 2012/07/24
- Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets, Corey Bryant, 2012/07/24
- Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets, Kevin Wolf, 2012/07/25
- Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets,
Eric Blake <=
- Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets, Corey Bryant, 2012/07/25
- Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets, Eric Blake, 2012/07/26
- Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets, Kevin Wolf, 2012/07/26
- Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets, Corey Bryant, 2012/07/27
Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets, Eric Blake, 2012/07/25
[Qemu-devel] [PATCH v5 5/6] block: Convert close calls to qemu_close, Corey Bryant, 2012/07/23