From: Naohiro Aota Date: Thu, 19 Aug 2021 12:19:20 +0000 (+0900) Subject: btrfs: zoned: activate new block group X-Git-Tag: howlett/maple/20220722_2~2004^2~106 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=eb66a010d518aaff6d0279c35fcb0547f6601190;p=users%2Fjedix%2Flinux-maple.git btrfs: zoned: activate new block group 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 Signed-off-by: David Sterba --- diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index 8e7b74fa3fc8..1302bf8d0be1 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -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 */