During btrfs-convert, it can allocate space from METADATA block group for data, which is not supposed to be correct, although it doesn't cause any serious problem except eating METADATA space more quickly.
Signed-off-by: Liu Bo <bo.li....@oracle.com> --- btrfs-convert.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/btrfs-convert.c b/btrfs-convert.c index b49775c..550aa8f 100644 --- a/btrfs-convert.c +++ b/btrfs-convert.c @@ -364,6 +364,12 @@ static int custom_alloc_extent(struct btrfs_root *root, u64 num_bytes, continue; } + if ((!!metadata) != + (!!(cache->flags & BTRFS_BLOCK_GROUP_METADATA))) { + last = cache->key.objectid + cache->key.offset; + continue; + } + if (metadata) { BUG_ON(num_bytes != root->nodesize); if (check_crossing_stripes(start, num_bytes)) { -- 2.5.0 -- 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