pstore/zone: Remove redundant check for total size
PATCH 1/3 pstore/zone: Remove redundant check for total size
From: Zhenguo Zhao <[email protected]>
The macro check_size contains 4096 size check for total size.
check_size(total_size, 4096)
Signed-off-by Zhenguo Zhao <[email protected]>
--- fs/pstore/zone.c | 4 ---- 1 file changed, 4 deletions(-)
fs/pstore/zone.c +0 -4
@@ -1295,10 +1295,6 @@ int register_pstore_zone(struct pstore_zone_info *info)int err = -EINVAL ;struct psz_context *cxt = &pstore_zone_cxt; -if (info->total_size <4096 ) { -pr_warn ("total_size must be >= 4096\n" ); -return -EINVAL ; - }if (info->total_size >SZ_128M ) {pr_warn ("capping size to 128MiB\n" ); info->total_size =SZ_128M ;
Signature · 1 line
1.9.1
PATCH 2/3 pstore: Add pstore back-end choice method in kconfig
From: Zhenguo Zhao <[email protected]>
The pstore has one storage device for back-end,so it should be use choice method to config.
When ramoops config,insmod pstore_blk.ko,it will print unexpected,the module will insmod failed.
if (backend && strcmp(backend, psi->name)) {
pr_warn("ignoring unexpected backend '%s'\n", psi->name);
return -EPERM;
}Signed-off-by Zhenguo Zhao <[email protected]>
--- fs/pstore/Kconfig | 57 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 26 deletions(-)
fs/pstore/Kconfig +31 -26
@@ -146,21 +146,40 @@ config PSTORE_FTRACE If unsure, say N. -config PSTORE_RAM - tristate "Log panic/oops to a RAM buffer" +choice + prompt "Choice pstore device" depends on PSTORE - depends on HAS_IOMEM - select REED_SOLOMON - select REED_SOLOMON_ENC8 - select REED_SOLOMON_DEC8 + default PSTORE_RAM help - This enables panic and oops messages to be logged to a circular - buffer in RAM where it can be read back at some later point. - - Note that for historical reasons, the module will be named - "ramoops.ko". + This option chooses ram or blk to use pstore device. + config PSTORE_RAM + tristate "Log panic/oops to a RAM buffer" + depends on HAS_IOMEM + select REED_SOLOMON + select REED_SOLOMON_ENC8 + select REED_SOLOMON_DEC8 + help + This enables panic and oops messages to be logged to a circular + buffer in RAM where it can be read back at some later point. + + Note that for historical reasons, the module will be named + "ramoops.ko". + + For more information, see Documentation/admin-guide/ramoops.rst. + + config PSTORE_BLK + tristate "Log panic/oops to a block device" + depends on BLOCK + select PSTORE_ZONE + help + This enables panic and oops message to be logged to a block dev + where it can be read back at some later point. + + For more information, see Documentation/admin-guide/pstore-blk.rst + + If unsure, say N. - For more information, see Documentation/admin-guide/ramoops.rst. +endchoice config PSTORE_ZONE tristate
@@ -169,20 +188,6 @@ config PSTORE_ZONE The common layer for pstore/blk (and pstore/ram in the future) to manage storage in zones. -config PSTORE_BLK - tristate "Log panic/oops to a block device" - depends on PSTORE - depends on BLOCK - select PSTORE_ZONE - default n - help - This enables panic and oops message to be logged to a block dev - where it can be read back at some later point. - - For more information, see Documentation/admin-guide/pstore-blk.rst - - If unsure, say N. - config PSTORE_BLK_BLKDEV string "block device identifier" depends on PSTORE_BLK
Signature · 1 line
1.9.1
PATCH 3/3 pstore: Modify kconfig to align text
In reply to Zhenguo ZhaoFrom: Zhenguo Zhao <[email protected]>
Modify kconfig help for text consistency
Signed-off-by Zhenguo Zhao <[email protected]>
--- fs/pstore/Kconfig | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
fs/pstore/Kconfig +9 -9
@@ -4,15 +4,15 @@ config PSTORE select CRYPTO if PSTORE_COMPRESS default n help - This option enables generic access to platform level - persistent storage via "pstore" filesystem that can - be mounted as /dev/pstore. Only useful if you have - a platform level driver that registers with pstore to - provide the data, so you probably should just go say "Y" - (or "M") to a platform specific persistent store driver - (e.g. ACPI_APEI on X86) which will select this for you. - If you don't have a platform persistent store driver, - say N. + This option enables generic access to platform level + persistent storage via "pstore" filesystem that can + be mounted as /dev/pstore. Only useful if you have + a platform level driver that registers with pstore to + provide the data, so you probably should just go say "Y" + (or "M") to a platform specific persistent store driver + (e.g. ACPI_APEI on X86) which will select this for you. + If you don't have a platform persistent store driver, + say N. config PSTORE_DEFAULT_KMSG_BYTES int "Default kernel log storage space" if EXPERT
Signature · 1 line
1.9.1