Re: [PATCH] btrfs: write-protect folios during data writeback

Christoph Hellwig <[email protected]>
Newsgroups org.kernel.vger.linux-btrfs
Message-ID <[email protected]>
On Thu, Jul 09, 2026 at 03:08:49PM +0930, Qu Wenruo wrote:
> Just to mention, we can workaround the problem, by extracting the real work
> of btrfs_invalidate_folio() into a helper, with a bool parameter to indicate
> if we're called from the writeback path.
> 
> Then we would have a better chance to rever to folio_clear_dirty_for_io(),
> but there could be other things involved.
> So I'm totally fine with the current hot fix, but eventually we will still
> revert back to folio_clear_dirty_for_io(), to align the code to iomap.

This has nothing to do with iomap.  Normally the dirty clearing is done
by the generic code in mm/page-writeback.c.  Gettind btrfs to use that
instead of the horribly outdated forked version would be a really good
thing.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.