Tech Support > Microsoft Windows > Drivers > LBA in diskperf;
LBA in diskperf;
Posted by krish on June 10th, 2008


How can I obtain the Logical Block Address (LBA) on the disk of a
write/read request in the diskperf? The current IO stack location in
diskperf has: currentIrpStack->Parameters.Read.ByteOffset.QuadPart
which I think is the byte offset with in a file. Thanks.

Posted by Don Burn on June 11th, 2008


It is the byte offset in the partition. You can use the
IOCTL_DISK_GET_PARTION_INFO to get the base address of the partition.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply




"krish" <pradeep_bisht@yahoo.com> wrote in message
news:a77534aa-7043-431f-9c98-2f189c5f57f5@z24g2000prf.googlegroups.com...


Posted by krish on June 11th, 2008


On Jun 10, 5:03 pm, "Don Burn" <b...@stopspam.windrvr.com> wrote:
(disk.c). After getting the partition information (as per your
suggestion), I also need to use IOCTL_DISK_GET_DRIVE_GEOMETRY to get
the sector size etc to obtain the correct LBA. Right?



Posted by krish on June 11th, 2008


Also in the following thread Maxim says that just divide
currentIrpStack->Parameters.Read.ByteOffset.QuadPart by sector size to
get the LBA which I think would be wrong if it currentIrpStack-

http://groups.google.com/group/micro...f92a44 1548ea




On Jun 10, 5:31 pm, krish <pradeep_bi...@yahoo.com> wrote:



Posted by Don Burn on June 11th, 2008


Krish,

I messed up yesterday (under the weather) Max is correct just devide
the byteoffset by the LBA size.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply




"krish" <pradeep_bisht@yahoo.com> wrote in message
news:bffbc066-e4b9-43c8-aa6a-7d32db0c1c68@p25g2000pri.googlegroups.com...


Posted by krish on June 11th, 2008


Thanks Don.

On Jun 11, 4:34 am, "Don Burn" <b...@stopspam.windrvr.com> wrote:


Similar Posts