On 04/02/14 05:04, Eric Blake wrote:
> Some preparatory work before consolidating storage volume
> structs with the rest of virstoragefile.  Making these
> changes allows a volume target to be much closer to (a
> subset of) the virStorageSource struct.
> 
> Making perms be a pointer allows it to be optional if we
> have a storage pool that doesn't expose permissions in a
> way we can access.  It also allows future patches to
> optionally expose permissions details learned about a disk
> image via domain <disk> listings, rather than just
> limiting it to storage volume listings.
> 
> Disk partition types was only used by internal code to
> control what type of partition to create when carving up
> an MS-DOS partition table storage pool (and is not used
> for GPT partition tables or other storage pools).  It was
> not exposed in volume XML, and as it is more closely
> related to extent information of the overall block device
> than it is to the <target> information describing the host
> file.  Besides, if we ever decide to expose it in XML down
> the road, we can move it back as needed.
> 
> * src/conf/storage_conf.h (_virStorageVolTarget): Change perms to
> pointer, enhance comments.  Move partition type...
> (_virStorageVolSource): ...here.
> * src/conf/storage_conf.c (virStorageVolDefFree)
> (virStorageVolDefParseXML, virStorageVolTargetDefFormat): Update
> clients.
> * src/storage/storage_backend_fs.c (createFileDir): Likewise.
> * src/storage/storage_backend.c (virStorageBackendCreateBlockFrom)
> (virStorageBackendCreateRaw, virStorageBackendCreateExecCommand)
> (virStorageBackendUpdateVolTargetInfoFD): Likewise.
> * src/storage/storage_backend_logical.c
> (virStorageBackendLogicalCreateVol): Likewise.
> * src/storage/storage_backend_disk.c
> (virStorageBackendDiskMakeDataVol)
> (virStorageBackendDiskPartTypeToCreate): Likewise.
> 
> Signed-off-by: Eric Blake <ebl...@redhat.com>
> ---
>  src/conf/storage_conf.c               | 26 ++++++++++++------
>  src/conf/storage_conf.h               |  9 ++++---
>  src/storage/storage_backend.c         | 50 
> ++++++++++++++++++++---------------
>  src/storage/storage_backend_disk.c    | 18 ++++++-------
>  src/storage/storage_backend_fs.c      |  6 ++---
>  src/storage/storage_backend_logical.c |  6 ++---
>  6 files changed, 67 insertions(+), 48 deletions(-)
> 

...

> diff --git a/src/storage/storage_backend_disk.c 
> b/src/storage/storage_backend_disk.c
> index fb7a2a4..01f1b17 100644
> --- a/src/storage/storage_backend_disk.c
> +++ b/src/storage/storage_backend_disk.c
> @@ -614,7 +614,7 @@ virStorageBackendDiskPartBoundaries(virStoragePoolObjPtr 
> pool,
>          *end -= (*start % cylinderSize);
>      }
> 
> -    /* counting in byte, we want the last byte of the current sector */
> +    /* counting in bytes, we want the last byte of the current sector */

Unrelated typo fix?

>      *end -= 1;
>      VIR_DEBUG("final aligned start %llu, end %llu", *start, *end);
>      return 0;

ACK

Peter

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to