aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/build.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-07-30 07:59:50 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-08-02 00:21:19 -0400
commit64d4b4c90a876401e503c3a3260e9d0ed066f271 (patch)
tree4da6a688f44cdec560792a29e24031a00a0696ef /drivers/mtd/ubi/build.c
parent7cdb996ee4d04b5bb2cd544b14e8eb91cfd7fe64 (diff)
UBI: do not warn unnecessarily
Currently, when UBI attaches an MTD device and cannot reserve all 1% (by default) of PEBs for bad eraseblocks handling, it prints a warning. However, Matthew L. Creech <mlcreech@gmail.com> is not very happy to see this warning, because he did reserve enough of PEB at the beginning, but with time some PEBs became bad. The warning is not necessary in this case. This patch makes UBI print the warning o if this is a new image o of this is used image and the amount of reserved PEBs is only 10% (or less) of the size of the reserved PEB pool. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/build.c')
-rw-r--r--drivers/mtd/ubi/build.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 13b05cb33b08..78ae89488a4f 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -593,6 +593,7 @@ static int attach_by_scanning(struct ubi_device *ubi)
593 ubi->good_peb_count = ubi->peb_count - ubi->bad_peb_count; 593 ubi->good_peb_count = ubi->peb_count - ubi->bad_peb_count;
594 ubi->max_ec = si->max_ec; 594 ubi->max_ec = si->max_ec;
595 ubi->mean_ec = si->mean_ec; 595 ubi->mean_ec = si->mean_ec;
596 ubi_msg("max. sequence number: %llu", si->max_sqnum);
596 597
597 err = ubi_read_volume_table(ubi, si); 598 err = ubi_read_volume_table(ubi, si);
598 if (err) 599 if (err)
@@ -981,7 +982,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, int vid_hdr_offset)
981 ubi_msg("number of PEBs reserved for bad PEB handling: %d", 982 ubi_msg("number of PEBs reserved for bad PEB handling: %d",
982 ubi->beb_rsvd_pebs); 983 ubi->beb_rsvd_pebs);
983 ubi_msg("max/mean erase counter: %d/%d", ubi->max_ec, ubi->mean_ec); 984 ubi_msg("max/mean erase counter: %d/%d", ubi->max_ec, ubi->mean_ec);
984 ubi_msg("image sequence number: %d", ubi->image_seq); 985 ubi_msg("image sequence number: %d", ubi->image_seq);
985 986
986 /* 987 /*
987 * The below lock makes sure we do not race with 'ubi_thread()' which 988 * The below lock makes sure we do not race with 'ubi_thread()' which