Re: MTD: Lots of mtdblock warnings on bootup logs

From: Bjørn Mork
Date: Wed Jul 12 2023 - 10:40:11 EST


Pintu Agarwal <pintu.ping@xxxxxxxxx> writes:

> Kernel: 5.15 ; arm64 ; NAND + ubi + squashfs
> We have some RAW partitions and one UBI partition (with ubifs/squashfs volumes).
>
> We are seeing large numbers of these logs on the serial console that
> impact the boot time.
> [....]
> [ 9.667240][ T9] Creating 58 MTD partitions on "1c98000.nand":
> [....]
> [ 39.975707][ T519] mtdblock: MTD device 'uefi_a' is NAND, please
> consider using UBI block devices instead.
> [ 39.975707][ T519] mtdblock: MTD device 'uefi_b' is NAND, please
> consider using UBI block devices instead.
> [....]
>
> This was added as part of this commit:
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/mtd/mtdblock.c?h=v5.15.120&id=f41c9418c5898c01634675150696da290fb86796
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/mtd/mtdblock.c?h=v5.15.120&id=e07403a8c6be01857ff75060b2df9a1aa8320fe5

You have 5.15.what exactly? commit f41c9418c5898 was added in v5.15.46.
Your log looks like it is missing.

FWIW, commit f41c9418c5898 was supposed to fix exactly that problem with
commit e07403a8c6be01.

But to catch actual mounts it will still warn if the mtdblock device is
opened. This can obviously cause false positives if you e.g have some
script reading from the mtdblock devices. If you are running v5.15.46 or
later then there *is* something accessing those devices. You'll have to
figure out what it is and stop it to avoid the warning.


Bjørn