Re: [PATCH 4/8] FOLD: block: change the defer in task context interface to be procedural

Matthew Wilcox
2026-04-15T14:30:48Z

On Wed, Apr 15, 2026 at 07:44:07AM +0200, Christoph Hellwig wrote:
> On Fri, Apr 10, 2026 at 02:26:34PM +0100, Matthew Wilcox wrote:
> > > Yes. On the other hand we can actually use it when we don't know if
> > > we need to offload beforehand, which enabls the two later conversions
> > > and probably more.
> >
> > I don't understand why we need to remove _this_ way to defer completions
> > to take context in order to _add_ the ability to defer completions
> > inside the bi_end_io handler.
>
> I don't need to, but we'd better have very strong reasons for two ways
> to do the same thing, and I don't really see it here. But I can give it
> a try if the consensus is that we want to way to do it, and we're not
> worried about people getting the bio-flag one wrong as we could set it
> from ->bi_end_io, but it would not do anything.

I want to make all writebacks complete in task context so we can change
the i_pages.xa_lock from being irq-disabling to a plain spinlock.