From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayffh-00047m-Iu for qemu-devel@nongnu.org; Fri, 06 May 2016 09:20:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayffV-0001mc-H4 for qemu-devel@nongnu.org; Fri, 06 May 2016 09:19:52 -0400 Date: Fri, 6 May 2016 15:19:05 +0200 From: Kevin Wolf Message-ID: <20160506131905.GI5093@noname.redhat.com> References: <1461346962-4676-1-git-send-email-kwolf@redhat.com> <1461346962-4676-9-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v2 08/13] block: Introduce BdrvChild.opaque List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: qemu-block@nongnu.org, pbonzini@redhat.com, mreitz@redhat.com, eblake@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org Am 06.05.2016 um 14:54 hat Alberto Garcia geschrieben: > On Fri 22 Apr 2016 07:42:37 PM CEST, Kevin Wolf wrote: > > BlockBackends use it to get a back pointer from BdrvChild to > > BlockBackend in any BdrvChildRole callbacks. > > Hmmm... can anyone else use this, other than BlockBackend? If not, why > is it opaque? If we ever want to call BdrvChild callbacks from somewhere else than the top of the image, there will be others users of this. For example, I could imagine .resize() or .change_media() to propagate through the whole tree when the host_cdrom driver detected a media change. At the moment we probably don't have another use for it, but it's the usual style that callbacks get an opaque value, so I just followed the pattern here. (And I don't want people to abuse this to get back from BDS to BB outside of such callbacks.) Kevin