[PATCH v4 0/3]: mtdoops fixes and improvements

Simon Kagstrom simon.kagstrom at netinsight.net
Mon Oct 12 07:06:35 EDT 2009


Hi!

Here are a couple of patches to mtdoops which I've been working on for
a while. They should be applied on top of Aaros fix for panic_on_oops.
That one technically breaks building mtdoops as a module, so I sent a
patch to LKML which exports panic_on_oops:

  http://patchwork.kernel.org/patch/52505/

(Artem has also sent the same patch). The patches here are:

1. Avoid erasing already empty areas (the area would be erased at each
   module load otherwise)

2. Keep track of mtdoops page cleanliness in an array. This allows
   mtdoops_inc_counter to be called during panic (which fails in my
   case, although I believe this is MTD-driver dependent).

3. Make page size configurable to support longer messages. Mainly
   needed for patch 3, but also allows longer messages to be stored
   during panics (when the next oops area cannot be erased).

4. Store all kernel messages in a circular buffer. This changes the
   behavior of mtdoops a bit by constantly recording messages (not only
   on oopses), which are written out on oopses and panics.

   The code is changed to register a panic handler which calls the
   write function, and on normal oopses scheduling a write work to
   store the buffer.

ChangeLog:

v2:
  * Patches have been reordered to keep the least controversial (?) first.

  * Implement Artems suggestion to keep cleanliness in an array

  * Use Aaros patch to fix the panic_on_oops problem

v3:

  * Correct checkpatch issues

v4: Review corrections

  * Rebase on top of "[PATCH] mtd: mtdoops: several minor cleanups"

  * Patch 1 has been added

  * Use 1 bit per oops page, and rename clean/dirty unused/used

  * Don't initialize oops_page_dirty (it's a global structure anyway so
    it will be cleared together with the rest of BSS)

  * Rename mtdoops_page_size record_size (although only for the page
    size setting)



More information about the linux-mtd mailing list