[PATCH 15/17] lxc_fuse: Tell FUSE that /proc/meminfo is nonseekable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/lxc/lxc_fuse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lxc/lxc_fuse.c b/src/lxc/lxc_fuse.c
index 73d3ab1015..181b05b605 100644
--- a/src/lxc/lxc_fuse.c
+++ b/src/lxc/lxc_fuse.c
@@ -118,6 +118,7 @@ lxcProcOpen(const char *path,
         return -EACCES;
 
     fi->direct_io = 1;
+    fi->nonseekable = 1;
     return 0;
 }
 
-- 
2.34.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux