]> git.ipfire.org Git - thirdparty/lxc.git/commit
use 2 sysfs instances for sys:mixed 4042/head
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 3 Dec 2021 08:13:11 +0000 (09:13 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 3 Dec 2021 11:47:00 +0000 (12:47 +0100)
commit53b2f3d5da9834f9763ba335a8fdb470e0b1cf2c
tree59e9f5e9d90117370a33320ee770f0968e3febcb
parent9873fb06d8b0e654e49a35facb5340de423c945a
use 2 sysfs instances for sys:mixed

In order to facilitate this, the default mount list's
'destination' may now be NULL to mean that the source should
be unmounted instead.

Here's what we need to do:

1) Ensure the first sysfs mount point is writable.
2) Mount a read-only sysfs on /sys
3) Bind devices/virtual/net *writably* into /sys

We use /proc/sys as a staging directory for the first sysfs
mount in read-write mode, then mount /sys r/o. Afterwards we
bind the r/w devices/virtual/net and unmount the staging
/proc/sys mount point.

The staging directory would not be required with the new
mount API, but this way we can support the old API and keep
the general workflow in the `default_mounts`.

Once we drop support for the old mount API, the
default_mounts table could just get a subdirectory field to
mount subdirectories directly.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/lxc/conf.c