target_submit_prep(9)
π target_submit_prep β prepare cmd for submission π
okay bestie, welcome to the Kernel API Manual (section 9, the fancy kernel-functions part β¨). today we're looking at target_submit_prep, and honestly? she's a prep queen. she gets your cmd all ready for submission. no cap. π¦
β¨ NAME β¨
target_submit_prep β prepare cmd for submission π
πΈ SYNOPSIS πΈ
int target_submit_prep (struct se_cmd *se_cmd , unsigned char *cdb ,
struct scatterlist *sgl , u32 sgl_count , struct scatterlist *sgl_bidi ,
u32 sgl_bidi_count , struct scatterlist *sgl_prot , u32 sgl_prot_count ,
gfp_t gfp );
like, look at all those args. she's got range. π«Ά
π ARGUMENTS π
se_cmdβ the command descriptor to prep, aka the main character of this whole operation πcdbβ pointer to the SCSI CDB, fr frsglβ thestruct scatterlistmemory for unidirectional mappingsgl_countβ the scatterlist count for that unidirectional mappingsgl_bidiβ thestruct scatterlistmemory for bidirectional READ mapping (yes, bidi, she goes both ways π )sgl_bidi_countβ scatterlist count for the bidirectional READ mappingsgl_protβ thestruct scatterlistmemory protection informationsgl_prot_countβ scatterlist count for the protection informationgfpβ thegfpallocation type
π¦ RETURN π¦
vibe check on what you get back:
- less than zero to signal failure π
- zero on success β¨ slay
π§ DESCRIPTION π§
so here's the tea: if failure is returned, lio will the callers queue_status to complete the cmd. like, that's literally what it says, and that's literally what happens. no notes. π
π SEE ALSO π
the kernel file: ./drivers/target/target_core_transport.c
and the whole friend group, bestie β go say hi to:
transport_init_session(9), transport_alloc_session(9), transport_alloc_session_tags(9), transport_init_session_tags(9), target_cmd_size_check(9), target_init_cmd(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)
π reminder: the synopsis args are case-sensitive and very much not vibe-based. copy them exactly, bestie. π
mwah π that's the whole page! this icon of a manpage lives in ./drivers/target and it's dated October 2026 β so like, mark your calendar, periodt. βπ
π¦ 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