I have a sparse file to which IO is done and the file
is closed, but it looks like the reference count on
the file object lingers for a long time. If I consume
memory to stress the system, the reference disappears.
I wish to evict the sparse file from the Cache Manager
cache. To evict the sparse file, I use the method
mentioned in Rajeev Nagar’s book, “Windows NT File
System Internals”. I open the file with
NO_INTERMEDIATE_BUFFERING and WRITE_THROUGH and then
close the file.
This seems to work for all files except the Sparse
File. Even if all the handles are closed and I use
the above mechanism to evict the file, it doesn’t get
evicted. The reference count on the file still
remains.
Does anybody have ideas on why the file reference
hangs around? Is there a way to force it out of the
cache?
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
i see this from RSS feed. WE have problem to.
before write finish lock FCB call CcFlushCache(FileObject->SectionObjectPointer) MmFlushImageSection(FileObject->SectionObjectPointer,MmFlushForDelete)
my FSFD driver is ok. sometime lockup system. We are debugging and not for every file because system will run slow
> I have a sparse file to which IO is done and the file
is closed, but it looks like the reference count on
the file object lingers for a long time. If I consume
memory to stress the system, the reference disappears.
This is the normal behavior of the Cache Manager.
This seems to work for all files except the Sparse
File.
CcPurgeCacheSection with NULLs as all possible NULLable parameters, then
CcWaitForCurrentLazyWriterActivity
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
Thanks for the information,
But I need to evict the sparse file from the File System Filter Driver, so is it safe to access CcPurgeCacheSection() from a filter driver