]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: account for space used by the super mirrors
authorJosef Bacik <josef@redhat.com>
Fri, 11 Sep 2009 20:11:20 +0000 (16:11 -0400)
committerChris Mason <chris.mason@oracle.com>
Mon, 21 Sep 2009 23:23:50 +0000 (19:23 -0400)
commit1a1d516b6af8b231aa0912ccd6bc2073082dbe4b
tree13d7ba24660c865efd184a25b7b0ac8830a6d7f1
parent480bf3e3b74d4413ad4829b912ef93980d409e0e
Btrfs: account for space used by the super mirrors

As we get closer to proper -ENOSPC handling in btrfs, we need more accurate
space accounting for the space info's.  Currently we exclude the free space for
the super mirrors, but the space they take up isn't accounted for in any of the
counters.  This patch introduces bytes_super, which keeps track of the amount
of bytes used for a super mirror in the block group cache and space info.  This
makes sure that our free space caclucations will be completely accurate.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c