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.

Details

Provenance
mavAuthored on Feb 13 2023, 9:21 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 24 2023, 4:55 PM
Parents
rG345f8beb5835: QAT: Fix uninitialized seed in QAT compression
Branches
Unknown
Tags
Unknown

Event Timeline