Skip to content

Commit

Permalink
Allow setting quota for individual containers
Browse files Browse the repository at this point in the history
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: containers/podman#11016

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
  • Loading branch information
rhatdan committed Oct 4, 2021
1 parent 48e2ca0 commit e682378
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions store.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ import (
"time"

// register all of the built-in drivers
_ "github.com/containers/storage/drivers/register"

drivers "github.com/containers/storage/drivers"
_ "github.com/containers/storage/drivers/register"
"github.com/containers/storage/pkg/archive"
"github.com/containers/storage/pkg/directory"
"github.com/containers/storage/pkg/idtools"
Expand Down Expand Up @@ -575,10 +574,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 {
Expand Down Expand Up @@ -1384,7 +1384,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
}
Expand Down

0 comments on commit e682378

Please sign in to comment.