Skip to content

Commit

Permalink
btrfs: zoned: activate new block group
Browse files Browse the repository at this point in the history
Activate new block group at btrfs_make_block_group(). We do not check the
return value. If failed, we can try again later at the actual extent
allocation phase.

Signed-off-by: Naohiro Aota <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
naota authored and kdave committed Oct 26, 2021
1 parent 2e654e4 commit eb66a01
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/btrfs/block-group.c
Original file line number Diff line number Diff line change
Expand Up @@ -2445,6 +2445,12 @@ struct btrfs_block_group *btrfs_make_block_group(struct btrfs_trans_handle *tran
return ERR_PTR(ret);
}

/*
* New block group is likely to be used soon. Try to activate it now.
* Failure is OK for now.
*/
btrfs_zone_activate(cache);

ret = exclude_super_stripes(cache);
if (ret) {
/* We may have excluded something, so call this just in case */
Expand Down

0 comments on commit eb66a01

Please sign in to comment.