<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mtd/ubi/eba.c, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-08-22T21:37:15Z</updated>
<entry>
<title>ubi: Make recover_peb power cut aware</title>
<updated>2016-08-22T21:37:15Z</updated>
<author>
<name>Richard Weinberger</name>
</author>
<published>2016-06-20T22:31:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bedbc047e74d0962e194eb0018e9e1dbd7b9402f'/>
<id>urn:sha1:bedbc047e74d0962e194eb0018e9e1dbd7b9402f</id>
<content type='text'>
commit 972228d87445dc46c0a01f5f3de673ac017626f7 upstream.

recover_peb() was never power cut aware,
if a power cut happened right after writing the VID header
upon next attach UBI would blindly use the new partial written
PEB and all data from the old PEB is lost.

In order to make recover_peb() power cut aware, write the new
VID with a proper crc and copy_flag set such that the UBI attach
process will detect whether the new PEB is completely written
or not.
We cannot directly use ubi_eba_atomic_leb_change() since we'd
have to unlock the LEB which is facing a write error.

Reported-by: Jörg Pfähler &lt;pfaehler@isse.de&gt;
Reviewed-by: Jörg Pfähler &lt;pfaehler@isse.de&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
[bwh: Backported to 3.2:
 - Adjust context
 - Use next_sqnum() instead of ubi_next_sqnum()
 - Use ubi_device::peb_buf1 instead of ubi_device::peb_buf
 - No need to unlock ubi-&gt;fm_eba_sem on error]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>UBI: fix out of bounds write</title>
<updated>2015-08-06T23:32:01Z</updated>
<author>
<name>Brian Norris</name>
</author>
<published>2015-02-28T10:23:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4d1519d8538a6a91ffcd10d56a15f538804b5bad'/>
<id>urn:sha1:4d1519d8538a6a91ffcd10d56a15f538804b5bad</id>
<content type='text'>
commit d74adbdb9abf0d2506a6c4afa534d894f28b763f upstream.

If aeb-&gt;len &gt;= vol-&gt;reserved_pebs, we should not be writing aeb into the
PEB-&gt;LEB mapping.

Caught by Coverity, CID #711212.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
[bwh: Backported to 3.2: adjust context; s/leb/seb/g]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>UBI: fix missing scrub when there is a bit-flip</title>
<updated>2012-01-26T00:13:17Z</updated>
<author>
<name>Bhavesh Parekh</name>
</author>
<published>2011-11-30T12:13:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=73461014f2de68f1dbca13897af0feb77872b8f5'/>
<id>urn:sha1:73461014f2de68f1dbca13897af0feb77872b8f5</id>
<content type='text'>
commit e801e128b2200c40a0ec236cf2330b2586b6e05a upstream.

Under some cases, when scrubbing the PEB if we did not get the lock on
the PEB it fails to scrub. Add that PEB again to the scrub list

Artem: minor amendments.

Signed-off-by: Bhavesh Parekh &lt;bparekh@nvidia.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>mtd: utilize `mtd_is_*()' functions</title>
<updated>2011-09-21T06:19:06Z</updated>
<author>
<name>Brian Norris</name>
</author>
<published>2011-09-21T01:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d57f40544a41fdfe90fd863b6865138c5a82f1cc'/>
<id>urn:sha1:d57f40544a41fdfe90fd863b6865138c5a82f1cc</id>
<content type='text'>
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: preserve corrupted PEBs</title>
<updated>2010-10-19T14:19:57Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2010-09-03T20:08:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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: rename IO error code</title>
<updated>2010-10-19T14:19:56Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2010-09-02T22:30:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=756e1df1d2b8b572a92dd1b82d2a432d5b280b1c'/>
<id>urn:sha1:756e1df1d2b8b572a92dd1b82d2a432d5b280b1c</id>
<content type='text'>
Rename UBI_IO_BAD_HDR_READ into UBI_IO_BAD_HDR_EBADMSG which is presumably more
self-documenting and readable. Indeed, the '_READ' suffix does not tell much and
even confuses, while '_EBADMSG' tells about uncorrectable ECC error, because we
use -EBADMSG all over the place to represent ECC errors.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: do not warn unnecessarily</title>
<updated>2010-08-02T04:21:19Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2010-07-30T11:59:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64d4b4c90a876401e503c3a3260e9d0ed066f271'/>
<id>urn:sha1:64d4b4c90a876401e503c3a3260e9d0ed066f271</id>
<content type='text'>
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 &lt;mlcreech@gmail.com&gt; 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 &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: introduce a new IO return code</title>
<updated>2010-06-04T08:30:42Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2010-05-03T06:04:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eb89580e1a8388d206bf143c6c39d001095106ba'/>
<id>urn:sha1:eb89580e1a8388d206bf143c6c39d001095106ba</id>
<content type='text'>
This patch introduces the %UBI_IO_BAD_HDR_READ return code for
the I/O level function. We will use this code in order to distinguish
between "corrupted header possibly because this is non-ubi data" and
"corrupted header possibly because of real data corruption and ECC error".

So far this patch does not introduce any functional change, just a
preparation.

This patch is pased on a patch from
Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Reviewed-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Tested-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
</content>
</entry>
<entry>
<title>UBI: simplify IO error codes</title>
<updated>2010-06-04T08:30:42Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2010-04-30T13:50:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=786d78318586cbdc8aec539fe5a4942490267fef'/>
<id>urn:sha1:786d78318586cbdc8aec539fe5a4942490267fef</id>
<content type='text'>
We do not really need 2 separate error codes for indicating bad VID
and bad EC headers (UBI_IO_BAD_EC_HDR, UBI_IO_BAD_VID_HDR), it is
enough to have only one UBI_IO_BAD_HDR return code.

This patch does not introduce any functional change, only some
code simplification.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Reviewed-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Tested-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
</content>
</entry>
<entry>
<title>trivial: fix typo "to to" in multiple files</title>
<updated>2009-09-21T13:14:55Z</updated>
<author>
<name>Anand Gadiyar</name>
</author>
<published>2009-07-16T15:13:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd589a8f0a13f53a2dd580b1fe170633cf6b095f'/>
<id>urn:sha1:fd589a8f0a13f53a2dd580b1fe170633cf6b095f</id>
<content type='text'>
Signed-off-by: Anand Gadiyar &lt;gadiyar@ti.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
