All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <rw@linutronix.de>
To: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Cc: tglx@linutronix.de, tim.bird@am.sony.com,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	dedekind1@gmail.com
Subject: Re: [RFC][PATCH 7/7] MTD: UBI: wire up checkpointing
Date: Sun, 19 Feb 2012 16:08:38 +0100	[thread overview]
Message-ID: <4F411076.9020105@linutronix.de> (raw)
In-Reply-To: <20120219164002.00e76895@pixies.home.jungo.com>

Am 19.02.2012 15:40, schrieb Shmulik Ladkani:
> On Sun, 19 Feb 2012 15:08:44 +0100 Richard Weinberger<rw@linutronix.de>  wrote:
>> Am 19.02.2012 14:57, schrieb Shmulik Ladkani:
>>> On Tue, 14 Feb 2012 21:06:46 +0100 Richard Weinberger<rw@linutronix.de>   wrote:
>>>> +#ifdef CONFIG_MTD_UBI_CHECKPOINT
>>>> +static int attach_by_checkpointing(struct ubi_device *ubi)
>>>> +{
>>>> +	int cp_start, err;
>>>> +	struct ubi_scan_info *si;
>>>> +
>>>> +	cp_start = ubi_find_checkpoint(ubi);
>>>> +	if (cp_start<   0)
>>>> +		return -ENOENT;
>>>> +
>>>> +	si = ubi_read_checkpoint(ubi, cp_start);
>>>> +	if (IS_ERR(si))
>>>> +		return PTR_ERR(si);
>>>> +
>>>> +	ubi->bad_peb_count = 0;
>>>> +	ubi->good_peb_count = ubi->peb_count;
>>>
>>> Zero reported bad PEBs when checkpointing.
>>> Seems that checkpointing does not remember number/location of bad PEBs.
>>
>> Currently checkpointing cares only about used and free PEBs.
>> Bad PEBs are no longer visible to UBI after recovering from a checkpoint.
>
> Ok.
> However it is still reported to the log in 'ubi_attach_mtd_dev'
> and as a sysfs attribute.
> BTW, the counter is still incremented by WL subsystem, though.
> Hence, reported value will be bad PEBs encountered since last attach
> (where formerly, it was absolute total bad PEBs in the ubi device).
> Maybe remove 'bad_peb_count' altogether.
>
> Also, "ubi->good_peb_count = ubi->peb_count" results in different
> 'beb_rsvd_level' caculation, see 'ubi_calculate_reserved'.

I can add these counters into the checkpoint.

>>> Are we fine with that?
>>
>> This patch is a RFC. :-)
>
> So I noticed :-)
> Just trying to point out things which cause ubi system to behave
> differently.
>

Thanks a lot for reviewing this feature!
//richard

WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <rw@linutronix.de>
To: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Cc: linux-mtd@lists.infradead.org, tglx@linutronix.de,
	dedekind1@gmail.com, linux-kernel@vger.kernel.org,
	tim.bird@am.sony.com
Subject: Re: [RFC][PATCH 7/7] MTD: UBI: wire up checkpointing
Date: Sun, 19 Feb 2012 16:08:38 +0100	[thread overview]
Message-ID: <4F411076.9020105@linutronix.de> (raw)
In-Reply-To: <20120219164002.00e76895@pixies.home.jungo.com>

Am 19.02.2012 15:40, schrieb Shmulik Ladkani:
> On Sun, 19 Feb 2012 15:08:44 +0100 Richard Weinberger<rw@linutronix.de>  wrote:
>> Am 19.02.2012 14:57, schrieb Shmulik Ladkani:
>>> On Tue, 14 Feb 2012 21:06:46 +0100 Richard Weinberger<rw@linutronix.de>   wrote:
>>>> +#ifdef CONFIG_MTD_UBI_CHECKPOINT
>>>> +static int attach_by_checkpointing(struct ubi_device *ubi)
>>>> +{
>>>> +	int cp_start, err;
>>>> +	struct ubi_scan_info *si;
>>>> +
>>>> +	cp_start = ubi_find_checkpoint(ubi);
>>>> +	if (cp_start<   0)
>>>> +		return -ENOENT;
>>>> +
>>>> +	si = ubi_read_checkpoint(ubi, cp_start);
>>>> +	if (IS_ERR(si))
>>>> +		return PTR_ERR(si);
>>>> +
>>>> +	ubi->bad_peb_count = 0;
>>>> +	ubi->good_peb_count = ubi->peb_count;
>>>
>>> Zero reported bad PEBs when checkpointing.
>>> Seems that checkpointing does not remember number/location of bad PEBs.
>>
>> Currently checkpointing cares only about used and free PEBs.
>> Bad PEBs are no longer visible to UBI after recovering from a checkpoint.
>
> Ok.
> However it is still reported to the log in 'ubi_attach_mtd_dev'
> and as a sysfs attribute.
> BTW, the counter is still incremented by WL subsystem, though.
> Hence, reported value will be bad PEBs encountered since last attach
> (where formerly, it was absolute total bad PEBs in the ubi device).
> Maybe remove 'bad_peb_count' altogether.
>
> Also, "ubi->good_peb_count = ubi->peb_count" results in different
> 'beb_rsvd_level' caculation, see 'ubi_calculate_reserved'.

I can add these counters into the checkpoint.

>>> Are we fine with that?
>>
>> This patch is a RFC. :-)
>
> So I noticed :-)
> Just trying to point out things which cause ubi system to behave
> differently.
>

Thanks a lot for reviewing this feature!
//richard

  reply	other threads:[~2012-02-19 15:08 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14 20:06 [RFC][PATCH 0/7] UBI checkpointing support Richard Weinberger
2012-02-14 20:06 ` Richard Weinberger
2012-02-14 20:06 ` [RFC][PATCH 1/7] MTD: UBI: Add checkpoint on-chip layout Richard Weinberger
2012-02-14 20:06   ` Richard Weinberger
2012-03-07 16:09   ` Artem Bityutskiy
2012-03-07 16:09     ` Artem Bityutskiy
2012-03-07 21:02     ` Richard Weinberger
2012-03-07 22:09       ` Thomas Gleixner
2012-03-07 22:09         ` Thomas Gleixner
2012-03-07 22:23         ` Thomas Gleixner
2012-03-07 22:23           ` Thomas Gleixner
2012-02-14 20:06 ` [RFC][PATCH 2/7] MTD: UBI: Add checkpoint struct to ubi_device Richard Weinberger
2012-02-14 20:06   ` Richard Weinberger
2012-02-14 20:06 ` [RFC][PATCH 3/7] MTD: UBI: Export next_sqnum() Richard Weinberger
2012-02-14 20:06   ` Richard Weinberger
2012-02-14 20:06 ` [RFC][PATCH 4/7] MTD: UBI: Make wl subsystem checkpoint aware Richard Weinberger
2012-02-14 20:06   ` Richard Weinberger
2012-02-14 20:06 ` [RFC][PATCH 5/7] MTD: UBI: Make process_eb() " Richard Weinberger
2012-02-14 20:06   ` Richard Weinberger
2012-02-14 20:06 ` [RFC][PATCH 6/7] MTD: UBI: Implement checkpointing support Richard Weinberger
2012-02-14 20:06   ` Richard Weinberger
2012-02-20 16:31   ` Shmulik Ladkani
2012-02-20 16:31     ` Shmulik Ladkani
2012-02-14 20:06 ` [RFC][PATCH 7/7] MTD: UBI: wire up checkpointing Richard Weinberger
2012-02-14 20:06   ` Richard Weinberger
2012-02-19 13:57   ` Shmulik Ladkani
2012-02-19 13:57     ` Shmulik Ladkani
2012-02-19 14:08     ` Richard Weinberger
2012-02-19 14:08       ` Richard Weinberger
2012-02-19 14:40       ` Shmulik Ladkani
2012-02-19 14:40         ` Shmulik Ladkani
2012-02-19 15:08         ` Richard Weinberger [this message]
2012-02-19 15:08           ` Richard Weinberger
2012-02-29 11:35 ` [RFC][PATCH 0/7] UBI checkpointing support Artem Bityutskiy
2012-02-29 11:35   ` Artem Bityutskiy
2012-02-29 11:36   ` Artem Bityutskiy
2012-02-29 11:36     ` Artem Bityutskiy
2012-02-29 11:40   ` Richard Weinberger
2012-02-29 12:01     ` Artem Bityutskiy
2012-02-29 12:09     ` Artem Bityutskiy
2012-03-07 16:04 ` Artem Bityutskiy
2012-03-07 16:04   ` Artem Bityutskiy
2012-03-07 21:01   ` Richard Weinberger
2012-03-07 21:01     ` Richard Weinberger
2012-03-08 11:22     ` Artem Bityutskiy
2012-03-08 11:22       ` Artem Bityutskiy
2012-03-07 16:33 ` Artem Bityutskiy
2012-03-07 16:33   ` Artem Bityutskiy
2012-03-07 21:19   ` Richard Weinberger
2012-03-07 21:19     ` Richard Weinberger
2012-03-08  7:08     ` Shmulik Ladkani
2012-03-08  7:08       ` Shmulik Ladkani
2012-03-08  9:21       ` Richard Weinberger
2012-03-08  9:21         ` Richard Weinberger
2012-03-08 11:58         ` Artem Bityutskiy
2012-03-08 11:58           ` Artem Bityutskiy
2012-03-08 13:16           ` Shmulik Ladkani
2012-03-08 13:16             ` Shmulik Ladkani
2012-03-08 11:54     ` Artem Bityutskiy
2012-03-08 11:54       ` Artem Bityutskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F411076.9020105@linutronix.de \
    --to=rw@linutronix.de \
    --cc=dedekind1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=shmulik.ladkani@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tim.bird@am.sony.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.