[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/7] block: add bdrv_get_format_allocated_size f
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 2/7] block: add bdrv_get_format_allocated_size format interface |
Date: |
Thu, 25 May 2017 12:54:36 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 05/25/2017 10:26 AM, Vladimir Sementsov-Ogievskiy wrote:
> The function should return actually used by top-level format driver
s/actually/the allocation actually/
> space (in it's .file). It differs from bdrv_get_allocated_file_size,
s/it's/its/ (remember, "it's" is only appropriate if "it is" can be used
in its place)
> which returns allocated on fs file size.
s/allocated on fs file size/the disk usage of the underlying file/
So this is a measure of how many clusters a qcow2 image is currently
using (including metadata clusters, and regardless of whether those
clusters happen to point to a hole in the underlying protocol layer)?
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> block.c | 15 +++++++++++++++
> include/block/block.h | 1 +
> include/block/block_int.h | 1 +
> 3 files changed, 17 insertions(+)
>
> diff --git a/block.c b/block.c
> index ba22fc0dfb..6e1a435490 100644
> --- a/block.c
> +++ b/block.c
> @@ -3407,6 +3407,21 @@ int64_t bdrv_get_allocated_file_size(BlockDriverState
> *bs)
> }
>
> /**
> + * Actually used by top-level format driver space (in it's .file) in bytes
s/it's/its/
I think we can do better. How about:
Return the amount of space allocated by the format driver (including
metadata) in bytes, even if some of that space currently maps to holes
in the underlying protocol file.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 1/7] block: fix comment for bdrv_get_allocated_file_size(), (continued)
[Qemu-devel] [PATCH 4/7] common: make get_human_readable_size public, Vladimir Sementsov-Ogievskiy, 2017/05/25
[Qemu-devel] [PATCH 6/7] qemu-img check: add file-size, Vladimir Sementsov-Ogievskiy, 2017/05/25
[Qemu-devel] [PATCH 7/7] block: rename _get_allocated_file_size() to _get_fs_allocated_size(), Vladimir Sementsov-Ogievskiy, 2017/05/25
[Qemu-devel] [PATCH 2/7] block: add bdrv_get_format_allocated_size format interface, Vladimir Sementsov-Ogievskiy, 2017/05/25
- Re: [Qemu-devel] [PATCH 2/7] block: add bdrv_get_format_allocated_size format interface,
Eric Blake <=
[Qemu-devel] [PATCH 5/7] qemu-img check: add format unallocated size, Vladimir Sementsov-Ogievskiy, 2017/05/25
[Qemu-devel] [PATCH 3/7] qcow2: add .bdrv_get_format_allocated_size, Vladimir Sementsov-Ogievskiy, 2017/05/25