Re: [PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-18 Thread Alberto Garcia
On Tue 14 Jan 2020 03:15:48 PM CET, Max Reitz wrote: >> @@ -3836,7 +3837,7 @@ qcow2_co_copy_range_from(BlockDriverState *bs, >> case QCOW2_CLUSTER_NORMAL: >> child = s->data_file; >> copy_offset += offset_into_cluster(s, src_offset); >> -if

Re: [PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-17 Thread Alberto Garcia
On Fri 17 Jan 2020 12:51:04 PM CET, Kevin Wolf wrote: >> > Now, what's wrong about the logic to avoid the RMW is that it assumes >> > a fixed required alignment of 512. What it should do is looking at >> > bs->file->bl.request_alignment and rounding accordingly. >> >> Yes. > > Who'll write the

Re: [PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-17 Thread Kevin Wolf
Am 17.01.2020 um 12:01 hat Max Reitz geschrieben: > On 17.01.20 10:55, Kevin Wolf wrote: > > Am 17.01.2020 um 10:12 hat Max Reitz geschrieben: > >> On 17.01.20 00:26, Alberto Garcia wrote: > >>> On Tue 14 Jan 2020 03:15:48 PM CET, Max Reitz wrote: > > @@ -219,7 +219,7 @@ static int

Re: [PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-17 Thread Max Reitz
On 17.01.20 10:55, Kevin Wolf wrote: > Am 17.01.2020 um 10:12 hat Max Reitz geschrieben: >> On 17.01.20 00:26, Alberto Garcia wrote: >>> On Tue 14 Jan 2020 03:15:48 PM CET, Max Reitz wrote: > @@ -219,7 +219,7 @@ static int l2_load(BlockDriverState *bs, uint64_t > offset, > * Writes

Re: [PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-17 Thread Kevin Wolf
Am 17.01.2020 um 10:12 hat Max Reitz geschrieben: > On 17.01.20 00:26, Alberto Garcia wrote: > > On Tue 14 Jan 2020 03:15:48 PM CET, Max Reitz wrote: > >>> @@ -219,7 +219,7 @@ static int l2_load(BlockDriverState *bs, uint64_t > >>> offset, > >>> * Writes one sector of the L1 table to the disk

Re: [PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-17 Thread Max Reitz
On 17.01.20 00:26, Alberto Garcia wrote: > On Tue 14 Jan 2020 03:15:48 PM CET, Max Reitz wrote: >>> @@ -219,7 +219,7 @@ static int l2_load(BlockDriverState *bs, uint64_t >>> offset, >>> * Writes one sector of the L1 table to the disk (can't update single >>> entries >>> * and we really don't

Re: [PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-16 Thread Alberto Garcia
On Tue 14 Jan 2020 03:15:48 PM CET, Max Reitz wrote: >> @@ -219,7 +219,7 @@ static int l2_load(BlockDriverState *bs, uint64_t offset, >> * Writes one sector of the L1 table to the disk (can't update single >> entries >> * and we really don't want bdrv_pread to perform a read-modify-write) >>

Re: [PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-14 Thread Max Reitz
On 09.01.20 20:13, Alberto Garcia wrote: > This replaces all remaining instances in the qcow2 code. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cluster.c | 2 +- > block/qcow2.c | 10 ++ > 2 files changed, 7 insertions(+), 5 deletions(-) The question of course is why