How check if there is dirty data in the cache after- IRP_MJ_CLEANUP

Hello all,

I am monitoring file modifications (specially IRP_MJ_WRITE) from a filter
driver and need to do something when all handles to a monitored file are
closed and there is no more dirty data in the cache for this file. The
problem is how can I determine if there is still dirty data in the cache
for this file and when the last dirty page for this file is flushed out to
the disk using a paging IO through IRP_MJ_WRITE? I want to check this in
the completion routine of both IRP_MJ_CLEANUP and IRP_MJ_WRITE (for paging
IO only).

Is there something like “CcIsThereDirtyData” for the FileObject? I have
tried “CcGetLsnForFileObject”, but it is always returning zero.

Any idea on how to solve this problem (on NT/2K/XP) will be highly
appreciated. Thanks in advance.


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)