From 68fe1950fe5bad7e29b7a75bb1e94a54fd7e5360 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 5 May 2021 15:44:29 +0200 Subject: podman: set volatile storage flag for --rm containers volatile containers are a storage optimization that disables *sync() syscalls for the container rootfs. If a container is created with --rm, then automatically set the volatile storage flag as anyway the container won't persist after a reboot or machine crash. [NO TESTS NEEDED] Signed-off-by: Giuseppe Scrivano --- libpod/container_internal.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libpod/container_internal.go') diff --git a/libpod/container_internal.go b/libpod/container_internal.go index 80c00a622..a293defd9 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -451,6 +451,8 @@ func (c *Container) setupStorage(ctx context.Context) error { options.MountOpts = newOptions } + options.Volatile = c.config.Volatile + c.setupStorageMapping(&options.IDMappingOptions, &c.config.IDMappings) containerInfo, err := c.runtime.storageService.CreateContainerStorage(ctx, c.runtime.imageContext, c.config.RootfsImageName, c.config.RootfsImageID, c.config.Name, c.config.ID, options) -- cgit v1.2.3-54-g00ecf