Re: [PATCH v7 16/19] iomap: Add done_before argument to iomap_dio_rw

From: Linus Torvalds
Date: Thu Sep 09 2021 - 13:23:20 EST


On Thu, Sep 9, 2021 at 4:31 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
>
> What about just passing done_before as an argument to
> iomap_dio_complete? gfs2 would have to switch to __iomap_dio_rw +
> iomap_dio_complete instead of iomap_dio_rw for that, and it obviously
> won't work for async completions, but you force sync in this case
> anyway, right?

I think you misunderstand.

Or maybe I do.

It very much doesn't force sync in this case. It did the *first* part
of it synchronously, but then it wants to continue with that async
part for the rest, and very much do that async completion.

And that's why it wants to add that "I already did X much of the
work", exactly so that the async completion can report the full end
result.

But maybe now it's me who is misunderstanding.

Linus