moby--moby/daemon/graphdriver
Vivek Goyal 482eca3099 devmapper: Few code cleanups
This patch does three things. Following are the descriptions.

===
Create a separate function for delete transactions so that parent function
is little smaller.

Also close transaction if an error happens.
===
When docker is being shutdown, save deviceset metadata first before
trying to remove the devices. Generally caller gives only 10 seconds
for shutdown to complete and then kills it after that. So if some device
is busy, we will wait 20 seconds for it removal and never be able to save
metadata. So first save metadata and then deal with device removal.
===
Move issue discard operation in a separate function. This makes reading code
little easier.

Also don't issue discards if device is still open. That means devices is
still probably being used and issuing discards is not a good idea.

This is especially true in case of deferred deletion. We want to issue
discards when device is not open. At that time device can be deleted too.
Otherwise we will issue discards and deletion will actually fail. Later
we will try deletion again and issue discards again and deletion will
fail again as device is open and busy.

So this will ensure that discards are issued once when device is not open
and it can actually be deleted.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-10-05 09:02:31 -04:00
..
aufs Add constants for AUFS whiteout files 2015-09-29 11:21:45 -07:00
btrfs Try to resize data and metadata loopback file when initiating devicemapper 2015-09-24 09:31:00 +08:00
devmapper devmapper: Few code cleanups 2015-10-05 09:02:31 -04:00
graphtest Merge pull request #15422 from kolyshkin/graphtest-fix 2015-08-10 12:21:21 -07:00
overlay Merge pull request #16490 from Microsoft/10662-mtimefix 2015-10-02 12:06:03 -07:00
vfs Try to resize data and metadata loopback file when initiating devicemapper 2015-09-24 09:31:00 +08:00
windows Fix golint issues on the windows graph driver. 2015-09-29 18:32:45 -04:00
zfs Try to resize data and metadata loopback file when initiating devicemapper 2015-09-24 09:31:00 +08:00
driver.go daemon/graphdriver fix lint errors/warnings 2015-08-17 19:27:36 +00:00
driver_freebsd.go make docker compile on freebsd 2015-07-29 21:25:56 +03:00
driver_linux.go daemon/graphdriver fix lint errors/warnings 2015-08-17 19:27:36 +00:00
driver_unsupported.go daemon/graphdriver fix lint errors/warnings 2015-08-17 19:27:36 +00:00
driver_windows.go daemon/graphdriver fix lint errors/warnings 2015-08-17 19:27:36 +00:00
fsdiff.go Try to resize data and metadata loopback file when initiating devicemapper 2015-09-24 09:31:00 +08:00
imagerestorer.go Make graph.Register take in io.Reader 2015-08-20 20:37:11 -07:00