devmapper: async remove device using Cleanup

Fix: #3923
Signed-off-by: Eric Ren <renzhen@linux.alibaba.com>
This commit is contained in:
Eric Ren
2020-02-25 00:50:27 +08:00
parent 2c5279e820
commit b6bf7b97c2
5 changed files with 68 additions and 4 deletions

View File

@@ -40,6 +40,9 @@ type Config struct {
// Defines how much space to allocate when creating base image for container
BaseImageSize string `toml:"base_image_size"`
BaseImageSizeBytes uint64 `toml:"-"`
// Flag to async remove device using Cleanup() callback in snapshots GC
AsyncRemove bool `toml:"async_remove"`
}
// LoadConfig reads devmapper configuration file from disk in TOML format