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
F115913083: D35093.diff
Wed, Apr 30, 8:17 AM
Unknown Object (File)
Thu, Apr 24, 10:54 PM
Unknown Object (File)
Fri, Apr 18, 5:18 AM
Unknown Object (File)
Tue, Apr 15, 7:03 PM
Unknown Object (File)
Tue, Apr 8, 11:17 AM
Unknown Object (File)
Tue, Apr 8, 2:42 AM
Unknown Object (File)
Mar 18 2025, 8:51 AM
Unknown Object (File)
Mar 10 2025, 5:52 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.