mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
Create raw storage files with O_DSYNC
When creating preallocated large raw files opening them with O_DSYNC prevents long delays in reading because cache pages can be immediately reused without writing them on a disk first.
This commit is contained in:
parent
5dee786d7b
commit
a82a87f26b
@ -300,7 +300,7 @@ virStorageBackendCreateRaw(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((fd = open(vol->target.path, O_RDWR | O_EXCL)) < 0) {
|
||||
if ((fd = open(vol->target.path, O_RDWR | O_EXCL | O_DSYNC)) < 0) {
|
||||
virReportSystemError(errno,
|
||||
_("cannot open new path '%s'"),
|
||||
vol->target.path);
|
||||
|
Loading…
Reference in New Issue
Block a user