… and Iosb.Information should reflect returned data, which includes
the zeroes.
Ex: VDL is 1000h, file size is 2000h. A noncached read from 800h to
1800h would be broken out as
* physical read from 800h to 1000h
* RtlZeroMemory of the buffer from 1000h to 1800h
* Iosb.Information = 1000h
VDL is just an optimization so that the filesystem does not have to zero
new allocation given to a file when it is extended; it tracks where the
highest user write has occured to the file. The filesystem using VDL
just zeroes the user buffer beyond it, but the data being returned to
the user is just as real as if the filesystem had gone to the effort of
zeroing the blocks ahead of time and performed physical reads for all of
it.
There are plenty of other ways to do what VDL does; its just how our FS
tend to do it. You could always set VDL = FileSize if you had some other
way of making sure uninitialized disk data didn’t get returned to the
user. Examples would be filesystem equivalents of the memory manager
zero page thread for making zeroed blocks in the background, sparse
files, etc.
-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Friday, August 03, 2001 7:12 AM
To: File Systems Developers
Subject: [ntfsd] Re: ValidDataLength
In my previous message on this subject, I have suggested the
approach of handling the paging reads in FSD/FSF.
After that, I had a conversation with Daniel Lovinger (FS guru from
MS) discussing it.
He considers that approach of “fail paging reads with
STATUS_END_OF_FILE if they start after ValidDataLength” as possibly
working, but possibly not safe due to FSD synchronization issues.
So, the more safe approach is to be as FASTFAT. Namely - the FSD
must zero all data in the buffer which lays between ValidDataLength and
EOF. STATUS_END_OF_FILE must be used only if the read starts after EOF
and not after ValidDataLength.
Max
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com