fix(storage): persist inline-data cleanup in CleanAbandonedData

CleanAbandonedData removes abandoned inline data directories from the
in-memory xl.meta (xl.data.remove), serializes the modified metadata
into newBuf, but then writes the ORIGINAL buffer (buf) back to disk.
As a result the inline-data cleanup never persisted and abandoned
inline entries reappear on the next read.

Write newBuf instead of buf so the cleaned metadata is what gets
persisted to xl.meta.

Signed-off-by: agonizerq <agonizerq@users.noreply.github.com>
This commit is contained in:
agonizerq
2026-11-25 12:57:18 -05:00
parent 44e848fedf
commit 5da5f0a342
+1 -1
View File
@@ -3366,7 +3366,7 @@ func (s *xlStorage) CleanAbandonedData(ctx context.Context, volume string, path
newBuf, err := xl.AppendTo(metaDataPoolGet())
if err == nil {
defer metaDataPoolPut(newBuf)
return s.WriteAll(ctx, volume, pathJoin(path, xlStorageFormatFile), buf)
return s.WriteAll(ctx, volume, pathJoin(path, xlStorageFormatFile), newBuf)
}
}
return nil