]> git.proxmox.com Git - pve-container.git/commit - src/PVE/LXC.pm
implement "staged mountpoints"
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 20 Nov 2019 07:30:58 +0000 (08:30 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 20 Nov 2019 13:59:54 +0000 (14:59 +0100)
commitef44794452f10f122f21d54621cb0191ea9729aa
treeb4aa36a5f2485fb1ed2970d56c8f7040e4395eae
parent2c6830d5e367ff233ce5f10cf87bb7071c472759
implement "staged mountpoints"

Staging a mount point requires the new kernel mount API and
will mount the volume at a fixed path, then use open_tree()
to "pick it up" into a file descriptor.

For most of our volumes we wouldn't need the temp directory,
but some things cannot be handled with _only_ the new API
(like single-step read-only bind mounts). Additionally, the
'mount' command figures out file systems automatically and
has a bunch of helpers we'd need to reimplement, so instead,
go through our usual mount code and then pick up the result.

This can then be used to implement mount point hotplugging,
as with the open file descriptor we can move into the
container's namespace and issue a `move_mount()` to put the
mount point in place in the running container.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/PVE/LXC.pm