This is the code that takes a normal file and adds it to a TarWriter.
We extract it so that we can share it with Tar().
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 5b77e51e0a15eddefcb40380673df8c0c24f95d1
Component: engine
stat.Rdev and time.* is 32bit on OSX, which breaks cross builds with eg:
cannot use stat.Rdev (type int32) as type uint64 in function argument
We fix this with an extra conversion to uint64.
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: ba52130873395a44d637fc57f98ed174f0ac87bb
Component: engine
This changes ExportChanges to use the go tar support so we can
directly create tar layer files. This has several advantages:
* We don't have to create the whiteout files on disk to get them
added to the layer
* We can later guarantee specific features (such as xattrs) being
supported by the tar implementation.
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: d54ce8087aba23663856c81a3fb5475979bdf453
Component: engine
The default gnu tar format has no sub-second precision mtime support,
and the golang tar writer currently doesn't support that either.
This means if we export the changes from a container we will not
get zeron in the sub-second precision field when the change is applied.
This means we can't compare that to the original without getting a
spurious change. So, we detect this case by treating a case where the
seconds match and either of the two nanoseconds are zero as equal.
Upstream-commit: 10cd902f900392a2f10a6f8763bba70607ea0d41
Component: engine
This moves Driver.Size() to Differ.DiffSize(), removing the empty
implementations in devmapper and dummy, and renaming the one in aufs.
Then we fall back to a container.Changes() implementation in the non-aufs
case.
Upstream-commit: 5d76681c3d0cbb744205a397420603ce029ce754
Component: engine
This code was duplicated in two places, one which was unused. This
syncs the code and removes the unused version.
Upstream-commit: d69a6a20f0b6657821638ee591920d071a784b0e
Component: engine
This replaces the current version with the latest version from the
dm branch. Advantages in this version:
We only scan each directory tree once, which means less i/o and less chance
of container changes inbetween the two scans causing inconsistencies.
We avoid comparing some fields for change detection:
* Inode
* size-in-blocks
These can change during a copy operation (e.g. in the dummy backend)
without needing to actually reflect a change in content or metadata.
* Ctime
Any copy operation will create a new Ctime value, and there is no
API to change it to the "source" value.
* size for directories
The size of a directory doesn't have to be the same just because you
recreated the same content as another director. Internal details in
the filesystem may make these different with no "real" change.
Upstream-commit: b6ef4bc9521346dc5066d71821c6cadfbeced9d3
Component: engine