A small file is copied via Explorer to my filesystem; on the first
IRP_MJ_WRITE I call CcInitializeCache() followed by CcCopyWrite() to
initiate caching. For all other writes to this file object I simply call
CcCopyWrite(). When the file object is cleaned-up/closed I call
CcUnitializeCache(). I expect that the Cc module will then call back to
my filesystem with the IRP_PAGING_IO flag set so I can write-through the
cached data to the media, but I never get called back and wind up with
zeroed-out files since I never write-through.
What causes the Cc to initiate a flush of a cached file object?
(If the file is large enough then I do get called back for some of the
earlier writes, but on small files I never get called to write-through.)
Anyone have any ideas on what I’m missing here?
Thanks!
Sometimes it can take quite a while for the lazy writer to push out
those dirty cache pages. As long as there is at least one file object
referenced for that file, the cache may still be dirty. If the last file
object is being IRP_MJ_CLOSE’d with writes still unflushed, then you
have a problem.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@charter.net
Sent: Wednesday, October 30, 2002 11:42 AM
To: File Systems Developers
Subject: [ntfsd] Cache Manager not flushing cached file objects?
A small file is copied via Explorer to my filesystem; on the
first IRP_MJ_WRITE I call CcInitializeCache() followed by
CcCopyWrite() to initiate caching. For all other writes to
this file object I simply call CcCopyWrite(). When the file
object is cleaned-up/closed I call CcUnitializeCache(). I
expect that the Cc module will then call back to my
filesystem with the IRP_PAGING_IO flag set so I can
write-through the cached data to the media, but I never get
called back and wind up with zeroed-out files since I never
write-through.
What causes the Cc to initiate a flush of a cached file object?
(If the file is large enough then I do get called back for
some of the earlier writes, but on small files I never get
called to write-through.)
Anyone have any ideas on what I’m missing here?
Thanks!
You are currently subscribed to ntfsd as: xxxxx@nryan.com
To unsubscribe send a blank email to %%email.unsub%%
have you tried to call CcFlushCache before CcUnitializeCache?
Ho Mun Chuen
@@ “Not everything that counts can be counted;
<” )~ and not everything that can be counted counts"
//\ … Albert Einstein
----- Original Message -----
From:
To: “File Systems Developers”
Sent: Thursday, October 31, 2002 3:41 AM
Subject: [ntfsd] Cache Manager not flushing cached file objects?
A small file is copied via Explorer to my filesystem; on the first
IRP_MJ_WRITE I call CcInitializeCache() followed by CcCopyWrite() to
initiate caching. For all other writes to this file object I simply call
CcCopyWrite(). When the file object is cleaned-up/closed I call
CcUnitializeCache(). I expect that the Cc module will then call back to
my filesystem with the IRP_PAGING_IO flag set so I can write-through the
cached data to the media, but I never get called back and wind up with
zeroed-out files since I never write-through.
What causes the Cc to initiate a flush of a cached file object?
(If the file is large enough then I do get called back for some of the
earlier writes, but on small files I never get called to write-through.)
Anyone have any ideas on what I’m missing here?
Thanks!
—
You are currently subscribed to ntfsd as: xxxxx@pmail.ntu.edu.sg
To unsubscribe send a blank email to %%email.unsub%%