Remove O_SYNC from device open and use fsync().

This speed up wipe operation considerably.
This commit is contained in:
Milan Broz
2018-08-09 12:01:20 +02:00
parent 5b5a64361f
commit 69a844c654
10 changed files with 29 additions and 5 deletions

View File

@@ -193,8 +193,10 @@ int LUKS_encrypt_to_storage(char *src, size_t srcLength,
r = 0;
out:
if (devfd >= 0)
if (devfd >= 0) {
device_sync(device, devfd);
close(devfd);
}
if (r)
log_err(ctx, _("IO error while encrypting keyslot."));