On 11/09/2020 19:42, Naohiro Aota wrote: > Tree manipulating operations like merging nodes often release > once-allocated tree nodes. Btrfs cleans such nodes so that pages in the > node are not uselessly written out. On ZONED volumes, however, such > optimization blocks the following IOs as the cancellation of the write out > of the freed blocks breaks the sequential write sequence expected by the > device. > > This patch introduces a list of clean and unwritten extent buffers that > have been released in a transaction. Btrfs redirty the buffer so that > btree_write_cache_pages() can send proper bios to the devices. > > Besides it clears the entire content of the extent buffer not to confuse > raw block scanners e.g. btrfsck. By clearing the content, > csum_dirty_buffer() complains about bytenr mismatch, so avoid the checking > and checksum using newly introduced buffer flag EXTENT_BUFFER_NO_CHECK. That one doesn't apply cleanly on current misc-next.