btrfs: fix buffer index in wait_eb_writebacks()
authorNaohiro Aota <naohiro.aota@wdc.com>
Mon, 11 Aug 2025 16:32:58 +0000 (01:32 +0900)
committerDavid Sterba <dsterba@suse.com>
Wed, 13 Aug 2025 12:08:45 +0000 (14:08 +0200)
commitdc61d97b0ba064fb21b01fbfa7436873948277bd
treef54853d36bc55f4e070330300b38e4d5e6bb9d43
parentb1511360c8ac882b0c52caa263620538e8d73220
btrfs: fix buffer index in wait_eb_writebacks()

The commit f2cb97ee964a ("btrfs: index buffer_tree using node size")
changed the index of buffer_tree from "start >> sectorsize_bits" to "start
>> nodesize_bits". However, the change is not applied for
wait_eb_writebacks() and caused IO failures by writing in a full zone. Use
the index properly.

Fixes: f2cb97ee964a ("btrfs: index buffer_tree using node size")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c