aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorNaohiro Aota <nao.aota@gmail.com>2023-10-30 16:38:53 +0900
committerHanna Czenczek <hreitz@redhat.com>2023-11-06 16:15:07 +0100
commitad4feaca61d76fecad784e6d5e7bae40d0411c46 (patch)
treebf35b07fad84ea1cf840659c8158a4dd503330b7 /qapi
parent10b9e0802a074c991e1ce485631d75641d0b0f9e (diff)
downloadqemu-ad4feaca61d76fecad784e6d5e7bae40d0411c46.zip
qemu-ad4feaca61d76fecad784e6d5e7bae40d0411c46.tar.gz
qemu-ad4feaca61d76fecad784e6d5e7bae40d0411c46.tar.bz2
file-posix: fix over-writing of returning zone_append offset
raw_co_zone_append() sets "s->offset" where "BDRVRawState *s". This pointer is used later at raw_co_prw() to save the block address where the data is written. When multiple IOs are on-going at the same time, a later IO's raw_co_zone_append() call over-writes a former IO's offset address before raw_co_prw() completes. As a result, the former zone append IO returns the initial value (= the start address of the writing zone), instead of the proper address. Fix the issue by passing the offset pointer to raw_co_prw() instead of passing it through s->offset. Also, remove "offset" from BDRVRawState as there is no usage anymore. Fixes: 4751d09adcc3 ("block: introduce zone append write for zoned devices") Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Message-Id: <20231030073853.2601162-1-naohiro.aota@wdc.com> Reviewed-by: Sam Li <faithilikerun@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Diffstat (limited to 'qapi')
0 files changed, 0 insertions, 0 deletions