Messages in this thread | | | Date | Wed, 23 Apr 2008 11:33:44 +0200 | From | Seewer Philippe <> | Subject | Re: Disk geometry from /sys |
| |
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.
| |