Commit Graph

5 Commits

Author SHA1 Message Date
c88fa0bb83 Make TarStream return an io.ReadCloser
Currently, the resources associated with the io.Reader returned by
TarStream are only freed when it is read until EOF. This means that
partial uploads or exports (for example, in the case of a full disk or
severed connection) can leak a goroutine and open file. This commit
changes TarStream to return an io.ReadCloser. Resources are freed when
Close is called.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 21278efaee563b356851a530b08b0537fee095d7
Component: engine
2015-11-25 16:39:54 -08:00
4190d23ba7 Merge pull request #18202 from aidanhs/aphs-content-addressability-layerstore
Rearrange layerstore locking
Upstream-commit: 900c8f5847b9f6a51a4a1a3d03631bad7b3149db
Component: engine
2015-11-24 14:53:10 -08:00
6064788a9b Rearrange layerstore locking
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: cbf55b924f05a918c9b95795f6c69aa89d180530
Component: engine
2015-11-24 21:45:50 +00:00
305f6f5e5a Make releaseLayers iterative rather than recursive, remove useless func
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: a4d768538afb2f14e270509343c67b13ba3f6ddf
Component: engine
2015-11-24 19:40:09 +00:00
26cb84830f Add layer store
Layer store manages read-only and read-write layers on a union file system.
Read only layers are always referenced by content addresses.
Read-write layer identifiers are handled by the caller but upon registering
its difference, the committed read-only layer will be referenced by content
hash.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 500e77bad0b19b3b1c8e6ac195485adcb70daef1
Component: engine
2015-11-24 09:40:23 -08:00