scsi_alloc_sgtables(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ scsi_alloc_sgtables β€” the Kernel API Manual page you didn't know you needed ✨

okay so bestie, welcome to the Kernel API Manual entry for scsi_alloc_sgtables, and honestly? it's a little setup queen and we love her for it πŸ’…

πŸŽ€ NAME πŸŽ€

scsi_alloc_sgtables β€” allocate and initialize data and integrity scatterlists 🌸

πŸ¦‹ SYNOPSIS πŸ¦‹

blk_status_t scsi_alloc_sgtables (struct scsi_cmnd *cmd );

πŸ’– ARGUMENTS πŸ’–

  • cmd β€” the SCSI command data structure you're about to initialize 🫢

✨ DESCRIPTION ✨

so what she actually does: she initializes cmd->sdb, and also cmd->prot_sdb if data integrity is enabled for cmd. that's it, that's the whole vibe. no cap. 🧚

πŸ”₯ RETURN πŸ”₯

she comes back at you with a blk_status_t, and here's the lineup of what it could be:

  • BLK_STS_OK β€” on success πŸŽ‰ slay, everything's fine
  • BLK_STS_RESOURCE β€” if the failure is retryable πŸ” lowkey try again
  • BLK_STS_IOERR β€” if the failure is fatal πŸ’€ like, actually fatal, no coming back from that one

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/scsi/scsi_lib.c πŸ“ and literally the whole friend group:


fr fr, that's a long guest list, but every single one of them is invited 🫢

and that's the page!! this little masterpiece lives in ./drivers/scsi, dated October 2026, and it's filed in the Kernel API Manual β€” mwah, iconic, no notes, periodt πŸ’œπŸŒˆβ­

πŸ“¦ where this page comes from