mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-05-24 21:41:33 +00:00
Windows driver: queue volume flushes as ordered barriers
Route IRP_MJ_FLUSH_BUFFERS through EncryptedIoQueue for mounted writable non-system volumes. Flushes are represented as zero-length queue items handled by the I/O thread, so ZwFlushBuffersFile runs after earlier encrypted write fragments before completing to the caller. Also perform a best-effort ZwFlushBuffersFile before closing writable mounted-volume host handles, after the encrypted I/O queue has drained, so clean dismount/shutdown paths push the host file or raw device before close. This keeps the change focused on ordinary mounted-volume flush ordering and avoids system-encryption, boot-drive, and header-update paths.
This commit is contained in:
@@ -155,6 +155,7 @@ typedef struct
|
||||
EncryptedIoQueue *Queue;
|
||||
PIRP OriginalIrp;
|
||||
BOOL Write;
|
||||
BOOL Flush;
|
||||
ULONG OriginalLength;
|
||||
LARGE_INTEGER OriginalOffset;
|
||||
NTSTATUS Status;
|
||||
|
||||
Reference in New Issue
Block a user