<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/ubifs, branch v2.6.39-rc4</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>UBIFS: fix compilation warnings when compiling with gcc 4.5</title>
<updated>2011-04-13T08:59:09+00:00</updated>
<author>
<name>Maksim Rayskiy</name>
<email>maksim.rayskiy@gmail.com</email>
</author>
<published>2011-04-12T22:14:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1dcffad74183bb00e8129ba1c5bb2c9931d31bd7'/>
<id>1dcffad74183bb00e8129ba1c5bb2c9931d31bd7</id>
<content type='text'>
When compiling UBIFS with CONFIG_UBIFS_FS_DEBUG not set,
gcc-4.5.2 generates a slew of "warning: statement with no effect"
on references to non-void functions defined as 0.
To avoid these warnings, replace #defines with dummy inline functions.

Artem: massage the patch a bit, also remove the duplicate
       'dbg_check_lprops()' prototype.

Signed-off-by: Maksim Rayskiy &lt;maksim.rayskiy@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&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>
When compiling UBIFS with CONFIG_UBIFS_FS_DEBUG not set,
gcc-4.5.2 generates a slew of "warning: statement with no effect"
on references to non-void functions defined as 0.
To avoid these warnings, replace #defines with dummy inline functions.

Artem: massage the patch a bit, also remove the duplicate
       'dbg_check_lprops()' prototype.

Signed-off-by: Maksim Rayskiy &lt;maksim.rayskiy@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: fix oops when R/O file-system is fsync'ed</title>
<updated>2011-04-13T07:43:32+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2011-04-13T07:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=78530bf7f2559b317c04991b52217c1608d5a58d'/>
<id>78530bf7f2559b317c04991b52217c1608d5a58d</id>
<content type='text'>
This patch fixes severe UBIFS bug: UBIFS oopses when we 'fsync()' an
file on R/O-mounter file-system. We (the UBIFS authors) incorrectly
thought that VFS would not propagate 'fsync()' down to the file-system
if it is read-only, but this is not the case.

It is easy to exploit this bug using the following simple perl script:

use strict;
use File::Sync qw(fsync sync);

die "File path is not specified" if not defined $ARGV[0];
my $path = $ARGV[0];

open FILE, "&lt;", "$path" or die "Cannot open $path: $!";
fsync(\*FILE) or die "cannot fsync $path: $!";
close FILE or die "Cannot close $path: $!";

Thanks to Reuben Dowle &lt;Reuben.Dowle@navico.com&gt; for reporting about this
issue.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Reported-by: Reuben Dowle &lt;Reuben.Dowle@navico.com&gt;
Cc: stable@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes severe UBIFS bug: UBIFS oopses when we 'fsync()' an
file on R/O-mounter file-system. We (the UBIFS authors) incorrectly
thought that VFS would not propagate 'fsync()' down to the file-system
if it is read-only, but this is not the case.

It is easy to exploit this bug using the following simple perl script:

use strict;
use File::Sync qw(fsync sync);

die "File path is not specified" if not defined $ARGV[0];
my $path = $ARGV[0];

open FILE, "&lt;", "$path" or die "Cannot open $path: $!";
fsync(\*FILE) or die "cannot fsync $path: $!";
close FILE or die "Cannot close $path: $!";

Thanks to Reuben Dowle &lt;Reuben.Dowle@navico.com&gt; for reporting about this
issue.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Reported-by: Reuben Dowle &lt;Reuben.Dowle@navico.com&gt;
Cc: stable@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.infradead.org/ubifs-2.6</title>
<updated>2011-04-07T18:31:03+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-04-07T18:31:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ccfeef0ff76ebd632ae51bc56700f0072c4f1864'/>
<id>ccfeef0ff76ebd632ae51bc56700f0072c4f1864</id>
<content type='text'>
* 'for-linus' of git://git.infradead.org/ubifs-2.6:
  UBI: do not select KALLSYMS_ALL
  UBI: do not compare array with NULL
  UBI: check if we are in RO mode in the erase routine
  UBIFS: fix debugging failure in dbg_check_space_info
  UBIFS: fix error path in dbg_debugfs_init_fs
  UBIFS: unify error path dbg_debugfs_init_fs
  UBIFS: do not select KALLSYMS_ALL
  UBIFS: fix assertion warnings
  UBIFS: fix oops on error path in read_pnode
  UBIFS: do not read flash unnecessarily
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'for-linus' of git://git.infradead.org/ubifs-2.6:
  UBI: do not select KALLSYMS_ALL
  UBI: do not compare array with NULL
  UBI: check if we are in RO mode in the erase routine
  UBIFS: fix debugging failure in dbg_check_space_info
  UBIFS: fix error path in dbg_debugfs_init_fs
  UBIFS: unify error path dbg_debugfs_init_fs
  UBIFS: do not select KALLSYMS_ALL
  UBIFS: fix assertion warnings
  UBIFS: fix oops on error path in read_pnode
  UBIFS: do not read flash unnecessarily
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6</title>
<updated>2011-04-07T18:14:49+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-04-07T18:14:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=42933bac11e811f02200c944d8562a15f8ec4ff0'/>
<id>42933bac11e811f02200c944d8562a15f8ec4ff0</id>
<content type='text'>
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: export empty_aops</title>
<updated>2011-04-05T21:51:48+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jaxboe@fusionio.com</email>
</author>
<published>2011-04-05T21:51:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7dcda1c96d7c643101d4a05579ef4512a4baa7ef'/>
<id>7dcda1c96d7c643101d4a05579ef4512a4baa7ef</id>
<content type='text'>
With the -&gt;sync_page() hook gone, we have a few users that
add their own static address_space_operations without any
functions defined.

fs/inode.c already has an empty_aops that it uses for init
purposes. Lets export that and use it in the places where
an otherwise empty aops was defined.

Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the -&gt;sync_page() hook gone, we have a few users that
add their own static address_space_operations without any
functions defined.

fs/inode.c already has an empty_aops that it uses for init
purposes. Lets export that and use it in the places where
an otherwise empty aops was defined.

Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: fix debugging failure in dbg_check_space_info</title>
<updated>2011-04-05T08:07:37+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2011-04-04T14:16:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7da6443aca9be29c6948dcbd636ad50154d0bc0c'/>
<id>7da6443aca9be29c6948dcbd636ad50154d0bc0c</id>
<content type='text'>
This patch fixes a debugging failure with which looks like this:
UBIFS error (pid 32313): dbg_check_space_info: free space changed from 6019344 to 6022654

The reason for this failure is described in the comment this patch adds
to the code. But in short - 'c-&gt;freeable_cnt' may be different before
and after re-mounting, and this is normal. So the debugging code should
make sure that free space calculations do not depend on 'c-&gt;freeable_cnt'.

A similar issue has been reported here:
http://lists.infradead.org/pipermail/linux-mtd/2011-April/034647.html

This patch should fix it.

For the -stable guys: this patch is only relevant for kernels 2.6.30
onwards.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Cc: stable@kernel.org [2.6.30+]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a debugging failure with which looks like this:
UBIFS error (pid 32313): dbg_check_space_info: free space changed from 6019344 to 6022654

The reason for this failure is described in the comment this patch adds
to the code. But in short - 'c-&gt;freeable_cnt' may be different before
and after re-mounting, and this is normal. So the debugging code should
make sure that free space calculations do not depend on 'c-&gt;freeable_cnt'.

A similar issue has been reported here:
http://lists.infradead.org/pipermail/linux-mtd/2011-April/034647.html

This patch should fix it.

For the -stable guys: this patch is only relevant for kernels 2.6.30
onwards.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Cc: stable@kernel.org [2.6.30+]
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: fix error path in dbg_debugfs_init_fs</title>
<updated>2011-04-05T07:46:01+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2011-04-01T07:16:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=95169535113073993a3ed97ecc21831657f42a80'/>
<id>95169535113073993a3ed97ecc21831657f42a80</id>
<content type='text'>
The debug interface is substandard and on error returns either
NULL or an error code packed in the pointer. So using "IS_ERR"
for the pointers returned by debugfs function is incorrect.
Instead, we should use IS_ERR_OR_NULL.

This path is an improved vestion of the original patch from
Phil Carmody.

Reported-by: Phil Carmody &lt;ext-phil.2.carmody@nokia.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Acked-by: Phil Carmody &lt;ext-phil.2.carmody@nokia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The debug interface is substandard and on error returns either
NULL or an error code packed in the pointer. So using "IS_ERR"
for the pointers returned by debugfs function is incorrect.
Instead, we should use IS_ERR_OR_NULL.

This path is an improved vestion of the original patch from
Phil Carmody.

Reported-by: Phil Carmody &lt;ext-phil.2.carmody@nokia.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Acked-by: Phil Carmody &lt;ext-phil.2.carmody@nokia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: unify error path dbg_debugfs_init_fs</title>
<updated>2011-04-05T07:46:01+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2011-04-01T07:10:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cc6a86b950d69cfe542ee0d0ff30790152936a00'/>
<id>cc6a86b950d69cfe542ee0d0ff30790152936a00</id>
<content type='text'>
This is just a small clean-up patch which simlifies and unifies the
error path in the dbg_debugfs_init_fs(). We have common error path
for all failure cases in this function except of the very first
case. And this patch makes the first failure case use the same
error path as the other cases by using the 'fname' and 'dent'
variables.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Acked-by: Phil Carmody &lt;ext-phil.2.carmody@nokia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is just a small clean-up patch which simlifies and unifies the
error path in the dbg_debugfs_init_fs(). We have common error path
for all failure cases in this function except of the very first
case. And this patch makes the first failure case use the same
error path as the other cases by using the 'fname' and 'dent'
variables.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Acked-by: Phil Carmody &lt;ext-phil.2.carmody@nokia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: do not select KALLSYMS_ALL</title>
<updated>2011-04-05T07:45:45+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2011-03-30T08:18:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=81354de3d8691c2dedcc686cd2c167819ff0df10'/>
<id>81354de3d8691c2dedcc686cd2c167819ff0df10</id>
<content type='text'>
All UBIFS needs is to make sure we stacktraces when UBIFS debugging
is enabled. It is enough to select KALLSYMS for this, KALLSYMS_ALL
is not necessary. Moreover, Randy Dunlap reported that UBIFS causes
the following Kconfig dependency warning:

warning: (UBIFS_FS_DEBUG &amp;&amp; LOCKDEP &amp;&amp; LATENCYTOP) selects KALLSYMS_ALL
which has unmet direct dependencies (DEBUG_KERNEL &amp;&amp; KALLSYMS)

The reason is that KALLSYMS_ALL requires DEBUG_KERNEL and KALLSYMS, so
ideally, to select KALLSYMS_ALL we'd need to select DEBUG_KERNEL and
KALLSYMS first.

This seems to be too much to select. The easiest way to go is to forget
about KALLSYMS_ALL and just select KALLSYMS when UBIFS debugging is
enabled - that should be enough for stackdumps.

Reported-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Acked-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All UBIFS needs is to make sure we stacktraces when UBIFS debugging
is enabled. It is enough to select KALLSYMS for this, KALLSYMS_ALL
is not necessary. Moreover, Randy Dunlap reported that UBIFS causes
the following Kconfig dependency warning:

warning: (UBIFS_FS_DEBUG &amp;&amp; LOCKDEP &amp;&amp; LATENCYTOP) selects KALLSYMS_ALL
which has unmet direct dependencies (DEBUG_KERNEL &amp;&amp; KALLSYMS)

The reason is that KALLSYMS_ALL requires DEBUG_KERNEL and KALLSYMS, so
ideally, to select KALLSYMS_ALL we'd need to select DEBUG_KERNEL and
KALLSYMS first.

This seems to be too much to select. The easiest way to go is to forget
about KALLSYMS_ALL and just select KALLSYMS when UBIFS debugging is
enabled - that should be enough for stackdumps.

Reported-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Acked-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UBIFS: fix assertion warnings</title>
<updated>2011-04-05T07:45:09+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2011-03-29T06:45:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c88ac00c5af70c2a0741da14b22cdcf8507ddd92'/>
<id>c88ac00c5af70c2a0741da14b22cdcf8507ddd92</id>
<content type='text'>
This patch fixes UBIFS assertion warnings like:

UBIFS assert failed in ubifs_leb_unmap at 135 (pid 29365)
Pid: 29365, comm: integck Tainted: G          I 2.6.37-ubi-2.6+ #34
Call Trace:
 [&lt;ffffffffa047c663&gt;] ubifs_lpt_init+0x95e/0x9ee [ubifs]
 [&lt;ffffffffa04623a7&gt;] ubifs_remount_fs+0x2c7/0x762 [ubifs]
 [&lt;ffffffff810f066e&gt;] do_remount_sb+0xb6/0x101
 [&lt;ffffffff81106ff4&gt;] ? do_mount+0x191/0x78e
 [&lt;ffffffff811070bb&gt;] do_mount+0x258/0x78e
 [&lt;ffffffff810da1e8&gt;] ? alloc_pages_current+0xa2/0xc5
 [&lt;ffffffff81107674&gt;] sys_mount+0x83/0xbd
 [&lt;ffffffff81009a12&gt;] system_call_fastpath+0x16/0x1b

They happen when we re-mount from R/O mode to R/W mode. While
re-mounting, we write to the media, but we still have the c-&gt;ro_mount
flag set. The fix is very simple - just clear the flag before
starting re-mounting R/W.

These warnings are caused by the following commit:
2ef13294d29bcfb306e0d360f1b97f37b647b0c0

For -stable guys: this bug was introduced in 2.6.38, this is materieal
for 2.6.38-stable.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Cc: stable@kernel.org [2.6.38]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes UBIFS assertion warnings like:

UBIFS assert failed in ubifs_leb_unmap at 135 (pid 29365)
Pid: 29365, comm: integck Tainted: G          I 2.6.37-ubi-2.6+ #34
Call Trace:
 [&lt;ffffffffa047c663&gt;] ubifs_lpt_init+0x95e/0x9ee [ubifs]
 [&lt;ffffffffa04623a7&gt;] ubifs_remount_fs+0x2c7/0x762 [ubifs]
 [&lt;ffffffff810f066e&gt;] do_remount_sb+0xb6/0x101
 [&lt;ffffffff81106ff4&gt;] ? do_mount+0x191/0x78e
 [&lt;ffffffff811070bb&gt;] do_mount+0x258/0x78e
 [&lt;ffffffff810da1e8&gt;] ? alloc_pages_current+0xa2/0xc5
 [&lt;ffffffff81107674&gt;] sys_mount+0x83/0xbd
 [&lt;ffffffff81009a12&gt;] system_call_fastpath+0x16/0x1b

They happen when we re-mount from R/O mode to R/W mode. While
re-mounting, we write to the media, but we still have the c-&gt;ro_mount
flag set. The fix is very simple - just clear the flag before
starting re-mounting R/W.

These warnings are caused by the following commit:
2ef13294d29bcfb306e0d360f1b97f37b647b0c0

For -stable guys: this bug was introduced in 2.6.38, this is materieal
for 2.6.38-stable.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Cc: stable@kernel.org [2.6.38]
</pre>
</div>
</content>
</entry>
</feed>
