alistair23-linux/fs/pstore
WeiXiong Liao 17639f67c1 pstore/blk: Introduce backend for block devices
pstore/blk is similar to pstore/ram, but uses a block device as the
storage rather than persistent ram.

The pstore/blk backend solves two common use-cases that used to preclude
using pstore/ram:
- not all devices have a battery that could be used to persist
  regular RAM across power failures.
- most embedded intelligent equipment have no persistent ram, which
  increases costs, instead preferring cheaper solutions, like block
  devices.

pstore/blk provides separate configurations for the end user and for the
block drivers. User configuration determines how pstore/blk operates, such
as record sizes, max kmsg dump reasons, etc. These can be set by Kconfig
and/or module parameters, but module parameter have priority over Kconfig.
Driver configuration covers all the details about the target block device,
such as total size of the device and how to perform read/write operations.
These are provided by block drivers, calling pstore_register_blkdev(),
including an optional panic_write callback used to bypass regular IO
APIs in an effort to avoid potentially destabilized kernel code during
a panic.

Signed-off-by: WeiXiong Liao <liaoweixiong@allwinnertech.com>
Link: https://lore.kernel.org/lkml/20200511233229.27745-3-keescook@chromium.org/
Co-developed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
2020-05-30 10:34:03 -07:00
..
blk.c pstore/blk: Introduce backend for block devices 2020-05-30 10:34:03 -07:00
ftrace.c pstore/ftrace: Provide ftrace log merging routine 2020-05-30 10:34:02 -07:00
inode.c pstore: Remove filesystem records when backend is unregistered 2020-05-30 10:34:02 -07:00
internal.h pstore/ftrace: Provide ftrace log merging routine 2020-05-30 10:34:02 -07:00
Kconfig pstore/blk: Introduce backend for block devices 2020-05-30 10:34:03 -07:00
Makefile pstore/blk: Introduce backend for block devices 2020-05-30 10:34:03 -07:00
platform.c pstore/platform: Pass max_reason to kmesg dump 2020-05-30 10:34:03 -07:00
pmsg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
ram.c pstore/ram: Introduce max_reason and convert dump_oops 2020-05-30 10:34:03 -07:00
ram_core.c pstore/ram: Replace zero-length array with flexible-array member 2020-03-09 14:45:40 -07:00
zone.c pstore/zone: Introduce common layer to manage storage zones 2020-05-30 10:34:03 -07:00