drivers/md/bcache/super.c
Source file repositories/reference/linux-study-clean/drivers/md/bcache/super.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/bcache/super.c- Extension
.c- Size
- 74913 bytes
- Lines
- 2976
- Domain
- Driver Families
- Bucket
- drivers/md
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
bcache.hbtree.hdebug.hextents.hrequest.hwriteback.hfeatures.hlinux/blkdev.hlinux/pagemap.hlinux/debugfs.hlinux/idr.hlinux/kthread.hlinux/workqueue.hlinux/module.hlinux/random.hlinux/reboot.hlinux/sysfs.h
Detected Declarations
struct async_reg_argsstruct pdevfunction get_bucket_sizefunction write_bdev_super_endiofunction __write_superfunction CLOSURE_CALLBACKfunction bch_write_bdev_superfunction write_super_endiofunction CLOSURE_CALLBACKfunction bcache_write_superfunction uuid_endiofunction CLOSURE_CALLBACKfunction uuid_iofunction __uuid_writefunction bch_uuid_writefunction prio_endiofunction prio_iofunction bch_prio_writefunction prio_readfunction open_devfunction release_devfunction ioctl_devfunction bcache_device_stopfunction bcache_device_unlinkfunction bcache_device_linkfunction bcache_device_detachfunction bcache_device_attachfunction first_minor_to_idxfunction idx_to_first_minorfunction bcache_device_freefunction bcache_device_initfunction calc_cached_dev_sectorsfunction cached_dev_status_updatefunction bch_cached_dev_runfunction quitsfunction cached_dev_detach_finishfunction bch_cached_dev_detachfunction bch_cached_dev_attachfunction bch_cached_dev_releasefunction CLOSURE_CALLBACKfunction CLOSURE_CALLBACKfunction cached_dev_initfunction register_bdevfunction bch_flash_dev_releasefunction CLOSURE_CALLBACKfunction CLOSURE_CALLBACKfunction flash_dev_runfunction flash_devs_run
Annotated Snippet
module_init(bcache_init);
module_param(bch_cutoff_writeback, uint, 0);
MODULE_PARM_DESC(bch_cutoff_writeback, "threshold to cutoff writeback");
module_param(bch_cutoff_writeback_sync, uint, 0);
MODULE_PARM_DESC(bch_cutoff_writeback_sync, "hard threshold to cutoff writeback");
MODULE_DESCRIPTION("Bcache: a Linux block layer cache");
MODULE_AUTHOR("Kent Overstreet <kent.overstreet@gmail.com>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `bcache.h`, `btree.h`, `debug.h`, `extents.h`, `request.h`, `writeback.h`, `features.h`, `linux/blkdev.h`.
- Detected declarations: `struct async_reg_args`, `struct pdev`, `function get_bucket_size`, `function write_bdev_super_endio`, `function __write_super`, `function CLOSURE_CALLBACK`, `function bch_write_bdev_super`, `function write_super_endio`, `function CLOSURE_CALLBACK`, `function bcache_write_super`.
- Atlas domain: Driver Families / drivers/md.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.