Page MenuHomeFreeBSD

cam: use disk_alloc_nowait
AbandonedPublic

Authored by imp on Mar 9 2021, 8:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Feb 13, 6:19 AM
Unknown Object (File)
Wed, Feb 4, 2:11 PM
Unknown Object (File)
Sun, Feb 1, 8:49 PM
Unknown Object (File)
Jan 7 2026, 4:54 PM
Unknown Object (File)
Dec 9 2025, 7:52 PM
Unknown Object (File)
Nov 30 2025, 12:00 AM
Unknown Object (File)
Nov 25 2025, 1:00 AM
Unknown Object (File)
Nov 12 2025, 5:11 AM
Subscribers

Details

Reviewers
ken
glebius
kevans
mav
scottl
Group Reviewers
cam
Summary

CAM drivers are created in a callback in xpt_done_td. This thread is marked
non-sleepable so that callbacks executed here don't block other completions. For
all these periph's register callbacks, use this to allocate the disk. Rearrange
a little so we allocate everything at the top of the function and return the
appropriate error after cleaning upt he allocations.

Diff Detail

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

Event Timeline

imp requested review of this revision.Mar 9 2021, 8:31 PM

Can drivers are created in a callback in xpt_done_td.

"CAM drivers are created in a callback in xpt_done_td." ?

Can drivers are created in a callback in xpt_done_td.

"CAM drivers are created in a callback in xpt_done_td." ?

fixed in my local copy and in this description here.

On second thought, I'm going to abandon this approach and schedule the cam register routine into a taskqueue so we can sleep. There's no good retry mechanism here, and adding one would make things more complicated. We can switch to waiting for memory to have a more robust system with simpler code. This also matches at least some of the feedback I've received privately (thanks Chuck). I'll post that review when I have it done.