Skip to content

Commit 76211f1

Browse files
josefbacikgregkh
authored andcommitted
btrfs: don't arbitrarily slow down delalloc if we're committing
commit 11aeb97 upstream. We have a random schedule_timeout() if the current transaction is committing, which seems to be a holdover from the original delalloc reservation code. Remove this, we have the proper flushing stuff, we shouldn't be hoping for random timing things to make everything work. This just induces latency for no reason. CC: [email protected] # 5.4+ Signed-off-by: Josef Bacik <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 175f4b0 commit 76211f1

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

fs/btrfs/delalloc-space.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,6 @@ int btrfs_delalloc_reserve_metadata(struct btrfs_inode *inode, u64 num_bytes)
307307
} else {
308308
if (current->journal_info)
309309
flush = BTRFS_RESERVE_FLUSH_LIMIT;
310-
311-
if (btrfs_transaction_in_commit(fs_info))
312-
schedule_timeout(1);
313310
}
314311

315312
num_bytes = ALIGN(num_bytes, fs_info->sectorsize);

0 commit comments

Comments
 (0)