g_assert(got<=PAGE_SIZE);
after_eof=(got<PAGE_SIZE);
captive_shared_cache_map_object->pages[now/PAGE_SIZE].data_valid=TRUE;
+ captive_shared_cache_map_object->pages[now/PAGE_SIZE].dirty=FALSE;
}
}
for (now=start;now<end;now+=PAGE_SIZE) {
captive_shared_cache_map_object->pages[now/PAGE_SIZE].data_valid=TRUE;
+ /* .dirty is undefined */
}
}
g_signal_emit(captive_shared_cache_map_object,purge_signal,0);
+ /* Needed by fastfat.sys of NT-5.1sp1 during FAT32 unmount
+ * otherwise it fails on: g_assert(!page->dirty);
+ * It corrupts the disk if the buffer is dropped instead.
+ */
+ captive_shared_cache_map_flush(captive_shared_cache_map_object,
+ 0,CAPTIVE_ROUND_UP64(captive_shared_cache_map_object->AllocationSize,PAGE_SIZE));
+
for (offset=0;offset<CAPTIVE_ROUND_UP64(captive_shared_cache_map_object->AllocationSize,PAGE_SIZE);offset+=PAGE_SIZE) {
page=captive_shared_cache_map_object->pages+offset/PAGE_SIZE;
if (!page->data_valid)
continue;
- g_assert(!page->dirty); /* FIXME: Is it allowed by W32? */
+ g_assert(!page->dirty);
page->data_valid=FALSE;
}
}