Re: [PATCH] Btrfs-progs: mkfs, fix metadata corruption when using mixed mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 25, 2019 at 11:27:17AM +0100, fdmanana@xxxxxxxxxx wrote:
> From: Filipe Manana <fdmanana@xxxxxxxx>
> 
> 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 <fdmanana@xxxxxxxx>

Applied, thanks.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux