]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: zoned: activate necessary block group
authorNaohiro Aota <naohiro.aota@wdc.com>
Fri, 8 Jul 2022 23:18:48 +0000 (08:18 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:42:27 +0000 (14:42 +0200)
commitb89cef7fab4ecd0a380ce8eb3634c948874f66ff
tree81226bd3a47ad21f5339fa0e6c61e29fc3ef2123
parenta4714736647bfda42b63bd81ea79a4f1d2ace58b
btrfs: zoned: activate necessary block group

[ Upstream commit b6a98021e4019c562a23ad151a7e40adfa9f91e5 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/block-group.c