<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mtd/ubi/wl.c, branch linux-2.6.37.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2010-10-19T14:19:57Z</updated>
<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: handle bit-flips when no header found</title>
<updated>2010-10-19T14:19:56Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2010-09-03T11:22:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=92e1a7d9e7e07fb1cf0cbbcdf202938d0819b54d'/>
<id>urn:sha1:92e1a7d9e7e07fb1cf0cbbcdf202938d0819b54d</id>
<content type='text'>
Currently UBI has one small flaw - when we read EC or VID header, but find only
0xFF bytes, we return UBI_IO_FF and do not report whether we had bit-flips or
not. In case of the VID header, the scanning code adds this PEB to the free list,
even though there were bit-flips.

Imagine the following situation: we start writing VID header to a PEB and have a
power cut, so the PEB becomes unstable. When we scan and read the PEB, we get
a bit-flip. Currently, UBI would just ignore this and treat the PEB as free. This
patch changes UBI behavior and now UBI will schedule this PEB for erasure.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: remove duplicate IO error codes</title>
<updated>2010-10-19T14:19:56Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2010-09-02T23:11:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74d82d2660058e32644f0c673656b2a1d01d3688'/>
<id>urn:sha1:74d82d2660058e32644f0c673656b2a1d01d3688</id>
<content type='text'>
The 'UBI_IO_PEB_EMPTY' and 'UBI_IO_PEB_FREE' are essentially the same
and mean that there are only 0xFF bytes instead of headers. Simplify
UBI a little by turning them into a single 'UBI_IO_FF' error code.

Also, stop maintaining commentaries in 'ubi_io_read_vid_hdr()' which are
almost identical to commentaries in 'ubi_io_read_ec_hdr()'.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: do not oops when erroneous PEB is scheduled for scrubbing</title>
<updated>2010-08-30T10:32:31Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2010-08-29T20:34:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d3f6e6c666c0f68991d785177c4c62fcd1d651f2'/>
<id>urn:sha1:d3f6e6c666c0f68991d785177c4c62fcd1d651f2</id>
<content type='text'>
When an erroneous PEB is scheduling for scrubbing, we end up with the
following oops:

[&lt;c0162404&gt;] (prot_queue_del+0x0/0x50) from [&lt;c01635b4&gt;] (ubi_wl_scrub_peb+0xec/0x13c)
[&lt;c01634c8&gt;] (ubi_wl_scrub_peb+0x0/0x13c) from [&lt;c01603bc&gt;] (ubi_eba_read_leb+0x200/0x428)
[&lt;c01601bc&gt;] (ubi_eba_read_leb+0x0/0x428) from [&lt;c015e3c0&gt;] (ubi_leb_read+0xe8/0x138)
[&lt;c015e2d8&gt;] (ubi_leb_read+0x0/0x138) from [&lt;c00d6918&gt;] (ubifs_start_scan+0x7c/0xf4)
[&lt;c00d689c&gt;] (ubifs_start_scan+0x0/0xf4) from [&lt;c00e3650&gt;] (ubifs_recover_leb+0x3c/0x730)
[&lt;c00e3614&gt;] (ubifs_recover_leb+0x0/0x730) from [&lt;c00e444c&gt;] (ubifs_recover_log_leb+0xc8/0x2dc)
[&lt;c00e4384&gt;] (ubifs_recover_log_leb+0x0/0x2dc) from [&lt;c00d7c20&gt;] (ubifs_replay_journal+0xb90/0x13a4)
[&lt;c00d7090&gt;] (ubifs_replay_journal+0x0/0x13a4) from [&lt;c00cdd68&gt;] (ubifs_fill_super+0xb84/0x1054)
[&lt;c00cd1e4&gt;] (ubifs_fill_super+0x0/0x1054) from [&lt;c00ced04&gt;] (ubifs_get_sb+0xc4/0x2ac)
[&lt;c00cec40&gt;] (ubifs_get_sb+0x0/0x2ac) from [&lt;c007f04c&gt;] (vfs_kern_mount+0x58/0x94)
[&lt;c007eff4&gt;] (vfs_kern_mount+0x0/0x94) from [&lt;c007f0e8&gt;] (do_kern_mount+0x40/0xe8)
[&lt;c007f0a8&gt;] (do_kern_mount+0x0/0xe8) from [&lt;c0095628&gt;] (do_new_mount+0x68/0x8c)
[&lt;c00955c0&gt;] (do_new_mount+0x0/0x8c) from [&lt;c00957a8&gt;] (do_mount+0x15c/0x1b8)
[&lt;c009564c&gt;] (do_mount+0x0/0x1b8) from [&lt;c0095890&gt;] (sys_mount+0x8c/0xd4)
[&lt;c0095804&gt;] (sys_mount+0x0/0xd4) from [&lt;c0023c00&gt;] (ret_fast_syscall+0x0/0x2c)
Kernel panic - not syncing: Fatal exception

The problem is that 'ubi_wl_scrub_peb()' does not expect that PEBs may
be in the erroneous tree, which is a bug. This patch fixes the bug
and adds corresponding check to 'ubi_wl_scrub_peb()'. Now it will simply
ignore erroneous PEBs, instead of causing an oops.

Reported-by: Matthieu CASTET &lt;matthieu.castet@parrot.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: fix s/then/than/ typos</title>
<updated>2010-05-07T05:33:10Z</updated>
<author>
<name>Shinya Kuribayashi</name>
</author>
<published>2010-05-06T10:21:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3f5026222e8a16daaa830eec4d72c6745b74407e'/>
<id>urn:sha1:3f5026222e8a16daaa830eec4d72c6745b74407e</id>
<content type='text'>
Signed-off-by: Shinya Kuribayashi &lt;shinya.kuribayashi.px@renesas.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: simplify debugging return codes</title>
<updated>2010-02-01T13:16:37Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2010-01-20T08:28:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adbf05e3ec6ea380ba145b6fa89d9125ed76eb98'/>
<id>urn:sha1:adbf05e3ec6ea380ba145b6fa89d9125ed76eb98</id>
<content type='text'>
UBI debugging functions were a little bit over-engineered and
returned more error codes than needed, and the callers had to
do useless checks. Simplify the return codes.

Impact: only debugging code is affected, which means that for
        non-developers this is a no-op patch.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: remove bogus debugging checks</title>
<updated>2009-07-05T15:47:05Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2009-06-29T12:58:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1398788fe7b730db10e97dcb9f838603e41922d5'/>
<id>urn:sha1:1398788fe7b730db10e97dcb9f838603e41922d5</id>
<content type='text'>
The 'paranoid_check_empty()' is bogus because, which is easilly
seen on NOR flash, which has long erase cycles, and which may
easilly end-up with half-erased eraseblocks. In this case the
paranoid check fails. I is just wrong to assume that PEBs which
do not have EC headers always contain all 0xFF. Such assumption
should not be made on the I/O level, which is quite low.

Thus, just kill the check.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: add empty eraseblocks verification</title>
<updated>2009-07-05T15:47:03Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2009-06-28T16:16:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=40a71a87fa8e0cb3ec0fca4d152263734b203eb2'/>
<id>urn:sha1:40a71a87fa8e0cb3ec0fca4d152263734b203eb2</id>
<content type='text'>
This patch adds code which makes sure eraseblocks contain all 0xFF
bytes before starting using them. The verification is done only when
debugging checks are enabled.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: fix multiple spelling typos</title>
<updated>2009-06-10T13:13:27Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2009-06-08T16:28:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=815bc5f8fe516f55291aef90f2142073821e7a9c'/>
<id>urn:sha1:815bc5f8fe516f55291aef90f2142073821e7a9c</id>
<content type='text'>
Some of the typos were indicated by Adrian Hunter,
some by 'aspell'.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: fix kmem_cache_free on error patch</title>
<updated>2009-06-10T13:13:27Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2009-06-08T16:28:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=21d08bbcb19d9cdef8ab5b584f25b50d842068e9'/>
<id>urn:sha1:21d08bbcb19d9cdef8ab5b584f25b50d842068e9</id>
<content type='text'>
'kmem_cache_free()' oopeses if NULL is passed, and there is
one error-path place where UBI may call it with NULL object.
This problem was pointed to by Adrian Hunter.

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