aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2010-10-14 14:52:27 -0400
committerJosef Bacik <josef@redhat.com>2010-10-22 15:54:55 -0400
commit89a55897a2fbbceb94480952784004bf23911d38 (patch)
treee62ea1ced4c7941ab53e7aa7047ce8f0af0add9f /fs/btrfs/ctree.h
parentbf5fc093c5b625e4259203f1cee7ca73488a5620 (diff)
Btrfs: fix df regression
The new ENOSPC stuff breaks out the raid types which breaks the way we were reporting df to the system. This fixes it back so that Available is the total space available to data and used is the actual bytes used by the filesystem. This means that Available is Total - data used - all of the metadata space. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 29c20092847e..014fd52c01bf 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -675,7 +675,8 @@ struct btrfs_block_group_item {
675struct btrfs_space_info { 675struct btrfs_space_info {
676 u64 flags; 676 u64 flags;
677 677
678 u64 total_bytes; /* total bytes in the space */ 678 u64 total_bytes; /* total bytes in the space,
679 this doesn't take mirrors into account */
679 u64 bytes_used; /* total bytes used, 680 u64 bytes_used; /* total bytes used,
680 this does't take mirrors into account */ 681 this does't take mirrors into account */
681 u64 bytes_pinned; /* total bytes pinned, will be freed when the 682 u64 bytes_pinned; /* total bytes pinned, will be freed when the
@@ -687,6 +688,8 @@ struct btrfs_space_info {
687 u64 bytes_may_use; /* number of bytes that may be used for 688 u64 bytes_may_use; /* number of bytes that may be used for
688 delalloc/allocations */ 689 delalloc/allocations */
689 u64 disk_used; /* total bytes used on disk */ 690 u64 disk_used; /* total bytes used on disk */
691 u64 disk_total; /* total bytes on disk, takes mirrors into
692 account */
690 693
691 int full; /* indicates that we cannot allocate any more 694 int full; /* indicates that we cannot allocate any more
692 chunks for this space */ 695 chunks for this space */