From patchwork Mon Feb 13 21:31:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Oberhollenzer X-Patchwork-Id: 727587 X-Patchwork-Delegate: david.oberhollenzer@sigma-star.at Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vMf3K0Pqmz9s03 for ; Tue, 14 Feb 2017 08:35:09 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="u/xcfu2K"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=QZVjUz1rirJQeJ4BPlvlKCiAu0cUr9E6iV9RcQmpKyg=; b=u/xcfu2KG3Flsv+LBwWEstU1eb vNkSmag8EzUNPSDXiyBYbE+ONn5WAUyg/A/4oE66Li46XzW0A8sPWD79DF499sfnwsrJiWmHdWvAx 93btvTzsvZ3UTgr5Rnw66atv6VeicpLhJqb1YwEJ1YHMK3f73VsxpIC/wrYtGNeY+YHeUh1TpuCS6 nIAigsauxQPdspQ74hyKEr+5wsjZhMLh+Bu5BZ2lmS7Zd22G10zLsInqWhu6FtAadK1Lq3cZoJwVV DAEB+RQQ6ilfQXz60S2m4uFU0Qeuhc0wTmh2lak0z63ex2kT9rE30DkfUu1hfOSCBhhxczzz42og/ hUhVyTeA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cdOH5-0001VQ-5r; Mon, 13 Feb 2017 21:35:07 +0000 Received: from mail.sigma-star.at ([95.130.255.111]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cdOG6-0008LG-59 for linux-mtd@lists.infradead.org; Mon, 13 Feb 2017 21:34:14 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.sigma-star.at (Postfix) with ESMTP id 58C4024E0002; Mon, 13 Feb 2017 22:33:19 +0100 (CET) Received: from arch-laptop.asozial (212-186-42-13.cable.dynamic.surfer.at [212.186.42.13]) by mail.sigma-star.at (Postfix) with ESMTPSA id 8040024E0001; Mon, 13 Feb 2017 22:33:18 +0100 (CET) From: David Oberhollenzer To: linux-mtd@lists.infradead.org Subject: [PATCH 5/5] mtd-www: UBI: Add sections about UBI power-cut testing Date: Mon, 13 Feb 2017 22:31:18 +0100 Message-Id: <20170213213118.7857-6-david.oberhollenzer@sigma-star.at> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170213213118.7857-1-david.oberhollenzer@sigma-star.at> References: <20170213213118.7857-1-david.oberhollenzer@sigma-star.at> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170213_133407_100463_782D5EE3 X-CRM114-Status: GOOD ( 13.30 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: richard@nod.at, dwmw2@infradead.org, David Oberhollenzer MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add remark about UBI power-cut testing and reference in UBIFS section. Signed-off-by: David Oberhollenzer --- doc/ubi.xml | 11 +++++++++++ faq/ubi.xml | 35 +++++++++++++++++++++++++++++++++++ faq/ubifs.xml | 5 +++++ 3 files changed, 51 insertions(+) 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?