scsi_sequential_lun_scan(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scsi_sequential_lun_scan(9) β€” the kernel API manual, but make it cute

okay so bestie, welcome to scsi_sequential_lun_scan(9) from the Kernel API Manual ✨ this one is a function, it lives in ./drivers/scsi, and it's literally about walking through a SCSI target's LUNs one by one until the vibes say stop. let's get into it 🫢


🌸 NAME 🌸

scsi_sequential_lun_scan β€” sequentially scan a SCSI target. that's it, that's the whole name, and honestly? iconic. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

void scsi_sequential_lun_scan (struct Scsi_Host *shost , struct
       scsi_target *starget , blist_flags_t bflags , int scsi_level , enum
       scsi_scan_mode rescan );

that's the whole signature, no cap β€” five args, one void, zero drama πŸ’…


✨ ARGUMENTS ✨

  • shost β€” the SCSI host pointer. like, the host of the whole party πŸ’–
  • starget β€” pointer to the target structure we're gonna scan. this is our main character πŸŽ€
  • bflags β€” the black/white list flag for LUN 0. yes, specifically LUN 0. mind the details bestie πŸ™ˆ
  • scsi_level β€” which version of the standard this device adheres to. gotta know what rules we're playing by πŸ“œ
  • rescan β€” passed on to scsi_probe_add_lun. we don't handle it, we just hand it over 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so generally speaking 🌈 we scan from LUN 1 β€” because LUN 0 is assumed to already have been scanned, she's done, she's booked and busy πŸ’… β€” all the way up to some maximum lun, and we keep going until we hit a LUN that has no device attached. that's the stop condition, that's the vibe check ✨

and use the bflags to figure out any oddities πŸ‘€ like, that's what she's there for.

also, she modifies sdevscan->lun. not a read-only situation. noted. πŸ“

🌟 SEE ALSO 🌟

Kernel file ./drivers/scsi/scsi_scan.c β€” plus the whole friend group πŸ’œ:


and that's the page!! πŸŽ€ she's from ./drivers/scsi, dated October 2026, and her whole name is scsi_sequential_lun_scan(9) β€” go forth and scan sequentially, bestie πŸ’…βœ¨

πŸ“¦ where this page comes from