summary refs log tree commit diff stats
path: root/scripts/qapi-introspect.py
diff options
context:
space:
mode:
authorAnton Nefedov <anton.nefedov@virtuozzo.com>2018-02-14 19:09:20 +0300
committerKevin Wolf <kwolf@redhat.com>2018-03-02 18:39:07 +0100
commit18a59f03c36214105477e9bbaed5a99355718d27 (patch)
tree522b5bd858f9b73a492c4292b3bb154a4094c591 /scripts/qapi-introspect.py
parent636cb5125823a75ef6bbc9d63f8d7890576fdfec (diff)
downloadfocaccia-qemu-18a59f03c36214105477e9bbaed5a99355718d27.tar.gz
focaccia-qemu-18a59f03c36214105477e9bbaed5a99355718d27.zip
block: fix write with zero flag set and iovector provided
The normal bdrv_co_pwritev() use is either
  - BDRV_REQ_ZERO_WRITE clear and iovector provided
  - BDRV_REQ_ZERO_WRITE set and iovector == NULL

while
  - the flag clear and iovector == NULL is an assertion failure
    in bdrv_co_do_zero_pwritev()
  - the flag set and iovector provided is in fact allowed
    (the flag prevails and zeroes are written)

However the alignment logic does not support the latter case so the padding
areas get overwritten with zeroes.

Currently, general functions like bdrv_rw_co() do provide iovector
regardless of flags. So, keep it supported and use bdrv_co_do_zero_pwritev()
alignment for it which also makes the code a bit more obvious anyway.

Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'scripts/qapi-introspect.py')
0 files changed, 0 insertions, 0 deletions