From 85b604d414161634ff96d68f85eaf211dbd979a4 Mon Sep 17 00:00:00 2001 From: Zakhar Bessarab Date: Tue, 3 Oct 2023 14:39:41 +0400 Subject: [PATCH] lib/logstorage: fix free space check (#5113) Signed-off-by: Zakhar Bessarab --- lib/logstorage/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logstorage/storage.go b/lib/logstorage/storage.go index 96cf041a02..2c7b0e25fc 100644 --- a/lib/logstorage/storage.go +++ b/lib/logstorage/storage.go @@ -541,7 +541,7 @@ func (s *Storage) UpdateStats(ss *StorageStats) { // IsReadOnly returns true if s is in read-only mode. func (s *Storage) IsReadOnly() bool { available := fs.MustGetFreeSpace(s.path) - return available > s.minFreeDiskSpaceBytes + return available < s.minFreeDiskSpaceBytes } func (s *Storage) debugFlush() {