core_tmr_drain_state_list(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… core_tmr_drain_state_list(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” yes we're reading kernel docs together, this is our bonding era 🫢


✨ NAME ✨

core_tmr_drain_state_list β€” the function that aborts SCSI commands associated with a device. like, it goes in and clears out the outstanding commands tied to one specific device. no cap, that's the whole job πŸ’…


🌸 SYNOPSIS 🌸

void core_tmr_drain_state_list (struct se_device *dev , struct se_cmd
*prout_cmd , struct se_session *tmr_sess , bool tas , struct list_head
*preempt_and_abort_list );

it returns void, so don't go looking for a return value, she gives you nothing back and that's iconic of her honestly ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device for which to abort outstanding SCSI commands. this is the main character of the operation, everything is happening for this device πŸ‘‘
  • prout_cmd β€” pointer to the SCSI PREEMPT AND ABORT, but only if this function is called to realize the PREEMPT AND ABORT functionality. so it's a "depends on the situation" kind of pointer, iykyk πŸ¦‹
  • tmr_sess β€” the session through which the LUN RESET has been received. like, who delivered the message πŸ’Œ
  • tas β€” the Task Aborted Status (TAS) bit from the SCSI control mode page. and because the original devs knew this needed context, here's the quote from SPC-4, paragraph "7.5.10 Control mode page", verbatim:
"A task aborted status (TAS) bit set to zero specifies that aborted commands shall be terminated by the device server without any response to the application client. A TAS bit set to one specifies that commands aborted by the actions of an I_T nexus other than the I_T nexus on which the command was received shall be completed with TASK ABORTED status."

ngl that's a whole paragraph but it matters, so read it fr fr πŸ“–

  • preempt_and_abort_list β€” for the PREEMPT AND ABORT functionality, a list with registrations that will be preempted. it's giving "guest list but make it hostile" πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/target/target_core_tmr.c

go read the source bestie, it's right there ⭐


that's the whole page!! πŸ’– this one came from ./drivers/target and it's dated October 2026 β€” so like, a little time-travel moment for us πŸ•°οΈβœ¨ mwah, bye! πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from