1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-12 11:01:17 +03:00

MCOL-2273 Improve disk usage reporting

Use the amount of available space rather than the amount of free space.
The two numbers are usually different because the free blocks may be
unusable at the time.
This commit is contained in:
Andrew Hutchings
2019-05-02 10:32:49 +01:00
parent e078d701f3
commit be83194c31

View File

@@ -240,7 +240,7 @@ void diskMonitor()
blksize = buf.f_bsize; blksize = buf.f_bsize;
blocks = buf.f_blocks; blocks = buf.f_blocks;
freeblks = buf.f_bfree; freeblks = buf.f_bavail;
totalBlocks = blocks * blksize; totalBlocks = blocks * blksize;
free = freeblks * blksize; free = freeblks * blksize;
@@ -359,7 +359,7 @@ void diskMonitor()
blksize = buf.f_bsize; blksize = buf.f_bsize;
blocks = buf.f_blocks; blocks = buf.f_blocks;
freeblks = buf.f_bfree; freeblks = buf.f_bavail;
totalBlocks = blocks * blksize; totalBlocks = blocks * blksize;
free = freeblks * blksize; free = freeblks * blksize;