From patchwork Mon Sep 24 18:31:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 186500 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (unknown [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EB57C2C008D for ; Tue, 25 Sep 2012 04:33:25 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TGDSH-0001bO-Jh; Mon, 24 Sep 2012 18:32:29 +0000 Received: from a.ns.miles-group.at ([95.130.255.143] helo=radon.swed.at) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TGDRi-0001Qt-6R for linux-mtd@lists.infradead.org; Mon, 24 Sep 2012 18:32:00 +0000 Received: (qmail 24440 invoked by uid 89); 24 Sep 2012 20:28:19 -0000 Received: by simscan 1.3.1 ppid: 24262, pid: 24437, t: 0.1283s scanners: attach: 1.3.1 clamav: 0.96.5/m:53 Received: from unknown (HELO localhost.localdomain) (richard@nod.at@212.62.202.73) by radon.swed.at with ESMTPA; 24 Sep 2012 20:28:19 -0000 From: Richard Weinberger To: linux-mtd@lists.infradead.org Subject: [PATCH 10/10] UBI: Wire-up fastmap Date: Mon, 24 Sep 2012 20:31:32 +0200 Message-Id: <1348511492-91606-11-git-send-email-richard@nod.at> X-Mailer: git-send-email 1.7.6.5 In-Reply-To: <1348511492-91606-1-git-send-email-richard@nod.at> References: <1348511492-91606-1-git-send-email-richard@nod.at> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: artem.bityutskiy@linux.intel.com, linux-kernel@vger.kernel.org, Heinz.Egger@linutronix.de, tim.bird@am.sony.com, Richard Weinberger , tglx@linutronix.de X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Make fastmap known to Kconfig, UBI Makefile and MAINTAINERS. Signed-off-by: Richard Weinberger --- MAINTAINERS | 6 ++++++ drivers/mtd/ubi/Kconfig | 20 ++++++++++++++++++++ drivers/mtd/ubi/Makefile | 1 + 3 files changed, 27 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index fdc0119..7bcade0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7075,6 +7075,12 @@ F: drivers/mtd/ubi/ F: include/linux/mtd/ubi.h F: include/mtd/ubi-user.h +UNSORTED BLOCK IMAGES (UBI) Fastmap +M: Richard Weinberger +L: linux-mtd@lists.infradead.org +S: Maintained +F: drivers/mtd/ubi/fastmap.c + USB ACM DRIVER M: Oliver Neukum L: linux-usb@vger.kernel.org diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig index 271a842..3620f91 100644 --- a/drivers/mtd/ubi/Kconfig +++ b/drivers/mtd/ubi/Kconfig @@ -56,6 +56,26 @@ config MTD_UBI_BEB_LIMIT Leave the default value if unsure. +config MTD_UBI_FASTMAP + bool "UBI Fastmap (EXPERIMENTAL)" + depends on EXPERIMENTAL + default n + help + Fastmap is a mechanism which allows attaching an UBI device + in nearly constant time. + Instead of scanning the whole MTD device it only has to locate + a checkpoint (called fastmap) on the device. + The on-flash fastmap contains all information needed to attach + the device. Using fastmap makes only sense on large devices where + attaching by scanning takes long. UBI will not automatically install + a fastmap on old images, but you can set the UBI module parameter + fm_autoconvert to 1 if you want so. Please note that fastmap-enabled + images are still usable with UBI implementations without + fastmap support. On typical flash devices the whole fastmap fits + into one PEB. UBI will reserve PEBs to hold two fastmaps. + + If in doubt, say "N". + config MTD_UBI_GLUEBI tristate "MTD devices emulation driver (gluebi)" help diff --git a/drivers/mtd/ubi/Makefile b/drivers/mtd/ubi/Makefile index a0803ac..7ab19ac 100644 --- a/drivers/mtd/ubi/Makefile +++ b/drivers/mtd/ubi/Makefile @@ -4,3 +4,4 @@ ubi-y += vtbl.o vmt.o upd.o build.o cdev.o kapi.o eba.o io.o wl.o attach.o ubi-y += misc.o debug.o obj-$(CONFIG_MTD_UBI_GLUEBI) += gluebi.o +obj-$(CONFIG_MTD_UBI_FASTMAP) += fastmap.o