How can I find out the cluster size of a volume (f.e “C:”) used by
FAT or NTFS from a kernel mode driver? (Any other possibility than
reading the boot record and interpreting its content.)
Is there a way to convert the LCN of a file to the physical sector
number of the harddisk ?
>What are the differences between FSCTL_QUERY_RETRIEVAL_POINTERS and
>FSCTL_GET_RETRIEVAL_POINTERS?
Sorry. FSCTL_GET_RETRIEVAL_POINTERS for sure.
FSCTL_QUERY_RETRIEVAL_POINTERS is really for a pagefile only.
Max
FSCTL_GET_RETRIEVAL_POINTERS returns for my understanding the LCNs
(logical cluster numbers) of a file, counted from the beginning of a
volume (which means usually a partition). How can this LCN be converted
to the physical sector number of the harddisk on which the volume is
located?
> volume (which means usually a partition). How can this LCN be
converted
to the physical sector number of the harddisk on which the volume is
located?
IOCTL_DISK_GET_DRIVE_LAYOUT will give you the partition table of the
disk.
You will also need the mount manager IOCTLs to determine what
partition on the disk is your FS volume.
The problem is that you assume a one-to-one mapping from the logical blocks
on a volume to the underlying physical storage - no such restriction is in
place. For example, suppose you are running a stripe set (using dynamic or
basic disks).
That is why FSCTL_QUERY_RETRIEVAL_POINTERS only works on the boot drive’s
paging file (the dump driver needs the blocks to dump it.)
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc. http://www.osr.com
Looking forward to seeing you at our revised and updated file systems class
in February 2003 (Boston, MA).
-----Original Message-----
From: Gerhard Wallh?u?er [mailto:gerhard.wallhaeusser@ce-infosys.com]
Sent: Tuesday, February 11, 2003 9:59 AM
To: File Systems Developers
Subject: [ntfsd] Re: LCN and physical sector
Maxim S. Shatskih wrote:
>What are the differences between FSCTL_QUERY_RETRIEVAL_POINTERS and
>FSCTL_GET_RETRIEVAL_POINTERS?
Sorry. FSCTL_GET_RETRIEVAL_POINTERS for sure.
FSCTL_QUERY_RETRIEVAL_POINTERS is really for a pagefile only.
Max
FSCTL_GET_RETRIEVAL_POINTERS returns for my understanding the LCNs
(logical cluster numbers) of a file, counted from the beginning of a
volume (which means usually a partition). How can this LCN be converted
to the physical sector number of the harddisk on which the volume is
located?