]> git.proxmox.com Git - mirror_lxcfs.git/commitdiff
Limit caching to 0.5s
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 12 Nov 2015 07:41:52 +0000 (01:41 -0600)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 12 Nov 2015 07:41:52 +0000 (01:41 -0600)
If a cgroup is deleted or chmoded using the underlying cgroupfs, then we
want to minimize the amount of time during which we get stale info.  At the
same time, we don't want to do away with caching in the fuse kernel module
altogether, since calling out to userspace is expensive.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
lxcfs.c

diff --git a/lxcfs.c b/lxcfs.c
index af734d5f9e688dc2c12afc4595fbc66757437274..e2ccc5e855d5f72c2a38b81ac2934cf76cd87698 100644 (file)
--- a/lxcfs.c
+++ b/lxcfs.c
@@ -1595,6 +1595,7 @@ int cg_mkdir(const char *path, mode_t mode)
        }
 
        ret = cgfs_create(controller, cgroup, fc->uid, fc->gid);
+       printf("cgfs_create returned %d for %s %s\n", ret, controller, cgroup);
 
 out:
        free(cgdir);
@@ -3036,7 +3037,7 @@ int main(int argc, char *argv[])
        newargv[cnt++] = argv[0];
        newargv[cnt++] = "-f";
        newargv[cnt++] = "-o";
-       newargv[cnt++] = "allow_other,direct_io";
+       newargv[cnt++] = "allow_other,direct_io,entry_timeout=0.5,attr_timeout=0.5";
        newargv[cnt++] = argv[1];
        newargv[cnt++] = NULL;