Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2665609ybf; Mon, 2 Mar 2020 13:16:18 -0800 (PST) X-Google-Smtp-Source: ADFU+vt3EEzDc7oqM4f1oGtXZmFnrG9e1HT7pyrTAN/bLJTrkJNUEOYVFKqEWxiGYt0sIMamPHJZ X-Received: by 2002:a9d:6058:: with SMTP id v24mr806577otj.115.1583183777911; Mon, 02 Mar 2020 13:16:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583183777; cv=none; d=google.com; s=arc-20160816; b=JnEFFPt1DNaqQdaZ72RkYJZlq/qbiHkW571dlNL2hnMQZkY7ddRsZZEqA6sYvCwf/x dF3eJzBxyBQLCcNksQMzbakgzISfME0vH4Y8KFmR62kKB3Lb1Of2ZTR4yIDodazhNTMx t2csifoEdfMNLFdkdxZ0/ZLujmBtvdBbq0C83lYMRq5/rj9Enor7eoGSAYcPlM5rxx+e dQxp6viyzOGj1A//SM/ghjq2UsxUb+2gmB9hmwKiQ8b0GIjowK2H5mhUIbTykQAzfCm8 SPjA17dz/zqV5o8H7wstgoJ8R14hAAdSdQaxO9VQ7N4f8zUNnFUEhUtajHYT5zaeDf6m W5iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=5matOJha1/pSHqpUD5pSs/+tLZfS/76GQlE2SX6b0M0=; b=tEt3Z4uWWSdM2wZE23C3fVx+LsKXK3HtD1lgfAyJu/fbS7jLxItWvkBDaek6mVndoS FIL3DGLRDDVovwhxWVXeIOIRhCQDGDyTzIbulzagFE587dIMSpP4rbhNJWFevn77HlZv vTn3xRp3GKvUY3RhGfWKwFwbf/S3S0BIQdmBEyJ1viTbOQY1QfiWmD16dtHDxFWLuuSr 8upWvAFZVmMqrpNt+8iNRDdj1jQA2YgwTSGp70+gpspsGz7qo9JR/xGSD6ahVwEEfuZK O1YHUq1a0+h5kTX3yaAeUyWysWp8GFU+o+sVOsHLWs4qghOV4W/s5kJke1EUc1hTsQ0P /ZQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WLQ1bbKd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2si527003oib.9.2020.03.02.13.16.00; Mon, 02 Mar 2020 13:16:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WLQ1bbKd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbgCBVOq (ORCPT + 99 others); Mon, 2 Mar 2020 16:14:46 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36860 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbgCBVOp (ORCPT ); Mon, 2 Mar 2020 16:14:45 -0500 Received: by mail-wm1-f66.google.com with SMTP id g83so631386wme.1 for ; Mon, 02 Mar 2020 13:14:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5matOJha1/pSHqpUD5pSs/+tLZfS/76GQlE2SX6b0M0=; b=WLQ1bbKd2/Yex4Q33Lc0u9NSdLhA9uHVbuYnOCrpz42gx4tDvnHyw37bkof+kxeg2g hJL/C/z7x+8qQSerlbyXUrA+K3/C10b4OngzKpAfFvgu3khnAIbSkWupZe0JF3C7h0fO fWbPL2ZpUuliXUNVKUpMceOP2RiYIhRRWQBORtNKsV7kISGDOYJmZbEAQjziwXAF6JVd 1is4yQOO2QbvNBTQfj30G0Vm5wRIj0cesC1Kl1mxS2yI34qeBf+Cuez5b1eHJlDQehQY qHQ5hqvBMzE5OEhaeN+0Ln4OUv0VaZ0gs4P6ZNoybjQnf+yZ355jE8DP5XqYRQdeBjbO 4sLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5matOJha1/pSHqpUD5pSs/+tLZfS/76GQlE2SX6b0M0=; b=L1twUWwSjBrcfguOiDLnGXeqUW1d4YbdF+mFiAqzYr23nngQ+EI2xNJYT4OwKSPXXC fBIOBCh8tCa85K3+QXTWJmUdzZQGoamcD3TqluUWc48BC5louPsDr33lRZuWlU+Mwy5i /eFCo4hKioNBRWz2kDu8W90B5iNG02XOvKFFKueWwkgldfcCz/Pf6cuuI6tUp/r6yVeB m/5/luUJzOQEyZ8wnwLenNaX9qDgSwN2qkdiQihDHos2N1NCPO8cp6naPYppIsBspA8f wo7VfDPugufAtAoSVhQDmxBjSZInH+Q5XjSfcFaD4YpgGMgYWZ2geBzEQX4qw8qryQ46 IarA== X-Gm-Message-State: ANhLgQ0rs/T7krFwZRVW3k8Blv43RBVHWrfLkUM5/zp87nszNtNT4BsV 1x8aqO2NsTK8e2faj2mQQNqAbL39VA3IYxbTbHU= X-Received: by 2002:a1c:208a:: with SMTP id g132mr279108wmg.143.1583183683752; Mon, 02 Mar 2020 13:14:43 -0800 (PST) MIME-Version: 1.0 References: <1582293853-136727-1-git-send-email-chengzhihao1@huawei.com> <58b11ca2-6b91-52b3-bc75-d44abb202cfb@huawei.com> In-Reply-To: <58b11ca2-6b91-52b3-bc75-d44abb202cfb@huawei.com> From: Richard Weinberger Date: Mon, 2 Mar 2020 22:14:32 +0100 Message-ID: Subject: Re: [PATCH] ubifs: Don't discard nodes in recovery when ecc err detected To: Zhihao Cheng Cc: Richard Weinberger , Sascha Hauer , "zhangyi (F)" , linux-mtd@lists.infradead.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 2, 2020 at 4:58 AM Zhihao Cheng wrote: > I mean, the uncorrectable ECC error is caused by hardware which may lead > to corrupted nodes detected in UBIFS. I found uncorretable ECC errors on > my NAND, in the environment of high temperature and humidity. > > At present, UBIFS ignores all EBADMSG errors, so the corrupted node is > only considered in being caused by unfinished writing. I think UBIFS > should consider the corrupted area caused by ECC errors in process > ubifs_recover_leb(). no_more_nodes() will skip a read-write unit. Maybe > the corrupted area is skipped. Well, if your NAND data is corrupted by your environment UBIFS cannot do much. Sure, we can paper over some places but at the end of the day you will always lose. What if the UBI VID header becomes unreadable or the root node of the index tree? -- Thanks, //richard