btrfs: Remove fs_info from btrfs_inc_block_group_ro
It can be referenced from the passed bg cache. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Родитель
61da2abfca
Коммит
c83488afc5
|
@ -2801,8 +2801,7 @@ int btrfs_cond_migrate_bytes(struct btrfs_fs_info *fs_info,
|
||||||
void btrfs_block_rsv_release(struct btrfs_fs_info *fs_info,
|
void btrfs_block_rsv_release(struct btrfs_fs_info *fs_info,
|
||||||
struct btrfs_block_rsv *block_rsv,
|
struct btrfs_block_rsv *block_rsv,
|
||||||
u64 num_bytes);
|
u64 num_bytes);
|
||||||
int btrfs_inc_block_group_ro(struct btrfs_fs_info *fs_info,
|
int btrfs_inc_block_group_ro(struct btrfs_block_group_cache *cache);
|
||||||
struct btrfs_block_group_cache *cache);
|
|
||||||
void btrfs_dec_block_group_ro(struct btrfs_block_group_cache *cache);
|
void btrfs_dec_block_group_ro(struct btrfs_block_group_cache *cache);
|
||||||
void btrfs_put_block_group_cache(struct btrfs_fs_info *info);
|
void btrfs_put_block_group_cache(struct btrfs_fs_info *info);
|
||||||
u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo);
|
u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo);
|
||||||
|
|
|
@ -9426,10 +9426,10 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int btrfs_inc_block_group_ro(struct btrfs_fs_info *fs_info,
|
int btrfs_inc_block_group_ro(struct btrfs_block_group_cache *cache)
|
||||||
struct btrfs_block_group_cache *cache)
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
struct btrfs_fs_info *fs_info = cache->fs_info;
|
||||||
struct btrfs_trans_handle *trans;
|
struct btrfs_trans_handle *trans;
|
||||||
u64 alloc_flags;
|
u64 alloc_flags;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
|
@ -4375,7 +4375,7 @@ int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start)
|
||||||
rc->block_group = btrfs_lookup_block_group(fs_info, group_start);
|
rc->block_group = btrfs_lookup_block_group(fs_info, group_start);
|
||||||
BUG_ON(!rc->block_group);
|
BUG_ON(!rc->block_group);
|
||||||
|
|
||||||
ret = btrfs_inc_block_group_ro(fs_info, rc->block_group);
|
ret = btrfs_inc_block_group_ro(rc->block_group);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
err = ret;
|
err = ret;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -3832,7 +3832,7 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
|
||||||
* -> btrfs_scrub_pause()
|
* -> btrfs_scrub_pause()
|
||||||
*/
|
*/
|
||||||
scrub_pause_on(fs_info);
|
scrub_pause_on(fs_info);
|
||||||
ret = btrfs_inc_block_group_ro(fs_info, cache);
|
ret = btrfs_inc_block_group_ro(cache);
|
||||||
if (!ret && is_dev_replace) {
|
if (!ret && is_dev_replace) {
|
||||||
/*
|
/*
|
||||||
* If we are doing a device replace wait for any tasks
|
* If we are doing a device replace wait for any tasks
|
||||||
|
|
Загрузка…
Ссылка в новой задаче