From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org, Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH 2/3] mtd: peb: Do not mark as bad in mtd_peb_torture()
Date: Mon, 15 Jul 2019 16:48:31 +0200 [thread overview]
Message-ID: <661933fb-ad95-c96b-e9b0-da0464af9718@pengutronix.de> (raw)
In-Reply-To: <20190715135434.5666-2-s.hauer@pengutronix.de>
Hello Sascha,
On 15/7/19 15:54, Sascha Hauer wrote:
> diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c
> index 4676730d05..9c106b7b63 100644
> --- a/common/state/backend_bucket_circular.c
> +++ b/common/state/backend_bucket_circular.c
> @@ -95,6 +95,7 @@ static int state_mtd_peb_read(struct state_backend_storage_bucket_circular *circ
> if (ret == -EBADMSG) {
> ret = mtd_peb_torture(circ->mtd, circ->eraseblock);
> if (ret == -EIO) {
> + mtd_peb_mark_bad(mtd, circ->eraseblock);
There's no `mtd' in this scope. Do you mean `circ->mtd'?
> dev_err(circ->dev, "Tortured eraseblock failed and is marked bad now, PEB %u\n",
> circ->eraseblock);
> return -EIO;
> @@ -132,6 +133,7 @@ static int state_mtd_peb_write(struct state_backend_storage_bucket_circular *cir
> if (ret == -EBADMSG) {
> ret = mtd_peb_torture(circ->mtd, circ->eraseblock);
> if (ret == -EIO) {
> + mtd_peb_mark_bad(mtd, circ->eraseblock);
Likewise.
> dev_err(circ->dev, "Tortured eraseblock failed and is marked bad now, PEB %u\n",
> circ->eraseblock);
> return -EIO;
Thanks,
Ahmad
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-07-15 14:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 13:54 [PATCH 1/3] mtd: ubi: mark PEBs as bad on erase failure Sascha Hauer
2019-07-15 13:54 ` [PATCH 2/3] mtd: peb: Do not mark as bad in mtd_peb_torture() Sascha Hauer
2019-07-15 14:48 ` Ahmad Fatoum [this message]
2019-07-15 13:54 ` [PATCH 3/3] ubiformat: handle write errors correctly Sascha Hauer
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=661933fb-ad95-c96b-e9b0-da0464af9718@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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