btrfs: don't arbitrarily slow down delalloc if we're committing
authorJosef Bacik <josef@toxicpanda.com>
Mon, 18 Sep 2023 18:15:33 +0000 (14:15 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:20:02 +0000 (17:20 +0000)
commit85bb1d41d76fe03805f506b475595d3e70197200
treea14a4a4f24439cd41cfc604090c945d1fbe8cca8
parentb88cc37a8208d17a0298ec5c0c5bd519435aefee
btrfs: don't arbitrarily slow down delalloc if we're committing

commit 11aeb97b45ad2e0040cbb2a589bc403152526345 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: stable@vger.kernel.org # 5.4+
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/delalloc-space.c