aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-10-03 12:24:01 -0400
committerChris Mason <chris.mason@oracle.com>2008-10-03 12:24:01 -0400
commit30c43e2444c16afe3b2130f40ad273541bf3dc36 (patch)
treed15296f70f1a66c0248008bfa77494593f28f2a2 /fs/btrfs
parentcb843a6f513a1a91c54951005e60bd9b95bdf973 (diff)
Btrfs: remove last_log_alloc allocator optimization
The tree logging code was trying to separate tree log allocations from normal metadata allocations to improve writeback patterns during an fsync. But, the code was not effective and ended up just mixing tree log blocks with regular metadata. That seems to be working fairly well, so the last_log_alloc code can be removed. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/ctree.h1
-rw-r--r--fs/btrfs/extent-tree.c7
-rw-r--r--fs/btrfs/transaction.c1
3 files changed, 0 insertions, 9 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 94e0cdfddc0..8566eb30f56 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -672,7 +672,6 @@ struct btrfs_fs_info {
u64 delalloc_bytes;
u64 last_alloc;
u64 last_data_alloc;
- u64 last_log_alloc;
spinlock_t ref_cache_lock;
u64 total_ref_cache_size;
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index db37b867e4f..29380467b67 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2228,13 +2228,6 @@ static int noinline find_free_extent(struct btrfs_trans_handle *trans,
if ((data & BTRFS_BLOCK_GROUP_DATA) && btrfs_test_opt(root, SSD))
last_ptr = &root->fs_info->last_data_alloc;
- if (root->root_key.objectid == BTRFS_TREE_LOG_OBJECTID) {
- last_ptr = &root->fs_info->last_log_alloc;
- if (!last_ptr == 0 && root->fs_info->last_alloc) {
- *last_ptr = root->fs_info->last_alloc + empty_cluster;
- }
- }
-
if (last_ptr) {
if (*last_ptr)
hint_byte = *last_ptr;
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 11266d68a6c..5ecc24d634a 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -61,7 +61,6 @@ static noinline int join_transaction(struct btrfs_root *root)
root->fs_info->generation++;
root->fs_info->last_alloc = 0;
root->fs_info->last_data_alloc = 0;
- root->fs_info->last_log_alloc = 0;
cur_trans->num_writers = 1;
cur_trans->num_joined = 0;
cur_trans->transid = root->fs_info->generation;