[Top] [All Lists]

Free blocks btrees are not counted against sb->sb_fdblocks?

To: linux-xfs@xxxxxxxxxxx
Subject: Free blocks btrees are not counted against sb->sb_fdblocks?
From: Iustin Pop <iusty@xxxxxxxxx>
Date: Sat, 3 Sep 2005 12:30:05 +0300
Mail-followup-to: linux-xfs@xxxxxxxxxxx
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.10i
Hello to all,

I believe that the blocks used by the free block btrees (BNO + CNT) are
not substracted from the superblock's fdblocks. Except for the roots of
course, which are included in the XFS_PREALLOC_BLOCKS(mp).

Is there a reason for this? Especially since the inode btrees are
substracted... Furthermore, I think this is why a full filesystem
sometime shows a few kb's free - they are actually in the btrees and
can't be used.

How did I got to this result: whenever the level of the trees is > 1,
SUM(agf->agf_freeblks) + SUM(agf->agf_flcount) != sb->sb_fdblocks.  How
does this happen? The blocks are allocated using xfs_alloc_get_freelist
which does not modify the superblock counters.  The debug checks in
xfs_trans_apply_sb_deltas are ok, because the xfs_alloc_btree.c code
modifies also tp->t_ag_btree_delta and keeps them in sync
(xfs_alloc_get_freelist decrements tp->t_ag_freeblks_delta by 1,
xfs_alloc_split increments tp->t_ag_btree_delta by 1 and thus they
cancel each other).

Iustin Pop

<Prev in Thread] Current Thread [Next in Thread>
  • Free blocks btrees are not counted against sb->sb_fdblocks?, Iustin Pop <=