scsi_sequential_lun_scan(9)
π 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 toscsi_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 π:
scsi_complete_async_scans(9)scsi_unlock_floptical(9)scsi_alloc_sdev(9)scsi_target_reap_ref_release(9)scsi_alloc_target(9)scsi_target_reap(9)scsi_sanitize_inquiry_string(9)scsi_probe_lun(9)scsi_add_lun(9)scsi_inq_str(9)scsi_probe_and_add_lun(9)scsi_report_lun_scan(9)scsi_add_device(9)scsi_scan_target(9)scsi_prep_async_scan(9)scsi_finish_async_scan(9)scsi_scan_host(9)scsi_get_pseudo_sdev(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms