1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Alexander Larsson
2343fe4453 devmapper: Remove directory when removing devicemapper device
We're currently leaving around lots of empty directories in
/var/lib/docker/devicemapper/mnt/ for removed images and containers.
Fix this by removing the directory when the device is removed.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-02-11 09:40:13 +01:00
Alexander Larsson
b95c560fdd devmapper: Move refcounting to DeviceSet
We already have some kind of refcounting in DeviceSet, this fleshes
it out to allow it to completely subsume the refcounting in
devmapper.Driver.

This allows us to drop the double refcounting, and the locking inside
devmapper.Driver. This, in particular the locking simplification will
make it easier in the future to parallelize the device mapper.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-02-06 13:14:42 +01:00
Alexander Larsson
63d4b293e7 devmapper: Rename DeviceSet.RemoveDevice to DeleteDevice
"Remove" is a bit overloaded, as it is also what deactivating a
device mapper device is called. Using "delete" is more clear here.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-02-05 21:27:12 +01:00
Tianon Gravi
065dd231dd Update/fix build tags, Dockerfile, and release.sh for proper building and releasing of linux/386 and linux/arm cross-compiled client binaries
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-01-31 03:16:42 -07:00
Alexander Larsson
886f650d9b devicemapper: Unmount inactive devices
This implements the new Put() operation such that
Get()/Put() maintains a refcount for each ID, mounting
only on first Get() and unmounting on the last Get().

This means we avoid littering the system with lots of mounts
and active devicemapper devices and free resources related
to them.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)

asdfljk
2014-01-21 11:26:11 +01:00
Alexander Larsson
bcaf6c2359 Add Put() to graphdriver API and use it
This makes all users of Put() have a corresponding call
to Get() which means we will be able to track whether
any particular ID is in use and if not unmount it.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-01-21 11:25:37 +01:00
Guillaume J. Charmes
24c03b2d93 Make devicemapper linux-only 2013-11-27 19:12:51 -08:00
Guillaume J. Charmes
bc82940a57
Forbid syscalls in tests, add 2 new unit tests 2013-11-21 16:32:16 -08:00
Guillaume J. Charmes
a39bd65662
Remove os from devmapper 2013-11-20 13:05:17 -08:00
Michael Crosby
1b28cdc7f9 Handle image metadata when drivers are switched 2013-11-20 10:31:51 -08:00
Guillaume J. Charmes
3e0a5ac48b Merge pull request #41 from alexlarsson/dm-plugin-device-tool
Update docker-device-tool
2013-11-19 15:38:47 -08:00
Victor Vieux
5a4113140e Merge pull request #43 from alexlarsson/dm-plugin-use-root-subdir
devmapper: Use a "root" subdirectory in the devmapper volume
2013-11-19 13:51:04 -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
0ed762f2d2 devicemapper: Unmount when removing device
Without this the remove will fail due to a busy device.
2013-11-19 14:40:15 +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
80aecc7014 devmapper: Update device-mapper-tool
This makes the device mapper tool work again and adds new features
to get pool status, device status and to list all devices.
2013-11-19 09:44:19 +01:00
Alexander Larsson
00401a30b7 devmapper: Use a "rootfs" subdirectory in the devmapper volume
We place the actual image/containers in the "rootfs" directory, which
allows us to have other data in the toplevel directory in the mount.

For starters, this means the "lost+found" directory from mkfs will
not always be in your container/image.

Secondly, we can create a file "id" in the toplevel dir which is not
visible from the container. This is useful because it allows us to map
back from the device fs to the container if something goes wrong with
the devicemapper metadata.
2013-11-19 09:29:42 +01:00
Guillaume J. Charmes
035c144242
Move all drivers to the same subdir graphdriver 2013-11-15 15:48:24 -08:00
Renamed from devmapper/driver.go (Browse further)