Re: [PATCH 2/5] btrfs: zoned: don't clear dirty flag of extent buffer

From: Christoph Hellwig
Date: Tue Nov 21 2023 - 12:03:34 EST


> if (test_bit(EXTENT_BUFFER_CANCELLED, &eb->bflags)) {
> - WARN_ON_ONCE(found_start != 0);
> + memzero_extent_buffer(eb, 0, eb->len);
> return BLK_STS_OK;

> + if (btrfs_is_zoned(fs_info)) {
> + set_bit(EXTENT_BUFFER_CANCELLED, &eb->bflags);
> + return;
> + }

Maybe these two places would benefit from comments on why the buffer
is just marked as cancelled and zeroed out (that is to keep the
write order because block numbers are already assigned)?

Otherwise this looks great:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>