<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/ext4, branch v2.6.22.15</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>dir_index: error out instead of BUG on corrupt dx dirs</title>
<updated>2007-09-26T17:54:41+00:00</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2007-09-19T05:46:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ef0f3948e965f20af7426a4f3dca2512578cd379'/>
<id>ef0f3948e965f20af7426a4f3dca2512578cd379</id>
<content type='text'>
commit 3d82abae9523c33d4a16fdfdfd2bdde316d7b56a in mainline.

Convert asserts (BUGs) in dx_probe from bad on-disk data to recoverable
errors with helpful warnings.  With help catching other asserts from Duane
Griffin &lt;duaneg@dghda.com&gt;

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Acked-by: Duane Griffin &lt;duaneg@dghda.com&gt;
Acked-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3d82abae9523c33d4a16fdfdfd2bdde316d7b56a in mainline.

Convert asserts (BUGs) in dx_probe from bad on-disk data to recoverable
errors with helpful warnings.  With help catching other asserts from Duane
Griffin &lt;duaneg@dghda.com&gt;

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Acked-by: Duane Griffin &lt;duaneg@dghda.com&gt;
Acked-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ext34: ensure do_split leaves enough free space in both blocks</title>
<updated>2007-09-26T17:54:40+00:00</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2007-09-19T05:46:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f36dab894e29637bae9a58a6fb43fa66e8a94f85'/>
<id>f36dab894e29637bae9a58a6fb43fa66e8a94f85</id>
<content type='text'>
commit ef2b02d3e617cb0400eedf2668f86215e1b0e6af in mainline.

The do_split() function for htree dir blocks is intended to split a leaf
block to make room for a new entry.  It sorts the entries in the original
block by hash value, then moves the last half of the entries to the new
block - without accounting for how much space this actually moves.  (IOW,
it moves half of the entry *count* not half of the entry *space*).  If by
chance we have both large &amp; small entries, and we move only the smallest
entries, and we have a large new entry to insert, we may not have created
enough space for it.

The patch below stores each record size when calculating the dx_map, and
then walks the hash-sorted dx_map, calculating how many entries must be
moved to more evenly split the existing entries between the old block and
the new block, guaranteeing enough space for the new entry.

The dx_map "offs" member is reduced to u16 so that the overall map size
does not change - it is temporarily stored at the end of the new block, and
if it grows too large it may be overwritten.  By making offs and size both
u16, we won't grow the map size.

Also add a few comments to the functions involved.

This fixes the testcase reported by hooanon05@yahoo.co.jp on the
linux-ext4 list, "ext3 dir_index causes an error"

Thanks to Andreas Dilger for discussing the problem &amp; solution with me.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Signed-off-by: Andreas Dilger &lt;adilger@clusterfs.com&gt;
Tested-by: Junjiro Okajima &lt;hooanon05@yahoo.co.jp&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: ext4 &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ef2b02d3e617cb0400eedf2668f86215e1b0e6af in mainline.

The do_split() function for htree dir blocks is intended to split a leaf
block to make room for a new entry.  It sorts the entries in the original
block by hash value, then moves the last half of the entries to the new
block - without accounting for how much space this actually moves.  (IOW,
it moves half of the entry *count* not half of the entry *space*).  If by
chance we have both large &amp; small entries, and we move only the smallest
entries, and we have a large new entry to insert, we may not have created
enough space for it.

The patch below stores each record size when calculating the dx_map, and
then walks the hash-sorted dx_map, calculating how many entries must be
moved to more evenly split the existing entries between the old block and
the new block, guaranteeing enough space for the new entry.

The dx_map "offs" member is reduced to u16 so that the overall map size
does not change - it is temporarily stored at the end of the new block, and
if it grows too large it may be overwritten.  By making offs and size both
u16, we won't grow the map size.

Also add a few comments to the functions involved.

This fixes the testcase reported by hooanon05@yahoo.co.jp on the
linux-ext4 list, "ext3 dir_index causes an error"

Thanks to Andreas Dilger for discussing the problem &amp; solution with me.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Signed-off-by: Andreas Dilger &lt;adilger@clusterfs.com&gt;
Tested-by: Junjiro Okajima &lt;hooanon05@yahoo.co.jp&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: ext4 &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>"ext4_ext_put_in_cache" uses __u32 to receive physical block number</title>
<updated>2007-08-09T21:27:36+00:00</updated>
<author>
<name>Mingming Cao</name>
<email>cmm@us.ibm.com</email>
</author>
<published>2007-07-31T07:37:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e2b5b2ab31b585fd67faab69db3bfe2e3c993ec7'/>
<id>e2b5b2ab31b585fd67faab69db3bfe2e3c993ec7</id>
<content type='text'>
Yan Zheng wrote:

&gt; I think I found a bug in ext4/extents.c, "ext4_ext_put_in_cache" uses
&gt; "__u32" to receive physical block number.  "ext4_ext_put_in_cache" is
&gt; used in "ext4_ext_get_blocks", it sets ext4 inode's extent cache
&gt; according most recently tree lookup (higher 16 bits of saved physical
&gt; block number are always zero). when serving a mapping request,
&gt; "ext4_ext_get_blocks" first check whether the logical block is in
&gt; inode's extent cache. if the logical block is in the cache and the
&gt; cached region isn't a gap, "ext4_ext_get_blocks" gets physical block
&gt; number by using cached region's physical block number and offset in
&gt; the cached region.  as described above, "ext4_ext_get_blocks" may
&gt; return wrong result when there are physical block numbers bigger than
&gt; 0xffffffff.
&gt;

You are right.  Thanks for reporting this!

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Cc: Yan Zheng &lt;yanzheng@21cn.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Yan Zheng wrote:

&gt; I think I found a bug in ext4/extents.c, "ext4_ext_put_in_cache" uses
&gt; "__u32" to receive physical block number.  "ext4_ext_put_in_cache" is
&gt; used in "ext4_ext_get_blocks", it sets ext4 inode's extent cache
&gt; according most recently tree lookup (higher 16 bits of saved physical
&gt; block number are always zero). when serving a mapping request,
&gt; "ext4_ext_get_blocks" first check whether the logical block is in
&gt; inode's extent cache. if the logical block is in the cache and the
&gt; cached region isn't a gap, "ext4_ext_get_blocks" gets physical block
&gt; number by using cached region's physical block number and offset in
&gt; the cached region.  as described above, "ext4_ext_get_blocks" may
&gt; return wrong result when there are physical block numbers bigger than
&gt; 0xffffffff.
&gt;

You are right.  Thanks for reporting this!

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Cc: Yan Zheng &lt;yanzheng@21cn.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: lost brelse in ext4_read_inode()</title>
<updated>2007-06-24T15:59:12+00:00</updated>
<author>
<name>Kirill Korotaev</name>
<email>dev@openvz.org</email>
</author>
<published>2007-06-24T00:16:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e5d2861f31474b373ce7754dc5122b414a176c64'/>
<id>e5d2861f31474b373ce7754dc5122b414a176c64</id>
<content type='text'>
One of error path in ext4_read_inode() leaks bh since brelse is forgoten.

Signed-off-by: Kirill Korotaev &lt;dev@openvz.org&gt;
Acked-by: Vasily Averin &lt;vvs@sw.ru&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One of error path in ext4_read_inode() leaks bh since brelse is forgoten.

Signed-off-by: Kirill Korotaev &lt;dev@openvz.org&gt;
Acked-by: Vasily Averin &lt;vvs@sw.ru&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>When ext4_ext_insert_extent() fails to insert new blocks</title>
<updated>2007-05-31T20:20:15+00:00</updated>
<author>
<name>Alex Tomas</name>
<email>alex@clusterfs.com</email>
</author>
<published>2007-05-24T17:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=315054f023d28ee64f308adf8b5737831541776b'/>
<id>315054f023d28ee64f308adf8b5737831541776b</id>
<content type='text'>
we should free just the allocated blocks.

Signed-off-by: Alex Tomas &lt;alex@clusterfs.com&gt;
Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
we should free just the allocated blocks.

Signed-off-by: Alex Tomas &lt;alex@clusterfs.com&gt;
Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: Extent overlap bugfix</title>
<updated>2007-05-31T20:20:15+00:00</updated>
<author>
<name>Amit Arora</name>
<email>aarora@in.ibm.com</email>
</author>
<published>2007-05-24T17:04:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25d14f983f70ddbeb15fa2d0f32f6b70bca42a15'/>
<id>25d14f983f70ddbeb15fa2d0f32f6b70bca42a15</id>
<content type='text'>
This patch adds a check for overlap of extents and cuts short the
new extent to be inserted, if there is a chance of overlap.

Signed-off-by: Amit Arora &lt;aarora@in.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a check for overlap of extents and cuts short the
new extent to be inserted, if there is a chance of overlap.

Signed-off-by: Amit Arora &lt;aarora@in.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unnecessary exported symbols.</title>
<updated>2007-05-31T20:20:15+00:00</updated>
<author>
<name>Mingming Cao</name>
<email>cmm@us.ibm.com</email>
</author>
<published>2007-05-24T17:04:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8a9dc94498f39c259b011d0abcb89bdf73cafa2d'/>
<id>8a9dc94498f39c259b011d0abcb89bdf73cafa2d</id>
<content type='text'>
Signed-Off-By: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-Off-By: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>EXT4: Fix whitespace</title>
<updated>2007-05-31T20:20:14+00:00</updated>
<author>
<name>Dave Kleikamp</name>
<email>shaggy@austin.ibm.com</email>
</author>
<published>2007-05-24T17:04:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8c55e20411c9499c52890a081724a8b71f3dc3a1'/>
<id>8c55e20411c9499c52890a081724a8b71f3dc3a1</id>
<content type='text'>
Replace a lot of spaces with tabs

Signed-off-by: Dave Kleikamp &lt;shaggy@linux.vnet.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace a lot of spaces with tabs

Signed-off-by: Dave Kleikamp &lt;shaggy@linux.vnet.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove SLAB_CTOR_CONSTRUCTOR</title>
<updated>2007-05-17T12:23:04+00:00</updated>
<author>
<name>Christoph Lameter</name>
<email>clameter@sgi.com</email>
</author>
<published>2007-05-17T05:10:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a35afb830f8d71ec211531aeb9a621b09a2efb39'/>
<id>a35afb830f8d71ec211531aeb9a621b09a2efb39</id>
<content type='text'>
SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it.

Signed-off-by: Christoph Lameter &lt;clameter@sgi.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Steven French &lt;sfrench@us.ibm.com&gt;
Cc: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Cc: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Cc: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Cc: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Dave Kleikamp &lt;shaggy@austin.ibm.com&gt;
Cc: Trond Myklebust &lt;trond.myklebust@fys.uio.no&gt;
Cc: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Cc: Anton Altaparmakov &lt;aia21@cantab.net&gt;
Cc: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Jan Kara &lt;jack@ucw.cz&gt;
Cc: David Chinner &lt;dgc@sgi.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it.

Signed-off-by: Christoph Lameter &lt;clameter@sgi.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Steven French &lt;sfrench@us.ibm.com&gt;
Cc: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Cc: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Cc: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Cc: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Dave Kleikamp &lt;shaggy@austin.ibm.com&gt;
Cc: Trond Myklebust &lt;trond.myklebust@fys.uio.no&gt;
Cc: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Cc: Anton Altaparmakov &lt;aia21@cantab.net&gt;
Cc: Mark Fasheh &lt;mark.fasheh@oracle.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Jan Kara &lt;jack@ucw.cz&gt;
Cc: David Chinner &lt;dgc@sgi.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>header cleaning: don't include smp_lock.h when not used</title>
<updated>2007-05-08T18:15:07+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2007-05-08T07:28:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e63340ae6b6205fef26b40a75673d1c9c0c8bb90'/>
<id>e63340ae6b6205fef26b40a75673d1c9c0c8bb90</id>
<content type='text'>
Remove includes of &lt;linux/smp_lock.h&gt; where it is not used/needed.
Suggested by Al Viro.

Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove includes of &lt;linux/smp_lock.h&gt; where it is not used/needed.
Suggested by Al Viro.

Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
