btrfs: zoned: activate necessary block group
authorNaohiro Aota <naohiro.aota@wdc.com>
Fri, 8 Jul 2022 23:18:48 +0000 (08:18 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:45:42 +0000 (17:45 +0200)
commitb6a98021e4019c562a23ad151a7e40adfa9f91e5
tree124f91b9266e9d4b1f393c921ec3dc93c47c7f47
parentb0931513913633044ed6e3800334c28433c007b0
btrfs: zoned: activate necessary block group

There are two places where allocating a chunk is not enough. These two
places are trying to ensure the space by allocating a chunk. To meet the
condition for active_total_bytes, we also need to activate a block group
there.

CC: stable@vger.kernel.org # 5.16+
Fixes: afba2bc036b0 ("btrfs: zoned: implement active zone tracking")
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c