mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
Create raw storage files with O_DSYNC (again)
Recently we introduced O_DSYNC flag when creating raw storage files to avoid filling all disk cache with dirty pages. However, the patch got lost when virStorageBackendCreateRaw was reworked using virFileOperation. Let's use O_DSYNC again.
This commit is contained in:
parent
617075f49f
commit
9568c1d985
@ -356,7 +356,8 @@ virStorageBackendCreateRaw(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((createstat = virFileOperation(vol->target.path, O_RDWR | O_CREAT | O_EXCL,
|
if ((createstat = virFileOperation(vol->target.path,
|
||||||
|
O_RDWR | O_CREAT | O_EXCL | O_DSYNC,
|
||||||
vol->target.perms.mode,
|
vol->target.perms.mode,
|
||||||
vol->target.perms.uid, vol->target.perms.gid,
|
vol->target.perms.uid, vol->target.perms.gid,
|
||||||
createRawFileOpHook, &hdata,
|
createRawFileOpHook, &hdata,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user