diff options
author | Zheng Yan <zheng.yan@oracle.com> | 2008-09-26 10:05:48 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-26 10:05:48 -0400 |
commit | e8569813849b5da394a195c7e76b4faa452b12d1 (patch) | |
tree | 87b09cd5bfc3dda16e181c247fdd7f77b6c463ea /fs/btrfs/ctree.h | |
parent | 24ab9cd85c11bccacbd0cce7f8e1aebd4930404c (diff) |
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 3b3c1ca50c5..c683aaa925f 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -498,6 +498,7 @@ struct btrfs_space_info { | |||
498 | u64 total_bytes; | 498 | u64 total_bytes; |
499 | u64 bytes_used; | 499 | u64 bytes_used; |
500 | u64 bytes_pinned; | 500 | u64 bytes_pinned; |
501 | u64 bytes_reserved; | ||
501 | int full; | 502 | int full; |
502 | int force_alloc; | 503 | int force_alloc; |
503 | struct list_head list; | 504 | struct list_head list; |
@@ -519,6 +520,7 @@ struct btrfs_block_group_cache { | |||
519 | struct btrfs_block_group_item item; | 520 | struct btrfs_block_group_item item; |
520 | spinlock_t lock; | 521 | spinlock_t lock; |
521 | u64 pinned; | 522 | u64 pinned; |
523 | u64 reserved; | ||
522 | u64 flags; | 524 | u64 flags; |
523 | int cached; | 525 | int cached; |
524 | int ro; | 526 | int ro; |