From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from a.ns.miles-group.at ([95.130.255.143] helo=radon.swed.at) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YfnKC-0007V2-0z for linux-mtd@lists.infradead.org; Wed, 08 Apr 2015 10:35:14 +0000 Message-ID: <55250446.40707@nod.at> Date: Wed, 08 Apr 2015 12:34:46 +0200 From: Richard Weinberger MIME-Version: 1.0 To: Andrea Scian Subject: Re: [PATCH 4/4] UBI: Implement bitrot checking References: <1427631197-23610-5-git-send-email-richard@nod.at> <551D7DB4.9010607@dave-tech.it> <551D824D.3000004@nod.at> <551D9630.3090704@dave-tech.it> In-Reply-To: <551D9630.3090704@dave-tech.it> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: boris.brezillon@free-electrons.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Am 02.04.2015 um 21:19 schrieb Andrea Scian: > Il 02/04/2015 19:54, Richard Weinberger ha scritto: >> Hi! >> >> Am 02.04.2015 um 19:34 schrieb Andrea Scian: >>> Richard, >>> >>> Il 29/03/2015 14:13, Richard Weinberger ha scritto: >>>> + mutex_lock(&ubi->buf_mutex); >>>> + err = ubi_io_read(ubi, ubi->peb_buf, e->pnum, 0, ubi->peb_size); >>>> + mutex_unlock(&ubi->buf_mutex); >>>> + if (err == UBI_IO_BITFLIPS) { >>>> + dbg_wl("found bitflips in PEB %d", e->pnum); >>>> + spin_lock(&ubi->wl_lock); >>>> + >>> IIUC you trigger the action as soon as you have a bitflip error, is this >>> correct? >> I trigger it as soon UBI sees the bitflip. This depends on the configured MTD >> bitflip_threshold. > > ops.. I confused UBI bitflip error with MTD bitflip error ;-) > thanks for point this out and help me understanding the code > > now it's clear and it sounds good to me Is this an implicit Reviewed-by? :) Thanks, //richard From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753454AbbDHKev (ORCPT ); Wed, 8 Apr 2015 06:34:51 -0400 Received: from a.ns.miles-group.at ([95.130.255.143]:65275 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753120AbbDHKeu (ORCPT ); Wed, 8 Apr 2015 06:34:50 -0400 Message-ID: <55250446.40707@nod.at> Date: Wed, 08 Apr 2015 12:34:46 +0200 From: Richard Weinberger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Andrea Scian CC: linux-mtd@lists.infradead.org, boris.brezillon@free-electrons.com, linux-kernel@vger.kernel.org, dedekind1@gmail.com Subject: Re: [PATCH 4/4] UBI: Implement bitrot checking References: <1427631197-23610-5-git-send-email-richard@nod.at> <551D7DB4.9010607@dave-tech.it> <551D824D.3000004@nod.at> <551D9630.3090704@dave-tech.it> In-Reply-To: <551D9630.3090704@dave-tech.it> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 02.04.2015 um 21:19 schrieb Andrea Scian: > Il 02/04/2015 19:54, Richard Weinberger ha scritto: >> Hi! >> >> Am 02.04.2015 um 19:34 schrieb Andrea Scian: >>> Richard, >>> >>> Il 29/03/2015 14:13, Richard Weinberger ha scritto: >>>> + mutex_lock(&ubi->buf_mutex); >>>> + err = ubi_io_read(ubi, ubi->peb_buf, e->pnum, 0, ubi->peb_size); >>>> + mutex_unlock(&ubi->buf_mutex); >>>> + if (err == UBI_IO_BITFLIPS) { >>>> + dbg_wl("found bitflips in PEB %d", e->pnum); >>>> + spin_lock(&ubi->wl_lock); >>>> + >>> IIUC you trigger the action as soon as you have a bitflip error, is this >>> correct? >> I trigger it as soon UBI sees the bitflip. This depends on the configured MTD >> bitflip_threshold. > > ops.. I confused UBI bitflip error with MTD bitflip error ;-) > thanks for point this out and help me understanding the code > > now it's clear and it sounds good to me Is this an implicit Reviewed-by? :) Thanks, //richard