Files
docker-cli/components/engine/volume
Aaron Lehmann 8e87df7fd3 volume: Use a map of maps for VolumeStore.refs
The current implementation of getRefs is a bit fragile. It returns a
slice to callers without copying its contents, and assumes the contents
will not be modified elsewhere.

Also, the current implementation of Dereference requires copying the
slice of references, excluding the one we wish to remove.

To improve both of these things, change refs to be a map of maps.
Deleting an item becomes trivial, and returning a slice of references
necessitates copying from the map.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: a762222396d21990b2c0772300660312e7a58b6c
Component: engine
2016-12-05 15:39:05 -08:00
..