* [Qemu-devel] [PATCH] qemu-nbd: remove unnecessary qemu_notify_event()
@ 2015-07-27 11:54 Paolo Bonzini
2015-07-27 14:44 ` Max Reitz
2015-07-28 4:09 ` Fam Zheng
0 siblings, 2 replies; 4+ messages in thread
From: Paolo Bonzini @ 2015-07-27 11:54 UTC (permalink / raw)
To: qemu-devel
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 <pbonzini@redhat.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-nbd: remove unnecessary qemu_notify_event()
2015-07-27 11:54 [Qemu-devel] [PATCH] qemu-nbd: remove unnecessary qemu_notify_event() Paolo Bonzini
@ 2015-07-27 14:44 ` Max Reitz
2015-07-28 4:09 ` Fam Zheng
1 sibling, 0 replies; 4+ messages in thread
From: Max Reitz @ 2015-07-27 14:44 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
On 27.07.2015 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 <pbonzini@redhat.com>
> ---
> 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);
> }
Reviewed-by: Max Reitz <mreitz@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-nbd: remove unnecessary qemu_notify_event()
2015-07-27 11:54 [Qemu-devel] [PATCH] qemu-nbd: remove unnecessary qemu_notify_event() Paolo Bonzini
2015-07-27 14:44 ` Max Reitz
@ 2015-07-28 4:09 ` Fam Zheng
2015-07-28 12:34 ` Paolo Bonzini
1 sibling, 1 reply; 4+ messages in thread
From: Fam Zheng @ 2015-07-28 4:09 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
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 <pbonzini@redhat.com>
> ---
> 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 <famz@redhat.com>
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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-nbd: remove unnecessary qemu_notify_event()
2015-07-28 4:09 ` Fam Zheng
@ 2015-07-28 12:34 ` Paolo Bonzini
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2015-07-28 12:34 UTC (permalink / raw)
To: Fam Zheng; +Cc: qemu-devel
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 <pbonzini@redhat.com>
>> ---
>> 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 <famz@redhat.com>
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-28 12:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27 11:54 [Qemu-devel] [PATCH] qemu-nbd: remove unnecessary qemu_notify_event() Paolo Bonzini
2015-07-27 14:44 ` Max Reitz
2015-07-28 4:09 ` Fam Zheng
2015-07-28 12:34 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).