Skip to content
  • WeiXiong Liao's avatar
    mtd: Support kmsg dumper based on pstore/blk · 78c08247
    WeiXiong Liao authored
    This introduces mtdpstore, which is similar to mtdoops but more
    powerful. It uses pstore/blk, and aims to store panic and oops logs to
    a flash partition, where pstore can later read back and present as files
    in the mounted pstore filesystem.
    
    To make mtdpstore work, the "blkdev" of pstore/blk should be set
    as MTD device name or MTD device number. For more details, see
    Documentation/admin-guide/pstore-blk.rst
    
    This solves a number of issues:
    - Work duplication: both of pstore and mtdoops do the same job storing
      panic/oops log. They have very similar logic, registering to kmsg
      dumper and storing logs to several chunks one by one.
    - Layer violations: drivers should provides methods instead of polices.
      MTD should provide read/write/erase operations, and allow a higher
      level drivers to provide the chunk management, kmsg dump
      configuration, etc.
    - Missing features: pstore provides many additional features, including
      presenting the logs as files, logging d...
    78c08247
Loading