On Thu, 2004-02-26 at 12:58, nag talekar wrote:
> i am doing a project on NTFS volume.
Cool. I am CC:-ing the ntfs list.
> Theres a problem.
>
> In $INDEX_ALLOCATION (0xA0h) attribute of system32
> folder VCN range is mentioned as 0 to 45h
>
> but when i count the no of clusters in datarun
> entries it comes to around 117 (decimal).I think its
> ok as Windows can allocate extra clusters.
>
> Problem arises when i access the Index records using
> data runs.
>
> I mean first 5 data runs point to valid Index records.
> Then onwards dataruns point to certain clusters which
> do not contain valid Index records
>
> I used the docs at the site
>
> http://linux-ntfs.sourceforge.net/
>
> could u please tell me how to locate dataruns that
> point to valid Index records??
>
> Is there way to map VCN to LCN values ??
>
> even $BITMAP (0xB0) in that file reocrd for system32
> folder shows that first 46h Index entries (VCNs) are
> occupied
>
> ie
> FF FF FF FF .... 3F (totals to 46h VCNs)
>
>
> i am not following B+ tree structure .I am just using
> dataruns to sequentially goto the Index records.
>
> could please help me ??
Are you perhaps forgetting to apply the multi sector transfer fixups?
Also why do you not use the ntfs library for your accesses?
See http://linux-ntfs.sourceforge.net/downloads.html
Unpack it and look in include/*.h and libntfs/*.c for the library and
associated header files and in ntfsprogs/*.c for the utilities where you
can see how to call the library.
In the library you will see how to map VCNs to LCNs, too.
Have a look and feel free to come back with questions...
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ &
http://www-stu.christs.cam.ac.uk/~aia21/
|