[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 01/13] block: Make essential BlockDriver obje
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 01/13] block: Make essential BlockDriver objects public |
Date: |
Mon, 01 Dec 2014 08:59:20 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
On 11/27/2014 07:48 AM, Max Reitz wrote:
> There are some block drivers which are essential to QEMU and may not be
> removed: These are raw, file and qcow2 (as the default non-raw format).
> Make their BlockDriver objects public so they can be directly referenced
> throughout the block layer without needing to call bdrv_find_format()
> and having to deal with an error at runtime, while the real problem
> occured during linking (where raw, file or qcow2 were not linked into
s/occured/occurred/
> qemu).
>
> Cc: address@hidden
> Signed-off-by: Max Reitz <address@hidden>
> ---
> block/qcow2.c | 4 ++--
> block/raw-posix.c | 4 ++--
> block/raw-win32.c | 4 ++--
> block/raw_bsd.c | 4 ++--
> include/block/block_int.h | 8 ++++++++
> 5 files changed, 16 insertions(+), 8 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
> +++ b/block/qcow2.c
> @@ -2847,7 +2847,7 @@ static QemuOptsList qcow2_create_opts = {
> }
> };
>
> -static BlockDriver bdrv_qcow2 = {
> +BlockDriver *bdrv_qcow2 = &(BlockDriver){
Do we want any use of 'const', to avoid accidental manipulation of the
pointer and/or pointed-to contents?
--
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 v2 01/13] block: Make essential BlockDriver objects public,
Eric Blake <=