From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 2/2] state: bucket_circular: -EUCLEAN means data could be read
Date: Thu, 23 Mar 2017 14:21:42 +0100 [thread overview]
Message-ID: <20170323132142.28871-2-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20170323132142.28871-1-s.hauer@pengutronix.de>
-EUCLEAN returned from state_mtd_peb_read() means that the
data shall still be used. This fixes initialization of buckets
which need cleanup
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/state/backend_bucket_circular.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c
index d8504e035c..9cb9dce2ac 100644
--- a/common/state/backend_bucket_circular.c
+++ b/common/state/backend_bucket_circular.c
@@ -390,7 +390,7 @@ static int state_backend_bucket_circular_init(
ret = state_mtd_peb_read(circ, buf, sub_offset,
circ->writesize);
- if (ret)
+ if (ret && ret != -EUCLEAN)
return ret;
ret = mtd_buf_all_ff(buf, circ->writesize);
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2017-03-23 13:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 13:21 [PATCH 1/2] state: bucket_cached: Fix reading pages which need cleanup Sascha Hauer
2017-03-23 13:21 ` Sascha Hauer [this message]
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=20170323132142.28871-2-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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