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)
Sun, Apr 7, 12:49 PM
Unknown Object (File)
Tue, Apr 2, 11:32 PM
Unknown Object (File)
Fri, Mar 29, 1:34 PM
Unknown Object (File)
Mar 4 2024, 11:01 AM
Unknown Object (File)
Mar 4 2024, 8:10 AM
Unknown Object (File)
Feb 6 2024, 2:50 AM
Unknown Object (File)
Jan 16 2024, 10:16 PM
Unknown Object (File)
Jan 16 2024, 5:36 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.