mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 03:01:41 +02:00
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>
This commit is contained in:
parent
b619185168
commit
bd0ffde1d3
|
|
@ -2040,10 +2040,8 @@ static int btrfs_reclaim_block_group(struct btrfs_block_group *bg)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void btrfs_reclaim_bgs_work(struct work_struct *work)
|
||||
static void btrfs_reclaim_block_groups(struct btrfs_fs_info *fs_info)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info =
|
||||
container_of(work, struct btrfs_fs_info, reclaim_bgs_work);
|
||||
struct btrfs_block_group *bg;
|
||||
struct btrfs_space_info *space_info;
|
||||
LIST_HEAD(retry_list);
|
||||
|
|
@ -2111,6 +2109,14 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
|
|||
btrfs_exclop_finish(fs_info);
|
||||
}
|
||||
|
||||
void btrfs_reclaim_bgs_work(struct work_struct *work)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info =
|
||||
container_of(work, struct btrfs_fs_info, reclaim_bgs_work);
|
||||
|
||||
btrfs_reclaim_block_groups(fs_info);
|
||||
}
|
||||
|
||||
void btrfs_reclaim_bgs(struct btrfs_fs_info *fs_info)
|
||||
{
|
||||
btrfs_reclaim_sweep(fs_info);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user