Hi all,
I am trying to understand the relationship between paging I/O and the three
file sizes. I found this thread,
http://www.osronline.com/showThread.cfm?link=72094, where Alexei Jelvis says
this:
File system tracks in ValidDataLength the biggest offset at which data
were
written to the file by user. It allows to implement optimisation of both
read
and write requests.
For read requests file system can fill part of the output buffer that lies
beyond ValidDataLength with 0s without reading data from disk.
Cache manager generates write requests in page size granularity. A part of
the page that is beyond ValidDataLength doesn’t contain any usfull data so
file system may truncate actual write request if the request is originated
by
the Cache Manager. If the write request comes from user or from Modifed
Page
Writer then it contains user’s information and ValidDataLength must be
extended.
As I understand then, if paging i/o comes from the last writer, it might
specify a byte range that goes beyond VDL or FileSize. However, the file
system should ignore anything beyond VDL. The file system should never
extend the file by making either VDL or FileSize bigger.
If the paging i/o comes from the MPW, it might specify a byte range that
goes beyond VDL. From what I have read elsewhere, MPW guarantees that it
will never specify a range beyond FileSize. If the MPW paging i/o write
does go beyond VDL, then the file system must assume that any information
beyond VDL is valid, and extend VDL, but only up to FileSize.
Finally, since AllocationSize is always larger than FileSize, and since
paging i/o can never extend FileSize, this means that paging i/o can never
extend AllocationSize either.
Do I understand correctly? Thanks.
=================================================
Roger Tawa
http://tawacentral.net/
[One thing about paradigms: shift happens.]
[When you stop, you’re done.]