On Thu, Jul 25, 2019 at 11:27:17AM +0100, [email protected] wrote: > From: Filipe Manana <[email protected]> > > When creating a filesystem with mixed block groups, we are creating two > space info objects to track used/reserved/pinned space, one only for data > and another one only for metadata. > > This is making fstests test case generic/416 fail, with btrfs' check > reporting over an hundred errors about bad extents: > > (...) > bad extent [17186816, 17190912), type mismatch with chunk > bad extent [17195008, 17199104), type mismatch with chunk > bad extent [17203200, 17207296), type mismatch with chunk > (...) > > Because, surprisingly, this results in block groups that do not have the > BTRFS_BLOCK_GROUP_DATA flag set but have data extents allocated in them. > This is a regression introduced in btrfs-progs v5.2. > > So fix this by making sure we only create one space info object, for both > metadata and data, when mixed block groups are enabled. > > Fixes: c31edf610cbe1e ("btrfs-progs: Fix false ENOSPC alert by tracking used > space correctly") > Signed-off-by: Filipe Manana <[email protected]>
Applied, thanks.
