mtd: ubi: Read threshold verification
PATCH v2 4/5 mtd: ubi: Read threshold verification
One of the criteria to scrub an eraseblock due to read disturb issue is if that eraseblock was read from more times then a pre-defined threshold. This is verified at each LEB read according to the read counter parameter of the read PEB.
An eraseblock that is found needs scrubbing is added to the ubi->scrub list.
Signed-off-by Tanya Brokhman <[email protected]>
--- drivers/mtd/ubi/eba.c | 7 ++++++- drivers/mtd/ubi/wl.c | 56 +++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 56 insertions(+), 7 deletions(-)
drivers/mtd/ubi/eba.c +6 -1
@@ -1,5 +1,8 @@/* * Copyright (c) International Business Machines Corp., 2006 +* Copyright (c) 2014, Linux Foundation. All rights reserved. +* Linux Foundation chooses to take subject only to the GPLv2 +* license terms, and distributes only under these terms. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
@@ -466,8 +469,10 @@ retry: goto out_unlock; } } +if (ubi->lookuptbl[pnum]->rc >= ubi->rd_threshold) + scrub =1 ; -if (scrub) +if (scrub && !ubi_in_wl_tree (ubi->lookuptbl[pnum], &ubi->scrub)) err =ubi_wl_scrub_peb (ubi, pnum);leb_read_unlock (ubi, vol_id, lnum);
drivers/mtd/ubi/wl.c +50 -6
123 lines not on this page · raw message
Signature · 3 lines
Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project