diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 16:34:23 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 16:34:23 -0700 |
commit | 4f3a29dadaf999a273f1e7fe2476595d0283eef3 (patch) | |
tree | 3776499f6edc95a36533c7efe32a7b6038c88b61 /drivers/mtd/ubi/vtbl.c | |
parent | 06d362931a530e0d48c1a9554a752da4ed240f0b (diff) | |
parent | 45aafd32996e27bfc4862654ff31231bdddbe200 (diff) | |
download | lwn-4f3a29dadaf999a273f1e7fe2476595d0283eef3.tar.gz lwn-4f3a29dadaf999a273f1e7fe2476595d0283eef3.zip |
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6
* 'linux-next' of git://git.infradead.org/ubi-2.6:
UBI: tighten the corrupted PEB criteria
UBI: fix check_data_ff return code
UBI: remember copy_flag while scanning
UBI: preserve corrupted PEBs
UBI: add truly corrupted PEBs to corrupted list
UBI: introduce debugging helper function
UBI: make check_pattern function non-static
UBI: do not put eraseblocks to the corrupted list unnecessarily
UBI: separate out corrupted list
UBI: change cascade of ifs to switch statements
UBI: rename a local variable
UBI: handle bit-flips when no header found
UBI: remove duplicate IO error codes
UBI: rename IO error code
UBI: fix small 80 characters limit style issue
UBI: cleanup and simplify Kconfig
Diffstat (limited to 'drivers/mtd/ubi/vtbl.c')
-rw-r--r-- | drivers/mtd/ubi/vtbl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 14c10bed94ee..fcdb7f65fe0b 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c @@ -366,7 +366,7 @@ write_error: * Probably this physical eraseblock went bad, try to pick * another one. */ - list_add_tail(&new_seb->u.list, &si->corr); + list_add(&new_seb->u.list, &si->erase); goto retry; } kfree(new_seb); @@ -662,9 +662,13 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si, ubi->vol_count += 1; vol->ubi = ubi; - if (reserved_pebs > ubi->avail_pebs) + if (reserved_pebs > ubi->avail_pebs) { ubi_err("not enough PEBs, required %d, available %d", reserved_pebs, ubi->avail_pebs); + if (ubi->corr_peb_count) + ubi_err("%d PEBs are corrupted and not used", + ubi->corr_peb_count); + } ubi->rsvd_pebs += reserved_pebs; ubi->avail_pebs -= reserved_pebs; @@ -837,7 +841,7 @@ int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_scan_info *si) return PTR_ERR(ubi->vtbl); } - ubi->avail_pebs = ubi->good_peb_count; + ubi->avail_pebs = ubi->good_peb_count - ubi->corr_peb_count; /* * The layout volume is OK, initialize the corresponding in-RAM data |