[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 02/16] block: Add blk_new_open()
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v4 02/16] block: Add blk_new_open() |
Date: |
Fri, 13 Feb 2015 11:36:30 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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().
>
> 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.
>
> 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.
>
> Signed-off-by: Max Reitz <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Reviewed-by: Kevin Wolf <address@hidden>
> ---
> block/block-backend.c | 34 ++++++++++++++++++++++++++++++++++
> include/sysemu/block-backend.h | 3 +++
> 2 files changed, 37 insertions(+)
Reviewed-by: Stefan Hajnoczi <address@hidden>
pgp0dofs6RQSS.pgp
Description: PGP signature
- Re: [Qemu-devel] [PATCH v4 07/16] qemu-img: Use blk_new_open() in img_open(), (continued)
- [Qemu-devel] [PATCH v4 06/16] block/xen: Use blk_new_open() in blk_connect(), Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 08/16] qemu-img: Use blk_new_open() in img_rebase(), Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 12/16] qemu-io: Remove "growable" option, Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 02/16] block: Add blk_new_open(), Max Reitz, 2015/02/05
- Re: [Qemu-devel] [PATCH v4 02/16] block: Add blk_new_open(),
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH v4 09/16] qemu-img: Use BlockBackend as far as possible, Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 14/16] block: Clamp BlockBackend requests, Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 10/16] qemu-nbd: Use blk_new_open() in main(), Max Reitz, 2015/02/05
- [Qemu-devel] [PATCH v4 11/16] qemu-io: Use blk_new_open() in openfile(), Max Reitz, 2015/02/05