[Qemu-devel] [PATCH 0/2] block/file-posix: Fix xfs_write_zeroes()

Max Reitz posted 2 patches 4 years, 7 months ago
Test docker-clang@ubuntu passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190822162618.27670-1-mreitz@redhat.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
block/file-posix.c         | 16 ++++++---
tests/qemu-iotests/265     | 67 ++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/265.out |  6 ++++
tests/qemu-iotests/group   |  1 +
4 files changed, 85 insertions(+), 5 deletions(-)
create mode 100755 tests/qemu-iotests/265
create mode 100644 tests/qemu-iotests/265.out
[Qemu-devel] [PATCH 0/2] block/file-posix: Fix xfs_write_zeroes()
Posted by Max Reitz 4 years, 7 months ago
Lukàš ran over a nasty regression in our xfs_write_zeroes() function
(sorry, my fault) made apparent by a recent patch from Anton that makes
qcow2 images heavily exercise the offending code path.

This series fixes the bug and adds a test to prevent it from
reoccurring.


Max Reitz (2):
  block/file-posix: Fix xfs_write_zeroes()
  iotests: Test reverse sub-cluster qcow2 writes

 block/file-posix.c         | 16 ++++++---
 tests/qemu-iotests/265     | 67 ++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/265.out |  6 ++++
 tests/qemu-iotests/group   |  1 +
 4 files changed, 85 insertions(+), 5 deletions(-)
 create mode 100755 tests/qemu-iotests/265
 create mode 100644 tests/qemu-iotests/265.out

-- 
2.21.0


Re: [Qemu-devel] [PATCH 0/2] block/file-posix: Fix xfs_write_zeroes()
Posted by Paolo Bonzini 4 years, 7 months ago
On 22/08/19 18:26, Max Reitz wrote:
> Lukàš ran over a nasty regression in our xfs_write_zeroes() function
> (sorry, my fault) made apparent by a recent patch from Anton that makes
> qcow2 images heavily exercise the offending code path.
> 
> This series fixes the bug and adds a test to prevent it from
> reoccurring.
> 
> 
> Max Reitz (2):
>   block/file-posix: Fix xfs_write_zeroes()
>   iotests: Test reverse sub-cluster qcow2 writes
> 
>  block/file-posix.c         | 16 ++++++---
>  tests/qemu-iotests/265     | 67 ++++++++++++++++++++++++++++++++++++++
>  tests/qemu-iotests/265.out |  6 ++++
>  tests/qemu-iotests/group   |  1 +
>  4 files changed, 85 insertions(+), 5 deletions(-)
>  create mode 100755 tests/qemu-iotests/265
>  create mode 100644 tests/qemu-iotests/265.out
> 

What about just killing libxfs support and only use fallocate?
FALLOC_FL_ZERO_RANGE was added in Linux 3.15 (2014) and the only
platform we probably support with such an old kernel is of course
RHEL/CentOS 7 which has had it backported.

Paolo

Re: [Qemu-devel] [PATCH 0/2] block/file-posix: Fix xfs_write_zeroes()
Posted by Max Reitz 4 years, 7 months ago
On 22.08.19 18:53, Paolo Bonzini wrote:
> On 22/08/19 18:26, Max Reitz wrote:
>> Lukàš ran over a nasty regression in our xfs_write_zeroes() function
>> (sorry, my fault) made apparent by a recent patch from Anton that makes
>> qcow2 images heavily exercise the offending code path.
>>
>> This series fixes the bug and adds a test to prevent it from
>> reoccurring.
>>
>>
>> Max Reitz (2):
>>   block/file-posix: Fix xfs_write_zeroes()
>>   iotests: Test reverse sub-cluster qcow2 writes
>>
>>  block/file-posix.c         | 16 ++++++---
>>  tests/qemu-iotests/265     | 67 ++++++++++++++++++++++++++++++++++++++
>>  tests/qemu-iotests/265.out |  6 ++++
>>  tests/qemu-iotests/group   |  1 +
>>  4 files changed, 85 insertions(+), 5 deletions(-)
>>  create mode 100755 tests/qemu-iotests/265
>>  create mode 100644 tests/qemu-iotests/265.out
>>
> 
> What about just killing libxfs support and only use fallocate?
> FALLOC_FL_ZERO_RANGE was added in Linux 3.15 (2014) and the only
> platform we probably support with such an old kernel is of course
> RHEL/CentOS 7 which has had it backported.

Works just as well for me. :-)

Max

Re: [Qemu-devel] [PATCH 0/2] block/file-posix: Fix xfs_write_zeroes()
Posted by Lukáš Doktor 4 years, 7 months ago
Dne 22. 08. 19 v 19:09 Max Reitz napsal(a):
> On 22.08.19 18:53, Paolo Bonzini wrote:
>> On 22/08/19 18:26, Max Reitz wrote:
>>> Lukàš ran over a nasty regression in our xfs_write_zeroes() function
>>> (sorry, my fault) made apparent by a recent patch from Anton that makes
>>> qcow2 images heavily exercise the offending code path.
>>>
>>> This series fixes the bug and adds a test to prevent it from
>>> reoccurring.
>>>
>>>
>>> Max Reitz (2):
>>>   block/file-posix: Fix xfs_write_zeroes()
>>>   iotests: Test reverse sub-cluster qcow2 writes
>>>
>>>  block/file-posix.c         | 16 ++++++---
>>>  tests/qemu-iotests/265     | 67 ++++++++++++++++++++++++++++++++++++++
>>>  tests/qemu-iotests/265.out |  6 ++++
>>>  tests/qemu-iotests/group   |  1 +
>>>  4 files changed, 85 insertions(+), 5 deletions(-)
>>>  create mode 100755 tests/qemu-iotests/265
>>>  create mode 100644 tests/qemu-iotests/265.out
>>>
>>
>> What about just killing libxfs support and only use fallocate?
>> FALLOC_FL_ZERO_RANGE was added in Linux 3.15 (2014) and the only
>> platform we probably support with such an old kernel is of course
>> RHEL/CentOS 7 which has had it backported.
> 
> Works just as well for me. :-)
> 
> Max
> 

Whatever you decide, anyway this patch fixes my arm installation issue and the attached qemu iotest is also passing on my system.

Thank you,
Lukáš

Tested-by: Lukáš Doktor <ldoktor@redhat.com>

Re: [Qemu-devel] [PATCH 0/2] block/file-posix: Fix xfs_write_zeroes()
Posted by Anton Nefedov 4 years, 7 months ago
On 22/8/2019 7:26 PM, Max Reitz wrote:
> Lukàš ran over a nasty regression in our xfs_write_zeroes() function
> (sorry, my fault) made apparent by a recent patch from Anton that makes
> qcow2 images heavily exercise the offending code path.
> 
> This series fixes the bug and adds a test to prevent it from
> reoccurring.
> 
> 
> Max Reitz (2):
>    block/file-posix: Fix xfs_write_zeroes()
>    iotests: Test reverse sub-cluster qcow2 writes
> 
>   block/file-posix.c         | 16 ++++++---
>   tests/qemu-iotests/265     | 67 ++++++++++++++++++++++++++++++++++++++
>   tests/qemu-iotests/265.out |  6 ++++
>   tests/qemu-iotests/group   |  1 +
>   4 files changed, 85 insertions(+), 5 deletions(-)
>   create mode 100755 tests/qemu-iotests/265
>   create mode 100644 tests/qemu-iotests/265.out
> 

Nice! thanks Max

Reviewed-by: Anton Nefedov <anton.nefedov@virtuozzo.com>