g_return_if_fail(CAPTIVE_PRIVATE_BCB_OBJECT(captive_private_bcb_pin_object)->SharedCacheMap
==captive_shared_cache_map_object);
- /* 'AllocationSize' must not change if any map/pin Bcbs exist. */
- g_assert(AllocationSize==captive_shared_cache_map_object->AllocationSize);
+ /* ntfs.sys of NT-5.1sp1 may extend StreamFileObject while dirty pins exist.
+ * How to extend SharedCacheMap size without changing the memory location?
+ * I hope ntfs.sys does not expect long-term absolute position of its
+ * StreamFileObject:
+ */
+ if (!(captive_shared_cache_map_object->FileObject->Flags&FO_STREAM_FILE)) {
+ /* 'AllocationSize' must not change if any map/pin Bcbs exist. */
+ g_assert(AllocationSize==captive_shared_cache_map_object->AllocationSize);
+ }
}
static void captive_private_bcb_pin_object_purge(CaptiveSharedCacheMapObject *captive_shared_cache_map_object,
if (size_old!=size_new) {
gpointer buffer_new;
- /* These two assertions should be already catched by pin/map signal handlers. */
- g_assert(!captive_shared_cache_map_object->map);
- g_assert(!g_hash_table_size(captive_shared_cache_map_object->pin_hash));
+ /* ntfs.sys of NT-5.1sp1 may extend StreamFileObject while dirty pins exist.
+ * How to extend SharedCacheMap size without changing the memory location?
+ * I hope ntfs.sys does not expect long-term absolute position of its
+ * StreamFileObject:
+ */
+ if (!(captive_shared_cache_map_object->FileObject->Flags&FO_STREAM_FILE)) {
+ /* These two assertions should be already catched by pin/map signal handlers. */
+ g_assert(!captive_shared_cache_map_object->map);
+ g_assert(!g_hash_table_size(captive_shared_cache_map_object->pin_hash));
+ }
if (AllocationSize) {
gpointer base;