Hi, I was trying to find out how to get logical block number from given disk head position by structure, currdisk->mech_state<br><br>i was using currdisk->model->layout->dm_convert_atop(currdisk->model,&mech_state,&pbn); <br>
to get the physical block number and then, rval=currdisk->model->layout->dm_translate_ptol(currdisk->model, &pbn, 0); to<br>get corresponding logical block number. Not sure, if this is the right thing to do ?<br>
<br>Furthermore, i was looking at the disksim code, for disksim_diskctlr.c , line no. 3987 ( version 3),<br><br> currdisk->model->mech->dm_latency(currdisk->model, <br>                          &startstate,<br>
                          curr->cause, <br>                          curr->bcount, <br>                          immed,<br>                          0);<br><br>curr is current request event, and i think its cause field denotes the starting sector from/to which data needs to read/written.<br>
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. <br>Any suggestion, why this may happen?<br><br>thanks and regards,<br>ashok<br>