scsi_block_targets(9)
β¨ NAME β¨
scsi_block_targets β transition all SCSI child devices to SDEV_BLOCK state. Yes bestie, this is scsi_block_targets(9) from the Kernel API Manual, and itβs here to put every SCSI child device into SDEV_BLOCK state. Itβs giving group chat gets put on do-not-disturb π
.
π¦ SYNOPSIS π¦
The exact signature, no cap:
void scsi_block_targets (struct Scsi_Host *shost , struct device *dev );
πΈ ARGUMENTS πΈ
shostβ theScsi_Hostto which this device belongs.devβ a parent device of one or morescsi_targetdevices.
π DESCRIPTION π
Okay so it iterates over all children of dev, and those children should be scsi_target devices. For every one of them, it switches all subordinate scsi devices to SDEV_BLOCK state. Then it waits for ongoing scsi_queue_rq calls to finish. Thatβs the whole plot, bestie.
May sleep. Yep, it may sleep. Not a drill, just the actual documented vibe π.
π¨ NOTE π¨
devmust not itself be ascsi_targetdevice. Thatβs the rule. Do not hand it ascsi_targetand expect main character energy β itβs literally in the note, bestie π.
π₯ SEE ALSO π₯
Kernel file: ./drivers/scsi/scsi_lib.c
The whole friend group, every single one:
__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_internal_device_unblock(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)
Bye bestie! From ./drivers/scsi, dated October 2026, on the scsi_block_targets(9) page β stay blocked and slay π
β¨
π¦ 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