Re: [PATCH v2 11/11] mtd: new support oops logger based on pstore/blk

From: liaoweixiong
Date: Tue Feb 18 2020 - 20:12:50 EST


hi Miquel Raynal,

On 2020/2/18 äå6:34, Miquel Raynal wrote:
> Hi WeiXiong,
>
> WeiXiong Liao <liaoweixiong@xxxxxxxxxxxxxxxxx> wrote on Fri, 7 Feb
> 2020 20:25:55 +0800:
>
>> It's the last one of a series of patches for adaptive to MTD device.
>>
>> The mtdpstore is similar to mtdoops but more powerful. It bases on
>> pstore/blk, aims to store panic and oops logs to a flash partition,
>> where it can be read back as files after mounting pstore filesystem.
>>
>> The pstore/blk and blkoops, a wrapper for pstore/blk, are designed for
>> block device at the very beginning, but now, compatible to not only
>> block device. After this series of patches, pstore/blk can also work
>> for MTD device. To make it work, 'blkdev' on kconfig or module
>> parameter of blkoops should be set as mtd device name or mtd number.
>> See more about pstore/blk and blkoops on:
>> Documentation/admin-guide/pstore-block.rst
>>
>> Why do we need mtdpstore?
>> 1. repetitive jobs between pstore and mtdoops
>> Both of pstore and mtdoops do the same jobs that store panic/oops log.
>> They have much similar logic that register to kmsg dumper and store
>> log to several chunks one by one.
>> 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.
>>
>> Signed-off-by: WeiXiong Liao <liaoweixiong@xxxxxxxxxxxxxxxxx>
>
> Acked-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
>
> Richard, your PoV on this is welcome.
>
> I suppose this patch depends on the others to work correctly so maybe
> we should wait the next release before applying it.
>

Of couse, thank you for your review

> Thanks,
> MiquÃl
>

--
liaoweixiong