scsi_alloc_sgtables(9)
β¨ scsi_alloc_sgtables β the Kernel API Manual page you didn't know you needed β¨
okay so bestie, welcome to the Kernel API Manual entry for scsi_alloc_sgtables, and honestly? it's a little setup queen and we love her for it π
π NAME π
scsi_alloc_sgtables β allocate and initialize data and integrity scatterlists πΈ
π¦ SYNOPSIS π¦
blk_status_t scsi_alloc_sgtables (struct scsi_cmnd *cmd );
π ARGUMENTS π
cmdβ the SCSI command data structure you're about to initialize π«Ά
β¨ DESCRIPTION β¨
so what she actually does: she initializes cmd->sdb, and also cmd->prot_sdb if data integrity is enabled for cmd. that's it, that's the whole vibe. no cap. π§
π₯ RETURN π₯
she comes back at you with a blk_status_t, and here's the lineup of what it could be:
BLK_STS_OKβ on success π slay, everything's fineBLK_STS_RESOURCEβ if the failure is retryable π lowkey try againBLK_STS_IOERRβ if the failure is fatal π like, actually fatal, no coming back from that one
π SEE ALSO π
kernel file ./drivers/scsi/scsi_lib.c π and literally the whole friend group:
__scsi_queue_insert(9)scsi_queue_insert(9)scsi_failures_reset_retries(9)scsi_check_passthrough(9)scsi_execute_cmd(9)scsi_run_queue(9)scsi_result_to_blk_status(9)scsi_rq_err_bytes(9)scsi_io_completion(9)scsi_initialize_rq(9)scsi_alloc_request(9)scsi_dispatch_cmd(9)scsi_get_internal_cmd(9)scsi_put_internal_cmd(9)scsi_device_from_queue(9)scsi_block_requests(9)scsi_unblock_requests(9)scsi_mode_select(9)scsi_mode_sense(9)scsi_test_unit_ready(9)scsi_device_set_state(9)scsi_evt_emit(9)scsi_evt_thread(9)sdev_evt_send(9)sdev_evt_alloc(9)sdev_evt_send_simple(9)scsi_device_quiesce(9)scsi_device_resume(9)scsi_internal_device_block_nowait(9)scsi_device_block(9)scsi_internal_device_unblock_nowait(9)scsi_internal_device_unblock(9)scsi_block_targets(9)scsi_host_block(9)scsi_kmap_atomic_sg(9)scsi_kunmap_atomic_sg(9)scsi_vpd_lun_id(9)scsi_vpd_lun_serial(9)scsi_vpd_tpg_id(9)scsi_build_sense(9)
fr fr, that's a long guest list, but every single one of them is invited π«Ά
and that's the page!! this little masterpiece lives in ./drivers/scsi, dated October 2026, and it's filed in the Kernel API Manual β mwah, iconic, no notes, 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