OS – Windows 2000 (with or without Service Pack2 and Pentium III)
In our file system driver (network redirector) if we need to flush all data
to the server we call CcFlushCache() to flush the complete file.
Now I observe that I get an IRP_MJ_WRITE for pages that are not dirty.
This happens randomly.
e.g. consider a FastIoWrite() to byte number 0x1 (in page 1) and file
length is 0x1500.
then a read has happened to byte 0x1400. (so page 2 is read into the NT
cache)
Now if CcFlushCache() is called I get an IRP_MJ_WRITE with offset set to
0x0 and length as 0x2000. i.e. 2 pages
where as only page 1 has been dirty.
another case is :
consider a filelength of 0x3000
complete file is read into the cache.
0x100 bytes are appended. (final file length is 0x3100).
now if a CcCacheFlush is called I get an IRP_MJ_WRITE with offset 0x2000
and length as 0x2000. i.e. page 3 and 4 where as only page 4 is actually
dirty.
why does this happen?
What are all the cases upon which NT cache manager considers a page dirty
and flushes it out on a CcFlushCache() call.?
I don’t expect to get an IRP_MJ_WRITE (PagingIo) for any pages that have
not had a cached IRP_MJ_WRITE (or FastIoWrite() ) access.
Thanks and Regards,
Ishfak Bhagat
Software Engineer
IBM India Software Labs, Pune
Tel # 91-20-6349724 (Extn 1474),
Fax # 91-20-6344066/6349615
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