From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org, stable@vger.kernel.org
Subject: Re: [PATCH 3/3] ubi: Fix Fastmap's update_vol()
Date: Mon, 5 Sep 2016 23:06:39 +0200 [thread overview]
Message-ID: <20160905230639.42fe2a94@bbrezillon> (raw)
In-Reply-To: <1472042175-8655-3-git-send-email-richard@nod.at>
On Wed, 24 Aug 2016 14:36:15 +0200
Richard Weinberger <richard@nod.at> wrote:
> Usually Fastmap is free to consider every PEB in one of the pools
> as newer than the existing PEB. Since PEBs in a pool are by definition
> newer than everything else.
> But update_vol() missed the case that a pool can contain more than
> one candidate.
Hm, it's not really that update_vol() was not taking this case into
account (actually it is comparing 2 LEBs and picking the latest
version), it's just that it's not updating ->sqnum as it should be. Or,
am I missing something?
>
> Cc: <stable@vger.kernel.org>
> Fixes: dbb7d2a88d ("UBI: Add fastmap core")
> Signed-off-by: Richard Weinberger <richard@nod.at>
Anyway, apart from the commit message,
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
> drivers/mtd/ubi/fastmap.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
> index da33100..ccb3ceb 100644
> --- a/drivers/mtd/ubi/fastmap.c
> +++ b/drivers/mtd/ubi/fastmap.c
> @@ -328,6 +328,7 @@ static int update_vol(struct ubi_device *ubi, struct ubi_attach_info *ai,
> aeb->pnum = new_aeb->pnum;
> aeb->copy_flag = new_vh->copy_flag;
> aeb->scrub = new_aeb->scrub;
> + aeb->sqnum = new_aeb->sqnum;
> kmem_cache_free(ai->aeb_slab_cache, new_aeb);
>
> /* new_aeb is older */
next prev parent reply other threads:[~2016-09-05 21:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 12:36 [PATCH 1/3] ubi: Deal with interrupted erasures in WL Richard Weinberger
2016-08-24 12:36 ` [PATCH 2/3] ubi: Fix races around ubi_refill_pools() Richard Weinberger
2016-08-24 12:36 ` [PATCH 3/3] ubi: Fix Fastmap's update_vol() Richard Weinberger
2016-09-05 21:06 ` Boris Brezillon [this message]
2016-09-05 20:57 ` [PATCH 1/3] ubi: Deal with interrupted erasures in WL Boris Brezillon
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=20160905230639.42fe2a94@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=stable@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox