forked from TrueCloudLab/frostfs-node
[#1668] writecache: Use object size to check free space
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
bd61f7bf0a
commit
8643e0abc5
2 changed files with 10 additions and 5 deletions
|
@ -7,10 +7,6 @@ func (c *cache) estimateCacheSize() (uint64, uint64) {
|
|||
return count, size
|
||||
}
|
||||
|
||||
func (c *cache) hasEnoughSpaceFS() bool {
|
||||
return c.hasEnoughSpace(c.maxObjectSize)
|
||||
}
|
||||
|
||||
func (c *cache) hasEnoughSpace(objectSize uint64) bool {
|
||||
count, size := c.estimateCacheSize()
|
||||
if c.maxCacheCount > 0 && count+1 > c.maxCacheCount {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue