Re: [PATCH v3] erofs: cap LZMA stream pool size

From: Guenter Roeck

Date: Fri Aug 14 2026 - 15:08:13 EST


On 8/14/26 11:50, Gao Xiang wrote:
On Fri, Aug 14, 2026 at 11:44:31AM -0700, Guenter Roeck wrote:
On 8/14/26 11:26, Gao Xiang wrote:
Hi Guenter,

On Wed, Aug 12, 2026 at 07:25:50AM -0700, Guenter Roeck wrote:

...


Thank you, that seems to work (despite still seeing the warning on m68k,
as NR_CPUS does not exist).


...


$ make ARCH=m68k allmodconfig
fs/erofs/Kconfig:137:warning: range is invalid

Warning...


Yes, other arches shouldn't have the warning because I think other
arches (including microblaze) defines NR_CPUS in Kconfig, except m68k.


That is not entirely true. openrisc only has it if SMP=y. But it still
does not generate the warning for some reason.


I looked into the documentation a bit
(https://docs.kernel.org/kbuild/kconfig-language.html), especially the
following parts:

- type definition: “bool”/”tristate”/”string”/”hex”/”int” ...
- input prompt: “prompt” <prompt> [“if” <expr>] ...
and "If a prompt is not present, the config option is
a non-visible symbol, ..."

- dependencies: “depends on” <expr> [“if” <expr>] ...
- Menu dependencies ..

and I think that is true, taking openrisc for example:

config NR_CPUS
int "Maximum number of CPUs (2-32)"
range 2 32
depends on SMP
default "2"

which can be transformed into

config NR_CPUS
int
prompt "Maximum number of CPUs (2-32)"
range 2 32
depends on SMP
default "2"

which can be then transformed into

config NR_CPUS
int
prompt "Maximum number of CPUs (2-32)" if SMP
range 2 32 if SMP
default "2" if SMP

so if `SMP=n`, it's equivalent to

config NR_CPUS
int

so NR_CPUS symbol is still there I think (and its value is 0.)

$ grep NR_CPUS .config
CONFIG_FORCE_NR_CPUS=y
$ grep EROFS .config
CONFIG_EROFS_FS=y
# CONFIG_EROFS_FS_DEBUG is not set
CONFIG_EROFS_FS_XATTR=y
CONFIG_EROFS_FS_POSIX_ACL=y
CONFIG_EROFS_FS_SECURITY=y
CONFIG_EROFS_FS_BACKED_BY_FILE=y
CONFIG_EROFS_FS_ZIP=y
CONFIG_EROFS_FS_ZIP_LZMA=y
CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS=0
# CONFIG_EROFS_FS_ZIP_DEFLATE is not set
# CONFIG_EROFS_FS_ZIP_ZSTD is not set
# CONFIG_EROFS_FS_ZIP_ACCEL is not set
# CONFIG_EROFS_FS_PCPU_KTHREAD is not set
# CONFIG_EROFS_FS_PAGE_CACHE_SHARE is not set

The symbol may be there internally, but it does not show up in .config.

As I said, the documentation:

If a prompt is not present, the config option is
a non-visible symbol, meaning its value cannot be
directly changed by the user (such as altering the
value in .config) and the option will not appear in
any config menus.

So It think it's expected, and any config X like
this won't be shown in .config:

config X
int


Ah, yes, that makes sense.

Thanks,
Guenter