mbox series

[0/2] block/parallels: Fix buffer-based write call

Message ID 20220714132801.72464-1-hreitz@redhat.com (mailing list archive)
Headers show
Series block/parallels: Fix buffer-based write call | expand

Message

Hanna Czenczek July 14, 2022, 1:27 p.m. UTC
Hi,

While reviewing Stefan’s libblkio driver series, I’ve noticed that
block/parallels.c contains a call to bdrv_co_pwritev() that doesn’t pass
a QEMUIOVector object but a plain buffer instead.  That seems wrong and
also pretty dangerous, so change it to a bdrv_co_pwrite() call (as I
assume it should be), and add a regression test demonstrating the
problem.


Hanna Reitz (2):
  block/parallels: Fix buffer-based write call
  iotests/131: Add parallels regression test

 block/parallels.c          |  4 ++--
 tests/qemu-iotests/131     | 35 ++++++++++++++++++++++++++++++++++-
 tests/qemu-iotests/131.out | 13 +++++++++++++
 3 files changed, 49 insertions(+), 3 deletions(-)

Comments

Vladimir Sementsov-Ogievskiy July 26, 2022, 7:06 p.m. UTC | #1
On 7/14/22 16:27, Hanna Reitz wrote:
> Hi,
> 
> While reviewing Stefan’s libblkio driver series, I’ve noticed that
> block/parallels.c contains a call to bdrv_co_pwritev() that doesn’t pass
> a QEMUIOVector object but a plain buffer instead.  That seems wrong and
> also pretty dangerous, so change it to a bdrv_co_pwrite() call (as I
> assume it should be), and add a regression test demonstrating the
> problem.
> 
> 
> Hanna Reitz (2):
>    block/parallels: Fix buffer-based write call
>    iotests/131: Add parallels regression test
> 
>   block/parallels.c          |  4 ++--
>   tests/qemu-iotests/131     | 35 ++++++++++++++++++++++++++++++++++-
>   tests/qemu-iotests/131.out | 13 +++++++++++++
>   3 files changed, 49 insertions(+), 3 deletions(-)
> 

Thanks, applied to my block branch.