• D
    Allow use of file images for LXC container filesystems · 5f5c6fde
    Daniel P. Berrange 提交于
    A previous commit gave the LXC driver the ability to mount
    block devices for the container filesystem. Through use of
    the loopback device functionality, we can build on this to
    support use of plain file images for LXC filesytems.
    
    By setting the LO_FLAGS_AUTOCLEAR flag we can ensure that
    the loop device automatically disappears when the container
    dies / shuts down
    
    * src/lxc/lxc_container.c: Raise error if we see a file
      based filesystem, since it should have been turned into
      a loopback device already
    * src/lxc/lxc_controller.c: Rewrite any filesystems of
      type=file, into type=block, by binding the file image
      to a free loop device
    5f5c6fde
lxc_container.c 34.1 KB