[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of
From: |
Max Reitz |
Subject: |
Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size |
Date: |
Tue, 14 Jan 2020 14:01:03 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 |
On 09.01.20 20:12, Alberto Garcia wrote:
> The qcow2 header specifies the virtual size of the image in bytes, but
> BlockDriverState stores it as a number of 512-byte sectors.
>
> If the user tries to create an image with a size that is not a
> multiple of the sector size then this is fixed on creation by
> silently rounding the image size up (see commit c2eb918e32).
> qcow2_co_truncate() is more strict and returns an error instead.
>
> However when an image is opened the virtual size is rounded down,
> which means that trying to access the last few advertised bytes will
> result in an error. As seen above QEMU cannot create such images and
> there's no good use case that would require us to try to handle them
> so let's just treat them as unsupported.
But isn’t that just a bug in qemu?
Max
signature.asc
Description: OpenPGP digital signature
- [PATCH v2 0/4] qcow2: Misc BDRV_SECTOR_SIZE updates, Alberto Garcia, 2020/01/09
- [PATCH v2 3/4] qcow2: Tighten cluster_offset alignment assertions, Alberto Garcia, 2020/01/09
- [PATCH v2 2/4] qcow2: Don't round the L1 table allocation up to the sector size, Alberto Garcia, 2020/01/09
- [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Alberto Garcia, 2020/01/09
- Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size,
Max Reitz <=
- Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Alberto Garcia, 2020/01/14
- Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Max Reitz, 2020/01/14
- Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Alberto Garcia, 2020/01/14
- Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Max Reitz, 2020/01/14
- Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Alberto Garcia, 2020/01/16
[PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value, Alberto Garcia, 2020/01/09