Re: [PATCH v3 1/3] btrfs: use bdev_rw_virt() to read and scratch the disk super block

From: Qu Wenruo

Date: Sat Jan 10 2026 - 01:02:59 EST




在 2026/1/10 16:26, Matthew Wilcox 写道:
On Sat, Jan 10, 2026 at 02:26:19PM +1030, Qu Wenruo wrote:
Furthermore read_cache_page*() can race with device block size setting,
thus requires extra locking.

What? There's supposed to be sufficient locking to prevent this.
Is there a bug report I can look at?

The comment of read_cache_page_gfp() already mentions that invalidate lock is required, but we didn't hold inside btrfs, and it's already fixed now, nothing to be worried from mm side:

https://lore.kernel.org/linux-btrfs/tencent_A63C4B6C74A576F566AA3C0B37CE96AC3609@xxxxxx/

This report and fix just reminds me to finally push the series to get rid of read_cache_page_gfp() completely.

Thanks,
Qu