+CcIsThereDirtyData()
authorshort <>
Wed, 16 Jul 2003 06:33:34 +0000 (06:33 +0000)
committershort <>
Wed, 16 Jul 2003 06:33:34 +0000 (06:33 +0000)
src/libcaptive/cc/map.c
src/libcaptive/ke/exports.captivesym

index 27700eb..7cd583c 100644 (file)
@@ -2654,3 +2654,35 @@ NTSTATUS CcWaitForCurrentLazyWriterActivity(VOID)
 {
        return STATUS_SUCCESS;
 }
+
+static void CcIsThereDirtyData_private_bcb_hash_foreach(
+               PUBLIC_BCB *PublicBcb,  /* key */
+               struct private_bcb *privbcb,  /* value */
+               gboolean *dirty_foundp) /* user_data */
+{
+       g_return_if_fail(validate_Bcb(PublicBcb));
+       g_return_if_fail(privbcb!=NULL);
+       g_return_if_fail(PublicBcb==privbcb->PublicBcb);
+
+       if (!privbcb->dirty)
+               return;
+
+       *dirty_foundp=TRUE;     /* FIXME: stop the traversal. */
+}
+
+BOOLEAN CcIsThereDirtyData(IN PVPB Vpb)
+{
+gboolean dirty_found;
+
+       g_return_val_if_fail(Vpb!=NULL,FALSE);  /* We have just one volume mounted anyway. */
+
+       private_bcb_hash_init();
+
+       dirty_found=FALSE;
+       g_hash_table_foreach(
+                       private_bcb_hash,       /* hash_table */
+                       (GHFunc)CcIsThereDirtyData_private_bcb_hash_foreach,    /* func */
+                       &dirty_found);  /* user_data */
+
+       return dirty_found;
+}
index adbd27d..6400dd4 100644 (file)
@@ -260,7 +260,7 @@ ntoskrnl.exe        CcPrepareMdlWrite       undef
 ntoskrnl.exe   CcCopyWrite
 ntoskrnl.exe   CcMdlWriteComplete      undef
 ntoskrnl.exe   CcDeferWrite    undef
-ntoskrnl.exe   CcIsThereDirtyData      undef
+ntoskrnl.exe   CcIsThereDirtyData
 ntoskrnl.exe   CcSetAdditionalCacheAttributes
 ntoskrnl.exe   DbgPrintEx      undef
 ntoskrnl.exe   ExAcquireSharedWaitForExclusive