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.
Details
Details
- Reviewers
imp mav mckusick - Commits
- rG515fa5ff2e4d: geom/geom_vfs.c: use EXTERROR_KE() in g_vfs_strategy for ENXIOs
rG6c406b5b9312: exterror(9): add infra for bufs and bios
rG069e2fb5506f: exterror(9): add two helpers
rG7746b51dae12: exterror(9): add SETEXTERROR_KE() macro
rG58e5f3b84df0: sys/: rename bio_error variable to abio_error
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Debugged version. Worked for me with the artificial random errors returned from md(4) start_swap() on BIO_READ.
Comment Actions
This approach seems like the right way to get the extended errors back from the underlying devices.