The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6716
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 2cede8c421b04cc295df93e28be455745a6495dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Wed, 15 Jan 2020 10:22:57 -0500 Subject: [PATCH] lxd/storage/btrfs: Fix usage inside containers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/storage/drivers/driver_btrfs.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lxd/storage/drivers/driver_btrfs.go b/lxd/storage/drivers/driver_btrfs.go index d508709fc8..5001366582 100644 --- a/lxd/storage/drivers/driver_btrfs.go +++ b/lxd/storage/drivers/driver_btrfs.go @@ -244,6 +244,11 @@ func (d *btrfs) Update(changedConfig map[string]string) error { return nil } + // Custom mount options don't work inside containers + if d.state.OS.RunningInUserNS { + return nil + } + // Trigger a re-mount. d.config["btrfs.mount_options"] = val mntFlags, mntOptions := resolveMountOptions(d.getMountOptions()) @@ -305,6 +310,11 @@ func (d *btrfs) Mount() (bool, error) { return false, err } + // Custom mount options don't work inside containers + if !d.state.OS.RunningInUserNS { + return true, nil + } + // Now apply the custom options. mntFlags |= unix.MS_REMOUNT err = TryMount("", mntDst, mntFilesystem, mntFlags, mntOptions)
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel