target_cmd_size_check(9)
π target_cmd_size_check(9) π
okay so bestie, welcome to the target_cmd_size_check(9) era β it's a kernel API manual page and honestly it's kind of a little legend. the vibe? it checks whether there's gonna be a residual. yes, residual. slay. β¨
πΈ NAME πΈ
target_cmd_size_check β literally just checks whether there will be a residual π
π SYNOPSIS π
sense_reason_t target_cmd_size_check (struct se_cmd *cmd , unsigned int size );
that's it, that's the whole signature, no cap π«Ά
π¦ ARGUMENTS π¦
cmdβ the SCSI command, bestie. that's the one.sizeβ the data buffer size derived from the CDB. and listen, the data buffer size that the SCSI transport driver provides is available incmd->data_length. iykyk π«
β DESCRIPTION β
so what does it actually do, you ask? it compares the data buffer size from the CDB with the data buffer limit from the transport header. and if necessary β and only if necessary, okay β it sets cmd->residual_count and either SCF_OVERFLOW_BIT or SCF_UNDERFLOW_BIT. that's the whole assignment. main character behaviour, honestly π₯
π NOTE π
target drivers set cmd->data_length by calling __target_init_cmd. that's the note. write it down. π
π RETURN π
TCM_NO_SENSE
that's what you get back. that's it. periodt. β¨
π SEE ALSO π
kernel file ./drivers/target/target_core_transport.c β go read it, bestie, it's giving source of truth π
transport_init_session(9)transport_alloc_session(9)transport_alloc_session_tags(9)transport_init_session_tags(9)target_init_cmd(9)target_submit_prep(9)target_submit_cmd(9)target_queue_submission(9)target_submit(9)target_submit_tmr(9)target_get_sess_cmd(9)target_put_sess_cmd(9)target_stop_cmd_counter(9)target_stop_session(9)target_wait_for_cmds(9)target_wait_for_sess_cmds(9)transport_wait_for_tasks(9)translate_sense_reason(9)target_send_busy(9)
whole friend group, honestly π§
and that's the page!! this little icon lives in ./drivers/target, dated October 2026, and yes that's the whole footer vibe β it's the ./drivers/target release, October 2026, for target_cmd_size_check(9). bye bestie, go check some residuals πππΈ
π¦ 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