[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 02/14] block: Add blk_new_open()
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 02/14] block: Add blk_new_open() |
Date: |
Mon, 26 Jan 2015 14:56:41 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 01/26/2015 08:00 AM, 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 naturally to be
s/naturally/natural/
> 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>
> ---
> block/block-backend.c | 34 ++++++++++++++++++++++++++++++++++
> include/sysemu/block-backend.h | 3 +++
> 2 files changed, 37 insertions(+)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v3 10/14] qemu-io: Remove "growable" option, (continued)
- [Qemu-devel] [PATCH v3 14/14] block: Keep bdrv_check*_request()'s return value, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH v3 12/14] block: Clamp BlockBackend requests, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH v3 13/14] block: Remove "growable" from BDS, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH v3 11/14] qemu-io: Use BlockBackend, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH v3 02/14] block: Add blk_new_open(), Max Reitz, 2015/01/26
- Re: [Qemu-devel] [PATCH v3 02/14] block: Add blk_new_open(),
Eric Blake <=
- [Qemu-devel] [PATCH v3 01/14] block: Lift some BDS functions to the BlockBackend, Max Reitz, 2015/01/26
- Re: [Qemu-devel] [PATCH v3 00/14] block: Remove "growable", add blk_new_open(), Stefano Stabellini, 2015/01/26