Received: from eggs.gnu.org ([2001:4830:134:3::10]:35815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VosuQ-0003FY-9z for qemu-devel@nongnu.org; Fri, 06 Dec 2013 05:45:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VosuI-0003sF-I6 for qemu-devel@nongnu.org; Fri, 06 Dec 2013 05:45:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VosuI-0003rj-AZ for qemu-devel@nongnu.org; Fri, 06 Dec 2013 05:45:14 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rB6AjCqF025219 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 6 Dec 2013 05:45:12 -0500 Date: Fri, 6 Dec 2013 11:45:10 +0100 From: Kevin Wolf Message-ID: <20131206104510.GB2911@dhcp-200-207.str.redhat.com> References: <52A0BAD8.90001@redhat.com> <52A0C77F.8060200@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <52A0C77F.8060200@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC] Using BlockdevRef in the block layer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: "qemu-devel@nongnu.org" , Stefan Hajnoczi Am 05.12.2013 um 19:35 hat Max Reitz geschrieben: > On 05.12.2013 18:41, Max Reitz wrote: > >[=E2=80=A6] > > > >Second, if specifying a reference to an existing device should > >really be supported, bdrv_open() should ideally not call > >bdrv_file_open() anymore, but a function bdrv_find_ref() instead > >which resolves a BlockdevRef structure (for simplicity, it appears > >to be easier to use a QDict equivalent to a BlockdevRef instead of > >the latter itself (since that results in many effectively > >redundant conversions to and from those representations)). > >However, bdrv_file_open() supports parsing protocol filenames, > >which bdrv_find_ref() would not. As a result, it is probably best > >to call bdrv_find_ref() from bdrv_file_open() instead and leave > >bdrv_open() generally the way it is right now =E2=80=93 yes, this is a > >question. ;-) (=E2=80=9CDo you agree?=E2=80=9D) >=20 > I noticed only just now that the current design does not seem to > allow nesting of files (i.e., driver=3Dblkdebug-qmp, > file.driver=3Dqcow2, file.file.driver=3Dfile). Perhaps I do have to cal= l > bdrv_find_ref() in bdrv_open() and only resort to bdrv_file_open() > if a filename that must be parsed was given...? This is supposed to work. If it doesn't work today, it is a bug or missing implementation rather than a design decision. Kevin