<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mtd/ubi/io.c, branch linux-2.6.34.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.34.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.34.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2010-03-30T13:02:32Z</updated>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>UBI: add write checking</title>
<updated>2010-02-01T13:16:37Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2010-01-25T15:09:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e9065d756df5dac6dc02b94b82b4f5dbbf38caf'/>
<id>urn:sha1:6e9065d756df5dac6dc02b94b82b4f5dbbf38caf</id>
<content type='text'>
Add an extra debugging check function which validates writes.
After every write it reads the data back, compares it with the
original data, and complains if they mismatch.

Useful for debugging. No-op if extra debugging checks are disabled.

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: improve NOR flash erasure quirk</title>
<updated>2009-08-14T17:02:20Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2009-07-24T13:18:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de75c771b4cc4da963164a538a8448128301bc35'/>
<id>urn:sha1:de75c771b4cc4da963164a538a8448128301bc35</id>
<content type='text'>
More testing of NOR flash against power cuts showed that sometimes
eraseblocks may be unwritable, and we cannot really invalidate
them before erasure. But in this case the eraseblock probably
contains garbage anyway, and we do not have to invalidate the
headers. This assumption might be not true, but this is at least
what I have observed. So if we cannot invalidate the headers,
we make sure that the PEB does not contain valid VID header.
If this is true, everything is fine, otherwise we panic.
</content>
</entry>
<entry>
<title>UBI: introduce flash dump helper</title>
<updated>2009-08-14T17:02:20Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2009-07-24T12:31:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=867996b15c1f0a98d2c405bada907e97499ba8c2'/>
<id>urn:sha1:867996b15c1f0a98d2c405bada907e97499ba8c2</id>
<content type='text'>
Useful for debugging problems, compiled in only if UBI debugging
is enabled. This patch also makes the UBI writing function dump
the flash if it fails to write.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: amend NOR flash pre-erase quirk</title>
<updated>2009-08-14T17:01:36Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2009-07-19T11:09:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5b289b562f6d236108569a880cb38cc03d17a50d'/>
<id>urn:sha1:5b289b562f6d236108569a880cb38cc03d17a50d</id>
<content type='text'>
In case of NOR flash, UBI zeroes EC and VID headers' magic,
in order to detect interrupted erasures. It first zeroes out
the EC magic, then VID magic. However, if a power cut happens
in between, we'll end up with a corrupted EC header and a valid
VID header, in which case UBI accepts the PEB, but prints a
warning. This patch makes sure we first zero out the VID
magic, then the EC magic, not vice versa. This is just a
small amendment to prevent warning messages.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: fix compilation warnings</title>
<updated>2009-07-08T07:15:41Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2009-07-08T07:15:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=83c2099f5e1f0a4621ed4f20fc539069c636a24b'/>
<id>urn:sha1:83c2099f5e1f0a4621ed4f20fc539069c636a24b</id>
<content type='text'>
The recent "UBI: fix NOR flash recovery" introduced compilation
warnings which were immediately spotted by our linux-next keeper.
This patch fixes them.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: fix NOR flash recovery</title>
<updated>2009-07-07T08:37:45Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2009-07-06T05:57:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ebf53f421308c2f59c9bcbad4c5c297a0d00199a'/>
<id>urn:sha1:ebf53f421308c2f59c9bcbad4c5c297a0d00199a</id>
<content type='text'>
This commit fixes NOR flash recovery issues observed with Spansion
S29GL512N NOR.

When NOR erases, it first fills PEBs with zeroes, then sets all bytes
to 0xFF. Filling with zeroes starts from the end of the PEB. And when
power is cut, this results in PEBs containing correct EC and VID headers
but corrupted with zeros at the end. This confuses UBI and it mistakinly
accepts these PEBs and associate them with LEBs.

Fis this issue by zeroing EC and VID magics before erasing PEBs, to
make UBI later refuse zem.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: nicify image sequence number handling</title>
<updated>2009-07-05T15:47:08Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2009-06-30T13:11:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe96efc1a3c049f0a1bcd9b65e0faeb751ce5ec6'/>
<id>urn:sha1:fe96efc1a3c049f0a1bcd9b65e0faeb751ce5ec6</id>
<content type='text'>
Move the image seq. number handling from I/O level to the scanning
lever, where it really belongs to. Move the @image_seq_set variable
to the @struct ubi_scan_info structure, which exists only during
scanning.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: add image sequence number to EC header</title>
<updated>2009-07-05T15:47:07Z</updated>
<author>
<name>Adrian Hunter</name>
</author>
<published>2009-06-26T11:58:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c6c7fa1313fcb69cae35e34168d2e83b8da854a'/>
<id>urn:sha1:0c6c7fa1313fcb69cae35e34168d2e83b8da854a</id>
<content type='text'>
An image sequence number is added to the UBI erase-counter header
to be able determine if the root file system contains a mixture
of old and new images (because the flashing failed to complete).

A change to nolo is also needed for this to take effect.

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