]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: consolidate reclaim readiness checks in btrfs_should_reclaim()
authorSun YangKai <sunk67188@gmail.com>
Wed, 14 Jan 2026 03:47:03 +0000 (11:47 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 06:56:14 +0000 (07:56 +0100)
commit4b7ecd0984e34262430b9db7efbfaf293b4b4d3c
tree13b168b6f70731faa828ef85aeb959adc2c9376a
parent19eff93dc738e8afaa59cb374b44bb5a162e6c2d
btrfs: consolidate reclaim readiness checks in btrfs_should_reclaim()

Move the filesystem state validation from btrfs_reclaim_bgs_work() into
btrfs_should_reclaim() to centralize the reclaim eligibility logic.
Since it is the only caller of btrfs_should_reclaim(), there's no
functional change.

Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Sun YangKai <sunk67188@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c