block/blk-timeout.c
Source file repositories/reference/linux-study-clean/block/blk-timeout.c
File Facts
- System
- Linux kernel
- Corpus path
block/blk-timeout.c- Extension
.c- Size
- 4216 bytes
- Lines
- 168
- Domain
- Representative Device Path
- Bucket
- PCIe NVMe Storage Path
- Inferred role
- Representative Device Path: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/blkdev.hlinux/fault-inject.hblk.hblk-mq.h
Detected Declarations
function setup_fail_io_timeoutfunction __blk_should_fake_timeoutfunction fail_io_timeout_debugfsfunction part_timeout_showfunction part_timeout_storefunction blk_abort_requestfunction blk_timeout_initfunction blk_round_jiffiesfunction blk_rq_timeoutfunction blk_add_timerexport __blk_should_fake_timeoutexport blk_abort_request
Annotated Snippet
time_before(expiry, q->timeout.expires)) {
unsigned long diff = q->timeout.expires - expiry;
/*
* Due to added timer slack to group timers, the timer
* will often be a little in front of what we asked for.
* So apply some tolerance here too, otherwise we keep
* modifying the timer because expires for value X
* will be X + something.
*/
if (!timer_pending(&q->timeout) || (diff >= HZ / 2))
mod_timer(&q->timeout, expiry);
}
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/blkdev.h`, `linux/fault-inject.h`, `blk.h`, `blk-mq.h`.
- Detected declarations: `function setup_fail_io_timeout`, `function __blk_should_fake_timeout`, `function fail_io_timeout_debugfs`, `function part_timeout_show`, `function part_timeout_store`, `function blk_abort_request`, `function blk_timeout_init`, `function blk_round_jiffies`, `function blk_rq_timeout`, `function blk_add_timer`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.