[lxc-devel] [lxd/master] patches: use MNT_DETACH for lvm
brauner on Github
lxc-bot at linuxcontainers.org
Mon Mar 6 20:44:59 UTC 2017
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170306/bb40ac05/attachment.bin>
-------------- next part --------------
From febabcf79315c85d98065767e8e9c191a1f34aa6 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Mon, 6 Mar 2017 21:44:30 +0100
Subject: [PATCH] patches: use MNT_DETACH for lvm
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
lxd/patches.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lxd/patches.go b/lxd/patches.go
index e51443c..6af6dde 100644
--- a/lxd/patches.go
+++ b/lxd/patches.go
@@ -918,7 +918,7 @@ func upgradeFromStorageTypeLvm(name string, d *Daemon, defaultPoolName string, d
// Unmount the logical volume.
oldContainerMntPoint := shared.VarPath("containers", ct)
if shared.IsMountPoint(oldContainerMntPoint) {
- err := tryUnmount(oldContainerMntPoint, 0)
+ err := tryUnmount(oldContainerMntPoint, syscall.MNT_DETACH)
if err != nil {
return err
}
@@ -1021,7 +1021,7 @@ func upgradeFromStorageTypeLvm(name string, d *Daemon, defaultPoolName string, d
// Unmount the logical volume.
oldSnapshotMntPoint := shared.VarPath("snapshots", cs)
if shared.IsMountPoint(oldSnapshotMntPoint) {
- err := tryUnmount(oldSnapshotMntPoint, 0)
+ err := tryUnmount(oldSnapshotMntPoint, syscall.MNT_DETACH)
if err != nil {
return err
}
@@ -1109,7 +1109,7 @@ func upgradeFromStorageTypeLvm(name string, d *Daemon, defaultPoolName string, d
// Unmount the logical volume.
oldImageMntPoint := shared.VarPath("images", img+".lv")
if shared.IsMountPoint(oldImageMntPoint) {
- err := tryUnmount(oldImageMntPoint, 0)
+ err := tryUnmount(oldImageMntPoint, syscall.MNT_DETACH)
if err != nil {
return err
}
More information about the lxc-devel
mailing list