Re: [PATCH] page_io: return proper error codes for swap_read_folio_zeromap()

Nhat Pham
2025-03-07T17:03:48Z

On Thu, Mar 6, 2025 at 3:42 PM Yosry Ahmed <yosry.ahmed@linux.dev> wrote:
>
> > + *
> > + * -EINVAL: some of the subpages in the folio are zeromaped, but not all of
> > + * them. This is an error because we don't currently support a large folio
> > + * that is partially in the zeromap. The folio is unlocked, but NOT marked
> > + * up-to-date, so that an IO error is emitted (e.g. do_swap_page() will
> > + * sigbus).
>
> This is a bit repetitive. Maybe:
>
> * -EINVAL: The folio is partially in the zeromap, which is not
> * currently supported. The folio is unlocked, but NOT marked
> * up-to-date, so that an IO error is emitted (e.g. do_swap_page() will
> * sigbus).
>
>
>
> I would drop this whole comment now because it's mostly repeating what's
> now documneted above.
>
> With the comments fixed up:
>
> Reviewed-by: Yosry Ahmed <yosry.ahmed@linux.dev>
>

Ah I like both suggestions :) Gimme one sec to send out a fixlet.

Thanks, Yosry!