aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-06-25 16:01:31 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:04 -0400
commit3f157a2fd2ad731e1ed9964fecdc5f459f04a4a4 (patch)
treedf9421e7b1d0c06d5efb8659f4317438d3d511d7 /fs/btrfs/ctree.h
parent1b1e2135dc1e4efbcf25ac9ac9979316d4e1193e (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.h7
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,
1412struct extent_buffer *btrfs_root_node(struct btrfs_root *root); 1413struct extent_buffer *btrfs_root_node(struct btrfs_root *root);
1413struct extent_buffer *btrfs_lock_root_node(struct btrfs_root *root); 1414struct extent_buffer *btrfs_lock_root_node(struct btrfs_root *root);
1414int btrfs_find_next_key(struct btrfs_root *root, struct btrfs_path *path, 1415int 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);
1418int 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
1417int btrfs_cow_block(struct btrfs_trans_handle *trans, 1422int 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,