Re: [Qemu-block] [PATCH 3/7] qcow2: Check L1 table parameters in qcow2_expand_zero_clusters()

2018-03-06 Thread Alberto Garcia
On Tue 06 Mar 2018 04:11:17 PM CET, Kevin Wolf wrote: > I've finished the review now, the rest looks correct. > > The only other thing I wondered is about the cases where you pass a > NULL errp because the callers don't get an Error parameter, so they > can't pass it on. Some of these callers alrea

Re: [Qemu-block] [PATCH 3/7] qcow2: Check L1 table parameters in qcow2_expand_zero_clusters()

2018-03-06 Thread Kevin Wolf
Am 06.03.2018 um 16:01 hat Alberto Garcia geschrieben: > On Tue 06 Mar 2018 03:54:26 PM CET, Kevin Wolf wrote: > >> @@ -2092,11 +2092,18 @@ int qcow2_expand_zero_clusters(BlockDriverState > >> *bs, > >> } > >> > >> for (i = 0; i < s->nb_snapshots; i++) { > >> -int l1_sectors =

Re: [Qemu-block] [PATCH 3/7] qcow2: Check L1 table parameters in qcow2_expand_zero_clusters()

2018-03-06 Thread Alberto Garcia
On Tue 06 Mar 2018 03:54:26 PM CET, Kevin Wolf wrote: >> @@ -2092,11 +2092,18 @@ int qcow2_expand_zero_clusters(BlockDriverState *bs, >> } >> >> for (i = 0; i < s->nb_snapshots; i++) { >> -int l1_sectors = DIV_ROUND_UP(s->snapshots[i].l1_size * >> -

Re: [Qemu-block] [PATCH 3/7] qcow2: Check L1 table parameters in qcow2_expand_zero_clusters()

2018-03-06 Thread Kevin Wolf
Am 01.03.2018 um 17:27 hat Alberto Garcia geschrieben: > This function iterates over all snapshots of a qcow2 file in order to > expand all zero clusters, but it does not validate the snapshots' L1 > tables first. > > We now have a function to take care of this, so let's use it. > > We can also t

Re: [Qemu-block] [PATCH 3/7] qcow2: Check L1 table parameters in qcow2_expand_zero_clusters()

2018-03-01 Thread Eric Blake
On 03/01/2018 10:27 AM, Alberto Garcia wrote: This function iterates over all snapshots of a qcow2 file in order to expand all zero clusters, but it does not validate the snapshots' L1 tables first. We now have a function to take care of this, so let's use it. We can also take the opportunity t

[Qemu-block] [PATCH 3/7] qcow2: Check L1 table parameters in qcow2_expand_zero_clusters()

2018-03-01 Thread Alberto Garcia
This function iterates over all snapshots of a qcow2 file in order to expand all zero clusters, but it does not validate the snapshots' L1 tables first. We now have a function to take care of this, so let's use it. We can also take the opportunity to replace the sector-based bdrv_read() with bdrv