From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMEY1-0002a7-3D for qemu-devel@nongnu.org; Fri, 13 Feb 2015 06:36:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMEXx-00058j-Sx for qemu-devel@nongnu.org; Fri, 13 Feb 2015 06:36:37 -0500 Received: from mail-wg0-x233.google.com ([2a00:1450:400c:c00::233]:46974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMEXx-00058c-M7 for qemu-devel@nongnu.org; Fri, 13 Feb 2015 06:36:33 -0500 Received: by mail-wg0-f51.google.com with SMTP id y19so16040872wgg.10 for ; Fri, 13 Feb 2015 03:36:33 -0800 (PST) Date: Fri, 13 Feb 2015 11:36:30 +0000 From: Stefan Hajnoczi Message-ID: <20150213113630.GC21976@stefanha-thinkpad.redhat.com> References: <1423162705-32065-1-git-send-email-mreitz@redhat.com> <1423162705-32065-3-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HG+GLK89HZ1zG0kk" Content-Disposition: inline In-Reply-To: <1423162705-32065-3-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 02/16] block: Add blk_new_open() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi --HG+GLK89HZ1zG0kk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 05, 2015 at 01:58:11PM -0500, Max Reitz wrote: > blk_new_with_bs() creates a BlockBackend with an empty BlockDriverState > attached to it. Empty BDSs are not nice, therefore add an alternative > function which combines blk_new_with_bs() with bdrv_open(). >=20 > Note: In contrast to bdrv_open() which takes a BlockDriver parameter, > blk_new_open() does not take such a parameter. This is because > bdrv_open() opens a BlockDriverState, therefore it is natural to be able > to set the BlockDriver for that BDS. The fact that bdrv_open() can open > more than a single BDS is merely some form of a byproduct. >=20 > blk_new_open() on the other hand is intended to be used to create a > whole tree of BlockDriverStates. Therefore, setting a single BlockDriver > does not make much sense. Instead, the drivers to be used for each of > the nodes must be configured through the "options" QDict; including the > driver of the root BDS. >=20 > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > Reviewed-by: Kevin Wolf > --- > block/block-backend.c | 34 ++++++++++++++++++++++++++++++++++ > include/sysemu/block-backend.h | 3 +++ > 2 files changed, 37 insertions(+) Reviewed-by: Stefan Hajnoczi --HG+GLK89HZ1zG0kk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJU3eG+AAoJEJykq7OBq3PIsj8H/3bU4svipMpfmNZEPlEp+OTW eCVMfPiNSO57o9IDjXXhOu3CGEZzwT/t6iH8+C0SjlFEAZ7TgMklRzNGscPC4QaR vqPm9K02N8ONC481whG4H1b8/iG/OwSVTcjlxsKIbuaTgRUVDWbvYOU5rJ5adHPr 3Yos0nL/ijxeXafcanXim8Ip4rSnGELruG9qnml7qjVbvi9JA6zQ7oT6qGobfSot gH6M5JMZUkx9GKczTgmZ95j7WLHPpG9nTQULUn7ykYRV6poUbV3armFfEf9QSlZf mw26er2ziv1m8i4UY+LlPLm3WfT5Bbi2crUwOMnKvkLFiTIMsuusTYqyEFZxyvo= =BQFv -----END PGP SIGNATURE----- --HG+GLK89HZ1zG0kk--