Re: [PATCH 2/3] io_u: Fix inconsistent handling of non-fatal errors with option error_dump
Damien Le Moal <[email protected]> Fri, 13 Feb 2026 12:17:20 +0900
| Newsgroups | org.kernel.vger.fio |
|---|---|
| Organization | Western Digital Research |
| Message-ID | <[email protected]> |
On 2/7/26 01:40, Niklas Cassel wrote:
> Commit 8b28bd413759 ("backend: Add configurable non fatal error list")
> added an early return in io_u_log_error() for non-fatal errors.
>
> This early return is performed if the error is a non-fatal error, and if
> error_dump is not set.
>
> Looking at the help text for the error_dump option:
> "If set dump every error even if it is non fatal, true by default.
> If disabled only fatal error will be dumped."
>
> So this commit made sure that, if error dump is NOT set:
> For a non-fatal error, io_u_log_error() will return early and will thus:
> 1) NOT print an error to the log
> 2) NOT call td_verror()
>
> However, if error dump is set, io_u_log_error() will not do an early
> return, instead it will log the non-fatal error and then call td_verror().
>
> It is clear that the intention is for a non-fatal error to not set
> td->error. (If error_dump is used it should _log_ the non-fatal error.)
>
> Thus, fix the code such that if error_dump is set, for a non-fatal error,
> we:
> 1) print an error to the log
> 2) NOT call td_verror()
>
> This will make the behavior in io_u_log_error() consistent.
> If error_dump is set, we will log the non-fatal error, but regardless of
> error_dump being set or not, we do NOT call td_verror() (which would set
> td->error) for a non-fatal error, since that was obviously the intention
> of commit 8b28bd413759 ("backend: Add configurable non fatal error list").
>
> Fixes: 8b28bd413759 ("backend: Add configurable non fatal error list")
> Signed-off-by: Niklas Cassel <[email protected]>
Looks OK to me.
Reviewed-by: Damien Le Moal <[email protected]>
--
Damien Le Moal
Western Digital Research