Commit Graph

12 Commits

Author SHA1 Message Date
Michael Crosby 1b28cdc7f9 Handle image metadata when drivers are switched 2013-11-20 10:31:51 -08:00
Michael Crosby 4c2624a277 Merge pull request #45 from alexlarsson/dm-plugin-diff-size
Implement fallback for getting the size of a container
2013-11-19 10:25:31 -08:00
Alexander Larsson 242fd4b3ef dummy driver: Use cp --reflink=auto to copy directories
On systems that supports reflinking (i.e. btrfs) this means the dummy
backend is much faster at copying files and will be sharing file data in
a CoW fashion.

On my (btrfs) system this makes "docker run ubuntu echo hello world" go
from about 3 seconds to about 1 second. Not instant, but clearly better.

cp --reflink=auto is availible since coreutils 7.5 (around 2009), so this
seems pretty ok to rely on.

cp is also better at preserving file metadata than tar, so for instance
it will copy xattrs.
2013-11-19 13:09:36 +01:00
Alexander Larsson 5d76681c3d Implement fallback for getting the size of a container
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.
2013-11-19 10:36:54 +01:00
Alexander Larsson 243843c078 Print devicemapper status details in docker info
This adds a generic Status call in the Driver api and
implements if for the devicemapper backend.

The status is an array of key/value strings rather than a map so that
we can guarantee some static order of the docker info output.
2013-11-15 11:04:02 +01:00
Michael Crosby 5d9723002b Allow drivers to implement ApplyDiff in Differ interface 2013-11-11 19:09:57 -08:00
Michael Crosby 4d1a537433 Remove Differ and Changer interfaces
Add the methods to the Driver interface
to force the drivers to implement the methods
2013-11-11 12:10:53 -08:00
Alexander Larsson e82f8c1661 Implement fallback operation for driver.Diff()
This moves the Diff() operation to a separate Differ interface and
implements a fallback that uses the Changes() results to encode
a diff tar.
2013-11-11 17:46:07 +01:00
Michael Crosby 1eb00e1d5b Allow drivers to export their own diff 2013-11-08 15:32:50 -08:00
Michael Crosby 9514767587 Allow driver to provide changes if it impl the Changer interface 2013-11-08 14:54:20 -08:00
Michael Crosby 51c93c0f33 Fix aufs error at startup
Add String methods to other drivers
2013-11-07 19:02:15 -08:00
Solomon Hykes 81674fbbdf New 'dummy' driver uses plain directories and regular copy 2013-11-08 01:52:56 +00:00