On 2026-08-01 08:06, Aadeshveer Singh wrote:
> Remove the internal QEMUFile error state modification from
> qemu_get_buffer_at(). This function is called by two functions, both of
> which already check for unexpected return values and handle their own
> error reporting.
> 
> Removing this shared state modification makes qemu_get_buffer_at()
> strictly thread-safe for concurrent disk reads, serving as a
> preparatory change for the upcoming fast snapshot load feature.
> 
> Removed local error by passing errp to improve on error handling,
> consequently also change caller to use error_prevent and not error_setg.
> 
> Set errp in case of f->last_error as function should set errp in case it
> fails, and caller can simply use error_prepend without checking errp in
> case of error.
> 
> Signed-off-by: Aadeshveer Singh <[email protected]>
> ---
>  migration/qemu-file.c | 11 +++++------
>  migration/qemu-file.h |  4 ++--
>  migration/ram.c       |  6 +++---
>  3 files changed, 10 insertions(+), 11 deletions(-)

Reviewed-by: Juraj Marcin <[email protected]>


Reply via email to