linux/drivers/mtd
Seiji Aguchi fc2d557c74 kmsg_dump: constrain mtdoops and ramoops to perform their actions only for KMSG_DUMP_PANIC
This series aims to develop logging facility for enterprise use.

It is important to save kernel messages reliably on enterprise system
because they are helpful for diagnosing system.

This series add kmsg_dump() to the paths loosing kernel messages.  The use
case is the following.

[Use case of reboot/poweroff/halt/emergency_restart]

 My company has often experienced the followings in our support service.
 - Customer's system suddenly reboots.
 - Customers ask us to investigate the reason of the reboot.

We recognize the fact itself because boot messages remain in
/var/log/messages.  However, we can't investigate the reason why the
system rebooted, because the last messages don't remain.  And off course
we can't explain the reason.

We can solve above problem with this patch as follows.

 Case1: reboot with command
   - We can see "Restarting system with command:" or ""Restarting system.".

 Case2: halt with command
   - We can see "System halted.".

 Case3: poweroff with command
   - We can see " Power down.".

 Case4: emergency_restart with sysrq.
   - We can see "Sysrq:" outputted in __handle_sysrq().

 Case5: emergency_restart with softdog.
   - We can see "Initiating system reboot" in watchdog_fire().

So, we can distinguish the reason of reboot, poweroff, halt and emergency_restart.

If customer executed reboot command, you may think the customer should
know the fact.  However, they often claim they don't execute the command
when they rebooted system by mistake.

No message remains on the current Linux kernel, so we can't show the proof
to the customer.  This patch improves this situation.

This patch:

Alters mtdoops and ramoops to perform their actions only for
KMSG_DUMP_PANIC, KMSG_DUMP_OOPS and KMSG_DUMP_KEXEC because they would
like to log crashes only.

Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Marco Stornelli <marco.stornelli@gmail.com>
Reviewed-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-13 08:03:07 -08:00
..
chips Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2010-10-30 12:35:11 +01:00
devices mtd: fix build error in m25p80.c 2010-10-30 12:46:08 +01:00
lpddr
maps of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF 2011-01-03 14:08:18 -07:00
nand omap: nand: remove hardware ECC as default 2010-12-06 16:00:08 -08:00
onenand OMAP2/3: OneNAND: add 104MHz support 2010-12-21 12:05:34 -08:00
tests
ubi UBI: fix corrupted PEB detection for NOR flash 2010-12-03 15:49:21 +02:00
afs.c
ar7part.c
cmdlinepart.c
ftl.c
inftlcore.c
inftlmount.c
Kconfig of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF 2011-01-03 14:08:18 -07:00
Makefile
mtd_blkdevs.c mtd: Remove redundant mutex from mtd_blkdevs.c 2010-10-30 12:39:21 +01:00
mtdblock_ro.c
mtdblock.c
mtdchar.c fs: scale mntget/mntput 2011-01-07 17:50:33 +11:00
mtdconcat.c
mtdcore.c
mtdcore.h
mtdoops.c kmsg_dump: constrain mtdoops and ramoops to perform their actions only for KMSG_DUMP_PANIC 2011-01-13 08:03:07 -08:00
mtdpart.c
mtdsuper.c convert get_sb_mtd() users to ->mount() 2010-10-29 04:16:26 -04:00
nftlcore.c
nftlmount.c
ofpart.c
redboot.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c