]> Git Repo - linux.git/commitdiff
btrfs: don't arbitrarily slow down delalloc if we're committing
authorJosef Bacik <[email protected]>
Mon, 18 Sep 2023 18:15:33 +0000 (14:15 -0400)
committerDavid Sterba <[email protected]>
Thu, 12 Oct 2023 14:44:08 +0000 (16:44 +0200)
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]>
fs/btrfs/delalloc-space.c

index a764db67c033b0c52672bb4bfeaaadab28c03ed9..51453d4928fa400dcf0d08c2e01bb1080b59cb88 100644 (file)
@@ -322,9 +322,6 @@ int btrfs_delalloc_reserve_metadata(struct btrfs_inode *inode, u64 num_bytes,
        } else {
                if (current->journal_info)
                        flush = BTRFS_RESERVE_FLUSH_LIMIT;
-
-               if (btrfs_transaction_in_commit(fs_info))
-                       schedule_timeout(1);
        }
 
        num_bytes = ALIGN(num_bytes, fs_info->sectorsize);
This page took 0.058656 seconds and 4 git commands to generate.