qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/3] nbd: Drop BDS backpointer


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 1/3] nbd: Drop BDS backpointer
Date: Tue, 03 Feb 2015 08:54:20 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 2015-02-03 at 03:37, Paolo Bonzini wrote:

On 02/02/2015 22:40, Max Reitz wrote:
Before this patch, the "opaque" pointer in an NBD BDS points to a
BDRVNBDState, which contains an NbdClientSession object, which in turn
contains a pointer to the BDS. This pointer may become invalid due to
bdrv_swap(), so drop it, and instead pass the BDS directly to the
nbd-client.c functions which then retrieve the NbdClientSession object
from there.
Looks good, but please change function names from nbd_client_session_foo
to nbd_client_foo or even just nbd_foo if they do not take an
NbdClientSession* as the first parameter.

Ah, that makes a lot of sense, especially concerning the callback functions (albeit they were named nbd_foo already, but well...) which only take a void pointer.

Will do, thanks,

Max

Thanks,

Paolo




reply via email to

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