qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH v3 02/13] qemu-nbd: Switch to qemu_set_fd_handle


From: Amit Shah
Subject: Re: [Qemu-block] [PATCH v3 02/13] qemu-nbd: Switch to qemu_set_fd_handler
Date: Tue, 19 May 2015 11:32:56 +0530

On (Tue) 19 May 2015 [10:50:59], Fam Zheng wrote:
> Achieved by:
> 
> - Remembering the server fd with a global variable, in order to access
>   it from nbd_client_closed.
> 
> - Checking nbd_can_accept() and updating server_fd handler whenever
>   client connects or disconnects.
> 
> Signed-off-by: Fam Zheng <address@hidden>
> Reviewed-by: Paolo Bonzini <address@hidden>

(snip)

> +static void nbd_update_server_fd_handler(int fd)
> +{
> +    if (nbd_can_accept()) {
> +        qemu_set_fd_handler(fd, nbd_accept, NULL, (void *)(uintptr_t)fd);
> +    } else {
> +        qemu_set_fd_handler(fd, NULL, NULL, NULL);

The previous patch just introduces a stub for qemu_set_fd_handler(),
so this functionality will break (during bisect) -- can you modify
patch 1 so that things keep working (even by just copying over
qemu_set_fd_handler2() to qemu_set_fd_handler(), and then re-working
that function later?

Or, it may even be possible to rename the function in patch 1, and
then modify it later.  Depends on the flow of the following patches,
but one of these approaches looks better to me.

                Amit



reply via email to

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