Files
scoutfs/kmod
Zach BrownandZach Brown a25b6324d2 scoutfs: maintain free_blocks in one place
The free_blocks counter in the super is meant to track the number of
total blocks in the primary free extent index.  Callers of extent
manipulation were trying to keep it in sync with the extents.

Segment allocation was allocating extents manually using a cursor.  It
forgot to update free_blocks.  Segment freeing then freed the segment as
an extent which did update free_blocks.  This created ever accumulating
free blocks over time which eventually pushed it greater than total
blocks and caused df to report negative usage.

This updates the free_blocks count in server extent io which is the only
place we update the extent items themselves.  This ensures that we'll
keep the count in sync with the extent items.  Callers don't have to
worry about it.

Signed-off-by: Zach Brown <zab@versity.com>

T# with '#' will be ignored, and an empty message aborts the commit.
2018-08-21 13:25:05 -07:00
..
2018-03-29 15:39:36 -07:00