From 297071381164fada35b168275723239d78336716 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 4 Oct 2021 15:40:53 -0400 Subject: [PATCH] Allow setting quota for individual containers Drivers have the ability to support size and inodes quota, but we don't allow these options to be passed down to the driver. With this fix, Podman should be able to support --storage-opt size= per container. Helps Fix: https://github.com/containers/podman/issues/11016 Signed-off-by: Daniel J Walsh --- store.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/store.go b/store.go index 169c7d1513..b8d8582312 100644 --- a/store.go +++ b/store.go @@ -575,10 +575,11 @@ type ContainerOptions struct { // container's layer will inherit settings from the image's top layer // or, if it is not being created based on an image, the Store object. types.IDMappingOptions - LabelOpts []string - Flags map[string]interface{} - MountOpts []string - Volatile bool + LabelOpts []string + Flags map[string]interface{} + MountOpts []string + Volatile bool + StorageOpt map[string]string } type store struct { @@ -1384,7 +1385,7 @@ func (s *store) CreateContainer(id string, names []string, image, layer, metadat options.Flags["MountLabel"] = mountLabel } - clayer, err := rlstore.Create(layer, imageTopLayer, nil, options.Flags["MountLabel"].(string), nil, layerOptions, true) + clayer, err := rlstore.Create(layer, imageTopLayer, nil, options.Flags["MountLabel"].(string), options.StorageOpt, layerOptions, true) if err != nil { return nil, err }