From 579ce2fd31f01b0befba947ed863ed1d5e4be3f0 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 28 Jun 2023 00:47:58 +0200 Subject: Windows: Better handling of quick format for file container We write a zeroed sector every 128 MiB, leaving other sectors untouched This helps users visualize the progress of actual file creation while forcing Windows to allocate the disk space of each 128 MiB chunk immediately, otherwise, Windows would delay the allocation until we write the backup header at the end of the volume which would make the user think that the format process has stalled after progress bar reaches 100%. --- src/Format/InPlace.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/Format') diff --git a/src/Format/InPlace.h b/src/Format/InPlace.h index f2d97bed..717a8ed3 100644 --- a/src/Format/InPlace.h +++ b/src/Format/InPlace.h @@ -43,7 +43,6 @@ static int DismountFileSystem (HWND hwndDlg, HANDLE dev, int driveLetter, BOOL b static int ConcealNTFS (HANDLE dev); BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId wipeAlgorithm, BOOL bDecrypting); static void ExportProgressStats (__int64 bytesDone, __int64 totalSize); -BOOL MoveFilePointer (HANDLE dev, LARGE_INTEGER offset); int ZeroUnreadableSectors (HANDLE dev, LARGE_INTEGER startOffset, int64 size, int sectorSize, uint64 *zeroedSectorCount); static int OpenBackupHeader (HANDLE dev, const wchar_t *devicePath, Password *password, int pkcs5, int pim, PCRYPTO_INFO *retCryptoInfo, CRYPTO_INFO *headerCryptoInfo, __int64 deviceSize); BOOL MoveClustersBeforeThreshold (HANDLE volumeHandle, PWSTR volumeDevicePath, int64 clusterThreshold); -- cgit v1.2.3