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>
u64 delalloc_bytes;
u64 last_alloc;
u64 last_data_alloc;
- u64 last_log_alloc;
spinlock_t ref_cache_lock;
u64 total_ref_cache_size;
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;
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;