From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx.dave-tech.it ([2.229.21.40]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YdkeP-0003bN-7W for linux-mtd@lists.infradead.org; Thu, 02 Apr 2015 19:19:38 +0000 Message-ID: <551D9630.3090704@dave-tech.it> Date: Thu, 02 Apr 2015 21:19:12 +0200 From: Andrea Scian MIME-Version: 1.0 To: Richard Weinberger 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> In-Reply-To: <551D824D.3000004@nod.at> 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: , 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 Kind Regards, -- Andrea SCIAN DAVE Embedded Systems From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753448AbbDBTT3 (ORCPT ); Thu, 2 Apr 2015 15:19:29 -0400 Received: from mx.dave-tech.it ([2.229.21.40]:37830 "EHLO mx.dave-tech.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752723AbbDBTTP (ORCPT ); Thu, 2 Apr 2015 15:19:15 -0400 Message-ID: <551D9630.3090704@dave-tech.it> Date: Thu, 02 Apr 2015 21:19:12 +0200 From: Andrea Scian User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Richard Weinberger 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> In-Reply-To: <551D824D.3000004@nod.at> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 150402-1, 02/04/2015), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Kind Regards, -- Andrea SCIAN DAVE Embedded Systems