I' m writing a block driver and my purpose to this point is be able to re-issue requests that I recieve to a lower-level block driver.
I started looking at md.c but it's a too big to understand. I believe I have to set the major/minor fields of the bio->block_device->gendisk structure or set a new block device to bio->di_bdev. The problem is that I can't get the information I want, meaning the right dev_t struct (or something suitable) that corresponds to the target device. I only know the device name ("/dev/sda2") and it's major/minor (8/2) but changing these fields just won't work.
Any help?
Thanx.