iscsi_host_alloc(9)
π iscsi_host_alloc(9)
okay so bestie, you're in the Kernel API Manual and today's main character is iscsi_host_alloc β the function that literally hands you a host and the driver data to go with it. two for one, slay β¨
πΈ NAME πΈ
iscsi_host_alloc β allocate a host and driver data π«Ά
β¨ SYNOPSIS β¨
struct Scsi_Host * iscsi_host_alloc (const struct scsi_host_template
*sht , int dd_data_size , bool xmit_can_sleep );
like, that's the whole vibe. returns you a struct Scsi_Host *, takes three arguments, periodt π
π ARGUMENTS π
shtβ the scsi host template, your blueprint basically πdd_data_sizeβ how big the driver host data is, size matters bestiexmit_can_sleepβ aboolsaying whether the LLD is gonna queue IO from a work queue π΄
π¦ DESCRIPTION π¦
so here's the tea: this is what partial offload drivers and software iscsi drivers should be calling. no cap, that's the audience π
and when you wanna get at that driver-specific memory? you use the iscsi_host_priv macro. that's the key to the private stash, iykyk π
π SEE ALSO π
kernel file ./drivers/scsi/libiscsi.c and honestly the whole friend group:
iscsi_prep_data_out_pdu(9)iscsi_check_tmf_restrictions(9)iscsi_prep_scsi_cmd_pdu(9)iscsi_free_task(9)__iscsi_put_task(9)iscsi_complete_task(9)iscsi_complete_scsi_task(9)iscsi_alloc_mgmt_task(9)iscsi_send_mgmt_task(9)iscsi_scsi_cmd_rsp(9)iscsi_data_in_rsp(9)iscsi_nop_out_rsp(9)iscsi_itt_to_task(9)__iscsi_complete_pdu(9)iscsi_itt_to_ctask(9)iscsi_requeue_task(9)iscsi_data_xmit(9)iscsi_suspend_queue(9)iscsi_suspend_tx(9)iscsi_suspend_rx(9)iscsi_conn_unbind(9)iscsi_eh_session_reset(9)iscsi_eh_target_reset(9)iscsi_eh_recover_target(9)iscsi_host_add(9)iscsi_host_remove(9)iscsi_session_setup(9)iscsi_session_free(9)iscsi_session_teardown(9)iscsi_conn_setup(9)iscsi_conn_teardown(9)
like, go read them, they're all iconic in their own way β
π SIGN-OFF π
that's a wrap bestie!! this one lives in ./drivers/scsi, dated October 2026 β go be great with your host allocation, mwah ππ§π
π¦ 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