Ideally it would be great to default to a btrfs subvolume for each new
container created.  However, this is not as we previously thought
without consequence.  'rsync --one-file-system' will not descend into
btrfs subvolumes.  This means that 'lxc-create -B _unset' will cause
different behavior for rsync -vax /var/lib/lxc based on whether that
fs is btrfs or not.

So don't do that.  If -B is not specified, use -B dir.

Signed-off-by: Serge Hallyn <serge.hal...@ubuntu.com>
---
 src/lxc/bdev.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c
index 9dea57b..07a794b 100644
--- a/src/lxc/bdev.c
+++ b/src/lxc/bdev.c
@@ -1993,25 +1993,9 @@ struct bdev *bdev_create(const char *dest, const char 
*type,
 {
        struct bdev *bdev;
 
-       if (!type) {
-               char *p, *p1;
-
+       if (!type)
                type = "dir";
 
-               /*
-                * $lxcpath/$lxcname/rootfs doesn't yet exist.  Check
-                * whether $lxcpath/$lxcname is btrfs.  If so, specify
-                * btrfs backing store for the container.
-                */
-               p = strdupa(dest);
-               p1 = rindex(p, '/');
-               if (p1) {
-                       *p1 = '\0';
-                       if (is_btrfs_fs(p))
-                               type = "btrfs";
-               }
-       }
-
        bdev = bdev_get(type);
        if (!bdev) {
                ERROR("Unknown fs type: %s\n", type);
-- 
1.8.3.2


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to