[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1581078355-19647-1-git-send-email-liaoweixiong@allwinnertech.com>
Date: Fri, 7 Feb 2020 20:25:44 +0800
From: WeiXiong Liao <liaoweixiong@...winnertech.com>
To: Kees Cook <keescook@...omium.org>,
Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Tony Luck <tony.luck@...el.com>,
Jonathan Corbet <corbet@....net>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Rob Herring <robh@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
WeiXiong Liao <liaoweixiong@...winnertech.com>
Cc: linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mtd@...ts.infradead.org
Subject: [PATCH v2 00/11] pstore: mtd: support crash log to block and mtd device
Why do we need to log to block (mtd) device?
1. Most embedded intelligent equipment have no persistent ram, which
increases costs. We perfer to cheaper solutions, like block devices.
2. Do not any equipment have battery, which means that it lost all data
on general ram if power failure. Pstore has little to do for these
equipments.
Why do we need mtdpstore instead of mtdoops?
1. repetitive jobs between pstore and mtdoops
Both of pstore and mtdoops do the same jobs that store panic/oops log.
2. do what a driver should do
To me, a driver should provide methods instead of policies. What MTD
should do is to provide read/write/erase operations, geting rid of codes
about chunk management, kmsg dumper and configuration.
3. enhanced feature
Not only store log, but also show it as files.
Not only log, but also trigger time and trigger count.
Not only panic/oops log, but also log recorder for pmsg, console and
ftrace in the future.
Before upstream submission, pstore/blk is tested on arch ARM and x84_64,
block device and mtd device, built as modules and in kernel. Here are the
details:
https://github.com/gmpy/articles/blob/master/pstore/Test-Pstore-Block.md
[PATCH v2]:
1. fix syntax error in documents. Thank Randy Dunlap <rdunlap@...radead.org>
2. replace pr_* with dev_* for mtdpstore.
Thank Vignesh Raghavendra <vigneshr@...com>
3. improve mtdpstore. Thank Miquel Raynal <mraynal@...nel.org>
[PATCH v1]:
1. fix errors and warnings reported by kbuild test robot.
WeiXiong Liao (11):
pstore/blk: new support logger for block devices
blkoops: add blkoops, a warpper for pstore/blk
pstore/blk: blkoops: support pmsg recorder
pstore/blk: blkoops: support console recorder
pstore/blk: blkoops: support ftrace recorder
Documentation: pstore/blk: blkoops: create document for pstore_blk
pstore/blk: skip broken zone for mtd device
blkoops: respect for device to pick recorders
pstore/blk: blkoops: support special removing jobs for dmesg.
blkoops: add interface for dirver to get information of blkoops
mtd: new support oops logger based on pstore/blk
Documentation/admin-guide/pstore-block.rst | 306 +++++++
MAINTAINERS | 3 +-
drivers/mtd/Kconfig | 10 +
drivers/mtd/Makefile | 1 +
drivers/mtd/mtdpstore.c | 564 ++++++++++++
fs/pstore/Kconfig | 109 +++
fs/pstore/Makefile | 5 +
fs/pstore/blkoops.c | 475 ++++++++++
fs/pstore/blkzone.c | 1328 ++++++++++++++++++++++++++++
include/linux/blkoops.h | 94 ++
include/linux/pstore_blk.h | 91 ++
11 files changed, 2985 insertions(+), 1 deletion(-)
create mode 100644 Documentation/admin-guide/pstore-block.rst
create mode 100644 drivers/mtd/mtdpstore.c
create mode 100644 fs/pstore/blkoops.c
create mode 100644 fs/pstore/blkzone.c
create mode 100644 include/linux/blkoops.h
create mode 100644 include/linux/pstore_blk.h
--
1.9.1
Powered by blists - more mailing lists