Re: [Qemu-devel] [PATCH 12/12] Add disk_size field to BlockDriverState structure

2011-06-19 Thread Stefan Hajnoczi
On Mon, Jun 20, 2011 at 6:37 AM, Fam Zheng wrote: > Is there any difference between bdrv_getlength and > bdrv_get_allocated_file_size for bs-file? If not, I can simplify it by > reusing it in two raw devices. Yes, the two functions are different: POSIX sparse files (files with holes) take up les

Re: [Qemu-devel] [PATCH 12/12] Add disk_size field to BlockDriverState structure

2011-06-19 Thread Fam Zheng
Is there any difference between bdrv_getlength and bdrv_get_allocated_file_size for bs-file? If not, I can simplify it by reusing it in two raw devices. On Sun, Jun 19, 2011 at 2:35 AM, Stefan Hajnoczi wrote: > On Sat, Jun 4, 2011 at 1:44 AM, Fam Zheng wrote: >> The `qemu-img info` results for m

Re: [Qemu-devel] [PATCH 12/12] Add disk_size field to BlockDriverState structure

2011-06-18 Thread Stefan Hajnoczi
On Sat, Jun 4, 2011 at 1:44 AM, Fam Zheng wrote: > The `qemu-img info` results for mono flat image are no longer > accurate, as the "disk size" was the length of bs->file, which is not > the case for multi file images (such as vmdk images with multiple > files). > The new field disk_size in BlockD

[Qemu-devel] [PATCH 12/12] Add disk_size field to BlockDriverState structure

2011-06-03 Thread Fam Zheng
The `qemu-img info` results for mono flat image are no longer accurate, as the "disk size" was the length of bs->file, which is not the case for multi file images (such as vmdk images with multiple files). The new field disk_size in BlockDriverState can be used by block driver to tell the exact dis