[lxc-devel] [lxc/lxc] 39460b: set lxc.rootfs.backend on container creation

GitHub noreply at github.com
Tue Apr 5 19:09:53 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 39460be89e946c9fbce3c4553b1d9d24d310365d
      https://github.com/lxc/lxc/commit/39460be89e946c9fbce3c4553b1d9d24d310365d
  Author: Christian Brauner <christian.brauner at mailbox.org>
  Date:   2016-04-05 (Tue, 05 Apr 2016)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  set lxc.rootfs.backend on container creation

Since specifying lxc.rootfs.backend can lead to performance improvements we
always set it during container creation.

This also fixes a bug. do_bdev_create() tried to be smart and retrieve the lower
directory when bdev->type == overlayfs or aufs thereby cutting the path.
However, this operation is done in ovl_mount() and aufs_mount() and both
functions need the full src path for this. The bug didn't show before because
when creating a overlayfs container with e.g.:

	lxc-create -n c -t busybox -B overlayfs

still left bdev->type set to dir and so the code for retrieving the lower dir in
do_bdev_create() was skipped. But by setting lxc.rootfs.backend on container
creation we force bdev->type to be set to e.g. overlayfs and the code gets
executed thereby exposing the bug.

Signed-off-by: Christian Brauner <christian.brauner at mailbox.org>


  Commit: 8869eb5f8358b61f3e9e2cf7540311dc46fb4b4e
      https://github.com/lxc/lxc/commit/8869eb5f8358b61f3e9e2cf7540311dc46fb4b4e
  Author: Christian Brauner <christian.brauner at mailbox.org>
  Date:   2016-04-05 (Tue, 05 Apr 2016)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  set lxc.rootfs.backend on copy/snapshot as well

Signed-off-by: Christian Brauner <christian.brauner at mailbox.org>


  Commit: bd08898fe5dc3ad890374654105bd12999ae6690
      https://github.com/lxc/lxc/commit/bd08898fe5dc3ad890374654105bd12999ae6690
  Author: Serge Hallyn <serge at hallyn.com>
  Date:   2016-04-05 (Tue, 05 Apr 2016)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  Merge pull request #945 from brauner/bugfix_branch

set lxc.rootfs.backend on container creation


Compare: https://github.com/lxc/lxc/compare/a3ff5b5639af...bd08898fe5dc


More information about the lxc-devel mailing list