Skip to content

Commit

Permalink
lxd/storage: Fix check for direct I/O write support
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
  • Loading branch information
simondeziel committed Sep 25, 2024
1 parent cb8a515 commit 1dd8d49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lxd/storage/backend_lxd.go
Original file line number Diff line number Diff line change
Expand Up @@ -1858,7 +1858,7 @@ func (b *lxdBackend) imageConversionFiller(imgPath string, imgFormat string, op
_ = from.Close()
}

to, err := os.OpenFile(diskPath, unix.O_DIRECT|unix.O_RDONLY, 0)
to, err := os.OpenFile(diskPath, unix.O_DIRECT|unix.O_WRONLY, 0)
if err == nil {
cmd = append(cmd, "-t", "none")
_ = to.Close()
Expand Down

0 comments on commit 1dd8d49

Please sign in to comment.