On Thu, Aug 25, 2016 at 06:08:27PM -0700, Liu Bo wrote:
> Currently we allow inconsistence about mixed flag
>  (BTRFS_BLOCK_GROUP_METADATA | BTRFS_BLOCK_GROUP_DATA).
> 
> We'd get ENOSPC if block group has mixed flag and btrfs doesn't.
> If that happens, we have one space_info with mixed flag and another
> space_info only with BTRFS_BLOCK_GROUP_METADATA, and
> global_block_rsv.space_info points to the latter one, but all bytes
> from block_group contributes to the mixed space_info, thus all the
> allocation will fail with ENOSPC.
> 
> This adds a check for the above case.
> 
> Reported-by: Vegard Nossum <vegard.nos...@oracle.com>
> Signed-off-by: Liu Bo <bo.li....@oracle.com>

OK for the fix. Even if we allow combining mixed and split bg, the
incompat bit must be present. This could be also part of fsck, as we
don't give an option how to fix that.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to