]> git.ipfire.org Git - thirdparty/libvirt.git/commit
lxc_fuse: Prefer fuse_file_info::direct_io over mount option
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 28 Feb 2022 12:26:14 +0000 (13:26 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 7 Mar 2022 13:01:48 +0000 (14:01 +0100)
commit3f2454ca0c9b033c070e865defe4134c0c209512
treedf5ab36cecf9e5aa1c7ed96eaa89d08354a2591f
parent030faee28d14ebcf4d48919b890d2f1e4ebc9e12
lxc_fuse: Prefer fuse_file_info::direct_io over mount option

When mounting a FUSE it is possible to bypass kernel cache by
specifying -odirect_io mount option. This is what we currently
do. However, FUSEv3 has a different approach - the open callback
(lxcProcOpen() in our case) can set direct_io member of
fuse_file_info struct. This results in the same behaviour, but
also works with both FUSEv1 and FUSEv3. The latter does not have
the mount option and uses per file approach.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/lxc/lxc_fuse.c