From 38c521e54a03a724ad3624e75ed6263fa1454c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Fri, 14 Mar 2025 08:26:20 +0100 Subject: [PATCH] Support OC_SPACES_MAX_QUOTA with the posix driver --- services/storage-users/pkg/config/config.go | 1 + services/storage-users/pkg/revaconfig/drivers.go | 1 + 2 files changed, 2 insertions(+) diff --git a/services/storage-users/pkg/config/config.go b/services/storage-users/pkg/config/config.go index d9cb596b8..25bb397b7 100644 --- a/services/storage-users/pkg/config/config.go +++ b/services/storage-users/pkg/config/config.go @@ -202,6 +202,7 @@ type PosixDriver struct { PermissionsEndpoint string `yaml:"permissions_endpoint" env:"STORAGE_USERS_PERMISSION_ENDPOINT;STORAGE_USERS_POSIX_PERMISSIONS_ENDPOINT" desc:"Endpoint of the permissions service. The endpoints can differ for 'decomposed', 'posix' and 'decomposeds3'." introductionVersion:"1.0.0"` AsyncUploads bool `yaml:"async_uploads" env:"OC_ASYNC_UPLOADS" desc:"Enable asynchronous file uploads." introductionVersion:"1.0.0"` ScanDebounceDelay time.Duration `yaml:"scan_debounce_delay" env:"STORAGE_USERS_POSIX_SCAN_DEBOUNCE_DELAY" desc:"The time in milliseconds to wait before scanning the filesystem for changes after a change has been detected." introductionVersion:"1.0.0"` + MaxQuota uint64 `yaml:"max_quota" env:"OC_SPACES_MAX_QUOTA;STORAGE_USERS_POSIX_MAX_QUOTA" desc:"Set a global max quota for spaces in bytes. A value of 0 equals unlimited. If not using the global OC_SPACES_MAX_QUOTA, you must define the FRONTEND_MAX_QUOTA in the frontend service." introductionVersion:"2.0.0"` UseSpaceGroups bool `yaml:"use_space_groups" env:"STORAGE_USERS_POSIX_USE_SPACE_GROUPS" desc:"Use space groups to manage permissions on spaces." introductionVersion:"1.0.0"` diff --git a/services/storage-users/pkg/revaconfig/drivers.go b/services/storage-users/pkg/revaconfig/drivers.go index ad955be9f..f929bfede 100644 --- a/services/storage-users/pkg/revaconfig/drivers.go +++ b/services/storage-users/pkg/revaconfig/drivers.go @@ -96,6 +96,7 @@ func Posix(cfg *config.Config, enableFSScan bool) map[string]interface{} { "treesize_accounting": true, "asyncfileuploads": cfg.Drivers.Posix.AsyncUploads, "scan_debounce_delay": cfg.Drivers.Posix.ScanDebounceDelay, + "max_quota": cfg.Drivers.Decomposed.MaxQuota, "idcache": map[string]interface{}{ "cache_store": cfg.IDCache.Store, "cache_nodes": cfg.IDCache.Nodes,