Commit Graph

14 Commits

Author SHA1 Message Date
cosmoer
344431cdd4 fix: support simultaneous create diff for same parent snapshot
Signed-off-by: Qian Zhang <cosmoer@qq.com>
2022-07-24 09:34:54 +08:00
Wei Fu
09b184c15a rootfs: use new ctx to cleanup instead of canceled one
rootfs.CreateDiff might be canceled by context for some reason. Based on
this case, the defer function should use the new ctx to do cleanup
temporary snapshotter instead of the canceled one.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-08-27 11:27:34 +08:00
Kir Kolyshkin
bbe14f0a2e Switch from x/net/context to context
Since Go 1.7, context is a standard package, superceding the
"x/net/context". Since Go 1.9, the latter only provides a few type
aliases from the former. Therefore, it makes sense to switch to the
standard package.

This commit was generated by the following script (with a couple of
minor fixups to remove extra changes done by goimports):

	#!/bin/bash

	if [ $# -ge 1 ]; then
		FILES=$*
	else
		FILES=$(git ls-files \*.go | grep -vF ".pb.go" | grep -v
	^vendor/)
	fi

	for f in $FILES; do
		printf .
		sed -i -e 's|"golang.org/x/net/context"$|"context"|' $f
		goimports -w $f
		awk '	/^$/ {e=1; next;}
			/[[:space:]]"context"$/ {e=0;}
			{if (e) {print ""; e=0}; print;}' < $f > $f.new && \
				mv $f.new $f
		goimports -w $f
	done
	echo

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-04-24 14:33:34 -07:00
Kunal Kushwaha
b12c3215a0 Licence header added
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-02-19 10:32:26 +09:00
Derek McGowan
b763777288
diff: rename differ to comparer
Remove combined interface and split implementations.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-01-26 16:32:09 -08:00
Akihiro Suda
b580441f91
diff: resplit Applier from Differ
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-01-25 13:58:34 -08:00
Jess Valarezo
5bc0c43c73 rootfs: remove upper snapshot after use
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2018-01-02 21:23:35 -05:00
Jess Valarezo
9885edfc44 rename snapshot->snapshots pkg
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-11-29 14:55:02 -08:00
Derek McGowan
d9db1d112d
Refactor differ into separate package
Add differ options and package with interface.
Update optional values on diff interface to use options.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-10-11 10:02:29 -07:00
Derek McGowan
da34812db6
Update differ to support compressed archives
Differ is updated to set a label for the uncompressed hash
of compressed content. This allows compressed blobs to
be used and looked up for their uncompressed hashes.
Uses commit options to set labels.
Updates rootfs default to create compressed archives.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-11 14:19:04 -07:00
Derek McGowan
4f388e0e27
Add documentation to rootfs functions
Clarifies role of varies rootfs functions as well as their return values.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-07-12 13:59:17 -07:00
Tonis Tiigi
39d55cc498 Fix context package imports
Conflicting with definition of plugin.Differ

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-09 10:58:29 -07:00
Michael Crosby
d7af92e00c Move Mount into mount pkg
This moves both the Mount type and mountinfo into a single mount
package.

This also opens up the root of the repo to hold the containerd client
implementation.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-22 16:41:12 -07:00
Derek McGowan
3ae69c43d8
Add diff service implementation
Add snapshot subcommand to ctr for creating diffs of RW layers.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-05-16 13:48:53 -07:00