Re: [Qemu-devel] [PATCH v2 8/9] block: Fix bdrv_co_truncate overlap check

2018-07-09 Thread Fam Zheng
On Fri, 07/06 17:09, Eric Blake wrote: > On 07/05/2018 02:37 AM, Fam Zheng wrote: > > If we are growing the image and potentially using preallocation for the > > new area, we need to make sure that no write requests are made to the > > "preallocated" area which [@old_size, @offset), not [@offset,

Re: [Qemu-devel] [PATCH v2 8/9] block: Fix bdrv_co_truncate overlap check

2018-07-06 Thread Eric Blake
On 07/05/2018 02:37 AM, Fam Zheng wrote: If we are growing the image and potentially using preallocation for the new area, we need to make sure that no write requests are made to the "preallocated" area which [@old_size, @offset), not [@offset, offset * 2 s/which/which is/ - @old_size).

[Qemu-devel] [PATCH v2 8/9] block: Fix bdrv_co_truncate overlap check

2018-07-05 Thread Fam Zheng
If we are growing the image and potentially using preallocation for the new area, we need to make sure that no write requests are made to the "preallocated" area which [@old_size, @offset), not [@offset, offset * 2 - @old_size). Signed-off-by: Fam Zheng --- block/io.c | 3 ++- 1 file changed, 2