scsi_eh_finish_cmd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ scsi_eh_finish_cmd(9) β€” Kernel API Manual, bestie edition ✨

okay so picture this: you're deep in the SCSI error handler (eh for short, iykyk), and a command is finally DONE. Like, handled. Finished. This function is the one that catches it on the way out the door and tucks it somewhere safe instead of letting it loose immediately. πŸŽ€

πŸ’– NAME πŸ’–

scsi_eh_finish_cmd β€” handles a cmd that eh is finished with. that's it, that's the vibe. πŸ¦‹

🌸 SYNOPSIS 🌸

void scsi_eh_finish_cmd (struct scsi_cmnd *scmd , struct list_head
       *done_q );

literally just two params and a dream πŸ’…

🧚 ARGUMENTS 🧚

  • scmd β€” the original SCSI cmd that eh has finished. main character energy, honestly β€” this is the command that just went through it all. πŸ”₯
  • done_q β€” the queue for processed commands. this is where finished cmds get to chill until it's safe to actually complete them. πŸ‘‘

πŸŽ€ NOTES πŸŽ€

okay so the big brain part: we do not want to use the normal command completion while we're still handling errors. like, absolutely not. πŸ™ˆ why? because normal completion might cause other commands to get queued, and that would disturb what we're doing β€” and we are very busy doing error handling, thank you. πŸ’€

so instead we really want to keep a list of pending commands for final completion. stack 'em up, keep 'em cozy, and then once we're ready to leave error handling we handle completion for real. periodt. ✨

ngl this is a "trust the process" situation β€” the queue exists so nothing chaotic happens mid-error-recovery. respect the queue. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./drivers/scsi/scsi_error.c β€” that's the neighborhood, bestie 🏑


and that's the whole page, bestie β€” go forth and finish those cmds responsibly πŸ’œ

sign-off szn: this lil masterpiece lives under ./drivers/scsi, dated October 2026, in the Kernel API Manual. mwah. πŸ“

πŸ“¦ where this page comes from