]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Prefer virtiofsd file handles when running as root instead of making them mandatory 2549/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 25 Mar 2024 10:30:48 +0000 (11:30 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 25 Mar 2024 10:50:58 +0000 (11:50 +0100)
We might be invoked as root from a user namespace which won't have
access to file handles.

mkosi/qemu.py

index 16d62f36d25da8574662b0f53caa5f8e118a4f9a..cac410ce69cd765137ffaed3c5c08c5862fa6135 100644 (file)
@@ -308,7 +308,7 @@ def start_virtiofsd(config: Config, directory: Path, *, uidmap: bool) -> Iterato
         "--no-announce-submounts",
         "--sandbox=chroot",
         "--cache=always",
-        f"--inode-file-handles={'mandatory' if os.getuid() == 0 and not uidmap else 'never'}",
+        f"--inode-file-handles={'prefer' if os.getuid() == 0 and not uidmap else 'never'}",
     ]
 
     if not uidmap and want_selinux_relabel(config, directory, fatal=False):