]> git.ipfire.org Git - thirdparty/libvirt.git/commit
lxc_fuse: Tell FUSE that /proc/meminfo is nonseekable
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 1 Mar 2022 08:35:48 +0000 (09:35 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 7 Mar 2022 13:01:48 +0000 (14:01 +0100)
commit766495508650bebd5f4ac23224ecd0a2ee2ca9eb
tree6298057173e4008212c6b80f2cbfa52c102bfcb7
parent3f2454ca0c9b033c070e865defe4134c0c209512
lxc_fuse: Tell FUSE that /proc/meminfo is nonseekable

If an app within a container wishes to read from /proc/meminfo
from a different position than the beginning of the file, we can
have FUSE keep track of all the lseek()-s and reflect them in
@offset argument of read callback (lxcProcRead()). This is done
by setting fuse_file_info::nonseekable. If we don't do this, then
FUSE reports errors back the app that does lseek().

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