<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mtd/ubi, branch v2.6.37</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/mtd/ubi?h=v2.6.37</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/mtd/ubi?h=v2.6.37'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-12-03T13:49:21Z</updated>
<entry>
<title>UBI: fix corrupted PEB detection for NOR flash</title>
<updated>2010-12-03T13:49:21Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2010-12-02T04:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7ac760c2f78ddd8e1bd633767b01becfbbf96720'/>
<id>urn:sha1:7ac760c2f78ddd8e1bd633767b01becfbbf96720</id>
<content type='text'>
My new shiny code for corrupted PEB detection has NOR specific bug.
We tread PEB as corrupted and preserve it, if

1. EC header is OK.
2. VID header is corrupted.
3. data area is not "all 0xFFs"

In case of NOR we have 'nor_erase_prepare()' quirk, which invalidates
the headers before erasing the PEB. And we invalidate first the VID
header, and then the EC header. So if a power cut happens after we have
invalidated the VID header, but before we have invalidated the EC
header, we end up with a PEB which satisfies the above 3 conditions,
and the scanning code will treat it as corrupted, and will print
scary warnings, wrongly.

This patch fixes the issue by firt invalidating the EC header, then
invalidating the VID header. In case of power cut inbetween, we still
just lose the EC header, and UBI can deal with this situation gracefully.

Thanks to Anatolij Gustschin &lt;agust@denx.de&gt; for tracking this down.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Reported-by: Anatolij Gustschin &lt;agust@denx.de&gt;
Tested-by: Anatolij Gustschin &lt;agust@denx.de&gt;
</content>
</entry>
<entry>
<title>UBI: release locks in check_corruption</title>
<updated>2010-11-19T13:19:40Z</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-11-18T03:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1b1d76e2df2a0aa965d6a227db7061d3fff029b1'/>
<id>urn:sha1:1b1d76e2df2a0aa965d6a227db7061d3fff029b1</id>
<content type='text'>
Commit 45aafd32996e27 "UBI: tighten the corrupted PEB criteria"
introduced some return paths that didn't release the ubi-&gt;buf_mutex

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6</title>
<updated>2010-10-22T23:34:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-22T23:34:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4f3a29dadaf999a273f1e7fe2476595d0283eef3'/>
<id>urn:sha1:4f3a29dadaf999a273f1e7fe2476595d0283eef3</id>
<content type='text'>
* '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
</content>
</entry>
<entry>
<title>UBI: tighten the corrupted PEB criteria</title>
<updated>2010-10-21T08:20:37Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2010-10-20T08:54:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=45aafd32996e27bfc4862654ff31231bdddbe200'/>
<id>urn:sha1:45aafd32996e27bfc4862654ff31231bdddbe200</id>
<content type='text'>
If we get a bit-flip of ECC error while reading the data area, do not add it to
corrupted list, because it is possible that this is just unstable PEB with
corruptions caused by unclean reboots.

This patch also improves commentaries.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: fix check_data_ff return code</title>
<updated>2010-10-21T08:20:37Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2010-10-20T08:51:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=df3fca4cdddfa6e1f51b65214d4342660649bd1f'/>
<id>urn:sha1:df3fca4cdddfa6e1f51b65214d4342660649bd1f</id>
<content type='text'>
When the data does not contain all 0xFF bytes, 'check_data_ff()' should return
1, not -EINVAL; Also, the caller ('process_eb()') should not add the PEB to the
"corrupted" list if there was a read error.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: remember copy_flag while scanning</title>
<updated>2010-10-21T08:20:36Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2010-10-19T19:00:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fb22b59b2c38054cc847f6acc5c46daa26dc6dd3'/>
<id>urn:sha1:fb22b59b2c38054cc847f6acc5c46daa26dc6dd3</id>
<content type='text'>
While scanning the flash we read all VID headers and store some important
information in 'struct ubi_scan_leb'. Store also the 'copy_flag' value there
as it is needed when comparing LEBs. We do not increase memory consumption
because this is just one bit and we have plenty of spare bits in
'struct ubi_scan_leb' (sizeof(struct ubi_scan_leb) is 48 both with and
without this patch).

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: preserve corrupted PEBs</title>
<updated>2010-10-19T14:19:57Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2010-09-03T20:08:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5fc01ab6934c43b42c41bc753fe1123c16d7f38f'/>
<id>urn:sha1:5fc01ab6934c43b42c41bc753fe1123c16d7f38f</id>
<content type='text'>
Currently UBI erases all corrupted eraseblocks, irrespectively of the nature
of corruption: corruption due to power cuts and non-power cut corruption.
The former case is OK, but the latter is not, because UBI may destroy
potentially important data.

With this patch, during scanning, when UBI hits a PEB with corrupted VID
header, it checks whether this PEB contains only 0xFF data. If yes, it is
safe to erase this PEB and it is put to the 'erase' list. If not, this may
be important data and it is better to avoid erasing this PEB. Instead,
UBI puts it to the corr list and moves out of the pool of available PEB.
IOW, UBI preserves this PEB.

Such corrupted PEB lessen the amount of available PEBs. So the more of them
we accumulate, the less PEBs are available. The maximum amount of non-power
cut corrupted PEBs is 8.

This patch is a response to UBIFS problem where reporter
(Matthew L. Creech &lt;mlcreech@gmail.com&gt;) observes that UBIFS index points
to an unmapped LEB. The theory is that corresponding PEB somehow got
corrupted and UBI wiped it. This patch (actually a series of patches)
tries to make sure such PEBs are preserved - this would make it is easier
to analyze the corruption.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: add truly corrupted PEBs to corrupted list</title>
<updated>2010-10-19T14:19:57Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2010-09-03T19:50:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=feeba4b872e5166ca64c44fbb5bbec234dfce199'/>
<id>urn:sha1:feeba4b872e5166ca64c44fbb5bbec234dfce199</id>
<content type='text'>
Start using the 'corr' list and add there PEBs which look truly corrupted,
which means they have corrupted VID header and the data which follows the
corrupted header does not contain all 0xFF bytes.

At the moment, this does not change UBI functionality much because these
PEBs will be erase when scanning finishes. But the plan is to teach UBI
preserving them.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: introduce debugging helper function</title>
<updated>2010-10-19T14:19:57Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2010-09-03T19:27:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=315324947cbc7264af86b7ecdc2d5fb5f8556222'/>
<id>urn:sha1:315324947cbc7264af86b7ecdc2d5fb5f8556222</id>
<content type='text'>
Introduce a helper function to print hexdump: 'ubi_dbg_print_hex_dump()'.
It is compiled out if debugging is enabled. Will be used in the next patch.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: make check_pattern function non-static</title>
<updated>2010-10-19T14:19:57Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2010-07-31T06:37:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bb00e180a93a6c8e89c3b2d1f9473781e1e2d2a4'/>
<id>urn:sha1:bb00e180a93a6c8e89c3b2d1f9473781e1e2d2a4</id>
<content type='text'>
This patch turns static function 'check_pattern()' into a non-static
'ubi_check_pattern()'. This is just a preparation for the chages which
are coming in the next patches.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
</feed>
