_scsih_raid...e_find_by_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… _scsih_raid_device_find_by_id(9) β€” or, as her friends call her, _scsih_raid...e_find_by_id(9)

okay so this is a page out of the Kernel API Manual, and it's literally about finding your raid device in a list. yes bestie, it's a lookup function. it's giving "I know a guy who knows a guy" energy and honestly? iconic. πŸŽ€


✨ NAME ✨

_scsih_raid_device_find_by_id β€” raid device search 🌸

like, the name says it all. it searches. for a raid device. by its id. slay.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct _raid_device * _scsih_raid_device_find_by_id (struct
MPT3SAS_ADAPTER *ioc , int id , int channel );

look at that signature. three args, one pointer back. clean. no cap. ✨


🌈 ARGUMENTS 🌈

  • ioc β€” the per adapter object πŸ’œ like, the whole adapter's vibe, passed in so we know which world we're searching in
  • id β€” the sas device target id. this is the thing we're matching on, bestie 🎯
  • channel β€” the sas device channel. yes, it's an argument. yes, it's here. don't ask me to skip it πŸ™ˆ

πŸ”₯ CONTEXT πŸ”₯

Calling function should acquire ioc->raid_device_lock

okay this one MATTERS. the calling function β€” not this one β€” has to grab ioc->raid_device_lock first. like, you don't walk into someone's room without knocking, and you don't call this without the lock. no cap. πŸ”’πŸ’€


⭐ DESCRIPTION ⭐

so what does it actually do? it searches for raid_device based on the target id, then returns the raid_device object. that's it. that's the whole thing. she's a finder. she finds. πŸ‘‘

the way that this is literally just "look for the thing, give back the thing" and yet it's load-bearing for a whole SCSI driver β€” main character energy fr fr πŸ’…


🫢 SEE ALSO 🫢

okay so there are a LOT of friends in this group chat. like, an unreasonable number. but we don't leave people out, so here's the entire squad, in order, exactly as listed: 🧚

and the source file these all live in is ./drivers/scsi/mpt3sas β€” that's the whole neighborhood, bestie. iykyk. πŸ¦‹


k that's the page!! source + version is ./drivers/scsi/mpt3sas, dated October 2026, and that's the whole _scsih_raid...e_find_by_id(9) situation 🫢 go forth, acquire that lock, and find your raid device. periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from