scsi_result_to_blk_status(9)
π scsi_result_to_blk_status π
okay so real quick β this is a page from the Kernel API Manual (yes, the kernel has lore too, keep up π«Ά) and it's about one tiny little function that does one tiny little translation job. no cap, it's lowkey iconic for how much it carries on its shoulders.
β¨ NAME β¨
scsi_result_to_blk_status β translate a SCSI result code into blk_status_t π
literally that's the whole gig. it takes the SCSI-flavored drama and converts it into block-layer language so everybody can understand each other. bestie behavior, fr fr.
π¦ SYNOPSIS π¦
blk_status_t scsi_result_to_blk_status (int result );
look at her. one arg. no notes. π
π ARGUMENTS π
resultβ the scsi error code π this is the raw SCSI-side scoop, and she's about to get translated.
πΈ DESCRIPTION πΈ
Translate a SCSI result code into a blk_status_t value.
that's it. that's the function. she takes the SCSI result code you hand her and hands you back a blk_status_t value. a little interpreter, a little translator, a little main character who speaks both languages π§β¨. not me being obsessed with a conversion function but here we are.
π SEE ALSO π
okay so this is the part where I need you to sit down, because the friend group is LARGE. all of these live in the Kernel file ./drivers/scsi/scsi_lib.c β say it with me now, ./drivers/scsi/scsi_lib.c, slay:
__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_rq_err_bytes(9)scsi_io_completion(9)scsi_alloc_sgtables(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)
forty of them. FORTY. the way this function has more friends than me π but honestly? respect. iykyk.
π‘ friendly reminder from your girl: every single one of those lives under ./drivers/scsi/scsi_lib.c β that's the source path the page gives you, so don't come for me if you're looking elsewhere. π«Ά
okay bye bestie, go translate some SCSI results π this little writeup was served fresh from the ./drivers/scsi source, dated October 2026, and yes β scsi_result_to_blk_status(9) is her name, don't wear it out β¨π
π¦ 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