From: Artem Bityutskiy <dedekind1@gmail.com>
To: Richard Genoud <richard.genoud@gmail.com>
Cc: linux-mtd@lists.infradead.org,
Shmulik Ladkani <shmulik.ladkani@gmail.com>
Subject: Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
Date: Thu, 23 Aug 2012 13:10:15 +0300 [thread overview]
Message-ID: <1345716615.2848.229.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <1345478416-23900-1-git-send-email-richard.genoud@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1961 bytes --]
On Mon, 2012-08-20 at 18:00 +0200, Richard Genoud wrote:
> This patch serie introduce, step by step the kernel module parameter
> max_beb_per1024, then the ioctl and finally drop the kernel config option
> CONFIG_MTD_UBI_BEB_LIMIT.
>
> It's based on top of linux-ubi/master (4ebb4b5)
I've also pushed this patch:
From 5fe236c703063f9bc87b66c593408a0d48bbe0e7 Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Date: Thu, 23 Aug 2012 13:01:11 +0300
Subject: [PATCH] UBI: disallow max_beb_per1024 on NOR flash
If the flash does not admit of bad blocks (e.g., NOR) - disallow using
'max_beb_per1024'.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
drivers/mtd/ubi/build.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index aa60b30..865e4fa 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -860,9 +860,6 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
if (max_beb_per1024 < 0 || max_beb_per1024 > MAX_MTD_UBI_BEB_LIMIT)
return -EINVAL;
- if (!max_beb_per1024)
- max_beb_per1024 = CONFIG_MTD_UBI_BEB_LIMIT;
-
/*
* Check if we already have the same MTD device attached.
*
@@ -935,6 +932,15 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
if (err)
goto out_free;
+ if (!max_beb_per1024) {
+ if (!ubi->bad_allowed) {
+ ubi_err("mtd%d does not admit of bad blocks, "
+ "max_beb_per1024 cannot be used", mtd->index);
+ goto out_free;
+ }
+ max_beb_per1024 = CONFIG_MTD_UBI_BEB_LIMIT;
+ }
+
err = -ENOMEM;
ubi->peb_buf = vmalloc(ubi->peb_size);
if (!ubi->peb_buf)
--
1.7.10.4
Are you OK with this?
Now that we seem to have everything in, would you please give this all a
final test. Could you please check both on nandsim and mtdram?
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-08-23 10:05 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-20 16:00 [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Richard Genoud
2012-08-20 16:00 ` [PATCH v3 1/6] UBI: prepare for max_beb_per1024 module parameter addition Richard Genoud
2012-08-20 19:01 ` Artem Bityutskiy
2012-08-20 16:00 ` [PATCH v3 2/6] UBI: change CONFIG_MTD_UBI_BEB_LIMIT range Richard Genoud
2012-08-20 19:03 ` Artem Bityutskiy
2012-08-20 16:00 ` [PATCH v3 3/6] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev Richard Genoud
2012-08-20 19:19 ` Artem Bityutskiy
2012-08-20 16:00 ` [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter Richard Genoud
2012-08-21 13:54 ` Artem Bityutskiy
2012-08-22 8:32 ` Richard Genoud
2012-08-22 8:49 ` Artem Bityutskiy
2012-08-22 12:09 ` Richard Genoud
2012-08-22 12:16 ` Artem Bityutskiy
2012-08-20 16:00 ` [PATCH v3 5/6] UBI: add ioctl for max_beb_per1024 Richard Genoud
2012-08-21 19:34 ` Artem Bityutskiy
2012-08-20 16:00 ` [PATCH v3 6/6] UBI: drop CONFIG_MTD_UBI_BEB_LIMIT Richard Genoud
2012-08-21 19:34 ` Artem Bityutskiy
2012-08-23 10:10 ` Artem Bityutskiy [this message]
2012-08-23 10:36 ` [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Shmulik Ladkani
2012-08-23 11:01 ` Richard Genoud
2012-08-23 12:30 ` Artem Bityutskiy
2012-08-23 12:44 ` Shmulik Ladkani
2012-08-23 12:58 ` Artem Bityutskiy
2012-08-23 13:13 ` Richard Genoud
2012-08-23 14:45 ` Artem Bityutskiy
2012-08-31 14:46 ` Richard Genoud
2012-09-03 8:00 ` Artem Bityutskiy
2012-09-03 10:57 ` Richard Genoud
2012-09-03 11:53 ` Artem Bityutskiy
2012-09-03 13:14 ` Richard Genoud
2012-09-03 13:31 ` Artem Bityutskiy
2012-09-03 13:37 ` Richard Genoud
2012-09-03 14:32 ` Artem Bityutskiy
2012-09-03 14:33 ` Artem Bityutskiy
2012-09-03 14:45 ` Richard Genoud
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=1345716615.2848.229.camel@sauron.fi.intel.com \
--to=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard.genoud@gmail.com \
--cc=shmulik.ladkani@gmail.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.