[Disksim-users] Re: disk head position to logical block number and vice versa

Ashok Anand ashok.anand at gmail.com
Wed Mar 26 17:12:25 EDT 2008


Hi,

I figured the conversion from angle to physical ( The manual does talk about
it at end :) ).. Now I am trying to find out in the disksim code, where
calculation for rotational latency take place, and where actually statistics
gets updated for the corresponding rotation.. Any quick pointer to this,
would be quite useful!

Thanks,
ashok

On Tue, Mar 25, 2008 at 9:49 PM, Ashok Anand <ashok.anand at gmail.com> wrote:

> Hi, I was trying to find out how to get logical block number from given
> disk head position by structure, currdisk->mech_state
>
> i was using
> currdisk->model->layout->dm_convert_atop(currdisk->model,&mech_state,&pbn);
> to get the physical block number and then,
> rval=currdisk->model->layout->dm_translate_ptol(currdisk->model, &pbn, 0);
> to
> get corresponding logical block number. Not sure, if this is the right
> thing to do ?
>
> Furthermore, i was looking at the disksim code, for disksim_diskctlr.c ,
> line no. 3987 ( version 3),
>
>  currdisk->model->mech->dm_latency(currdisk->model,
>                           &startstate,
>                           curr->cause,
>                           curr->bcount,
>                           immed,
>                           0);
>
> curr is current request event, and i think its cause field denotes the
> starting sector from/to which data needs to read/written.
> the conversion of this sector to angle uses dm_pbn_skew , but if i convert
> this angle to get pbn, its sector comes to be different.
> Any suggestion, why this may happen?
>
> thanks and regards,
> ashok
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/disksim-users/attachments/20080326/1b823e1c/attachment.html>


More information about the Disksim-users mailing list