Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 35cf288

Browse files
author
Jiri Denemark
committed
VirtualDisk: Use O_DSYNC when allocating storage
Otherwise xen can get racy on some machines since the page cache is full
1 parent 73733a9 commit 35cf288

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

virtinst/VirtualDisk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ def _create_local_file(self, progresscb, size_bytes):
10791079

10801080
try:
10811081
try:
1082-
fd = os.open(self.path, os.O_WRONLY | os.O_CREAT)
1082+
fd = os.open(self.path, os.O_WRONLY | os.O_CREAT | os.O_DSYNC)
10831083
if self.sparse:
10841084
os.ftruncate(fd, size_bytes)
10851085
progresscb.update(self.size)

0 commit comments

Comments
 (0)