scsi_interna...vice_unblock(9)
π scsi_internal_device_unblock β a Kernel API Manual moment
okay so before we even start: this is from the Kernel API Manual, bestie. the kernel manual. we're in the grown-up docs today and honestly? we're thriving. π
πΈ NAME πΈ
scsi_internal_device_unblock β the "you may go back online, queen" of SCSI functions aka resume a device after a block request
β¨ SYNOPSIS β¨
int scsi_internal_device_unblock (struct scsi_device *sdev , enum
scsi_device_state new_state );
likeβ¦ she takes two things and gives you back an int. short, sweet, iconic. π«Ά
π¦ ARGUMENTS π¦
sdevβ the device to resume. yes, the actual one. the little guy you put on pause earlier πnew_stateβ the state to set the device to after unblocking. you tell her where to land, she lands there π
π DESCRIPTION π
So the whole vibe here is: this restarts the device queue for a previously suspended SCSI device. that's it. that's the function. she's the "and we're back" moment. π¬
Not me telling you this butβ¦ it may sleep. π΄ like actually. keep that in mind, okay? don't call her from a place where sleeping is illegal, iykyk.
Returns zero if successful π or a negative error code upon failure π. that's literally it, no surprises, we love a predictable queen.
β NOTES β
This routine transitions the device to the SDEV_RUNNING state, or to one of the offline states β and heads up, that transition must be a legal transition (no cap, it has to be legal or the whole thing falls apart π). once that's done, it lets the midlayer goose the queue for this device. "goose the queue" is genuinely the technical term and I will not be elaborating because I did not make it up πͺΏβ¨
π SEE ALSO π
First things first, the kernel file this lives in:
./drivers/scsi/scsi_lib.c
and now, the extended friend group (there's like forty of them, buckle up π’):
__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_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_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)
that's the whole squad. no gatekeeping here π«Ά
so yeah, that's scsi_internal_device_unblock(9) β she unblocks, she may sleep, she returns an int, and she's legal-transition-only. slay. π
β¨
this lil love letter comes to you from the files at ./drivers/scsi, dated October 2026, and it's out. 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