HomeFreeBSD

Improve arc_read() error reporting

Description

Improve arc_read() error reporting

Debugging reported NULL de-reference panic in dnode_hold_impl() I found
that for certain types of errors arc_read() may only return error code,
but not properly report it via done and pio arguments. Lack of done
calls may result in reference and/or memory leaks in higher level code.
Lack of error reporting via pio may result in unnoticed errors there.
For example, dbuf_read(), where dbuf_read_impl() ignores arc_read()
return, relies completely on the pio mechanism and missed the errors.

This patch makes arc_read() to always call done callback and always
propagate errors to parent zio, if either is provided.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #14454

Details

Provenance
mavAuthored on Feb 13 2023, 9:21 PM
GitHub <noreply@github.com>Committed on Feb 13 2023, 9:21 PM
Parents
rG7883ea2234fa: rpm: Use libtirpc-devel and /usr/lib on SUSE
Branches
Unknown
Tags
Unknown

Event Timeline