qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v3 4/6] block/nvme: add support for image creati


From: Max Reitz
Subject: Re: [Qemu-block] [PATCH v3 4/6] block/nvme: add support for image creation
Date: Fri, 5 Jul 2019 14:09:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 03.07.19 17:59, Maxim Levitsky wrote:
> Tesed on a nvme device like that:
> 
> # create preallocated qcow2 image
> $ qemu-img create -f qcow2 nvme://0000:06:00.0/1 10G -o preallocation=metadata
> Formatting 'nvme://0000:06:00.0/1', fmt=qcow2 size=10737418240 
> cluster_size=65536 preallocation=metadata lazy_refcounts=off refcount_bits=16
> 
> # create an empty qcow2 image
> $ qemu-img create -f qcow2 nvme://0000:06:00.0/1 10G -o preallocation=off
> Formatting 'nvme://0000:06:00.0/1', fmt=qcow2 size=10737418240 
> cluster_size=65536 preallocation=off lazy_refcounts=off refcount_bits=16
> 
> Signed-off-by: Maxim Levitsky <address@hidden>
> ---
>  block/nvme.c | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 108 insertions(+)

Hm.  I’m not quite sure I like this, because this is not image creation.

What we need is a general interface for formatting existing files.  I
mean, we have that in QMP (blockdev-create), but the problem is that
this doesn’t really translate to qemu-img create.

I wonder whether it’s best to hack something up that makes
bdrv_create_file() a no-op, or whether we should expose blockdev-create
over qemu-img.  I’ll see how difficult the latter is, it sounds fun
(famous last words).

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]