Re: [PATCH v2 0/4] btrfs: btrfs: fix possible race between error handling and writeback

David Sterba
2025-08-21T13:52:37Z

On Tue, Aug 19, 2025 at 07:17:28AM +0930, Qu Wenruo wrote:
> 在 2025/8/19 01:18, David Sterba 写道:
> > On Mon, Jul 28, 2025 at 05:57:53PM +0930, Qu Wenruo wrote:
> >> Qu Wenruo (4):
> >> btrfs: rework the error handling of run_delalloc_nocow()
> >> btrfs: enhance error messages for delalloc range failure
> >> btrfs: make nocow_one_range() to do cleanup on error
> >> btrfs: keep folios locked inside run_delalloc_nocow()
> >
> > The patches have been in linux-next for some time, feel free to add them
> > to for-next proper so they can be merged. Related to that, you can
> > remove the cow fixup code in this development cycle if you want.
> >
>
> Unfortunately even with this series applies, I'm still hitting COW fixup
> warning at a very low chance for g/475.
>
> So I'm afraid we're not yet done about all the possible error paths,
> thus no removal of cow fixup yet.

I see. Alternatively the cow fixup can be turned to proper debugging
mechanism so you can still use it to catch bugs but it does not need to
have the whole fixup mechanism. If we can get rid of the fixup worker
kthread it would still be a good incremental step as it's just idling
and consuming rerources.