aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 746a7248678e..6132088a577c 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -663,6 +663,7 @@ struct btrfs_csum_item {
663#define BTRFS_BLOCK_GROUP_RAID1 (1 << 4) 663#define BTRFS_BLOCK_GROUP_RAID1 (1 << 4)
664#define BTRFS_BLOCK_GROUP_DUP (1 << 5) 664#define BTRFS_BLOCK_GROUP_DUP (1 << 5)
665#define BTRFS_BLOCK_GROUP_RAID10 (1 << 6) 665#define BTRFS_BLOCK_GROUP_RAID10 (1 << 6)
666#define BTRFS_NR_RAID_TYPES 5
666 667
667struct btrfs_block_group_item { 668struct btrfs_block_group_item {
668 __le64 used; 669 __le64 used;
@@ -674,7 +675,8 @@ struct btrfs_space_info {
674 u64 flags; 675 u64 flags;
675 676
676 u64 total_bytes; /* total bytes in the space */ 677 u64 total_bytes; /* total bytes in the space */
677 u64 bytes_used; /* total bytes used on disk */ 678 u64 bytes_used; /* total bytes used,
679 this does't take mirrors into account */
678 u64 bytes_pinned; /* total bytes pinned, will be freed when the 680 u64 bytes_pinned; /* total bytes pinned, will be freed when the
679 transaction finishes */ 681 transaction finishes */
680 u64 bytes_reserved; /* total bytes the allocator has reserved for 682 u64 bytes_reserved; /* total bytes the allocator has reserved for
@@ -687,6 +689,7 @@ struct btrfs_space_info {
687 delalloc/allocations */ 689 delalloc/allocations */
688 u64 bytes_delalloc; /* number of bytes currently reserved for 690 u64 bytes_delalloc; /* number of bytes currently reserved for
689 delayed allocation */ 691 delayed allocation */
692 u64 disk_used; /* total bytes used on disk */
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 */
@@ -704,7 +707,7 @@ struct btrfs_space_info {
704 int flushing; 707 int flushing;
705 708
706 /* for block groups in our same type */ 709 /* for block groups in our same type */
707 struct list_head block_groups; 710 struct list_head block_groups[BTRFS_NR_RAID_TYPES];
708 spinlock_t lock; 711 spinlock_t lock;
709 struct rw_semaphore groups_sem; 712 struct rw_semaphore groups_sem;
710 atomic_t caching_threads; 713 atomic_t caching_threads;