qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v9 6/7] block: Enable qemu_open/close to work wi


From: Corey Bryant
Subject: Re: [Qemu-devel] [PATCH v9 6/7] block: Enable qemu_open/close to work with fd sets
Date: Mon, 13 Aug 2012 13:32:12 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0



On 08/13/2012 01:13 PM, Eric Blake wrote:
On 08/13/2012 10:33 AM, Corey Bryant wrote:

The only way it could fail is if we are trying to add an fd that is
already in the set, or if we don't find mon_fdset; both of which would
indicate logic bugs earlier in our program.  Would it be worth asserting
that these conditions are impossible, and making this function return
void (the addition is always successful if it returns, since g_malloc0
aborts rather than failing with ENOMEM)?

I think what I did in v10 should suffice.  I didn't update
monitor_fdset_dup_fd_add(), but I did update the calling code.  If the
call fails then I set errno to EINVAL since (unless there's a bug) the
only possible error is that the fdset ID was non-existent.

It makes sense to add the asserts, but at this point I'd like to stick
with what we have in v10 if that's ok.

The problems of reading my inbox in FIFO order - I see now that v10
landed before my comments on v9 :)  Yes, what you did in v10 is probably
fine.


Heh. Well thanks again for the thorough review. If you have any other comments on the code let me know. But hopefully we're all set at this point and can make it into QEMU 1.2.

--
Regards,
Corey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]