Re: [PATCH 2/2] btrfs: zoned: finish raid stripe tree zones once all data is written

From: Johannes Thumshirn

Date: Fri Nov 27 2026 - 06:01:47 EST


On 11/22/26 4:48 AM, Miroslav Cimerman wrote:
@@ -266,6 +266,12 @@ struct btrfs_block_group {
u64 alloc_offset;
u64 zone_unusable;
u64 zone_capacity;
+ /*
+ * Bytes of allocated data whose write has completed. Only used for
+ * data block groups with the raid stripe tree on a zoned filesystem.
+ * Protected by the spinlock 'lock'.
+ */
+ u64 zone_written;

Not a huge fan of another field in btrfs_block_group for a niche case. Can we solve it differently?

Otherwise looks good.