Browse code

run auplink before unmounting aufs

unclejack authored on 2013/06/05 03:30:47
Showing 1 changed files
... ...
@@ -2,13 +2,18 @@ package docker
2 2
 
3 3
 import (
4 4
 	"fmt"
5
+	"github.com/dotcloud/docker/utils"
5 6
 	"os"
7
+	"os/exec"
6 8
 	"path/filepath"
7 9
 	"syscall"
8 10
 	"time"
9 11
 )
10 12
 
11 13
 func Unmount(target string) error {
14
+	if err := exec.Command("auplink", target, "flush").Run(); err != nil {
15
+		utils.Debugf("[warning]: couldn't run auplink before unmount: %s", err)
16
+	}
12 17
 	if err := syscall.Unmount(target, 0); err != nil {
13 18
 		return err
14 19
 	}