[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/17] block: define get_block_status return val
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH 10/17] block: define get_block_status return value |
Date: |
Fri, 5 Jul 2013 08:49:50 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, 07/04 23:10, Peter Lieven wrote:
>
> Am 04.07.2013 um 10:13 schrieb Paolo Bonzini <address@hidden>:
>
> > Il 03/07/2013 23:04, Peter Lieven ha scritto:
> >>>> Define the return value of get_block_status. Bits 0, 1, 2 and 8-62
> >>>> are valid; bit 63 (the sign bit) is reserved for errors. Bits 3-7
> >>>> are left for future extensions.
> >> Is Bit 8 not also reserved for future use? BDRV_SECTOR_BITS is 9.
> >
> > Right.
> >
> >> Can you explain which information is exactly returned in Bits 9-62?
> >
> > Bits 9-62 are the offset at which the data is stored in bs->file, they
> > are valid if bit 2 (BDRV_BLOCK_OFFSET_VALID) is 1.
>
> Ok, so this is if bs->file is not linear?
>
> If we return the offset into bs->file this would only make sense if the data
> at that position is raw and not encoded otherwise and if *pnum is limited
> to the size of the extend at that position, right?
Exactly.
>
> I currently do not understand for what operation this info is needed.
Quoted from the cover letter:
> One example usage is
> (for non-compressed, non-encrypted images) to transform the metadata
> into a Linux device-mapper setup, and make a qcow2 image available (for
> read only) as a block device. Another possible usage is to determine
> the used areas of a file, and convert it in place to another format.
Thanks.
Fam
- [Qemu-devel] [PATCH 07/17] qemu-img: always probe the input image for allocated sectors, (continued)
- [Qemu-devel] [PATCH 07/17] qemu-img: always probe the input image for allocated sectors, Paolo Bonzini, 2013/07/03
- [Qemu-devel] [PATCH 06/17] block: expect errors from bdrv_co_is_allocated, Paolo Bonzini, 2013/07/03
- [Qemu-devel] [PATCH 08/17] block: make bdrv_has_zero_init return false for copy-on-write-images, Paolo Bonzini, 2013/07/03
- [Qemu-devel] [PATCH 09/17] block: introduce bdrv_get_block_status API, Paolo Bonzini, 2013/07/03
- [Qemu-devel] [PATCH 10/17] block: define get_block_status return value, Paolo Bonzini, 2013/07/03
[Qemu-devel] [PATCH 12/17] qemu-img: add a "map" subcommand, Paolo Bonzini, 2013/07/03
Re: [Qemu-devel] [PATCH 12/17] qemu-img: add a "map" subcommand, Stefan Hajnoczi, 2013/07/15
Re: [Qemu-devel] [PATCH 12/17] qemu-img: add a "map" subcommand, Eric Blake, 2013/07/18
[Qemu-devel] [PATCH 11/17] block: return get_block_status data and flags for formats, Paolo Bonzini, 2013/07/03