Hello All,
I need some information for locating free clusters on an NTFS disk without going through the hassles of FSCTL_GET_VOLUME_BITMAP.Is it possible to retrieve this information from some location in MFT or some where else (I don’t know if its possible or not) instead of scanning the VOLUME Bitmap.
Please let me know
Thanks,
-Surya
> I need some information for locating free clusters on an NTFS disk without
going through the hassles of
Why would you do this ? If you let the FS to do the work,
you can be sure that it will work properly on all NTFS versions.
L.
yeah i understand. I have a job requirement. Currently I am using FSCTL_GET_VOLUME_BITMAP to know the number of free clusters on the partition using a linear search.This strategy is used in almost all defragmentation algorithms,which happens to be an expensive operation when the size of the partition is considerably large(>100 GB). So is there a much efficent/faster way to retrieve the number of free clusters(LCN with corresponding offset) so as to reduce on the search time?
Thanks,
-Surya
Knowing the “number of free clusters” is simply a matter of asking NTFS - that information is returned in IRP_MJ_QUERY_VOLUME_INFORMATION. But that’s distinctly different than knowing WHERE those free clusters are located. In either case, the information you obtain is stale as soon as you get it if the volume is mounted (read/write) since NTFS doesn’t stop changing the on-disk state after it gives you back bitmap or free cluster information.
So, do you need to know how MANY free clusters or do you need to know WHERE they are located?
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
Hi Tony,
perfectly right. I need the information on free clusters(LCN’s and offset to next free LCN ) so that i can traverse through all these very quickly.
Surya
I am afraid your need will not be satisfied - I suggest you raise wiht your
MSFT contact.
wrote in message news:xxxxx@ntfsd…
> Hello All,
> I need some information for locating free clusters on an NTFS disk without
> going through the hassles of FSCTL_GET_VOLUME_BITMAP.Is it possible to
> retrieve this information from some location in MFT or some where else (I
> don’t know if its possible or not) instead of scanning the VOLUME Bitmap.
>
> Please let me know
>
> Thanks,
> -Surya
>
Parse NTFS on-disk structures yourself, use the Linux NTFS source to see
how to do this.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From:
To: “Windows File Systems Devs Interest List”
Sent: Thursday, October 12, 2006 1:54 PM
Subject: [ntfsd] NTFS File System Internals
> Hello All,
> I need some information for locating free clusters on an NTFS disk without
going through the hassles of FSCTL_GET_VOLUME_BITMAP.Is it possible to
retrieve this information from some location in MFT or some where else (I don’t
know if its possible or not) instead of scanning the VOLUME Bitmap.
>
> Please let me know
>
> Thanks,
> -Surya
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>FSCTL_GET_VOLUME_BITMAP to know the number of free clusters on the
partition using a linear search.This strategy is used in almost all
defragmentation
algorithms,which happens to be an expensive operation when the size of the ?
partition is considerably large(>100 GB). So is there a much efficent/faster
way
Surely no. If FSCTL_GET_VOLUME_BITMAP is expensive - then sorry, you need to
live with it.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com