From eb346ff358ac55060c5bd261a750bdc0c32d4ab0 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Fri, 4 Dec 2015 13:27:44 -0800 Subject: [PATCH] Use direct filesystem access for tar-split on aufs Signed-off-by: Tonis Tiigi Upstream-commit: 0641429ad8a474c25eb99ee3c5a969b28baaad21 Component: engine --- components/engine/daemon/graphdriver/aufs/aufs.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/engine/daemon/graphdriver/aufs/aufs.go b/components/engine/daemon/graphdriver/aufs/aufs.go index aa24185ff4..b01cb147da 100644 --- a/components/engine/daemon/graphdriver/aufs/aufs.go +++ b/components/engine/daemon/graphdriver/aufs/aufs.go @@ -367,6 +367,12 @@ func (a *Driver) Diff(id, parent string) (archive.Archive, error) { }) } +// DiffPath returns path to the directory that contains files for the layer +// differences. Used for direct access for tar-split. +func (a *Driver) DiffPath(id string) (string, func() error, error) { + return path.Join(a.rootPath(), "diff", id), func() error { return nil }, nil +} + func (a *Driver) applyDiff(id string, diff archive.Reader) error { dir := path.Join(a.rootPath(), "diff", id) if err := chrootarchive.UntarUncompressed(diff, dir, &archive.TarOptions{