At 03:49 03/04/02, Wanyu Lin wrote:
>Hi developers,
>Now I want yo verify the attribute list feature of a ntfs driver.
>Does anyone know how I can build a testing environement with "nonresident
>Attibute List attibute" in files or directories?
>I create a directory with 10 thousands of files in it but still fail to
>make one.
Assuming your cluster size is small, the easiest way is to fill up the
partition with small files (just make loads and loads of copies of the
linux kernel source for example). (If your cluster size is big then the
files need to be bigger, too, in that case just make loads of copies of the
windows or program files directories for example.)
Once the partition is full delete loads of those files at random, i.e. do
not delete files that were created one after the other, but delete one file
here then another file there, etc.
You now have a disk full of small holes!!!
Now create a large file, this will fill all the holes.
Have a look at the mft record of the file. With some luck it will already
be using the attribute list attribute.
If not, delete more random files from the ones you generated before and
extend the big file so it gets even larger.
You now have the file so badly fragmented that it is almost guaranteed to
have attribute list attribute.
If not, lather, rinse, and repeat.
I managed to get really badly fragmented files (using attribute list
attribute) just running Win2k on a 1.4GiB partition and filling up the
partition several times by installing the debug symbols, then compressing
them, then installing other stuff, deleting some stuff installing other
things. That was just normal use!!! And when I was testing the new NTFS
driver on that partition I found that about 10-20 files and directories had
attribute list attributes, so it was great for testing and getting our run
list merging functions bullet-proof. (-:
Anton
--
"I've not lost my mind. It's backed up on tape somewhere." - Unknown
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/
|