lkml.org 
[lkml]   [2008]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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.


\
 
 \ /
  Last update: 2008-04-23 11:37    [W:0.213 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site