Hello,
I'm developing a kernel-module (for an embedded system running Linux), which requires to write to hard disk or similar devices. Note it is not a harddisk-driver itself, but a driver that operates in parallel with the hard disk driver. (I already have the driver for hard disk/etc.) That driver needs to access the disk a low-level; That is using lba-addresses.
Because I already have the hard disk driver, I could easily access some special functions of that driver to solve my problem. However, I want to make my solution generic. So if the system gets a different hard disk or ATA-storage system, I can use my solution without changing anything.
Since a hard disk driver is a block device, I wondered if it would be wise to let my kernel-module, access the disk a block-level, which is higher in the ranks.
Question is, how? How do you access a block device from a kernelel-module. All the examples and documentation I could find refers to using applications from user-space.
Regards,
Armin