qemu/block
Naohiro Aota bcc9879c1c 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: 4751d09adc ("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>
(cherry picked from commit ad4feaca61d76fecad784e6d5e7bae40d0411c46)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2023-11-09 16:39:13 +03:00
..
export vhost-user: fully use new backend/frontend naming 2023-06-26 09:50:00 -04:00
monitor meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
accounting.c
aio_task.c
amend.c block: Mark BlockDriver callbacks for amend job GRAPH_RDLOCK 2023-05-10 14:16:54 +02:00
backup.c
blkdebug.c blkdebug: add missing coroutine_fn annotation 2023-04-25 13:17:28 +02:00
blkio.c block/blkio: add more comments on the fd passing handling 2023-08-03 11:28:43 -04:00
blklogwrites.c
blkreplay.c
blkverify.c block: Mark bdrv_recurse_can_replace() and callers GRAPH_RDLOCK 2023-05-10 14:16:54 +02:00
block-backend.c block: add blk_io_plug_call() API 2023-06-01 07:34:03 -04:00
block-copy.c
block-gen.h
block-ram-registrar.c
bochs.c bochs: mark more functions as coroutine_fns and GRAPH_RDLOCK 2023-06-28 09:46:24 +02:00
cloop.c cloop: mark more functions as coroutine_fns and GRAPH_RDLOCK 2023-06-28 09:46:27 +02:00
commit.c blockjob: Adhere to rate limit even when reentered early 2023-05-19 19:12:12 +02:00
copy-before-write.c copy-before-write: Fix open with child in iothread 2023-05-30 17:29:35 +02:00
copy-before-write.h
copy-on-read.c block: remove has_variable_length from filters 2023-04-11 16:38:56 +02:00
copy-on-read.h
coroutines.h nbd: Mark nbd_co_do_establish_connection() and callers GRAPH_RDLOCK 2023-05-10 14:16:53 +02:00
create.c block: Call .bdrv_co_create(_opts) unlocked 2023-05-19 19:12:12 +02:00
crypto.c block: Call .bdrv_co_create(_opts) unlocked 2023-05-19 19:12:12 +02:00
crypto.h
curl.c aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
dirty-bitmap.c
dmg-bz2.c
dmg-lzfse.c block/dmg: Ignore C99 prototype declaration mismatch from <lzfse.h> 2023-03-30 15:03:36 +02:00
dmg.c dmg: mark more functions as coroutine_fns and GRAPH_RDLOCK 2023-06-28 09:46:28 +02:00
dmg.h block/dmg: Declare a type definition for DMG uncompress function 2023-04-24 13:53:44 -04:00
file-posix.c file-posix: fix over-writing of returning zone_append offset 2023-11-09 16:39:13 +03:00
file-win32.c thread-pool: avoid passing the pool parameter every time 2023-04-25 13:17:28 +02:00
filter-compress.c block: remove has_variable_length from filters 2023-04-11 16:38:56 +02:00
gluster.c cutils: Adjust signature of parse_uint[_full] 2023-06-02 12:27:19 -05:00
graph-lock.c Revert "graph-lock: Disable locking for now" 2023-06-28 08:46:26 +02:00
io.c block: Fix pad_request's request restriction 2023-07-27 09:48:16 -04:00
io_uring.c block/io_uring: convert to blk_io_plug_call() API 2023-06-01 07:34:03 -04:00
iscsi-opts.c
iscsi.c aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
linux-aio.c block/linux-aio: convert to blk_io_plug_call() API 2023-06-01 07:34:03 -04:00
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
mirror.c mirror: Hold main AioContext lock for calling bdrv_open_backing_file() 2023-05-30 17:21:23 +02:00
nbd.c nbd/client: Simplify cookie vs. index computation 2023-07-19 15:26:13 -05:00
nfs.c cutils: Adjust signature of parse_uint[_full] 2023-06-02 12:27:19 -05:00
null.c
nvme.c block/nvme: nvme_process_completion() fix bound for cid 2023-11-09 16:39:13 +03:00
parallels-ext.c util/uuid: Add UUID_STR_LEN definition 2023-11-09 16:39:13 +03:00
parallels.c block: use bdrv_co_getlength in coroutine context 2023-06-28 09:46:33 +02:00
parallels.h
plug.c block: add blk_io_plug_call() API 2023-06-01 07:34:03 -04:00
preallocate.c block: remove has_variable_length from filters 2023-04-11 16:38:56 +02:00
progress_meter.c
qapi-sysemu.c block: Fix locking in media change monitor commands 2023-11-01 12:51:23 +03:00
qapi.c block: add accounting for zone append operation 2023-05-15 08:18:10 -04:00
qcow.c block: use bdrv_co_debug_event in coroutine context 2023-06-28 09:46:34 +02:00
qcow2-bitmap.c qcow2: mark more functions as coroutine_fns and GRAPH_RDLOCK 2023-06-28 09:46:32 +02:00
qcow2-cache.c
qcow2-cluster.c qcow2: keep reference on zeroize with discard-no-unref enabled 2023-11-09 16:39:13 +03:00
qcow2-refcount.c block: use bdrv_co_debug_event in coroutine context 2023-06-28 09:46:34 +02:00
qcow2-snapshot.c qcow2: mark various functions as coroutine_fn and GRAPH_RDLOCK 2023-04-25 13:17:28 +02:00
qcow2-threads.c thread-pool: avoid passing the pool parameter every time 2023-04-25 13:17:28 +02:00
qcow2.c block: use bdrv_co_debug_event in coroutine context 2023-06-28 09:46:34 +02:00
qcow2.h qcow2: mark more functions as coroutine_fns and GRAPH_RDLOCK 2023-06-28 09:46:32 +02:00
qed-check.c qed: mark more functions as coroutine_fns and GRAPH_RDLOCK 2023-06-28 09:46:20 +02:00
qed-cluster.c
qed-l2-cache.c
qed-table.c block: use bdrv_co_debug_event in coroutine context 2023-06-28 09:46:34 +02:00
qed.c block: use bdrv_co_debug_event in coroutine context 2023-06-28 09:46:34 +02:00
qed.h
quorum.c block: Mark bdrv_recurse_can_replace() and callers GRAPH_RDLOCK 2023-05-10 14:16:54 +02:00
raw-format.c block: use bdrv_co_debug_event in coroutine context 2023-06-28 09:46:34 +02:00
rbd.c
replication.c block: remove has_variable_length from filters 2023-04-11 16:38:56 +02:00
reqlist.c
snapshot-access.c
snapshot.c
ssh.c aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
stream.c blockjob: Adhere to rate limit even when reentered early 2023-05-19 19:12:12 +02:00
throttle-groups.c
throttle.c
trace-events block/io_uring: convert to blk_io_plug_call() API 2023-06-01 07:34:03 -04:00
trace.h
vdi.c util/uuid: Add UUID_STR_LEN definition 2023-11-09 16:39:13 +03:00
vhdx-endian.c
vhdx-log.c vhdx: mark more functions as coroutine_fns and GRAPH_RDLOCK 2023-06-28 09:46:30 +02:00
vhdx.c vhdx: mark more functions as coroutine_fns and GRAPH_RDLOCK 2023-06-28 09:46:30 +02:00
vhdx.h vhdx: mark more functions as coroutine_fns and GRAPH_RDLOCK 2023-06-28 09:46:30 +02:00
vmdk.c block: use bdrv_co_debug_event in coroutine context 2023-06-28 09:46:34 +02:00
vpc.c vpc: mark more functions as coroutine_fns and GRAPH_RDLOCK 2023-06-28 09:46:23 +02:00
vvfat.c vvfat: mark various functions as coroutine_fn 2023-04-25 13:17:28 +02:00
win32-aio.c aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
write-threshold.c