linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] UBI: Fastmap: Fall back to scanning mode after ECC error
@ 2015-03-26 20:43 Richard Weinberger
  2015-03-29 10:49 ` Richard Weinberger
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Weinberger @ 2015-03-26 20:43 UTC (permalink / raw)
  To: linux-mtd; +Cc: Richard Weinberger, linux-kernel

If we encounter an uncorrectable ECC error while scanning for the fastmap
UBI must not fail hard. Instead fall back to scanning mode.

Reported-by: Alexander Block <Alexander.Block@continental-corporation.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
---
 drivers/mtd/ubi/attach.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index 9bc70eb..c1039d9 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -1419,7 +1419,7 @@ int ubi_attach(struct ubi_device *ubi, int force_scan)
 		err = scan_all(ubi, ai, 0);
 	else {
 		err = scan_fast(ubi, &ai);
-		if (err > 0) {
+		if (err > 0 || mtd_is_eccerr(err)) {
 			if (err != UBI_NO_FASTMAP) {
 				destroy_ai(ai);
 				ai = alloc_ai();
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] UBI: Fastmap: Fall back to scanning mode after ECC error
  2015-03-26 20:43 [PATCH] UBI: Fastmap: Fall back to scanning mode after ECC error Richard Weinberger
@ 2015-03-29 10:49 ` Richard Weinberger
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Weinberger @ 2015-03-29 10:49 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: linux-mtd@lists.infradead.org, LKML, Alexander.Block

On Thu, Mar 26, 2015 at 9:43 PM, Richard Weinberger <richard@nod.at> wrote:
> If we encounter an uncorrectable ECC error while scanning for the fastmap
> UBI must not fail hard. Instead fall back to scanning mode.
>
> Reported-by: Alexander Block <Alexander.Block@continental-corporation.com>
> Signed-off-by: Richard Weinberger <richard@nod.at>

Pushed to linux-ubifs.git/master.

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-29 10:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26 20:43 [PATCH] UBI: Fastmap: Fall back to scanning mode after ECC error Richard Weinberger
2015-03-29 10:49 ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).