]> git.proxmox.com Git - lxcfs.git/commitdiff
update to lxcfs-2.0.6
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 25 Jan 2017 09:46:51 +0000 (10:46 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 25 Jan 2017 09:50:20 +0000 (10:50 +0100)
Makefile
debian/changelog
debian/patches/0001-fix-swap-values-with-nested-cgroups.patch [deleted file]
debian/patches/fix-offsets-for-memory.stat-parsing.patch [deleted file]
debian/patches/series
lxcfs.tgz

index b27c0c6029c8d21e0361d1ec71339c7cb4e8c964..d03fce22490873a2c546a2cadcf162b187926447 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
-RELEASE=4.3
+RELEASE=4.4
 
 PACKAGE=lxcfs
-PKGVER=2.0.5
-DEBREL=pve2
+PKGVER=2.0.6
+DEBREL=pve1
 
 SRCDIR=${PACKAGE}
 SRCTAR=${SRCDIR}.tgz
index 0c54a59584d86f25d4e3df2e9365dd2e4f3ba741..18eddcd66476309ba645044c8ab58d53ababd634 100644 (file)
@@ -1,3 +1,9 @@
+lxcfs (2.0.6-pve1) unstable; urgency=medium
+
+  * update to lxcfs-2.0.6
+
+ -- Proxmox Support Team <support@proxmox.com>  Wed, 25 Jan 2017 10:46:06 +0100
+
 lxcfs (2.0.5-pve2) unstable; urgency=medium
 
   * fix swap values with nested cgroups
diff --git a/debian/patches/0001-fix-swap-values-with-nested-cgroups.patch b/debian/patches/0001-fix-swap-values-with-nested-cgroups.patch
deleted file mode 100644 (file)
index c217a7d..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-From 018246ffa81294d6d6a9151e0310c82a3548fe2e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
-Date: Thu, 22 Dec 2016 13:12:04 +0100
-Subject: [PATCH lxcfs] fix swap values with nested cgroups
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-the memory limit was already correctly set by looking at the
-whole cgroup hierarchy and using the minimum value, refactor
-that code to support arbitrary files in the memory cgroup
-and reuse it for the memsw limit as well.
-
-Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
----
- bindings.c | 52 +++++++++++-----------------------------------------
- 1 file changed, 11 insertions(+), 41 deletions(-)
-
-diff --git a/bindings.c b/bindings.c
-index 93c5aaa..3516be6 100644
---- a/bindings.c
-+++ b/bindings.c
-@@ -3046,12 +3046,12 @@ static int read_file(const char *path, char *buf, size_t size,
-  * FUSE ops for /proc
-  */
--static unsigned long get_memlimit(const char *cgroup)
-+static unsigned long get_memlimit(const char *cgroup, const char *file)
- {
-       char *memlimit_str = NULL;
-       unsigned long memlimit = -1;
--      if (cgfs_get_value("memory", cgroup, "memory.limit_in_bytes", &memlimit_str))
-+      if (cgfs_get_value("memory", cgroup, file, &memlimit_str))
-               memlimit = strtoul(memlimit_str, NULL, 10);
-       free(memlimit_str);
-@@ -3059,16 +3059,16 @@ static unsigned long get_memlimit(const char *cgroup)
-       return memlimit;
- }
--static unsigned long get_min_memlimit(const char *cgroup)
-+static unsigned long get_min_memlimit(const char *cgroup, const char *file)
- {
-       char *copy = strdupa(cgroup);
-       unsigned long memlimit = 0, retlimit;
--      retlimit = get_memlimit(copy);
-+      retlimit = get_memlimit(copy, file);
-       while (strcmp(copy, "/") != 0) {
-               copy = dirname(copy);
--              memlimit = get_memlimit(copy);
-+              memlimit = get_memlimit(copy, file);
-               if (memlimit != -1 && memlimit < retlimit)
-                       retlimit = memlimit;
-       };
-@@ -3083,8 +3083,7 @@ static int proc_meminfo_read(char *buf, size_t size, off_t offset,
-       struct file_info *d = (struct file_info *)fi->fh;
-       char *cg;
-       char *memusage_str = NULL, *memstat_str = NULL,
--              *memswlimit_str = NULL, *memswusage_str = NULL,
--              *memswlimit_default_str = NULL, *memswusage_default_str = NULL;
-+              *memswlimit_str = NULL, *memswusage_str = NULL;
-       unsigned long memlimit = 0, memusage = 0, memswlimit = 0, memswusage = 0,
-               cached = 0, hosttotal = 0, active_anon = 0, inactive_anon = 0,
-               active_file = 0, inactive_file = 0, unevictable = 0;
-@@ -3113,7 +3112,7 @@ static int proc_meminfo_read(char *buf, size_t size, off_t offset,
-               return read_file("/proc/meminfo", buf, size, d);
-       prune_init_slice(cg);
--      memlimit = get_min_memlimit(cg);
-+      memlimit = get_min_memlimit(cg, "memory.limit_in_bytes");
-       if (!cgfs_get_value("memory", cg, "memory.usage_in_bytes", &memusage_str))
-               goto err;
-       if (!cgfs_get_value("memory", cg, "memory.stat", &memstat_str))
-@@ -3124,20 +3123,9 @@ static int proc_meminfo_read(char *buf, size_t size, off_t offset,
-       if(cgfs_get_value("memory", cg, "memory.memsw.limit_in_bytes", &memswlimit_str) &&
-               cgfs_get_value("memory", cg, "memory.memsw.usage_in_bytes", &memswusage_str))
-       {
--              /* If swapaccounting is turned on, then default value is assumed to be that of cgroup / */
--              if (!cgfs_get_value("memory", "/", "memory.memsw.limit_in_bytes", &memswlimit_default_str))
--                      goto err;
--              if (!cgfs_get_value("memory", "/", "memory.memsw.usage_in_bytes", &memswusage_default_str))
--                      goto err;
--
--              memswlimit = strtoul(memswlimit_str, NULL, 10);
-+              memswlimit = get_min_memlimit(cg, "memory.memsw.limit_in_bytes");
-               memswusage = strtoul(memswusage_str, NULL, 10);
--              if (!strcmp(memswlimit_str, memswlimit_default_str))
--                      memswlimit = 0;
--              if (!strcmp(memswusage_str, memswusage_default_str))
--                      memswusage = 0;
--
-               memswlimit = memswlimit / 1024;
-               memswusage = memswusage / 1024;
-       }
-@@ -3257,8 +3245,6 @@ err:
-       free(memswlimit_str);
-       free(memswusage_str);
-       free(memstat_str);
--      free(memswlimit_default_str);
--      free(memswusage_default_str);
-       return rv;
- }
-@@ -3859,8 +3845,7 @@ static int proc_swaps_read(char *buf, size_t size, off_t offset,
-       struct fuse_context *fc = fuse_get_context();
-       struct file_info *d = (struct file_info *)fi->fh;
-       char *cg = NULL;
--      char *memswlimit_str = NULL, *memlimit_str = NULL, *memusage_str = NULL, *memswusage_str = NULL,
--             *memswlimit_default_str = NULL, *memswusage_default_str = NULL;
-+      char *memswlimit_str = NULL, *memlimit_str = NULL, *memusage_str = NULL, *memswusage_str = NULL;
-       unsigned long memswlimit = 0, memlimit = 0, memusage = 0, memswusage = 0, swap_total = 0, swap_free = 0;
-       ssize_t total_len = 0, rv = 0;
-       ssize_t l = 0;
-@@ -3885,32 +3870,19 @@ static int proc_swaps_read(char *buf, size_t size, off_t offset,
-               return read_file("/proc/swaps", buf, size, d);
-       prune_init_slice(cg);
--      if (!cgfs_get_value("memory", cg, "memory.limit_in_bytes", &memlimit_str))
--              goto err;
-+      memlimit = get_min_memlimit(cg, "memory.limit_in_bytes");
-       if (!cgfs_get_value("memory", cg, "memory.usage_in_bytes", &memusage_str))
-               goto err;
--      memlimit = strtoul(memlimit_str, NULL, 10);
-       memusage = strtoul(memusage_str, NULL, 10);
-       if (cgfs_get_value("memory", cg, "memory.memsw.usage_in_bytes", &memswusage_str) &&
-           cgfs_get_value("memory", cg, "memory.memsw.limit_in_bytes", &memswlimit_str)) {
--                /* If swap accounting is turned on, then default value is assumed to be that of cgroup / */
--                if (!cgfs_get_value("memory", "/", "memory.memsw.limit_in_bytes", &memswlimit_default_str))
--                    goto err;
--                if (!cgfs_get_value("memory", "/", "memory.memsw.usage_in_bytes", &memswusage_default_str))
--                    goto err;
--
--              memswlimit = strtoul(memswlimit_str, NULL, 10);
-+              memswlimit = get_min_memlimit(cg, "memory.memsw.limit_in_bytes");
-               memswusage = strtoul(memswusage_str, NULL, 10);
--                if (!strcmp(memswlimit_str, memswlimit_default_str))
--                    memswlimit = 0;
--                if (!strcmp(memswusage_str, memswusage_default_str))
--                    memswusage = 0;
--
-               swap_total = (memswlimit - memlimit) / 1024;
-               swap_free = (memswusage - memusage) / 1024;
-       }
-@@ -3964,8 +3936,6 @@ err:
-       free(memlimit_str);
-       free(memusage_str);
-       free(memswusage_str);
--      free(memswusage_default_str);
--      free(memswlimit_default_str);
-       return rv;
- }
--- 
-2.1.4
-
diff --git a/debian/patches/fix-offsets-for-memory.stat-parsing.patch b/debian/patches/fix-offsets-for-memory.stat-parsing.patch
deleted file mode 100644 (file)
index ca937fa..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-From 145cc4a9922aeabeecce69225c9476aaffe147ad Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
-Date: Wed, 19 Oct 2016 09:06:59 +0200
-Subject: [PATCH] fix offsets for memory.stat parsing
-
----
- bindings.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/bindings.c b/bindings.c
-index 2f78ab5..f433ea2 100644
---- a/bindings.c
-+++ b/bindings.c
-@@ -2958,22 +2958,22 @@ static void parse_memstat(char *memstat, unsigned long *cached,
-       while (*memstat) {
-               if (startswith(memstat, "cache")) {
--                      sscanf(memstat + 11, "%lu", cached);
-+                      sscanf(memstat + sizeof("cache"), "%lu", cached);
-                       *cached /= 1024;
-               } else if (startswith(memstat, "active_anon")) {
--                      sscanf(memstat + 11, "%lu", active_anon);
-+                      sscanf(memstat + sizeof("active_anon"), "%lu", active_anon);
-                       *active_anon /= 1024;
-               } else if (startswith(memstat, "inactive_anon")) {
--                      sscanf(memstat + 11, "%lu", inactive_anon);
-+                      sscanf(memstat + sizeof("inactive_anon"), "%lu", inactive_anon);
-                       *inactive_anon /= 1024;
-               } else if (startswith(memstat, "active_file")) {
--                      sscanf(memstat + 11, "%lu", active_file);
-+                      sscanf(memstat + sizeof("active_file"), "%lu", active_file);
-                       *active_file /= 1024;
-               } else if (startswith(memstat, "inactive_file")) {
--                      sscanf(memstat + 11, "%lu", inactive_file);
-+                      sscanf(memstat + sizeof("inactive_file"), "%lu", inactive_file);
-                       *inactive_file /= 1024;
-               } else if (startswith(memstat, "unevictable")) {
--                      sscanf(memstat + 11, "%lu", unevictable);
-+                      sscanf(memstat + sizeof("unevictable"), "%lu", unevictable);
-                       *unevictable /= 1024;
-               }
-               eol = strchr(memstat, '\n');
--- 
-2.1.4
-
index 411c72e65c2e8e4bed1bf803f36e9870e45aeb9c..bf650b42b1037ca3c7f99c19421c9e1728402554 100644 (file)
@@ -1,3 +1 @@
 do-not-start-without-lxcfs.patch
-fix-offsets-for-memory.stat-parsing.patch
-0001-fix-swap-values-with-nested-cgroups.patch
index f179e0b70fefc97d427940b161d378c1d21a9a23..410279025b066382d714c7cd66f780bb5def4fc3 100644 (file)
Binary files a/lxcfs.tgz and b/lxcfs.tgz differ