From: "Bjørn Mork" <bjorn@mork.no>
To: <Tudor.Ambarus@microchip.com>
Cc: <miquel.raynal@bootlin.com>, <ezequiel@vanguardiasur.com.ar>,
<richard@nod.at>, <vigneshr@ti.com>,
<linux-mtd@lists.infradead.org>
Subject: Re: [PATCH] mtdblock: warn if opened on NAND
Date: Thu, 21 Apr 2022 18:43:02 +0200 [thread overview]
Message-ID: <877d7io0a1.fsf@miraculix.mork.no> (raw)
In-Reply-To: <c98f728f-2fef-6174-714e-0d31ebe4c43c@microchip.com> (Tudor Ambarus's message of "Thu, 21 Apr 2022 14:27:47 +0000")
<Tudor.Ambarus@microchip.com> writes:
> I don't see this as a fix, you just mask out the warning, you assume
> that mtdblock is not used
No, I don't. No real warnings are masked. Only bogus warnings.
I make no assumption about mtdblock usage. I moved the warning to open()
so that the driver complains when a NAND mtdblock partition is mounted.
I am sure this does happen from time to time, and agree 100% that a
warning is appropriate in those cases.
Commit e07403a8c6be is based on two false assumptions:
1) the presence of the mtdblock driver is a problem
2) all partitions will be mounted as mtdblock devices
Extensive log noise is a problem for end users. We can obviously argue
if it is a bug or not. I claim that it is because real warnings drown
in the noise, making real bugs much harder to spot.
> but you still keep it in your config, which
> is wrong. You should instead update your config, remove mtdblock, and
> fix the cause if it's possible.
So if you have a device with both NOR and NAND flash, then what? Not
that unusual.
>> start noticing now that OpenWrt is moving to 5.15. As you may or
>> not know, OpenWrt unconditionally includes mtdblock whether the
>> target is NAND or NOR. So this will cause lots of noise on any
>
> Why does Openwrt include mtdblock?
I don't know and I don't speak for OpenWrt, being only an end user. But
I assume it's because OpenWrt builds semi-generic images for both NOR
and NAND devices, as well as devices with both flash types. They are
also trying to maintain flash layout compatibillty with OEM firmware,
which often does really stupid things.
Sure, OpenWrt could probably strip mtdblock from NAND only devices. But
I guess the priority is low since it doesn't fix any problem, and it
will complicate their build slightly. I'm sure patches are welcome
though.
> I have encountered these messages in some configs that I'm using and I
> ended up cleaning them. These messages helped me identify the problem and
> ultimately to fix it. Let's give others the chance to do the same.
Others will still get the warning iff there is a problem.
The fix is to prevent warnings when there isn't one. If you warn 200
times (which IMHO is a low estimate here) for every real problem, then
no one will care in the end. "Oh, it's just mtdblock whining again. It
does that all the time"
Bjørn
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2022-04-21 16:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-28 16:11 [PATCH] mtdblock: warn if opened on NAND Bjørn Mork
2022-04-02 21:25 ` Ezequiel Garcia
2022-04-21 14:27 ` Tudor.Ambarus
2022-04-21 16:43 ` Bjørn Mork [this message]
2022-04-22 6:25 ` Tudor.Ambarus
2022-04-22 6:38 ` Bjørn Mork
2022-04-22 9:03 ` Miquel Raynal
2022-04-22 16:07 ` Ezequiel Garcia
2022-04-26 7:37 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877d7io0a1.fsf@miraculix.mork.no \
--to=bjorn@mork.no \
--cc=Tudor.Ambarus@microchip.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox