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)
Wed, Feb 5, 5:09 PM
Unknown Object (File)
Mon, Jan 27, 4:40 PM
Unknown Object (File)
Jan 5 2025, 3:56 AM
Unknown Object (File)
Dec 28 2024, 7:16 PM
Unknown Object (File)
Dec 28 2024, 3:01 AM
Unknown Object (File)
Dec 25 2024, 1:46 PM
Unknown Object (File)
Dec 7 2024, 2:01 AM
Unknown Object (File)
Nov 25 2024, 12:33 PM
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.