qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] file-posix: fix over-writing of returning zone_append offset


From: Michael Tokarev
Subject: Re: [PATCH] file-posix: fix over-writing of returning zone_append offset
Date: Tue, 7 Nov 2023 19:29:42 +0300
User-agent: Mozilla Thunderbird

30.10.2023 10:38, Naohiro Aota wrote:
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>

This smells like a -stable material. Please let me know if it is not.

Thanks,

/mjt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]