Re: [PATCH 1/2] Btrfs-progs: make convert to allocate space from the desired type of block group

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

 



Hi Liu,

Since btrfs-convert has been reworked to use a completely new method to do such allocation, now it doesn't need any custom_alloc_extent() function.

And its new chunk lay out is designed to only put metadata chunk into large enough unused space, and data chunks will cover all used space.

So there is no need for such patch AFAIK.

And the new convert is already in devel branch.

Thanks,
Qu

Liu Bo wrote on 2016/05/26 18:26 -0700:
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.liu@xxxxxxxxxx>
---
 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)) {



--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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