[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v3 09/16] block/qcow2: Generalize p
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v3 09/16] block/qcow2: Generalize preallocate() |
Date: |
Wed, 31 May 2017 11:22:50 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Fri, May 26, 2017 at 06:55:11PM +0200, Max Reitz wrote:
> This patch adds two new parameters to the preallocate() function so we
> will be able to use it not just for preallocating a new image but also
> for preallocated image growth.
>
> The offset parameter allows the caller to specify a virtual offset from
> which to start preallocating. For newly created images this is always 0,
> but for preallocating growth this will be the old image length.
>
> The new_length parameter specifies the supposed new length of the image
> (basically the "end offset" for preallocation). During image truncation,
> bdrv_getlength() will return the old image length so we cannot rely on
> its return value then.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> block/qcow2.c | 17 ++++++++++++-----
> 1 file changed, 12 insertions(+), 5 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature
- [Qemu-block] [PATCH v3 03/16] block: Add PreallocMode to blk_truncate(), (continued)
- [Qemu-block] [PATCH v3 03/16] block: Add PreallocMode to blk_truncate(), Max Reitz, 2017/05/26
- [Qemu-block] [PATCH v3 04/16] qemu-img: Expose PreallocMode for resizing, Max Reitz, 2017/05/26
- [Qemu-block] [PATCH v3 05/16] block/file-posix: Small fixes in raw_create(), Max Reitz, 2017/05/26
- [Qemu-block] [PATCH v3 06/16] block/file-posix: Extract raw_regular_truncate(), Max Reitz, 2017/05/26
- [Qemu-block] [PATCH v3 07/16] block/file-posix: Generalize raw_regular_truncate, Max Reitz, 2017/05/26
- [Qemu-block] [PATCH v3 08/16] block/file-posix: Preallocation for truncate, Max Reitz, 2017/05/26
- [Qemu-block] [PATCH v3 09/16] block/qcow2: Generalize preallocate(), Max Reitz, 2017/05/26
- [Qemu-block] [PATCH v3 10/16] block/qcow2: Lock s->lock in preallocate(), Max Reitz, 2017/05/26
- [Qemu-block] [PATCH v3 11/16] block/qcow2: Metadata preallocation for truncate, Max Reitz, 2017/05/26
- [Qemu-block] [PATCH v3 12/16] block/qcow2: Add qcow2_refcount_area(), Max Reitz, 2017/05/26
- [Qemu-block] [PATCH v3 13/16] block/qcow2: Rename "fail_block" to just "fail", Max Reitz, 2017/05/26
- [Qemu-block] [PATCH v3 14/16] block/qcow2: falloc/full preallocating growth, Max Reitz, 2017/05/26