Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1518309imm; Sun, 23 Sep 2018 05:58:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaGhzIZHOCHO4CHPuJ70VahcckkrlcoIZbn2VorOVebJReVSrmyiwLYhFc+DPcG5h8Uor+f X-Received: by 2002:a62:6d02:: with SMTP id i2-v6mr6456666pfc.218.1537707521187; Sun, 23 Sep 2018 05:58:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537707521; cv=none; d=google.com; s=arc-20160816; b=0GjQoLXyLQCHI06pzSX7rXaQFnrevKUBxSjFcaNrwXNaFM292QJQmA/d6IEZkyJQFG tDNhKD2NYePuPLD8gP94/ZH+HpWR2w1U5oLUfj5kNdOz/fEdYIX0FMSuKFQpl9bwnIfF B8yXvQNNZQBLF3bQWONvNWLYsNHsjT0lWbswP7bbgkQci1VI56t7rk+F5AiBK6bZWOJ8 BHJEt7bDTtzXMaYUv/xQmnc4D1djUH5viqsChwjkGhtclwS+mdcN2F/EEh7Iy4E1ywhL m6RpSt2rRDa4APZu42hfjmK98KnYAjWEF9plSB7n1uvLkXRsqcSjpGD531OPs9hjuESC ER6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=sQ4NT95K3q3xMZh19pWhdkaXVcjI6KRk6rkQtCrL9Ms=; b=HqRxMRVLxtQLkjd15Gjm7poGFDYAZ9bNaY091GmxaYMgIyaFwQ3tCMtrkCw3Ykfm0Y dbqRtKhwMyOcK3UlDLi+9G7RNIV5QrOsXnXvByjj9ZOGqnt8VUNM8s+qXi05t+zHuYqC zgp3o/lux4JqDTnDNVfCgIH0w0zif/t7c3TCxqx9gdHNaKva3aJ20T4bPGnrsi/kozyV kHcSFwLWqHb36KzKdWpG+gmdGTf0a8SRMUJ8tg3vTtR6z2D2BQtnHCzNDJPQxsB4dn7J HkEa5osobtmj8XpT8zIB5sjJA2jK5z+ePC0fnFXw12jldvvH6hZXw34Z8TrfKaP9dqub NzFA== ARC-Authentication-Results: i=1; mx.google.com; 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 r4-v6si16870512pfb.257.2018.09.23.05.58.24; Sun, 23 Sep 2018 05:58:41 -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; 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 S1726255AbeIWSzg (ORCPT + 99 others); Sun, 23 Sep 2018 14:55:36 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:48348 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726134AbeIWSzf (ORCPT ); Sun, 23 Sep 2018 14:55:35 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 8B88C605A91B; Sun, 23 Sep 2018 14:58:10 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 6jZS23dOgs5p; Sun, 23 Sep 2018 14:58:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 13AD8605A91A; Sun, 23 Sep 2018 14:58:09 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id g7kxiYtZFCmj; Sun, 23 Sep 2018 14:58:08 +0200 (CEST) Received: from blindfold.localnet (213-47-184-186.cable.dynamic.surfer.at [213.47.184.186]) by lithops.sigma-star.at (Postfix) with ESMTPSA id B65A76088983; Sun, 23 Sep 2018 14:58:08 +0200 (CEST) From: Richard Weinberger To: Lars Persson Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Martinbayern@outlook.com Subject: Re: [PATCH 4.9 069/101] ubi: fastmap: Correctly handle interrupted erasures in EBA Date: Sun, 23 Sep 2018 14:58:08 +0200 Message-ID: <2076412.mQRaXglRsh@blindfold> In-Reply-To: References: <20180701160757.138608453@linuxfoundation.org> <20180701160759.928145668@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Lars, Am Sonntag, 23. September 2018, 14:49:23 CEST schrieb Lars Persson: > 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 Wait. Commit 34653fd8c46e771585fce5975e4243f8fd401914 was not scheduled for stable on purpose. It is just an optimization. How much is the performance regression you see? Commit 3e5e4335cc0ffd668054564b113fb3c9c97badb8 does not fix anything, all it does is adding another paranoia check to UBI. I'd appreciate if you would come up with regression reports on linux-mtd first before asking Greg to pick patches up... Thanks, //richard