Re: [RFC PATCH] mm/nommu: Implement just enough vmap that compressed erofs can be mounted

From: Pedro Falcato

Date: Wed May 20 2026 - 13:19:07 EST


Hello,

On Thu, May 21, 2026 at 01:34:38AM +0900, Daniel Palmer wrote:
> This implements a very poor imitation of vmap that works just
> enough that compressed erofs filesystems can be mounted on nommu
> machines. Right now compressed erofs filesystems trigger a BUG()
> on nommu due to this missing.
>
> This is awful, doesn't work like real vmap etc,.. but if you
> really cared about stuff working you'd have an MMU I guess?
>
> Signed-off-by: Daniel Palmer <daniel@xxxxxxxxx>
> ---
>
> Did I miss anything massive that is going to come back and bite me?
> Maybe it would have made more sense just to change the erofs
> code so on !CONFIG_MMU it doesn't use vmap?

Yes, I think that would be preferrable. I'm sure[1] it's possible to get
EROFS to not use vmap().

I know your patch took some effort but trying to implement this for nommu
is fundamentally not possible. Like your vmap() "bouncing" is completely
fake and users expecting that the pages are actually shared will have a nasty
surprise.


So, yeah, please see if you can find a way forward for erofs :)

[1] I hope.

--
Pedro