[PATCH v7 5/5]: mtdoops: refactor as a kmsg_dumper
Artem Bityutskiy
dedekind1 at gmail.com
Fri Oct 23 00:32:42 EDT 2009
On Thu, 2009-10-15 at 09:48 +0200, Simon Kagstrom wrote:
> The last messages which happens before a crash might contain interesting
> information about the crash. This patch reworks mtdoops using the
> kmsg_dumper support instead of a console, which simplifies the code and
> also includes the messages before the oops started.
>
> On oops callbacks, the MTD device write is scheduled in a work queue (to
> be able to use the regular mtd->write call), while panics call
> mtd->panic_write directly. Thus, if panic_on_oops is set, the oops will
> be written out during the panic.
>
> A parameter to specify which mtd device to use (number or name), as well
> as a flag, writable at runtime, to toggle wheter to dump oopses or only
> panics (since oopses can often be handled by regular syslog).
>
> Signed-off-by: Simon Kagstrom <simon.kagstrom at netinsight.net>
> Reviewed-by: Anders Grafstrom <anders.grafstrom at netinsight.net>
> ---
> ChangeLog:
> * (Vimal Singh) Correct Kconfig instructions on how to load
> the module
> * Correct kfree of unallocated area
> * More descriptive error message on wrong module parameters
> * Rebase against new patch 4 (use container_of instead of private
> pointer)
>
> drivers/mtd/Kconfig | 5 +-
> drivers/mtd/mtdoops.c | 211 ++++++++++++++++++++-----------------------------
> 2 files changed, 88 insertions(+), 128 deletions(-)
Looks good, thanks for doing this. Did you actually test this with
oopses and panics, with and without panic_on_oops?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
More information about the linux-mtd
mailing list