If your application has a large buffer and writes the data at once
Vista NTFS doesn’t update FileSize of FCB in a timely manner.
The sample trace of 1MB write is here.
F: IRP->Flag
L: Length
O: File Offset
FileSize: FileSize of FCB
ValidData: ValidDataLength of FCB
Write(0) F=60a00 L=100000 O=0
Write(1) F=60043 L=40000 O=0 FileSize=0 ValidData=0
Write(2) F=60043 L=40000 O=40000 FileSize=0 ValidData=0
Write(3) F=60043 L=40000 O=80000 FileSize=0 ValidData=0
Completion(Write)
…
Close
Write(4) F=60043 L=40000 O=c0000 FileSize=100000 ValidData=100000
Write(0) comes from an application.
Write(1) through Write(3) are paging writes and show incorrect(not updated)
FileSize.
Write(4) is a delayed paging write. At that time the FileSize is correct.
Windows XP and Vista Fat do not behave like this.
This is a bug of Vista NTFS?
Thank you in advance.
Ichiro Akimoto