Page MenuHomeFreeBSD

cam_periph: Return ENXIO when peripheral is invalidated
ClosedPublic

Authored by imp on Apr 28 2022, 7:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 17, 9:06 PM
Unknown Object (File)
Sun, May 12, 6:02 AM
Unknown Object (File)
Fri, May 3, 9:27 AM
Unknown Object (File)
Sun, Apr 28, 8:07 AM
Unknown Object (File)
Apr 7 2024, 12:49 PM
Unknown Object (File)
Apr 2 2024, 11:32 PM
Unknown Object (File)
Mar 29 2024, 1:34 PM
Unknown Object (File)
Mar 4 2024, 11:01 AM
Subscribers

Details

Summary

When the peripheral is invalidated, no further I/O is possible. Signal
this up the stack with ENXIO now that upper layers of the stack
differentiate sometimes. In order for there to be further I/O, and new
open is required for any block device that a future periph might
instantiate for devices at this location that might return or otherwise
become available. The I/O scheduler flushes its I/O with the ENXIO error
for pending I/O that didn't make it to the device, so this makes the two
paths match.

Sponsored by: Netflix

Test Plan

I noticed this when a drive failed under load, and we completed some of the I/O with EIO and some with ENXIO.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45422
Build 42310: arc lint + arc unit

Event Timeline

imp edited the test plan for this revision. (Show Details)
imp added a reviewer: mav.

I think both error codes are correct there, but ENXIO indeed should be more informative here.

This revision is now accepted and ready to land.Apr 28 2022, 8:33 PM
chs added a subscriber: chs.

This makes sense to me.