VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Format
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2023-06-28 00:47:58 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2023-06-28 00:47:58 +0200
commit579ce2fd31f01b0befba947ed863ed1d5e4be3f0 (patch)
tree61ccfe4d3a3f21ea24ffc1a34c87b68053eb080e /src/Format
parentdb12703e9b78192cc5dfc8c79b8d129290aa33f2 (diff)
downloadVeraCrypt-579ce2fd31f01b0befba947ed863ed1d5e4be3f0.tar.gz
VeraCrypt-579ce2fd31f01b0befba947ed863ed1d5e4be3f0.zip
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%.
Diffstat (limited to 'src/Format')
-rw-r--r--src/Format/InPlace.h1
1 files changed, 0 insertions, 1 deletions
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);