Commit 6a3c7f5c authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: don't balance btree inode pages from buffered write path

The call to btrfs_btree_balance_dirty has been there since the early
days of BTRFS, when the btree was directly modified from the write path,
hence dirtied btree inode pages. With the implementation of b888db2b
("Btrfs: Add delayed allocation to the extent based page tree code")
13 years ago the btree is no longer modified from the write path, hence
there is no point in calling this function. Just remove it.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 92ed3019
...@@ -1800,8 +1800,6 @@ static noinline ssize_t btrfs_buffered_write(struct kiocb *iocb, ...@@ -1800,8 +1800,6 @@ static noinline ssize_t btrfs_buffered_write(struct kiocb *iocb,
cond_resched(); cond_resched();
balance_dirty_pages_ratelimited(inode->i_mapping); balance_dirty_pages_ratelimited(inode->i_mapping);
if (dirty_pages < (fs_info->nodesize >> PAGE_SHIFT) + 1)
btrfs_btree_balance_dirty(fs_info);
pos += copied; pos += copied;
num_written += copied; num_written += copied;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment