moby--moby/daemon
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
..
events Resolves #16458 - filter events by labels. 2015-10-02 16:33:20 -04:00
execdriver
graphdriver devmapper: Few code cleanups 2015-10-05 09:02:31 -04:00
links
logger
network
README.md
archive.go
archive_unix.go
archive_windows.go
attach.go
changes.go
commit.go
config.go
config_experimental.go
config_stub.go
config_unix.go
config_windows.go
container.go
container_unit_test.go
container_unix.go
container_windows.go
create.go
create_unix.go
create_windows.go
daemon.go Resolves #16458 - filter events by labels. 2015-10-02 16:33:20 -04:00
daemon_aufs.go
daemon_btrfs.go
daemon_devicemapper.go
daemon_linux.go
daemon_linux_test.go
daemon_no_aufs.go
daemon_overlay.go
daemon_test.go
daemon_unix.go
daemon_unix_test.go
daemon_unsupported.go
daemon_windows.go
daemon_zfs.go
debugtrap_unix.go
debugtrap_unsupported.go
debugtrap_windows.go
delete.go
discovery.go
exec.go
exec_freebsd.go
exec_linux.go
exec_windows.go
export.go
history.go
image_delete.go
info.go
inspect.go
inspect_unix.go
inspect_windows.go
kill.go
list.go Don't let `Names` be null on GET /containers/JSON 2015-10-02 17:09:14 -04:00
logdrivers_linux.go
logdrivers_windows.go
logs.go
monitor.go
pause.go
rename.go
resize.go
restart.go
start.go
state.go
state_test.go
stats.go
stats_collector_unix.go
stats_collector_windows.go
stats_freebsd.go
stats_linux.go
stats_windows.go
stop.go
top_unix.go
top_windows.go
unpause.go
utils_freebsd.go
utils_linux.go
utils_nounix.go
utils_test.go
volumes.go
volumes_linux_unit_test.go
volumes_unit_test.go
volumes_unix.go
volumes_windows.go
wait.go

README.md

This directory contains code pertaining to running containers and storing images

Code pertaining to running containers:

  • execdriver

Code pertaining to storing images:

  • graphdriver