Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1512633imm; Sun, 23 Sep 2018 05:50:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYYpmDyE9Sfj67v6fC8XgB4O3gD6LkGG5xZyZsG7phh/f1WaMGN+jiF9GxM6crZtRsAKo8Q X-Received: by 2002:a62:4f94:: with SMTP id f20-v6mr6323062pfj.60.1537707031434; Sun, 23 Sep 2018 05:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537707031; cv=none; d=google.com; s=arc-20160816; b=dYgyYBU5x759x2RGrMR1cuDAAMEjWus08/lnwHn9OGR3BtFuiEzYjuzhO+HrQvc/S+ oK6ozwLtjSwKcEpbNYmMjpnFc1QmYwRZ7IpqRcNhZo5Ctu6xfCXkV+XSBl2qFN/AXWxu RzIYWAo1b2bnDOSBeFZmX0W9Po6b9OzAnD2IU025NnpohrKwFWsLAMgAFoYqMheeqUE0 ZCubOEtFlW/jX4dfKp0/nDCOyHpoyfxBAuPcE3mhu/gmirwJwEMG1lGL83QyVlGLDnYC G1VYVw9Eup9P0hCW+pWXXBrvOkGr6zzRLUNeD2HgcUImcOUcE5pqFVdwmhxJlradAvfn 7h/A== 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=lhmszu/x7AAXJwapMtmX/2IrEzWMZ0/D7XtDULkeBX8=; b=FesI6rtq48UhovWXViLSBCVnk/fyJaGyRsEuJFYJ+h/xKf1YBk4dQhhJIHSthuhKYV rElCPd4Q/E97iYoMLYkc0M2AqhvrbfjMKLIq0ND97ban2vyMh0ORP6RA5K35nl4fB622 74onZgCw5QM0cBfGjxJ4DhAasxAMydW0nszYmmDUH24bPBF8dK3YQULgAYxKMIpeD1OH oTQkhRFAKhQAhAV74wAHuOaagknLZtHVKQoNOzuN0hr74B87SvwFBZIIr+BQ8wlBIKmX xwuQAHypAEgq8JbfCMqxSkCDkGY6Og/D/PWTpmPxFZrtZmrCDHkBgiZ3jP1Ye1v6hEWX h2Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bofh-nu.20150623.gappssmtp.com header.s=20150623 header.b=gwey7IAQ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5-v6si30447317pgg.84.2018.09.23.05.49.40; Sun, 23 Sep 2018 05:50:31 -0700 (PDT) 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=@bofh-nu.20150623.gappssmtp.com header.s=20150623 header.b=gwey7IAQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726219AbeIWSq5 (ORCPT + 99 others); Sun, 23 Sep 2018 14:46:57 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:40670 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726135AbeIWSq4 (ORCPT ); Sun, 23 Sep 2018 14:46:56 -0400 Received: by mail-oi0-f65.google.com with SMTP id l202-v6so14948852oig.7 for ; Sun, 23 Sep 2018 05:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bofh-nu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lhmszu/x7AAXJwapMtmX/2IrEzWMZ0/D7XtDULkeBX8=; b=gwey7IAQ2kislwvHgUtn+EWGuDe+Pz1W1LZm8/G0G7p755tc/h7i2L59klYGt45p+1 cTXj0epeC+1DQJuZiELUrx0GGQN1pwI+szlOuNuc7FTw4zpo/jrltdDQtAxsHRWrvJsR y7dyKazJ4vg2PEGWw6GBFAhrZyjSdemCHYU6+WZVPtgrczfe1cHCcTMkwExWyq0u72eo 13MAv7Ig9zJSNfXZjf9ZjmzDnZhJ3V3eO4fkh6ZIWfEEc5WHaHbeKoNpaqVb5+bNU7hh Uru2nwEPaFIZgxW7xFlqoDy2tNgd4rV/593jyGPoG5arMTN4hWtmn3KctZiRvnKN6zK7 aTuQ== 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=lhmszu/x7AAXJwapMtmX/2IrEzWMZ0/D7XtDULkeBX8=; b=cMPPz/riIiK0e+5+arVtuD89rbsVzIaGgzC+w7RdsB/09cOPtn0HpDlplq5Nxwcf+L CRqsCXXoLeymTsiqyrMsDNteLN0lLR+aFoh7OLyeoCmJIHRLWDUuWWNWMKwhJ4+8Ybf0 d3BDEMIjDn0027p0gPqOJJhqHGFyMzLUFNZ8GQAHMHZaL4MPpU/3tYsq5c8Ttxl4VZws /FU9OgiLlzwQj6MNRvKiBnNvv9Yb8vfj/3x2EDD25dmDfpl4PiHzxoakPeLcULFzQeT7 46kZrJUp1C/zsgV2AMu7lHtvPYm+i6F/fTfjsmuRdfAucGgjIRd05vkUTWAoKpKydhFD BR2Q== X-Gm-Message-State: APzg51BOLDaZRtxCk9ktBLvl96Q8tTGNAEAZCzabC8Mc+Q3hv0eKKbIY sWKHXpbrLG0eiUhDEK2b9jtiBzBoFDrmSYNCf2I7iw== X-Received: by 2002:aca:6707:: with SMTP id z7-v6mr2875828oix.178.1537706974665; Sun, 23 Sep 2018 05:49:34 -0700 (PDT) MIME-Version: 1.0 References: <20180701160757.138608453@linuxfoundation.org> <20180701160759.928145668@linuxfoundation.org> In-Reply-To: <20180701160759.928145668@linuxfoundation.org> From: Lars Persson Date: Sun, 23 Sep 2018 14:49:23 +0200 Message-ID: Subject: Re: [PATCH 4.9 069/101] ubi: fastmap: Correctly handle interrupted erasures in EBA To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Martinbayern@outlook.com, richard@nod.at 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 Sun, Jul 1, 2018 at 6:27 PM Greg Kroah-Hartman wrote: > > 4.9-stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Richard Weinberger > > commit 781932375ffc6411713ee0926ccae8596ed0261c upstream. > > Fastmap cannot track the LEB unmap operation, therefore it can > happen that after an interrupted erasure the mapping still looks > good from Fastmap's point of view, while reading from the PEB will > cause an ECC error and confuses the upper layer. > > Instead of teaching users of UBI how to deal with that, we read back > the VID header and check for errors. If the PEB is empty or shows ECC > errors we fixup the mapping and schedule the PEB for erasure. > > Fixes: dbb7d2a88d2a ("UBI: Add fastmap core") > Cc: > Reported-by: martin bayern > Signed-off-by: Richard Weinberger > Signed-off-by: Greg Kroah-Hartman > > Hi Greg This commit belongs to a series of 3 commits that are intended to be used together. Currently the stable branches have only the first commit from the series and we get a UBI speed regression because an extra NAND page read is always performed for each access to a UBI LEB. 3e5e4335cc0ffd668054564b113fb3c9c97badb8 ubi: fastmap: Detect EBA mismatches on-the-fly 34653fd8c46e771585fce5975e4243f8fd401914 ubi: fastmap: Check each mapping only once 781932375ffc6411713ee0926ccae8596ed0261c ubi: fastmap: Correctly handle interrupted erasures in EBA This will in turn require also this follow-up patch: 25677478474a91fa1b46f19a4a591a9848bca6fb ubi: Initialize Fastmap checkmapping correctly BR, Lars Persson