linux-mtd digest emails (was Re: [PATCH 4/4] UBI: Implement bitrot checking)

2015-04-13 Thread Brian Norris
ail subject, so many subscribers probably did not see your email. So, a recent thread was under the subject: Re: [PATCH 4/4] UBI: Implement bitrot checking (linux-mtd Digest, Vol 145, Issue 24) But it should be using: Re: [PATCH 4/4] UBI: Implement bitrot checking I've released a few mess

Re: [PATCH 4/4] UBI: Implement bitrot checking (linux-mtd Digest, Vol 145, Issue 24)

2015-04-12 Thread Richard Weinberger
Am 12.04.2015 um 23:33 schrieb Andrea Scian: >>> I think is always useful to give some additional information in userspace, >>> from both debugging and diagnostic point of view. >> The question is, why does userspace care? > > Because the userspace trigger it As written in the previous mail, the

Re: [PATCH 4/4] UBI: Implement bitrot checking (linux-mtd Digest, Vol 145, Issue 24)

2015-04-12 Thread Richard Weinberger
Am 12.04.2015 um 23:30 schrieb Boris Brezillon: > On Sun, 12 Apr 2015 23:01:27 +0200 > Richard Weinberger wrote: > > +static struct device_attribute dev_trigger_bitrot_check = +__ATTR(trigger_bitrot_check, S_IWUSR, NULL, trigger_bitrot_check); >>> >>> How about maki

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Richard Weinberger
Am 12.04.2015 um 23:24 schrieb Boris Brezillon: > On Sun, 12 Apr 2015 21:53:12 +0200 > Richard Weinberger wrote: > >> Am 12.04.2015 um 21:20 schrieb Boris Brezillon: >>> Unless I'm missing something, it should be pretty easy to implement: >>> adding the following lines at the end of bitrot_check_

Re: [PATCH 4/4] UBI: Implement bitrot checking (linux-mtd Digest, Vol 145, Issue 24)

2015-04-12 Thread Andrea Scian
Il 12/04/2015 23:01, Richard Weinberger ha scritto: Am 12.04.2015 um 22:42 schrieb Andrea Scian: Il 12/04/2015 18:55, Richard Weinberger ha scritto: Am 12.04.2015 um 18:43 schrieb Boris Brezillon: On Sun, 12 Apr 2015 18:09:23 +0200 Richard Weinberger wrote: Am 12.04.2015 um 16:12 schrieb Bo

Re: [PATCH 4/4] UBI: Implement bitrot checking (linux-mtd Digest, Vol 145, Issue 24)

2015-04-12 Thread Boris Brezillon
On Sun, 12 Apr 2015 23:01:27 +0200 Richard Weinberger wrote: > >> +static struct device_attribute dev_trigger_bitrot_check = > >> +__ATTR(trigger_bitrot_check, S_IWUSR, NULL, trigger_bitrot_check); > > > > How about making this attribute a RW one, so that users could check >

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Boris Brezillon
On Sun, 12 Apr 2015 21:53:12 +0200 Richard Weinberger wrote: > Am 12.04.2015 um 21:20 schrieb Boris Brezillon: > > Unless I'm missing something, it should be pretty easy to implement: > > adding the following lines at the end of bitrot_check_worker() should do > > the trick > > > > if (e->pn

Re: [PATCH 4/4] UBI: Implement bitrot checking (linux-mtd Digest, Vol 145, Issue 24)

2015-04-12 Thread Richard Weinberger
Am 12.04.2015 um 22:42 schrieb Andrea Scian: > > Il 12/04/2015 18:55, Richard Weinberger ha scritto: >> Am 12.04.2015 um 18:43 schrieb Boris Brezillon: >>> On Sun, 12 Apr 2015 18:09:23 +0200 >>> Richard Weinberger wrote: >>> Am 12.04.2015 um 16:12 schrieb Boris Brezillon: > Hi Richard, >

Re: [PATCH 4/4] UBI: Implement bitrot checking (linux-mtd Digest, Vol 145, Issue 24)

2015-04-12 Thread Andrea Scian
Il 12/04/2015 18:55, Richard Weinberger ha scritto: Am 12.04.2015 um 18:43 schrieb Boris Brezillon: On Sun, 12 Apr 2015 18:09:23 +0200 Richard Weinberger wrote: Am 12.04.2015 um 16:12 schrieb Boris Brezillon: Hi Richard, Sorry for the late reply. On Sun, 29 Mar 2015 14:13:17 +0200 Richard

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Richard Weinberger
Am 12.04.2015 um 21:20 schrieb Boris Brezillon: > Unless I'm missing something, it should be pretty easy to implement: > adding the following lines at the end of bitrot_check_worker() should do > the trick > > if (e->pnum + 1 < ubi->peb_count) { > wl_wrk->e = ubi->lookuptbl[e->

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Boris Brezillon
On Sun, 12 Apr 2015 19:09:11 +0200 Richard Weinberger wrote: > Am 12.04.2015 um 19:01 schrieb Boris Brezillon: > > Hi Richard, > > > > After the 'coding style related'/'useless' comments, now comes a real > > question related to the approach you've taken :-). > > > > On Sun, 29 Mar 2015 14:13:1

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Richard Weinberger
Am 12.04.2015 um 19:01 schrieb Boris Brezillon: > Hi Richard, > > After the 'coding style related'/'useless' comments, now comes a real > question related to the approach you've taken :-). > > On Sun, 29 Mar 2015 14:13:17 +0200 > Richard Weinberger wrote: > > [...] >> + >> +/** >> + * ubi_wl_tr

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Richard Weinberger
Am 12.04.2015 um 19:01 schrieb Boris Brezillon: > Hi Richard, > > After the 'coding style related'/'useless' comments, now comes a real > question related to the approach you've taken :-). > > On Sun, 29 Mar 2015 14:13:17 +0200 > Richard Weinberger wrote: > > [...] >> + >> +/** >> + * ubi_wl_tr

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Boris Brezillon
Hi Richard, After the 'coding style related'/'useless' comments, now comes a real question related to the approach you've taken :-). On Sun, 29 Mar 2015 14:13:17 +0200 Richard Weinberger wrote: [...] > + > +/** > + * ubi_wl_trigger_bitrot_check - triggers a re-read of all physical erase > + * b

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Richard Weinberger
Am 12.04.2015 um 18:43 schrieb Boris Brezillon: > On Sun, 12 Apr 2015 18:09:23 +0200 > Richard Weinberger wrote: > >> Am 12.04.2015 um 16:12 schrieb Boris Brezillon: >>> Hi Richard, >>> >>> Sorry for the late reply. >>> >>> On Sun, 29 Mar 2015 14:13:17 +0200 >>> Richard Weinberger wrote: >>> >>>

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Boris Brezillon
On Sun, 12 Apr 2015 18:09:23 +0200 Richard Weinberger wrote: > Am 12.04.2015 um 16:12 schrieb Boris Brezillon: > > Hi Richard, > > > > Sorry for the late reply. > > > > On Sun, 29 Mar 2015 14:13:17 +0200 > > Richard Weinberger wrote: > > > >> This patch implements bitrot checking for UBI. > >

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Richard Weinberger
Am 12.04.2015 um 18:31 schrieb Boris Brezillon: > On Sun, 12 Apr 2015 18:14:40 +0200 > Richard Weinberger wrote: > >>> IMHO the following code chunk, starting here: >>> + wl_wrk = prepare_erase_work(e, -1, -1, 1); + if (IS_ERR(wl_wrk)) { +

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Boris Brezillon
On Sun, 12 Apr 2015 18:14:40 +0200 Richard Weinberger wrote: > > IMHO the following code chunk, starting here: > > > >> + wl_wrk = prepare_erase_work(e, -1, -1, 1); > >> + if (IS_ERR(wl_wrk)) { > >> + err = PTR_ERR(wl_wrk); > >> +

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Richard Weinberger
Am 12.04.2015 um 17:14 schrieb Boris Brezillon: > Second pass on this patch :-). > > On Sun, 29 Mar 2015 14:13:17 +0200 > Richard Weinberger wrote: > >> /** >> + * bitrot_check_worker - physical eraseblock bitrot check worker function. >> + * @ubi: UBI device description object >> + * @wl_wrk:

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Richard Weinberger
Am 12.04.2015 um 16:12 schrieb Boris Brezillon: > Hi Richard, > > Sorry for the late reply. > > On Sun, 29 Mar 2015 14:13:17 +0200 > Richard Weinberger wrote: > >> This patch implements bitrot checking for UBI. >> ubi_wl_trigger_bitrot_check() triggers a re-read of every >> PEB. If a bitflip is

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Boris Brezillon
Second pass on this patch :-). On Sun, 29 Mar 2015 14:13:17 +0200 Richard Weinberger wrote: > /** > + * bitrot_check_worker - physical eraseblock bitrot check worker function. > + * @ubi: UBI device description object > + * @wl_wrk: the work object > + * @shutdown: non-zero if the worker has to

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-12 Thread Boris Brezillon
Hi Richard, Sorry for the late reply. On Sun, 29 Mar 2015 14:13:17 +0200 Richard Weinberger wrote: > This patch implements bitrot checking for UBI. > ubi_wl_trigger_bitrot_check() triggers a re-read of every > PEB. If a bitflip is detected PEBs in use will get scrubbed > and free ones erased.

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-08 Thread Andrea Scian
Il 08/04/2015 12:34, Richard Weinberger ha scritto: > 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: > +

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-08 Thread David Oberhollenzer
Reviewed-by: David Oberhollenzer -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-08 Thread Richard Weinberger
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, u

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-02 Thread 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); >>> + mute

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-02 Thread Richard Weinberger
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_BIT

Re: [PATCH 4/4] UBI: Implement bitrot checking

2015-04-02 Thread 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"

[PATCH 4/4] UBI: Implement bitrot checking

2015-03-29 Thread Richard Weinberger
This patch implements bitrot checking for UBI. ubi_wl_trigger_bitrot_check() triggers a re-read of every PEB. If a bitflip is detected PEBs in use will get scrubbed and free ones erased. Signed-off-by: Richard Weinberger --- drivers/mtd/ubi/build.c | 39 + drivers/mtd/ubi/ubi.h |