diff options
author | Naohiro Aota <naohiro.aota@wdc.com> | 2021-08-19 21:19:20 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-10-26 19:07:59 +0200 |
commit | eb66a010d518aaff6d0279c35fcb0547f6601190 (patch) | |
tree | ebec96f23001b2304ee2b5025de757eb68c049d8 | |
parent | 2e654e4bb9aca11abf36ae37202daecf396e0119 (diff) | |
download | linux-eb66a010d518aaff6d0279c35fcb0547f6601190.tar.gz linux-eb66a010d518aaff6d0279c35fcb0547f6601190.tar.bz2 linux-eb66a010d518aaff6d0279c35fcb0547f6601190.zip |
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 <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/block-group.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ |