Re: [PATCH v4] mm/zswap: store <PAGE_SIZE compression failed page as-is
From: Herbert Xu
Date: Tue Aug 19 2025 - 21:21:16 EST
On Wed, Aug 20, 2025 at 01:13:13PM +1200, Barry Song wrote:
>
> Let’s sync with Herbert: have we reached the stage where all drivers
> reliably return -ENOSPC when dst_buf is PAGE_SIZE but the compressed
> size would exceed it?
It doesn't matter. Software compression should never fail, and
if it does fail due to a bug, that's not something that the user
of the API should worry about.
Hardware compression should always fall back to software compression
in case of failure.
IOW all compression errors should be treated as incompressible
data.
Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt