Skip to content

Commit

Permalink
Fix usedbytes -> usedlogicalbytes (#5084)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegeens authored Feb 20, 2025
1 parent 84a2d22 commit 7c299e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/quota-logical.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: use logicalbytes instead of bytes

EOS gRPC used `usedbytes` instead of `usedlogicalbytes` for calculating quota, resulting in a wrong view

https://github.com/cs3org/reva/pull/5084
2 changes: 1 addition & 1 deletion pkg/eosclient/eosgrpc/eosgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ func (c *Client) GetQuota(ctx context.Context, username string, rootAuth eosclie
log.Debug().Str("func", "GetQuota").Str("quotanode:", fmt.Sprintf("%d: %#v", i, resp.Quota.Quotanode[i])).Msg("")

qi.TotalBytes += max(uint64(resp.Quota.Quotanode[i].Maxlogicalbytes), 0)
qi.UsedBytes += resp.Quota.Quotanode[i].Usedbytes
qi.UsedBytes += resp.Quota.Quotanode[i].Usedlogicalbytes

qi.TotalInodes += max(uint64(resp.Quota.Quotanode[i].Maxfiles), 0)
qi.UsedInodes += resp.Quota.Quotanode[i].Usedfiles
Expand Down

0 comments on commit 7c299e3

Please sign in to comment.