Re: [PATCH v4] mm/zswap: store <PAGE_SIZE compression failed page as-is
From: Barry Song
Date: Fri Aug 22 2025 - 03:30:29 EST
On Fri, Aug 22, 2025 at 1:54 PM Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Aug 22, 2025 at 12:48:27PM +1200, Barry Song wrote:
> >
> > Is it even possible for crypto_wait_req() to return -EINPROGRESS, since
> > crypto_req_done() will not call complete(&wait->completion) in that case at
> > all?
>
> Of course crypto_wait_req cannot return -EINPROGRESS. However,
> I was responding to a request to make the crypto_acomp_compress
> call return a boolean instead of an error code. That is not
> possible because it has to be able to return -EINPROGRESS.
>
> Nor is it possible to change crypto_wait_req to be boolean since
> other Crypto API operations (including decompression) can indeed
> fail.
>
Ok. zswap only cares about the return value of crypto_wait_req(),
not crypto_acomp_compress(). So it’s clear now—any error return
means the page is incompressible.
Thanks
Barry