1 From 0c37b7e3ec65b4d0e166e2127d9f1835320165b8 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
3 Date: Fri, 6 Sep 2024 17:07:11 -0400
4 Subject: [PATCH] incusd/instance/qemu: Make O_DIRECT conditional on
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
12 internal/server/instance/drivers/driver_qemu.go | 4 +++-
13 1 file changed, 3 insertions(+), 1 deletion(-)
15 diff --git a/internal/server/instance/drivers/driver_qemu.go b/internal/server/instance/drivers/driver_qemu.go
16 index 5a94c9db43..9609b73c1b 100644
17 --- a/internal/server/instance/drivers/driver_qemu.go
18 +++ b/internal/server/instance/drivers/driver_qemu.go
19 @@ -4276,7 +4276,9 @@ func (d *qemu) addDriveConfig(qemuDev map[string]string, bootIndexes map[string]
20 permissions = unix.O_RDONLY
23 - permissions |= unix.O_DIRECT
25 + permissions |= unix.O_DIRECT
28 f, err := os.OpenFile(driveConf.DevPath, permissions, 0)