Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

btrfs: create btrfs_reclaim_block_groups()

Create a function btrfs_reclaim_block_groups() that gets called from the
block-group reclaim worker.

This allows creating synchronous block_group reclaim later on.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

Johannes Thumshirn and committed by
David Sterba
bd0ffde1 b6191851

+9 -3
+9 -3
fs/btrfs/block-group.c
··· 2040 2040 return ret; 2041 2041 } 2042 2042 2043 - void btrfs_reclaim_bgs_work(struct work_struct *work) 2043 + static void btrfs_reclaim_block_groups(struct btrfs_fs_info *fs_info) 2044 2044 { 2045 - struct btrfs_fs_info *fs_info = 2046 - container_of(work, struct btrfs_fs_info, reclaim_bgs_work); 2047 2045 struct btrfs_block_group *bg; 2048 2046 struct btrfs_space_info *space_info; 2049 2047 LIST_HEAD(retry_list); ··· 2107 2109 list_splice_tail(&retry_list, &fs_info->reclaim_bgs); 2108 2110 spin_unlock(&fs_info->unused_bgs_lock); 2109 2111 btrfs_exclop_finish(fs_info); 2112 + } 2113 + 2114 + void btrfs_reclaim_bgs_work(struct work_struct *work) 2115 + { 2116 + struct btrfs_fs_info *fs_info = 2117 + container_of(work, struct btrfs_fs_info, reclaim_bgs_work); 2118 + 2119 + btrfs_reclaim_block_groups(fs_info); 2110 2120 } 2111 2121 2112 2122 void btrfs_reclaim_bgs(struct btrfs_fs_info *fs_info)