]> git.hungrycats.org Git - linux/commit
btrfs: use BTRFS_MAX_EXTENT_SIZE in prealloc topics/prealloc-size
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sat, 21 Dec 2024 15:48:03 +0000 (10:48 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Wed, 29 Jul 2026 15:44:31 +0000 (11:44 -0400)
commit0caa4c8e060382e229b8d4eaea634b1e668b2105
treef8713a5e0880032ba9b1d92fa5a6a4c8d3abea6e
parentfc02acf6ac0ccde0c805c2daa9148683cdd01ba8
btrfs: use BTRFS_MAX_EXTENT_SIZE in prealloc

The prealloc size limit of 256M was set in
commit 24542bf7ea5e ("btrfs: limit fallocate extent reservation to 256MB")
while the 128M extent size limit used everywhere else was set in
commit b888db2bd7b6 ("Btrfs: Add delayed allocation to the extent based
page tree code"), i.e. since the beginning of btrfs.

Excessively large extents cause problems for relocations already, and
there is no need for prealloc to create any more.  Bring the prealloc size
down to the same size used by normal write allocations.

Zoned devices can't use prealloc, so we don't need to do anything special
for them like we do for normal writes.

Signed-off-by: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
fs/btrfs/inode.c