Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set max quota as space quota #3682

Merged
merged 1 commit into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/unreleased/quota.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ Added a global max quota option to limit how much quota can be assigned to space
Added a max quota value in the spacescapabilities.
Added a quota parameter to CreateHome. This is a prerequisite for setting a default quota per usertypes.

https://github.com/cs3org/reva/pull/3682
https://github.com/cs3org/reva/pull/3678
https://github.com/cs3org/reva/pull/3671
4 changes: 4 additions & 0 deletions pkg/storage/utils/decomposedfs/spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ func (fs *Decomposedfs) CreateStorageSpace(ctx context.Context, req *provider.Cr
return nil, errtypes.BadRequest("decompsedFS: requested quota is higher than allowed")
}
metadata[prefixes.QuotaAttr] = strconv.FormatUint(q.QuotaMaxBytes, 10)
} else if fs.o.MaxQuota != quotaUnrestricted {
// If no quota was requested but a max quota was set then the the storage space has a quota
// of max quota.
metadata[prefixes.QuotaAttr] = strconv.FormatUint(fs.o.MaxQuota, 10)
}

if description != "" {
Expand Down