]>
git.proxmox.com Git - mirror_lxcfs.git/log
Christian Brauner [Tue, 15 Jun 2021 08:00:13 +0000 (10:00 +0200)]
cgroup_fuse: replace potentially problematic terminology
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 2 Jun 2021 13:00:31 +0000 (15:00 +0200)]
Merge pull request #467 from simondeziel/shellcheck
lxc.mount.hook: shellcheck fixes
Simon Deziel [Wed, 2 Jun 2021 12:54:08 +0000 (08:54 -0400)]
lxc.mount.hook: reduce calls to basename
Signed-off-by: Simon Deziel <simon@sdeziel.info>
Simon Deziel [Wed, 2 Jun 2021 12:50:16 +0000 (08:50 -0400)]
lxc.mount.hook: make shellcheck clean
Signed-off-by: Simon Deziel <simon@sdeziel.info>
Stéphane Graber [Mon, 31 May 2021 15:13:03 +0000 (11:13 -0400)]
Merge pull request #466 from brauner/2021-05-31.fixes
proc_fuse: don't spam log needlessly
Christian Brauner [Mon, 31 May 2021 14:26:23 +0000 (16:26 +0200)]
proc_fuse: don't spam log needlessly
Fixes: https://discuss.linuxcontainers.org/t/lxcfs-spamming-syslog-with-logs-lxc-payload-container-has-unexpected-cpu-time-unable-to-determine-idle-time
Fixes: https://github.com/lxc/lxcfs/issues/464
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Thu, 27 May 2021 18:50:20 +0000 (14:50 -0400)]
Merge pull request #465 from brauner/2021-05-26.sysfs.cpu
sys: virtualize /sys/devices/system/cpu/cpu*
Christian Brauner [Thu, 27 May 2021 15:23:06 +0000 (17:23 +0200)]
sysfs_fuse: account for liblxcfs reload with identical lxcfs binary
This makes LXCFS upgradable from the old-style
/sys/devices/system/cpu/online virtualization to the new full
/sys/devices/system/cpu virtualization.
The special case this is handling is an upgrade where the LXCFS binary
itself is not replaced, only the liblxcfs shared library is replaced.
The original patch earlier in this series added several new fuse methods
e.g. .readlink() and .opendir() that required changes in the lxcfs.c
code itself while also modifying existing ones like .open() and .read().
This leads to inconsistency as .open() would end up being resolved to
the modified sys_open() implementation whereas .readlink() doesn't exist
as .readlink() wasn't registered with fuse. This causes the
virtualization to be broken.
Abuse the .init() method of fuse to indicate the sys_cpu works and also
make it possible to version struct lxcfs_opts.
If liblxcfs is reloaded virtualization of /sys/devices/system/cpu/online
will continue to work as before. In order to gain access to the new full
/sys/devices/system/cpu/ virtualzation a restart is needed.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Thu, 27 May 2021 15:17:24 +0000 (17:17 +0200)]
bindings: fix struct lxcfs_opts by making it versioned
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Thu, 27 May 2021 15:02:40 +0000 (17:02 +0200)]
cpuset_parse: drop unneeded dependencies
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 26 May 2021 16:13:24 +0000 (18:13 +0200)]
sysfs_fuse: create proper directories
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 26 May 2021 15:55:01 +0000 (17:55 +0200)]
bindings: introduce lxcfs_has_opt() helper
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 26 May 2021 12:30:20 +0000 (14:30 +0200)]
lxcfs: remove obsolete logging
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 26 May 2021 11:26:04 +0000 (13:26 +0200)]
lxc.mount.hook: adapt to new /sys/devices/system/cpu virtualization
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 26 May 2021 09:15:27 +0000 (11:15 +0200)]
sys: rework get_st_mode()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Zhiwei Li [Tue, 18 May 2021 07:03:01 +0000 (15:03 +0800)]
sys: virtualize /sys/devices/system/cpu/cpu*
Signed-off-by: Zhiwei Li <cyzz_a102@126.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Fri, 14 May 2021 12:55:27 +0000 (08:55 -0400)]
Merge pull request #461 from brauner/2021-05-13.fixes
lxcfs: rework option parsing
hailin84 [Thu, 6 May 2021 08:18:06 +0000 (16:18 +0800)]
lxcfs: rework argument parsing
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 17 Mar 2021 21:35:30 +0000 (22:35 +0100)]
Merge pull request #451 from stgraber/master
Switch to Github Actions
Stéphane Graber [Wed, 17 Mar 2021 21:24:32 +0000 (17:24 -0400)]
Switch to Github Actions
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Christian Brauner [Wed, 17 Mar 2021 14:56:02 +0000 (15:56 +0100)]
Merge pull request #449 from alliedtelesis/fix_fuse3_file_size
Determine the file size from the current system file size
Scott Parlane [Tue, 16 Mar 2021 02:53:31 +0000 (15:53 +1300)]
Determine the file size from the current system file size
fixes: #448 caused by
25982f5d7e008e6ad13df28af3006ab8286f4c97
Signed-off-by: Scott Parlane <scott.parlane@alliedtelesis.co.nz>
Stéphane Graber [Thu, 28 Jan 2021 13:23:49 +0000 (08:23 -0500)]
Merge pull request #443 from brauner/2021-01-28/fixes
proc_cpuview: release lock before returning
Christian Brauner [Thu, 28 Jan 2021 10:07:16 +0000 (11:07 +0100)]
proc_cpuview: release lock before returning
Fixes: #442
Cc: stable-4.0
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 18 Dec 2020 22:56:49 +0000 (23:56 +0100)]
Merge pull request #441 from timgates42/bugfix_typo_through
docs: fix simple typo, throuh -> through
Tim Gates [Thu, 17 Dec 2020 09:13:31 +0000 (20:13 +1100)]
docs: fix simple typo, throuh -> through
There is a small typo in src/proc_cpuview.c.
Should read `through` rather than `throuh`.
Signed-off-by: tgates <tim.gates@iress.com>
Christian Brauner [Thu, 10 Dec 2020 17:51:58 +0000 (18:51 +0100)]
Merge pull request #440 from loyou/master
proc_fuse: add /proc/slabinfo with slab accounting memcg
Feng Sun [Thu, 10 Dec 2020 09:30:54 +0000 (17:30 +0800)]
proc_fuse: add /proc/slabinfo with slab accounting memcg
Signed-off-by: Feng Sun <loyou85@gmail.com>
Christian Brauner [Thu, 5 Nov 2020 21:05:30 +0000 (22:05 +0100)]
Merge pull request #438 from stgraber/master
Rework swap memory management
Stéphane Graber [Thu, 5 Nov 2020 20:46:07 +0000 (15:46 -0500)]
swap: Remove now unused variable
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Thu, 5 Nov 2020 20:43:01 +0000 (15:43 -0500)]
swap: Make /proc/swaps match /proc/meminfo
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Thu, 5 Nov 2020 20:30:27 +0000 (15:30 -0500)]
swap: Tweak meminfo logic
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Thu, 5 Nov 2020 20:20:26 +0000 (15:20 -0500)]
swap: Only report usage when swappiness is 0
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Thu, 5 Nov 2020 20:17:40 +0000 (15:17 -0500)]
swap: Fix usage reporting
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Thu, 5 Nov 2020 20:17:02 +0000 (15:17 -0500)]
cgroups: Add get_memory_swappiness
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Christian Brauner [Thu, 5 Nov 2020 19:27:01 +0000 (20:27 +0100)]
Merge pull request #436 from stgraber/master
README: clarify SWAP
Stéphane Graber [Thu, 5 Nov 2020 04:06:00 +0000 (23:06 -0500)]
README: clarify SWAP
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Tue, 3 Nov 2020 22:44:59 +0000 (17:44 -0500)]
Merge pull request #435 from brauner/2020-11-03/fixes
meminfo: show host swap values when no limit or equal limits are set
Christian Brauner [Tue, 3 Nov 2020 21:27:05 +0000 (22:27 +0100)]
meminfo: show host swap values when no limit or equal limits are set
Closes: #434
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Tue, 8 Sep 2020 22:16:52 +0000 (18:16 -0400)]
Merge pull request #431 from brauner/2020-09-08/diskstats
diskstats: support new fields in 4.18+ kernels
Christian Brauner [Tue, 8 Sep 2020 11:17:20 +0000 (13:17 +0200)]
diskstats: support new fields in 4.18+ kernels
Closes: #427.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 7 Sep 2020 07:40:37 +0000 (09:40 +0200)]
Merge pull request #426 from alliedtelesis/add_fuse3_support
Add support for fuse3
Scott Parlane [Sun, 6 Sep 2020 20:45:23 +0000 (08:45 +1200)]
Set the file size to 4k
In fuse2, the apparant file size is always 4k, however in fuse3
the file size is actually obeyed, so we need to same something
bigger than 0 to get clients to be able to read the file contents.
Signed-off-by: Scott Parlane <scott.parlane@alliedtelesis.co.nz>
Scott Parlane [Thu, 3 Sep 2020 02:18:26 +0000 (14:18 +1200)]
rename fuse_compat.h to avoid conflict with system header
Signed-off-by: Scott Parlane <scott.parlane@alliedtelesis.co.nz>
Scott Parlane [Thu, 3 Sep 2020 02:16:02 +0000 (14:16 +1200)]
Update options passed to fuse_main
fuse3 doesn't support the direct_io option anymore
and nonempty has been dropped
Signed-off-by: Scott Parlane <scott.parlane@alliedtelesis.co.nz>
Christian Brauner [Fri, 4 Sep 2020 15:39:26 +0000 (17:39 +0200)]
Merge pull request #428 from devplayer0/fix-dirname
Fix `get_min_memlimit()` on non-glibc
Jack O'Sullivan [Thu, 3 Sep 2020 21:39:05 +0000 (22:39 +0100)]
Fix `get_min_memlimit()` on non-glibc
Signed-off-by: Jack O'Sullivan <j@ckos.ie>
[christian.brauner@ubuntu.com: fix coding style]
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Scott Parlane [Thu, 3 Sep 2020 00:54:39 +0000 (12:54 +1200)]
Add support for fuse3
Signed-off-by: Scott Parlane <scott.parlane@alliedtelesis.co.nz>
Christian Brauner [Wed, 2 Sep 2020 10:33:37 +0000 (12:33 +0200)]
Merge pull request #425 from ncleaton/master
fix epoll create socket error message
Nick Cleaton [Wed, 2 Sep 2020 07:57:12 +0000 (08:57 +0100)]
fix epoll create socket error message
Signed-off-by: Nick Cleaton <nick@cleaton.net>
Christian Brauner [Sat, 18 Jul 2020 12:28:42 +0000 (14:28 +0200)]
Merge pull request #423 from PeterRK/bugfix
fix type mismatch
Ruan Kunliang [Sat, 18 Jul 2020 12:16:12 +0000 (20:16 +0800)]
fix type mismatch
Signed-off-by: Ruan Kunliang <PeterRK@126.com>
Stéphane Graber [Mon, 6 Jul 2020 10:26:47 +0000 (06:26 -0400)]
Merge pull request #421 from brauner/2020-07-06/fixes
bindings: provide lxcfs_clone() as wrapper around lxcfs_raw_clone()
Christian Brauner [Mon, 6 Jul 2020 09:18:28 +0000 (11:18 +0200)]
proc_fuse: remove unused variable
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 6 Jul 2020 09:11:52 +0000 (11:11 +0200)]
.travis: use RTLD_NOW for tests
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 6 Jul 2020 09:05:14 +0000 (11:05 +0200)]
bindings: provide lxcfs_clone() as wrapper around lxcfs_raw_clone()
Closes: #420.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 5 Jul 2020 08:19:53 +0000 (10:19 +0200)]
cgroups: replace leftover reference to legacy terms
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 3 Jul 2020 11:24:02 +0000 (13:24 +0200)]
cgroups: update terminology
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 3 Jul 2020 10:51:35 +0000 (12:51 +0200)]
bindings: update terminology
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Wed, 24 Jun 2020 14:10:14 +0000 (10:10 -0400)]
Merge pull request #418 from brauner/2020-06-24/fixes
proc_fuse: provide host values when kernel does not support swap acco…
Christian Brauner [Wed, 24 Jun 2020 11:13:25 +0000 (13:13 +0200)]
proc_fuse: provide host values when kernel does not support swap accounting
Link: https://discuss.linuxcontainers.org/t/invalid-swaptotal-in-proc-meminfo-swaptotal-0
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Wed, 10 Jun 2020 14:11:37 +0000 (10:11 -0400)]
Merge pull request #417 from brauner/2020-06-10/fixes
cpuview: fixes
Christian Brauner [Wed, 10 Jun 2020 08:17:22 +0000 (10:17 +0200)]
proc_cpuview: cleanup cpuview_init_head()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 08:11:35 +0000 (10:11 +0200)]
proc_cpuview: cleanup cpuview_proc_stat()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 08:07:58 +0000 (10:07 +0200)]
proc_cpuview: fix max_cpu_count()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 08:06:36 +0000 (10:06 +0200)]
proc_cpuview: fix exact_cpu_count()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 08:05:26 +0000 (10:05 +0200)]
proc_cpuview: cleanup read_cpu_cfs_param()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 08:00:16 +0000 (10:00 +0200)]
proc_cpuview: cleanup add_cpu_usage()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 07:59:01 +0000 (09:59 +0200)]
proc_cpuview: clean up find_or_create_proc_stat_node()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 07:56:31 +0000 (09:56 +0200)]
proc_cpuview: clean up prune_proc_stat_list()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 07:52:53 +0000 (09:52 +0200)]
proc_cpuview: clean up expand_proc_stat_node()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 07:50:18 +0000 (09:50 +0200)]
proc_cpuview: use correct comment style
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 07:48:55 +0000 (09:48 +0200)]
proc_cpuview: cleanup add_proc_stat_node()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 07:35:37 +0000 (09:35 +0200)]
proc_cpuview: reduce variable scope in cpuview_free_head()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 07:35:16 +0000 (09:35 +0200)]
proc_cpuview: use more descriptive labels in add_proc_stat_node()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 10 Jun 2020 07:23:33 +0000 (09:23 +0200)]
proc_cpuview: cleanup new_proc_stat_node()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Tue, 9 Jun 2020 20:22:41 +0000 (16:22 -0400)]
Merge pull request #416 from brauner/2020-06-09/fixes
proc_fuse: more swap tweaks
Christian Brauner [Tue, 9 Jun 2020 13:38:15 +0000 (15:38 +0200)]
proc_fuse: more swap tweaks
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Tue, 9 Jun 2020 13:33:16 +0000 (09:33 -0400)]
Merge pull request #415 from brauner/2020-06-09/fixes
proc_fuse: cap swap to global values
Christian Brauner [Tue, 9 Jun 2020 12:30:04 +0000 (14:30 +0200)]
proc_cpuview: tweak cpuacct.percpu_usage fallback
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 9 Jun 2020 09:29:25 +0000 (11:29 +0200)]
proc_fuse: cap swap to global values
Closes: #412.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Mon, 8 Jun 2020 23:19:15 +0000 (19:19 -0400)]
Merge pull request #413 from brauner/2020-06-07/swap_fixes
swap fixes
Christian Brauner [Mon, 8 Jun 2020 22:05:48 +0000 (00:05 +0200)]
proc_fuse: don't cause invalid swap values
Closes: #412.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 8 Jun 2020 21:31:35 +0000 (23:31 +0200)]
proc_fuse: improve swap calculation a little
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Fri, 5 Jun 2020 16:33:10 +0000 (12:33 -0400)]
Merge pull request #411 from brauner/2020-06-04/performance_tweaks
fixes
Christian Brauner [Fri, 5 Jun 2020 15:03:32 +0000 (17:03 +0200)]
utils: don't leak fds in in_same_namespace()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 5 Jun 2020 13:42:41 +0000 (15:42 +0200)]
proc_fuse: cleanup proc_uptime_read() a little
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Fri, 5 Jun 2020 13:29:46 +0000 (09:29 -0400)]
Merge pull request #410 from brauner/2020-06-04/performance_tweaks
performance tweaks and leak fixes
Christian Brauner [Fri, 5 Jun 2020 12:53:54 +0000 (14:53 +0200)]
proc_fuse: move get_reaper_busy() down
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 5 Jun 2020 11:24:33 +0000 (13:24 +0200)]
proc_loadavg: avoid needless memory allocation
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 5 Jun 2020 11:23:31 +0000 (13:23 +0200)]
proc_loadavg: remove dummy variable
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 5 Jun 2020 11:11:39 +0000 (13:11 +0200)]
proc_loadavg: use must_* alloc helpers
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 5 Jun 2020 11:11:27 +0000 (13:11 +0200)]
proc_fuse: use zalloc()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 5 Jun 2020 10:59:05 +0000 (12:59 +0200)]
lxcfs: free opts on lxcfs binary exit
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 5 Jun 2020 10:52:12 +0000 (12:52 +0200)]
bindings: avoid dynamic stack allocations in clone()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 5 Jun 2020 10:41:00 +0000 (12:41 +0200)]
bindings: wipe initpid cache on library reload
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 5 Jun 2020 10:24:15 +0000 (12:24 +0200)]
proc_loadavg: simplify calc_pid()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 5 Jun 2020 10:13:01 +0000 (12:13 +0200)]
proc_loadavg(): use strdup() in calc_pid()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 5 Jun 2020 10:12:32 +0000 (12:12 +0200)]
macro: use ISO C compatible __typeof__
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 5 Jun 2020 09:44:56 +0000 (11:44 +0200)]
proc_loadavg: replace malloc() with asprintf() in calc_pid()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>