[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 12/12] BlockDriver: add bdrv_get_allocated_fi
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v5 12/12] BlockDriver: add bdrv_get_allocated_file_size() operation |
Date: |
Wed, 29 Jun 2011 16:27:41 +0100 |
On Tue, Jun 28, 2011 at 2:32 AM, Fam Zheng <address@hidden> wrote:
Please use "block:" as the commit message tag instead of BlockDriver.
Usually the easiest way to find out which tag to use it by doing
git-log(1) on the main file you have modified and looking at previous
commit messages.
> +static int64_t vmdk_get_allocated_file_size(BlockDriverState *bs)
> +{
> + int i;
> + int64_t ret = 0;
> + int64_t r;
> + BDRVVmdkState *s = bs->opaque;
> +
> + ret = bdrv_get_allocated_file_size(bs->file);
> + if (ret < 0) {
> + return ret;
> + }
> + for (i = 0; i < s->num_extents; i++) {
> + r = bdrv_get_allocated_file_size(s->extents[i].file);
> + if (r < 0) {
> + return r;
> + }
> + ret += r;
> + }
> + return ret;
> +}
Does this count bs->file twice for images without a separate descriptor file?
Stefan
- [Qemu-devel] [PATCH v5 06/12] VMDK: flush multiple extents, (continued)
- [Qemu-devel] [PATCH v5 08/12] VMDK: change get_cluster_offset return type, Fam Zheng, 2011/06/27
- [Qemu-devel] [PATCH v5 11/12] VMDK: fix coding style, Fam Zheng, 2011/06/27
- [Qemu-devel] [PATCH v5 10/12] VMDK: create different subformats, Fam Zheng, 2011/06/27
- [Qemu-devel] [PATCH v5 12/12] BlockDriver: add bdrv_get_allocated_file_size() operation, Fam Zheng, 2011/06/27
- Re: [Qemu-devel] [PATCH v5 12/12] BlockDriver: add bdrv_get_allocated_file_size() operation,
Stefan Hajnoczi <=