Page MenuHomeFreeBSD

exterror(9): add infra for bufs and bios
ClosedPublic

Authored by kib on Oct 25 2025, 9:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 3, 6:34 PM
Unknown Object (File)
Nov 13 2025, 4:21 AM
Unknown Object (File)
Nov 9 2025, 5:08 PM
Unknown Object (File)
Nov 6 2025, 9:45 PM
Unknown Object (File)
Oct 31 2025, 1:14 PM
Unknown Object (File)
Oct 31 2025, 6:51 AM
Unknown Object (File)
Oct 30 2025, 2:16 PM
Unknown Object (File)
Oct 28 2025, 11:18 PM
Subscribers

Details

Summary
The extended error can be stored in either struct bio or struct buf,
indicated by BIO_EXTERR bio_flag.  At some strategic places, it is
copied into the current thread extended error.

This structure is required because io request from the top might pass
down through several io threads and the context that can report meaningful
extended error does not belong to the thread that initiated the io.

WIP: more geom providers should handle BIO_EXTERR when passing cloned
bios down and then handling completions.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Oct 25 2025, 9:24 AM
kib edited the summary of this revision. (Show Details)
kib added reviewers: imp, mav.
kib removed a subscriber: imp.

Debugged version. Worked for me with the artificial random errors returned from md(4) start_swap() on BIO_READ.

This approach seems like the right way to get the extended errors back from the underlying devices.

Tried it out and had no problems and got expected errors.

This revision is now accepted and ready to land.Nov 3 2025, 10:30 PM

the ddb commands that display bio and buf need to be updated.