Re: [v5 PATCH 14/14] ubifs: Pass folios to acomp

Herbert Xu
2025-03-19T09:56:02Z

On Wed, Mar 19, 2025 at 05:44:17PM +0800, Zhihao Cheng wrote:
>
> Tested-by: Zhihao Cheng <chengzhihao1@huawei.com> # For xfstests

Thank you for testing!

> >
> > diff --git a/fs/ubifs/compress.c b/fs/ubifs/compress.c
> > index a241ba01c9a8..ea6f06adcd43 100644
> > --- a/fs/ubifs/compress.c
> > +++ b/fs/ubifs/compress.c
> > @@ -16,6 +16,7 @@
> > */
> > #include <crypto/acompress.h>
> > +#include <linux/highmem.h>
> > #include "ubifs.h"
> > /* Fake description object for the "none" compressor */
> > @@ -126,7 +127,7 @@ void ubifs_compress(const struct ubifs_info *c, const void *in_buf,
> > {
> > ACOMP_REQUEST_ALLOC(req, compr->cc, GFP_NOFS | __GFP_NOWARN);
> > - acomp_request_set_src_nondma(req, in_buf, in_len);
> > + acomp_request_set_src_dma(req, in_buf, in_len);
>
> Why not merging it into patch 13?

Because it will break without this patch. If the input is a highmem
folio it cannot be directly passed over to DMA (because the virtual
address has been remapped by kmap_local).

Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt