Skip to content

Commit 07bdc07

Browse files
committed
Merge tag 'pstore-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull pstore updates from Kees Cook: "Use normal block device I/O path for pstore/blk. (Christoph Hellwig, Kees Cook, Pu Lehui)" * tag 'pstore-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore/blk: Include zone in pstore_device_info pstore/blk: Fix kerndoc and redundancy on blkdev param pstore/blk: Use the normal block device I/O path pstore/blk: Move verify_size() macro out of function pstore/blk: Improve failure reporting
2 parents 616ea5c + 1d1f6cc commit 07bdc07

File tree

4 files changed

+171
-283
lines changed

4 files changed

+171
-283
lines changed

Documentation/admin-guide/pstore-blk.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,18 @@ blkdev
4545
The block device to use. Most of the time, it is a partition of block device.
4646
It's required for pstore/blk. It is also used for MTD device.
4747

48-
It accepts the following variants for block device:
48+
When pstore/blk is built as a module, "blkdev" accepts the following variants:
4949

50-
1. <hex_major><hex_minor> device number in hexadecimal represents itself; no
51-
leading 0x, for example b302.
52-
#. /dev/<disk_name> represents the device number of disk
50+
1. /dev/<disk_name> represents the device number of disk
5351
#. /dev/<disk_name><decimal> represents the device number of partition - device
5452
number of disk plus the partition number
5553
#. /dev/<disk_name>p<decimal> - same as the above; this form is used when disk
5654
name of partitioned disk ends with a digit.
55+
56+
When pstore/blk is built into the kernel, "blkdev" accepts the following variants:
57+
58+
#. <hex_major><hex_minor> device number in hexadecimal representation,
59+
with no leading 0x, for example b302.
5760
#. PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF represents the unique id of
5861
a partition if the partition table provides it. The UUID may be either an
5962
EFI/GPT UUID, or refer to an MSDOS partition using the format SSSSSSSS-PP,
@@ -227,8 +230,5 @@ For developer reference, here are all the important structures and APIs:
227230
.. kernel-doc:: include/linux/pstore_zone.h
228231
:internal:
229232

230-
.. kernel-doc:: fs/pstore/blk.c
231-
:internal:
232-
233233
.. kernel-doc:: include/linux/pstore_blk.h
234234
:internal:

drivers/mtd/mtdpstore.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,13 +423,13 @@ static void mtdpstore_notify_add(struct mtd_info *mtd)
423423
longcnt = BITS_TO_LONGS(div_u64(mtd->size, mtd->erasesize));
424424
cxt->badmap = kcalloc(longcnt, sizeof(long), GFP_KERNEL);
425425

426-
cxt->dev.total_size = mtd->size;
427426
/* just support dmesg right now */
428427
cxt->dev.flags = PSTORE_FLAGS_DMESG;
429-
cxt->dev.read = mtdpstore_read;
430-
cxt->dev.write = mtdpstore_write;
431-
cxt->dev.erase = mtdpstore_erase;
432-
cxt->dev.panic_write = mtdpstore_panic_write;
428+
cxt->dev.zone.read = mtdpstore_read;
429+
cxt->dev.zone.write = mtdpstore_write;
430+
cxt->dev.zone.erase = mtdpstore_erase;
431+
cxt->dev.zone.panic_write = mtdpstore_panic_write;
432+
cxt->dev.zone.total_size = mtd->size;
433433

434434
ret = register_pstore_device(&cxt->dev);
435435
if (ret) {

0 commit comments

Comments
 (0)