From: David Oberhollenzer Date: Mon, 13 Feb 2017 21:31:18 +0000 (+0100) Subject: mtd-www: UBI: Add sections about UBI power-cut testing X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=59f7644b1f28e6a8abac0dbad5970d0f18b1adbb;p=mtd-www.git mtd-www: UBI: Add sections about UBI power-cut testing Add remark about UBI power-cut testing and reference in UBIFS section. Signed-off-by: David Oberhollenzer --- diff --git a/doc/ubi.xml b/doc/ubi.xml index 3192fbc..299b0f1 100644 --- a/doc/ubi.xml +++ b/doc/ubi.xml @@ -15,6 +15,7 @@
  1. Big red note
  2. Overview
  3. +
  4. Power-cuts tolerance
  5. Source code
  6. Mailing list
  7. User-space tools
  8. @@ -188,6 +189,16 @@ technology imposes.

    +

    Power-cuts tolerance

    + +

    Both UBI and UBIFS are designed with tolerance to power-cuts in mind.

    + +

    UBI has an internal debugging infrastructure that can emulate power +failures for testing. The advantage of the emulation is that it emulates +power failures at the critical points where control data structures are +written to the device whereas the probability of interrupting the system at +those precise moments with physical power cut testing is rather low.

    +

    Source code

    UBI is in the main-line Linux kernel starting from version diff --git a/faq/ubi.xml b/faq/ubi.xml index f8c40f6..fdd7abb 100644 --- a/faq/ubi.xml +++ b/faq/ubi.xml @@ -898,6 +898,41 @@ similar, just a bit simpler. Here is a similar table for UBI.

    +

    Power-cut recovery testing

    + +

    UBI suppors power-cut emulation for testing which emulates power-cuts after +a random number of writes. When a power-cut is emulated, UBI switches to +read-only mode and disallows any further write to the UBI volume, thus +emulating a power cut. The main idea of this mode is to emulate power cuts in +interesting places, e.g. when writing the vid header.

    + +

    Use the tst_emulate_power_cut debugfs file to set flags for +when to enable power-cut emulation. Possible flags for power-cut testing +can be seen in the table below.

    + +

    Use the files tst_emulate_power_cut_min and +tst_emulate_power_cut_max to set the minimum and maximum number +of successful writes, respectively, before a power-cut is emulated.

    + +

    Note that UBIFS has its own power-cut emulation functions. Please, refere +to the corresponding +Power-cut recovery testing +section.

    + + + + + + + + + + + + + + +
    Emulation typeFlag value
    Allow power-cut to be emulated during EC header write1
    Allow power-cut to be emulated during VID header write2

    How do I send an UBI bug report?

    diff --git a/faq/ubifs.xml b/faq/ubifs.xml index 2b724f3..e223ee4 100644 --- a/faq/ubifs.xml +++ b/faq/ubifs.xml @@ -1405,6 +1405,11 @@ the ro_error file.

    repository) is aware of UBIFS power cut recovery testing mode and can be used for UBIFS power-cut testing.

    +

    Note that UBI also supports power-cut emulation for UBI testing. Please, +refere to the corresponding +Power-cut recovery testing +section.

    +

    How do I send an UBIFS bug report?