View Single Post
  #2  
Old January 18th 08, 09:02 PM posted to comp.arch.storage
Maxim S. Shatskih
external usenet poster
 
Posts: 87
Default Utility to write huge files instantly???

Should be able to just write the FAT without doing anything to the
actual allocation units being allocated???


Do you need NTFS support?

If you will go thru the usual filesystem, without patching the metadata
manually - then lseek() to (1GB - 1) and then write 1 byte of zero. The OS will
zero the whole 1GB automatically.

This is recommended by MS's filesystem guys to create the minimally fragmented
file, and is also portable to UNIXen (UNIXen will create a sparse file in this
case though).

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation

http://www.storagecraft.com