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

2015-02-09 Thread Paolo Bonzini
On 06/02/2015 22:06, Max Reitz wrote: > @@ -889,7 +889,7 @@ void nbd_client_put(NBDClient *client) > } > } > > -void nbd_client_close(NBDClient *client) > +static void client_close(NBDClient *client) > { > if (client->closing) { > return; Probably NBDClient should be renam

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

2015-02-06 Thread Max Reitz
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 whi