Get sector address of device

Hi~ everyone…
I want to get sector address of physical device before I/O Completion on
NTFS.
Does it enables?
Thx for your read… ^^

NTFS doesn’t have that information - that information belongs to the volume manager. Thus, you need to filter the SCSI disk class driver (below the volume manager) to see block information. However, at that point it is no longer directly associated with the corresponding file.

If you want LOGICAL block addresses (e.g., relative to the volume manager partition) you should just query (there is an FSCTL for this, something like “GET_RETRIEVAL_POINTERS”. There are two similar FSCTLs, one of which can only be used on the paging file and the other that can be used on other files. The latter one returns logical block addresses.)

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

Thank you for your answer.
I’d tried that using “DeviceIoControl” and “FSCTL_GET_RETRIEVAL_POINTERS”.
Then, I got logical block address(LBA) from general file. But, I couldn’t got LBA from metafiles.
It can’t access the files. (e.g., $mft). How can I get LBA from metafiles?