block/error-injection.h
Source file repositories/reference/linux-study-clean/block/error-injection.h
File Facts
- System
- Linux kernel
- Corpus path
block/error-injection.h- Extension
.h- Size
- 653 bytes
- Lines
- 22
- Domain
- Representative Device Path
- Bucket
- PCIe NVMe Storage Path
- Inferred role
- Representative Device Path: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/jump_label.h
Detected Declarations
function blk_error_inject
Annotated Snippet
#ifndef _BLK_ERROR_INJECTION_H
#define _BLK_ERROR_INJECTION_H 1
#include <linux/jump_label.h>
DECLARE_STATIC_KEY_FALSE(blk_error_injection_enabled);
void blk_error_injection_init(struct gendisk *disk);
void blk_error_injection_exit(struct gendisk *disk);
bool __blk_error_inject(struct bio *bio);
static inline bool blk_error_inject(struct bio *bio)
{
if (IS_ENABLED(CONFIG_BLK_ERROR_INJECTION) &&
static_branch_unlikely(&blk_error_injection_enabled) &&
test_bit(GD_ERROR_INJECT, &bio->bi_bdev->bd_disk->state))
return __blk_error_inject(bio);
return false;
}
#endif /* _BLK_ERROR_INJECTION_H */
Annotation
- Immediate include surface: `linux/jump_label.h`.
- Detected declarations: `function blk_error_inject`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- Implementation status: source 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.