Skip to content

Commit 507acf5

Browse files
committed
wip: total cache use?
1 parent 96b93d9 commit 507acf5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

vfs/vfscache/cache.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,11 @@ func (c *Cache) totalSizeQuotaOK() bool {
732732
if c.opt.CacheMinFreeSpace > 0 {
733733
margin = int64(c.opt.CacheMinFreeSpace)
734734
}
735+
fs.Logf(nil, "vfs cache totalSizeQuotaOK(): used = %d, margin = %d, total = %d", c.used, margin, int64(c.opt.DiskSpaceTotalSize))
736+
if (c.used + margin) > int64(c.opt.DiskSpaceTotalSize) {
737+
return false
738+
}
739+
// TODO: can we get to use the total (c.used) for all caches here?
735740
return (c.used + margin) <= int64(c.opt.DiskSpaceTotalSize)
736741
}
737742

0 commit comments

Comments
 (0)