<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/ubifs/lpt_commit.c, branch v2.6.34.2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<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:32+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: fix commentaries</title>
<updated>2009-03-20T17:11:12+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2009-03-20T17:11:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7d4e9ccb435e51e013e63abd340b4f496428139c'/>
<id>7d4e9ccb435e51e013e63abd340b4f496428139c</id>
<content type='text'>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: use KERN_CONT</title>
<updated>2009-03-16T08:52:02+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2009-03-16T07:42:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c9927c3ee2d3d14893efd793a2a9ea772ddb4289'/>
<id>c9927c3ee2d3d14893efd793a2a9ea772ddb4289</id>
<content type='text'>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: fix lprops committing bug</title>
<updated>2009-03-16T08:51:51+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2009-03-14T14:35:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a6fb8d9c435c612171b453449f98da28e9969a5'/>
<id>0a6fb8d9c435c612171b453449f98da28e9969a5</id>
<content type='text'>
When writing lprop nodes, do not forget to set @from to 0 when
switching the LEB. This fixes the following bug:

UBIFS error (pid 27768): ubifs_leb_write: writing -15456 bytes at 16:15880, error -22
UBIFS error (pid 27768): do_commit: commit failed, error -22
UBIFS warning (pid 27768): ubifs_ro_mode: switched to read-only mode, error -22
Pid: 27768, comm: freespace Not tainted 2.6.29-rc4-ubifs-2.6 #43
Call Trace:
 [&lt;ffffffffa00c46d6&gt;] ubifs_ro_mode+0x54/0x56 [ubifs]
 [&lt;ffffffffa00cfa16&gt;] do_commit+0x4f5/0x50a [ubifs]
 [&lt;ffffffffa00cfae7&gt;] ubifs_run_commit+0xbc/0xdb [ubifs]
 [&lt;ffffffffa00d42b9&gt;] ubifs_budget_space+0x742/0x9ed [ubifs]
 [&lt;ffffffff812daf45&gt;] ? __mutex_lock_common+0x361/0x3ae
 [&lt;ffffffffa00bc437&gt;] ? ubifs_write_begin+0x18d/0x44c [ubifs]
 [&lt;ffffffffa00bc5cb&gt;] ubifs_write_begin+0x321/0x44c [ubifs]
 [&lt;ffffffff8106222b&gt;] ? trace_hardirqs_on_caller+0x1f/0x14d
 [&lt;ffffffff81097ce2&gt;] generic_file_buffered_write+0x12f/0x2d9
 [&lt;ffffffff8109828d&gt;] __generic_file_aio_write_nolock+0x261/0x295
 [&lt;ffffffff81098aff&gt;] generic_file_aio_write+0x69/0xc5
 [&lt;ffffffffa00bb914&gt;] ubifs_aio_write+0x14c/0x19e [ubifs]
 [&lt;ffffffff810c8f42&gt;] do_sync_write+0xe7/0x12d
 [&lt;ffffffff81055378&gt;] ? autoremove_wake_function+0x0/0x38
 [&lt;ffffffff81149edc&gt;] ? security_file_permission+0x11/0x13
 [&lt;ffffffff810c9827&gt;] vfs_write+0xab/0x105
 [&lt;ffffffff810c9945&gt;] sys_write+0x47/0x6f
 [&lt;ffffffff8100c35b&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When writing lprop nodes, do not forget to set @from to 0 when
switching the LEB. This fixes the following bug:

UBIFS error (pid 27768): ubifs_leb_write: writing -15456 bytes at 16:15880, error -22
UBIFS error (pid 27768): do_commit: commit failed, error -22
UBIFS warning (pid 27768): ubifs_ro_mode: switched to read-only mode, error -22
Pid: 27768, comm: freespace Not tainted 2.6.29-rc4-ubifs-2.6 #43
Call Trace:
 [&lt;ffffffffa00c46d6&gt;] ubifs_ro_mode+0x54/0x56 [ubifs]
 [&lt;ffffffffa00cfa16&gt;] do_commit+0x4f5/0x50a [ubifs]
 [&lt;ffffffffa00cfae7&gt;] ubifs_run_commit+0xbc/0xdb [ubifs]
 [&lt;ffffffffa00d42b9&gt;] ubifs_budget_space+0x742/0x9ed [ubifs]
 [&lt;ffffffff812daf45&gt;] ? __mutex_lock_common+0x361/0x3ae
 [&lt;ffffffffa00bc437&gt;] ? ubifs_write_begin+0x18d/0x44c [ubifs]
 [&lt;ffffffffa00bc5cb&gt;] ubifs_write_begin+0x321/0x44c [ubifs]
 [&lt;ffffffff8106222b&gt;] ? trace_hardirqs_on_caller+0x1f/0x14d
 [&lt;ffffffff81097ce2&gt;] generic_file_buffered_write+0x12f/0x2d9
 [&lt;ffffffff8109828d&gt;] __generic_file_aio_write_nolock+0x261/0x295
 [&lt;ffffffff81098aff&gt;] generic_file_aio_write+0x69/0xc5
 [&lt;ffffffffa00bb914&gt;] ubifs_aio_write+0x14c/0x19e [ubifs]
 [&lt;ffffffff810c8f42&gt;] do_sync_write+0xe7/0x12d
 [&lt;ffffffff81055378&gt;] ? autoremove_wake_function+0x0/0x38
 [&lt;ffffffff81149edc&gt;] ? security_file_permission+0x11/0x13
 [&lt;ffffffff810c9827&gt;] vfs_write+0xab/0x105
 [&lt;ffffffff810c9945&gt;] sys_write+0x47/0x6f
 [&lt;ffffffff8100c35b&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: fix dbg_chk_lpt_sz()</title>
<updated>2009-02-09T11:52:49+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>ext-adrian.hunter@nokia.com</email>
</author>
<published>2009-02-05T11:08:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2bc275e9b04f23708c495a8bfe92a5f4b65345c8'/>
<id>2bc275e9b04f23708c495a8bfe92a5f4b65345c8</id>
<content type='text'>
The debugging function dbg_chk_lpt_sz() was not working
correctly for small min_io_unit size e.g. NOR flash.

Signed-off-by: Adrian Hunter &lt;ext-adrian.hunter@nokia.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The debugging function dbg_chk_lpt_sz() was not working
correctly for small min_io_unit size e.g. NOR flash.

Signed-off-by: Adrian Hunter &lt;ext-adrian.hunter@nokia.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: fix LPT out-of-space bug (again)</title>
<updated>2009-01-28T14:02:07+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>ext-adrian.hunter@nokia.com</email>
</author>
<published>2009-01-27T13:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4a29d2005b0f28d018d36d209c47f3973a725df5'/>
<id>4a29d2005b0f28d018d36d209c47f3973a725df5</id>
<content type='text'>
The function to traverse and dirty the LPT was still not
dirtying all nodes, with the result that the LPT could
run out of space.

Signed-off-by: Adrian Hunter &lt;ext-adrian.hunter@nokia.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function to traverse and dirty the LPT was still not
dirtying all nodes, with the result that the LPT could
run out of space.

Signed-off-by: Adrian Hunter &lt;ext-adrian.hunter@nokia.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: fix numerous spelling mistakes</title>
<updated>2008-12-31T12:13:25+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2008-12-30T15:44:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=80736d41f895bc472b2433a1c27fa6d4afe6ca35'/>
<id>80736d41f895bc472b2433a1c27fa6d4afe6ca35</id>
<content type='text'>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: fix checkpatch.pl warnings</title>
<updated>2008-12-31T12:13:25+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2008-12-28T09:34:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f92b982680e4b4149c559789a54e1e9db190752a'/>
<id>f92b982680e4b4149c559789a54e1e9db190752a</id>
<content type='text'>
These are mostly long lines and wrong indentation warning
fixes. But also there are two volatile variables and
checkpatch.pl complains about them:

WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
+       volatile int gc_seq;

WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
+       volatile int gced_lnum;

Well, we anyway use smp_wmb() for c-&gt;gc_seq and c-&gt;gced_lnum, so
these 'volatile' modifiers can be just dropped.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are mostly long lines and wrong indentation warning
fixes. But also there are two volatile variables and
checkpatch.pl complains about them:

WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
+       volatile int gc_seq;

WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
+       volatile int gced_lnum;

Well, we anyway use smp_wmb() for c-&gt;gc_seq and c-&gt;gced_lnum, so
these 'volatile' modifiers can be just dropped.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: introduce LPT dump function</title>
<updated>2008-12-03T11:14:34+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2008-10-31T15:32:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2ba5f7ae8165b3f575dd3a7d8bb18f421fab8273'/>
<id>2ba5f7ae8165b3f575dd3a7d8bb18f421fab8273</id>
<content type='text'>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: dump stack in LPT check functions</title>
<updated>2008-12-03T11:14:34+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2008-10-31T10:17:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=787845bdeadd368eedeace92d5bf53f5aa1450ba'/>
<id>787845bdeadd368eedeace92d5bf53f5aa1450ba</id>
<content type='text'>
It is useful to know how we got to the checking function when
hunting the bugs.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is useful to know how we got to the checking function when
hunting the bugs.

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