qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] qcow2: Can create qcow2 image format on rbd server


From: Kevin Wolf
Subject: Re: [Qemu-devel] qcow2: Can create qcow2 image format on rbd server
Date: Mon, 8 Dec 2014 11:07:07 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Am 05.12.2014 um 16:32 hat Jun Li geschrieben:
> Currently, qemu-img can not create qcow2 image format on rbd server. Analysis
> the code as followings:
> when create qcow2 format image:
> qcow2_create2
>   bdrv_create_file(filename, opts, &local_err);  --> Here will create a 0 size
>   file(e.g: file1) on rbd server.
>   ...
>   ret = bdrv_pwrite(bs, 0, header, cluster_size); --> So here can not write
>   qcow2 header into file1 due to the file1's length is 0. Seems
>   qemu_rbd_aio_writev can not write beyond EOF.
>   ...
> 
> As above analysis, there are two methods to solve the above bz as followings:
> 1, When create file1, just create a fixed-size file1 on rbd server(not 0 
> size).

This is not a solution. Even if you might be able to create an image
successfully, using qcow2 without a backend that allows the image file
to grow is bound to fail sooner or later.

So yes, you'll want to extend the rbd block driver to grow the file
asynchronously when writing beyond EOF.

Kevin



reply via email to

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