qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qemu-nbd: remove unnecessary qemu_notify_event(


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] qemu-nbd: remove unnecessary qemu_notify_event()
Date: Tue, 28 Jul 2015 14:34:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1


On 28/07/2015 06:09, Fam Zheng wrote:
> On Mon, 07/27 13:54, Paolo Bonzini wrote:
>> This was needed when qemu-nbd was using qemu_set_fd_handler2.  It is
>> not needed anymore now that nbd_update_server_fd_handler is called
>> whenever nbd_can_accept() can change from false to true.
>> nbd_update_server_fd_handler will call qemu_set_fd_handler(),
>> which will call qemu_notify_event().
>>
>> Signed-off-by: Paolo Bonzini <address@hidden>
>> ---
>>  qemu-nbd.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/qemu-nbd.c b/qemu-nbd.c
>> index 5106b80..d9644b2 100644
>> --- a/qemu-nbd.c
>> +++ b/qemu-nbd.c
>> @@ -362,7 +362,6 @@ static void nbd_client_closed(NBDClient *client)
>>          state = TERMINATE;
>>      }
>>      nbd_update_server_fd_handler(server_fd);
>> -    qemu_notify_event();
>>      nbd_client_put(client);
>>  }
>>  
>> -- 
>> 2.4.3
>>
>>
> 
> Reviewed-by: Fam Zheng <address@hidden>
> 
> A question not related to this patch: unlike aio_set_fd_handler,
> qemu_set_fd_handler doesn't call qemu_notify_event for the "delete" branch. Is
> that intended?

Yes.  In fact I think qemu_notify_event() is not needed at all in
qemu_set_fd_handler() because there are no concurrent ppoll() calls
during a qemu_set_fd_handler().

Paolo



reply via email to

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