* Close the cachine facilities from CcInitializeCacheMap().
* It is valid to pass @FileObject without being registered by CcInitializeCacheMap().
*
+ * FIXME; What to do with files with dirty blocks? Currently we fail assertion on them
+ * although I think W32 would drop such buffers (purge them - not flush them).
+ *
* Returns: %TRUE if the caching was closed successfuly.
* %FALSE if @FileObject wasn't registered by CcInitializeCacheMap().
*/
G_STRLOC,FileObject,(guint64)(!TruncateSize ? -1 : TruncateSize->QuadPart),UninitializeCompleteEvent);
/* TODO:thread */
+ /* Here it will check for any dirty blocks and it will fail g_assert() on them.
+ * I think it may happen for BCBs to exist dirty for 'FileObject' and they
+ * should be silently discarded if CcUninitializeCacheMap() but currently
+ * the assertion is left here as some debugging aid.
+ */
r=captive_cc_FileObject_delete(FileObject);
/* FIXME: should we do KePulseEvent? Are we allowed to signal from inside CcUninitializeCacheMap() ? */
g_log(G_LOG_DOMAIN,G_LOG_LEVEL_DEBUG,"%s: Bcb=%p,WriteThrough=%d,IoStatus=%p; privbcb->FileObject=%p",G_STRLOC,
Bcb,(gint)WriteThrough,IoStatus,privbcb->FileObject);
+ /* FIXME: Should we really flush the whole 'Bcb'?
+ * Or maybe just some writes between CcRepinBcb(Bcb) and now? Who knows?
+ */
+ if (WriteThrough)
+ captive_privbcb_flush(privbcb);
+
IoStatus->Status=STATUS_SUCCESS;
IoStatus->Information=privbcb->MappedLength;