diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-06-25 16:01:31 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:04 -0400 |
commit | 3f157a2fd2ad731e1ed9964fecdc5f459f04a4a4 (patch) | |
tree | df9421e7b1d0c06d5efb8659f4317438d3d511d7 /fs/btrfs/ctree.h | |
parent | 1b1e2135dc1e4efbcf25ac9ac9979316d4e1193e (diff) |
Btrfs: Online btree defragmentation fixes
The btree defragger wasn't making forward progress because the new key wasn't
being saved by the btrfs_search_forward function.
This also disables the automatic btree defrag, it wasn't scaling well to
huge filesystems. The auto-defrag needs to be done differently.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index ca8e6f15859e..a28796482b4a 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -609,6 +609,7 @@ struct btrfs_root { | |||
609 | u64 last_inode_alloc; | 609 | u64 last_inode_alloc; |
610 | int ref_cows; | 610 | int ref_cows; |
611 | int track_dirty; | 611 | int track_dirty; |
612 | u64 defrag_trans_start; | ||
612 | struct btrfs_key defrag_progress; | 613 | struct btrfs_key defrag_progress; |
613 | struct btrfs_key defrag_max; | 614 | struct btrfs_key defrag_max; |
614 | int defrag_running; | 615 | int defrag_running; |
@@ -1412,7 +1413,11 @@ int btrfs_previous_item(struct btrfs_root *root, | |||
1412 | struct extent_buffer *btrfs_root_node(struct btrfs_root *root); | 1413 | struct extent_buffer *btrfs_root_node(struct btrfs_root *root); |
1413 | struct extent_buffer *btrfs_lock_root_node(struct btrfs_root *root); | 1414 | struct extent_buffer *btrfs_lock_root_node(struct btrfs_root *root); |
1414 | int btrfs_find_next_key(struct btrfs_root *root, struct btrfs_path *path, | 1415 | int btrfs_find_next_key(struct btrfs_root *root, struct btrfs_path *path, |
1415 | struct btrfs_key *key, int lowest_level); | 1416 | struct btrfs_key *key, int lowest_level, |
1417 | int cache_only, u64 min_trans); | ||
1418 | int btrfs_search_forward(struct btrfs_root *root, struct btrfs_key *min_key, | ||
1419 | struct btrfs_path *path, int cache_only, | ||
1420 | u64 min_trans); | ||
1416 | 1421 | ||
1417 | int btrfs_cow_block(struct btrfs_trans_handle *trans, | 1422 | int btrfs_cow_block(struct btrfs_trans_handle *trans, |
1418 | struct btrfs_root *root, struct extent_buffer *buf, | 1423 | struct btrfs_root *root, struct extent_buffer *buf, |