Index: base/setup/usetup/bootsup.c =================================================================== --- base/setup/usetup/bootsup.c (revision 73171) +++ base/setup/usetup/bootsup.c (working copy) @@ -1659,7 +1659,7 @@ GENERIC_READ | SYNCHRONIZE, &ObjectAttributes, &IoStatusBlock, - 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT); if (!NT_SUCCESS(Status)) { @@ -1706,7 +1706,7 @@ GENERIC_READ | SYNCHRONIZE, &ObjectAttributes, &IoStatusBlock, - 0, + FILE_SHARE_READ, FILE_SYNCHRONOUS_IO_NONALERT); if (!NT_SUCCESS(Status)) { @@ -1757,7 +1757,7 @@ GENERIC_WRITE | SYNCHRONIZE, &ObjectAttributes, &IoStatusBlock, - 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT | FILE_SEQUENTIAL_ONLY); if (!NT_SUCCESS(Status)) { Index: drivers/filesystems/CMakeLists.txt =================================================================== --- drivers/filesystems/CMakeLists.txt (revision 73171) +++ drivers/filesystems/CMakeLists.txt (working copy) @@ -2,7 +2,7 @@ add_subdirectory(btrfs) add_subdirectory(cdfs) add_subdirectory(ext2) -add_subdirectory(fastfat) +add_subdirectory(msfastfat) #add_subdirectory(fastfat_new) add_subdirectory(ffs) add_subdirectory(fs_rec) Index: ntoskrnl/cc/fs.c =================================================================== --- ntoskrnl/cc/fs.c (revision 73171) +++ ntoskrnl/cc/fs.c (working copy) @@ -153,6 +153,7 @@ { KIRQL oldirql; PROS_SHARED_CACHE_MAP SharedCacheMap; + PROS_VACB LastVacb; PLIST_ENTRY current_entry; PROS_VACB current; LIST_ENTRY FreeListHead; @@ -231,6 +232,17 @@ } else { + if (SharedCacheMap->SectionSize.QuadPart < FileSizes->AllocationSize.QuadPart && + SharedCacheMap->SectionSize.QuadPart % VACB_MAPPING_GRANULARITY) + { + LastVacb = CcRosLookupVacb(SharedCacheMap, + SharedCacheMap->SectionSize.QuadPart); + if (LastVacb != NULL) + { + /* Mark it as invalid */ + CcRosReleaseVacb(SharedCacheMap, LastVacb, LastVacb->Dirty ? LastVacb->Valid : FALSE, FALSE, FALSE); + } + } KeAcquireSpinLock(&SharedCacheMap->CacheMapLock, &oldirql); SharedCacheMap->SectionSize = FileSizes->AllocationSize; SharedCacheMap->FileSize = FileSizes->FileSize; Index: ntoskrnl/fsrtl/oplock.c =================================================================== --- ntoskrnl/fsrtl/oplock.c (revision 73171) +++ ntoskrnl/fsrtl/oplock.c (working copy) @@ -49,7 +49,8 @@ IN POPLOCK_FS_PREPOST_IRP PostIrpRoutine OPTIONAL) { /* Unimplemented */ - UNIMPLEMENTED; + static int once; + if (!once++) UNIMPLEMENTED; return STATUS_SUCCESS; } @@ -146,7 +147,8 @@ NTAPI FsRtlOplockIsFastIoPossible(IN POPLOCK Oplock) { - UNIMPLEMENTED; + static int once; + if (!once++) UNIMPLEMENTED; return TRUE; } @@ -168,6 +170,7 @@ NTAPI FsRtlUninitializeOplock(IN POPLOCK Oplock) { - UNIMPLEMENTED; + static int once; + if (!once++) UNIMPLEMENTED; } Index: ntoskrnl/io/iomgr/file.c =================================================================== --- ntoskrnl/io/iomgr/file.c (revision 73171) +++ ntoskrnl/io/iomgr/file.c (working copy) @@ -533,7 +533,7 @@ /* Check if we can simply use a dummy file */ UseDummyFile = ((OpenPacket->QueryOnly) || (OpenPacket->DeleteOnly)); -#if 1 +#if 0 /* FIXME: Small hack still exists, have to check why... * This is triggered multiple times by usetup and then once per boot. */ Index: sdk/lib/fslib/vfatlib/fat16.c =================================================================== --- sdk/lib/fslib/vfatlib/fat16.c (revision 73171) +++ sdk/lib/fslib/vfatlib/fat16.c (working copy) @@ -37,6 +37,10 @@ /* Zero the new bootsector */ RtlZeroMemory(NewBootSector, BootSector->BytesPerSector); + /* Write a valid magic (jump code) */ + NewBootSector->magic0 = 0xe9; + NewBootSector->res0 = 0xfe; + /* Copy FAT16 BPB to new bootsector */ memcpy(&NewBootSector->OEMName[0], &BootSector->OEMName[0], @@ -282,6 +286,8 @@ GetShiftCount(DiskGeometry->BytesPerSector); /* Use shifting to avoid 64-bit division */ RtlZeroMemory(&BootSector, sizeof(FAT16_BOOT_SECTOR)); + BootSector.magic0 = 0xe9; + BootSector.res0 = 0xfe; memcpy(&BootSector.OEMName[0], "MSWIN4.1", 8); BootSector.BytesPerSector = DiskGeometry->BytesPerSector; BootSector.SectorsPerCluster = ClusterSize / BootSector.BytesPerSector; Index: sdk/lib/fslib/vfatlib/fat32.c =================================================================== --- sdk/lib/fslib/vfatlib/fat32.c (revision 73171) +++ sdk/lib/fslib/vfatlib/fat32.c (working copy) @@ -37,6 +37,10 @@ /* Zero the new bootsector */ RtlZeroMemory(NewBootSector, BootSector->BytesPerSector); + /* Write a valid magic (jump code) */ + NewBootSector->magic0 = 0xe9; + NewBootSector->res0 = 0xfe; + /* Copy FAT32 BPB to new bootsector */ memcpy(&NewBootSector->OEMName[0], &BootSector->OEMName[0], @@ -427,6 +431,8 @@ } RtlZeroMemory(&BootSector, sizeof(FAT32_BOOT_SECTOR)); + BootSector.magic0 = 0xe9; + BootSector.res0 = 0xfe; memcpy(&BootSector.OEMName[0], "MSWIN4.1", 8); BootSector.BytesPerSector = DiskGeometry->BytesPerSector; BootSector.SectorsPerCluster = ClusterSize / BootSector.BytesPerSector;