Re: [PATCH 1/3] qcow2: Require that the virtual size is a multiple of the sector size

2020-01-09 Thread Alberto Garcia
On Wed 08 Jan 2020 08:46:11 PM CET, Nir Soffer wrote: >> 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

Re: [PATCH 1/3] qcow2: Require that the virtual size is a multiple of the sector size

2020-01-09 Thread Kevin Wolf
Am 08.01.2020 um 20:46 hat Nir Soffer geschrieben: > On Wed, Jan 8, 2020 at 7:52 PM 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

Re: [PATCH 1/3] qcow2: Require that the virtual size is a multiple of the sector size

2020-01-08 Thread Nir Soffer
On Wed, Jan 8, 2020 at 7:52 PM 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

[PATCH 1/3] qcow2: Require that the virtual size is a multiple of the sector size

2020-01-08 Thread Alberto Garcia
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