]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Support bind mounting host files, as well as directories in LXC
authorDaniel J Walsh <dwalsh@redhat.com>
Mon, 25 Jun 2012 09:53:39 +0000 (10:53 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 25 Jun 2012 09:56:38 +0000 (10:56 +0100)
commit465c055f4a3baa72f06c7677f2203d1002cb2520
treedb965ed3b948cc9f0a7cf82c9a32d0d1a7f388cc
parent63f5c83bb0431a0cd814149cb61a64dfdc4d8d49
Support bind mounting host files, as well as directories in LXC

Currently libvirt-lxc checks to see if the destination exists and is a
directory.  If it is not a directory then the mount fails.  Since
libvirt-lxc can bind mount files on an inode, this patch is needed to
allow us to bind mount files on files.  Currently we want to bind mount
on top of /etc/machine-id, and /etc/adjtime

If the destination of the mount point does not exists, it checks if the
src is a directory and then attempts to create a directory, otherwise it
creates an empty file for the destination.  The code will then bind mount
over the destination.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_container.c