How aliez22/imrsim works
IMRSim is a Linux Device Mapper block-device simulator for interlaced magnetic recording. Users create a mapped device over a CMR block device, then issue ordinary I/O or use the command-line utility to inspect and configure it. The kernel target owns request handling, staged track allocation, read-modify-write behavior, zone state, statistics, error reporting, and ioctl dispatch. README-described visualization is included as a capability, but no implementation path or wiring is shown in the supplied excerpts. Kernel internals share one source file; edges reflect only visible calls or explicit README statements.
Main entry points: dm-imrsim.c Device Mapper target · imrsim_util.c Control utility · imrsim_ioctl.h Ioctl definitions · imrsim_types.h Shared IMR types
Components 16
User interface
- Control utility
imrsim_util/imrsim_util.c - Device formatter
imrsim_util/imr_format.sh
Kernel simulator
- Device Mapper target
imrsim_kmod/dm-imrsim.c - Ioctl interface
imrsim_kmod/dm-imrsim.c - RMW processing
imrsim_kmod/dm-imrsim.c - Shared IMR types
imrsim_kmod/imrsim_types.h - Ioctl definitions
imrsim_kmod/imrsim_ioctl.h
IMR domain
- Stage allocation
imrsim_kmod/dm-imrsim.c - Zone management
imrsim_kmod/dm-imrsim.c - Statistics
imrsim_kmod/dm-imrsim.c - Device configuration
imrsim_kmod/dm-imrsim.c - Error reporting
imrsim_kmod/dm-imrsim.c - I/O visualization
imrsim_kmod
Other components
- User
- I/O clients
- CMR block device
Connections 18
- User → Device formatter: formats device
README.md - User → Control utility: runs commands
README.md - User → Device Mapper target: creates mapped device
README.md - I/O clients → Device Mapper target: issues block I/O
README.md - Device Mapper target → CMR block device: simulates over
README.md - Device Mapper target → RMW processing: handles requests
imrsim_kmod/dm-imrsim.c - Device Mapper target → Stage allocation: allocates tracks
imrsim_kmod/dm-imrsim.c - Device Mapper target → Zone management: checks zone rules
imrsim_kmod/dm-imrsim.c - Device Mapper target → Ioctl interface: dispatches ioctls
imrsim_kmod/dm-imrsim.c - Control utility → Ioctl interface: issues ioctls
imrsim_util/imrsim_util.c - Ioctl interface → Zone management: queries and resets
imrsim_kmod/dm-imrsim.c - Ioctl interface → Statistics: gets and resets
imrsim_kmod/dm-imrsim.c - Ioctl interface → Device configuration: gets and sets
imrsim_kmod/dm-imrsim.c - Ioctl interface → Error reporting: controls logging
imrsim_kmod/dm-imrsim.c - Shared IMR types → Device Mapper target: defines state
imrsim_kmod/dm-imrsim.c - Ioctl definitions → Device Mapper target: defines commands
imrsim_kmod/dm-imrsim.c - Ioctl definitions → Control utility: shares command codes
imrsim_util/imrsim_util.c - I/O visualization → Device Mapper target: visualizes processing
README.md