Report free blocks in statfs

Our statfs callback was still using the old buddy allocator.

We add a free segments field to the super and have it track the number
of free segments in the allocator.  We then use that to calculate the
number of free blocks for statfs.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2017-04-18 13:44:54 -07:00
parent 9f5e42f7dd
commit 6516ce7d57
4 changed files with 28 additions and 2 deletions
+1
View File
@@ -8,6 +8,7 @@ int scoutfs_alloc_free(struct super_block *sb, u64 segno);
int scoutfs_alloc_has_dirty(struct super_block *sb);
int scoutfs_alloc_dirty_ring(struct super_block *sb);
u64 scoutfs_alloc_bfree(struct super_block *sb);
int scoutfs_alloc_setup(struct super_block *sb);
void scoutfs_alloc_destroy(struct super_block *sb);