Re: Disk geometry from /sys
From: Seewer Philippe
Date: Wed Apr 23 2008 - 05:34:09 EST
Francis Moreau wrote:
[snip]
If I'd like to take a look in the kernel code to see where the kernel
translates an offset
provided by sys_read into a LBA or CHS address, where should I go ?
drivers/block ?
No just /block
from Documentation/block/biodoc.txt
[quote]
Drivers no longer have to map a {partition, sector offset} into the
correct absolute location anymore, this is done by the block layer, so
where a driver received a request ala this before:
rq->rq_dev = mk_kdev(3, 5); /* /dev/hda5 */
rq->sector = 0; /* first sector on hda5 */
it will now see
rq->rq_dev = mk_kdev(3, 0); /* /dev/hda */
rq->sector = 123128; /* offset from start of disk */
[/quote]
/drivers/block is block-device drivers not the block layer itself.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/