summaryrefslogtreecommitdiff
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorZheng Yan <zheng.yan@oracle.com>2008-09-26 10:05:48 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-26 10:05:48 -0400
commite8569813849b5da394a195c7e76b4faa452b12d1 (patch)
tree87b09cd5bfc3dda16e181c247fdd7f77b6c463ea /fs/btrfs/ctree.h
parent24ab9cd85c11bccacbd0cce7f8e1aebd4930404c (diff)
downloadlwn-e8569813849b5da394a195c7e76b4faa452b12d1.tar.gz
lwn-e8569813849b5da394a195c7e76b4faa452b12d1.zip
Btrfs: allocator fixes for space balancing update
* Reserved extent accounting: reserved extents have been allocated in the rbtrees that track free space but have not been allocated on disk. They were never properly accounted for in the past, making it hard to know how much space was really free. * btrfs_find_block_group used to return NULL for block groups that had been removed by the space balancing code. This made it hard to account for space during the final stages of a balance run. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 3b3c1ca50c5d..c683aaa925fa 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -498,6 +498,7 @@ struct btrfs_space_info {
u64 total_bytes;
u64 bytes_used;
u64 bytes_pinned;
+ u64 bytes_reserved;
int full;
int force_alloc;
struct list_head list;
@@ -519,6 +520,7 @@ struct btrfs_block_group_cache {
struct btrfs_block_group_item item;
spinlock_t lock;
u64 pinned;
+ u64 reserved;
u64 flags;
int cached;
int ro;