All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org, zsadecki@itwatchdogs.com
Subject: Re: [PATCH 1/2] ubi: Remove PEB from free tree in get_peb_for_wl()
Date: Tue, 04 Dec 2012 10:34:39 +0200	[thread overview]
Message-ID: <1354610079.11583.58.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <1354564667-9549-2-git-send-email-richard@nod.at>

[-- Attachment #1: Type: text/plain, Size: 1159 bytes --]

On Mon, 2012-12-03 at 20:57 +0100, Richard Weinberger wrote:
> If UBI is built without fastmap, get_peb_for_wl() has to
> remove the PEB manially from the free tree.
> Otherwise the requested PEB lives in two trees.
> 
> Reported-by: Zach Sadecki <zsadecki@itwatchdogs.com>
> Signed-off-by: Richard Weinberger <richard@nod.at>

Thanks Richard, I'll send this to Linus ASAP.

> diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
> index da7b449..1f9f5f7 100644
> --- a/drivers/mtd/ubi/wl.c
> +++ b/drivers/mtd/ubi/wl.c
> @@ -679,7 +679,13 @@ static struct ubi_wl_entry *get_peb_for_wl(struct ubi_device *ubi)
>  #else
>  static struct ubi_wl_entry *get_peb_for_wl(struct ubi_device *ubi)
>  {
> -	return find_wl_entry(ubi, &ubi->free, WL_FREE_MAX_DIFF);
> +	struct ubi_wl_entry *e;
> +
> +	e = find_wl_entry(ubi, &ubi->free, WL_FREE_MAX_DIFF);
> +	self_check_in_wl_tree(ubi, e, &ubi->free);

Looking at all for these 'self_check_in_wl_tree()', I think can kill
most of them and just make 'find_wl_entry()' complain if it did not find
anything. But this is a subject of a separate patch.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-12-04  8:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30 15:05 UBI wl_tree_add problems after PEB scrubbed Zach Sadecki
2012-12-03 10:48 ` Artem Bityutskiy
2012-12-03 11:01   ` Artem Bityutskiy
2012-12-03 11:19   ` Richard Weinberger
2012-12-03 14:46 ` Artem Bityutskiy
2012-12-03 15:02   ` Richard Weinberger
2012-12-03 15:33     ` Artem Bityutskiy
     [not found]       ` <1354564667-9549-1-git-send-email-richard@nod.at>
2012-12-03 19:57         ` [PATCH 1/2] ubi: Remove PEB from free tree in get_peb_for_wl() Richard Weinberger
2012-12-04  8:34           ` Artem Bityutskiy [this message]
2012-12-04 10:24             ` Richard Weinberger
2012-12-03 19:57         ` [PATCH 2/2] ubi: Dont call ubi_self_check_all_ff() in __wl_get_peb() Richard Weinberger
2012-12-04  7:55           ` Artem Bityutskiy
2012-12-04  7:56           ` Artem Bityutskiy
2012-12-04  8:15             ` Artem Bityutskiy
2012-12-04  9:15               ` Richard Weinberger
2012-12-04 14:45         ` UBI Fastmap fixes for 3.7 Zach Sadecki
2012-12-04 14:48           ` Richard Weinberger
2012-12-04 14:56             ` Zach Sadecki

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=1354610079.11583.58.camel@sauron.fi.intel.com \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=zsadecki@itwatchdogs.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.