From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIdvv-0000D5-Qx for qemu-devel@nongnu.org; Tue, 03 Feb 2015 08:54:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIdvr-0007q4-Cw for qemu-devel@nongnu.org; Tue, 03 Feb 2015 08:54:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIdvr-0007pp-5o for qemu-devel@nongnu.org; Tue, 03 Feb 2015 08:54:23 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t13DsMcp027944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 3 Feb 2015 08:54:22 -0500 Message-ID: <54D0D30C.5080602@redhat.com> Date: Tue, 03 Feb 2015 08:54:20 -0500 From: Max Reitz MIME-Version: 1.0 References: <1422913238-7280-1-git-send-email-mreitz@redhat.com> <1422913238-7280-2-git-send-email-mreitz@redhat.com> <54D088AC.8030607@redhat.com> In-Reply-To: <54D088AC.8030607@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] nbd: Drop BDS backpointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi 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