Re: [PATCH 19/19] writeback: simplify writeback iteration

Christoph Hellwig
2024-01-31T13:01:40Z

On Wed, Jan 31, 2024 at 07:50:25AM -0500, Brian Foster wrote:
> The implied field initialization via !folio feels a little wonky to me
> just because it's not clear from the client code that both fields must
> be initialized. Even though the interface is simpler, I wonder if it's
> still worth having a dumb/macro type init function that at least does
> the batch and error field initialization.
>
> Or on second thought maybe having writeback_iter() reset *error as well
> on folio == NULL might be a little cleaner without changing the
> interface....

I like that second idea. An initialization helper I could live with,
but if only folio needs a defined state, that seems superflous.