target_cmd_size_check(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 in cmd->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 πŸ’œ

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