Am 25.02.2021 um 11:36 hat Stefano Garzarella geschrieben:
> When a block job fails, we report strerror(-job->job.ret) error
> message, also if the job set an error object.
> Let's report a better error message using error_get_pretty(job->job.err).
> 
> If an error object was not set, strerror(-job->ret) is used as fallback,
> as explained in include/qemu/job.h:
> 
> typedef struct Job {
>     ...
>     /**
>      * Error object for a failed job.
>      * If job->ret is nonzero and an error object was not set, it will be set
>      * to strerror(-job->ret) during job_completed.
>      */
>     Error *err;
> }
> 
> In block_job_query() there can be a transient where 'job.err' is not set
> by a scheduled bottom half. In that case we use strerror(-job->ret) as it
> was before.
> 
> Suggested-by: Kevin Wolf <kw...@redhat.com>
> Signed-off-by: Stefano Garzarella <sgarz...@redhat.com>

Thanks, applied to the block branch.

Kevin


Reply via email to