summaryrefslogtreecommitdiff
path: root/fs/pstore/blk.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/pstore/blk.c')
-rw-r--r--fs/pstore/blk.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/pstore/blk.c b/fs/pstore/blk.c
index a9e7078f08d6..082f6cdaf4bd 100644
--- a/fs/pstore/blk.c
+++ b/fs/pstore/blk.c
@@ -35,6 +35,14 @@ static long pmsg_size = -1;
module_param(pmsg_size, long, 0400);
MODULE_PARM_DESC(pmsg_size, "pmsg size in kbytes");
+#if IS_ENABLED(CONFIG_PSTORE_CONSOLE)
+static long console_size = CONFIG_PSTORE_BLK_CONSOLE_SIZE;
+#else
+static long console_size = -1;
+#endif
+module_param(console_size, long, 0400);
+MODULE_PARM_DESC(console_size, "console size in kbytes");
+
/*
* blkdev - the block device to use for pstore storage
*
@@ -91,7 +99,8 @@ struct bdev_info {
* whole disk).
* On success, the number of bytes should be returned, others
* means error.
- * @write: The same as @read.
+ * @write: The same as @read, but the following error number:
+ * -EBUSY means try to write again later.
* @panic_write:The write operation only used for panic case. It's optional
* if you do not care panic log. The parameters and return value
* are the same as @read.
@@ -142,6 +151,7 @@ static int psblk_register_do(struct pstore_device_info *dev)
verify_size(kmsg_size, 4096, dev->flags & PSTORE_FLAGS_DMESG);
verify_size(pmsg_size, 4096, dev->flags & PSTORE_FLAGS_PMSG);
+ verify_size(console_size, 4096, dev->flags & PSTORE_FLAGS_CONSOLE);
#undef verify_size
pstore_zone_info->total_size = dev->total_size;