core_tmr_drain_state_list(9)
π 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
- 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