<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/jbd, branch v2.6.19.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>[PATCH] jbd: journal_dirty_data re-check for unmapped buffers</title>
<updated>2006-10-28T18:30:51+00:00</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@sandeen.net</email>
</author>
<published>2006-10-28T17:38:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f58a74dca88d48b0669609b4957f3dd757bdc898'/>
<id>f58a74dca88d48b0669609b4957f3dd757bdc898</id>
<content type='text'>
When running several fsx's and other filesystem stress tests, we found
cases where an unmapped buffer was still being sent to submit_bh by the
ext3 dirty data journaling code.

I saw this happen in two ways, both related to another thread doing a
truncate which would unmap the buffer in question.

Either we would get into journal_dirty_data with a bh which was already
unmapped (although journal_dirty_data_fn had checked for this earlier, the
state was not locked at that point), or it would get unmapped in the middle
of journal_dirty_data when we dropped locks to call sync_dirty_buffer.

By re-checking for mapped state after we've acquired the bh state lock, we
should avoid these races.  If we find a buffer which is no longer mapped,
we essentially ignore it, because journal_unmap_buffer has already decided
that this buffer can go away.

I've also added tracepoints in these two cases, and made a couple other
tracepoint changes that I found useful in debugging this.

Signed-off-by: Eric Sandeen &lt;esandeen@redhat.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running several fsx's and other filesystem stress tests, we found
cases where an unmapped buffer was still being sent to submit_bh by the
ext3 dirty data journaling code.

I saw this happen in two ways, both related to another thread doing a
truncate which would unmap the buffer in question.

Either we would get into journal_dirty_data with a bh which was already
unmapped (although journal_dirty_data_fn had checked for this earlier, the
state was not locked at that point), or it would get unmapped in the middle
of journal_dirty_data when we dropped locks to call sync_dirty_buffer.

By re-checking for mapped state after we've acquired the bh state lock, we
should avoid these races.  If we find a buffer which is no longer mapped,
we essentially ignore it, because journal_unmap_buffer has already decided
that this buffer can go away.

I've also added tracepoints in these two cases, and made a couple other
tracepoint changes that I found useful in debugging this.

Signed-off-by: Eric Sandeen &lt;esandeen@redhat.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ext3/4: fix J_ASSERT(transaction-&gt;t_updates &gt; 0) in journal_stop()</title>
<updated>2006-10-20T17:26:44+00:00</updated>
<author>
<name>OGAWA Hirofumi</name>
<email>hirofumi@mail.parknet.co.jp</email>
</author>
<published>2006-10-20T06:29:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3e2a532b26b491706bd8b5c7cfc8d767b43b8f36'/>
<id>3e2a532b26b491706bd8b5c7cfc8d767b43b8f36</id>
<content type='text'>
A disk generated some I/O error, after it, I hitted
J_ASSERT(transaction-&gt;t_updates &gt; 0) in journal_stop().

It seems to happened on ext3_truncate() path from stack trace. Then,
maybe the following case may trigger J_ASSERT(transaction-&gt;t_updates &gt; 0).

ext3_truncate()
    -&gt; ext3_free_branches()
        -&gt; ext3_journal_test_restart()
	    -&gt; ext3_journal_restart()
                -&gt; journal_restart()
                transaction-&gt;t_updates--;
                /* another process aborted journal */
                    -&gt; start_this_handle()
		    returns -EROFS without transaction-&gt;t_updates++;

    -&gt; ext3_journal_stop()
        -&gt; journal_stop()
	J_ASSERT(transaction-&gt;t_updates &gt; 0)

If journal was aborted in middle of journal_restart(), ext3_truncate()
may trigger J_ASSERT().

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A disk generated some I/O error, after it, I hitted
J_ASSERT(transaction-&gt;t_updates &gt; 0) in journal_stop().

It seems to happened on ext3_truncate() path from stack trace. Then,
maybe the following case may trigger J_ASSERT(transaction-&gt;t_updates &gt; 0).

ext3_truncate()
    -&gt; ext3_free_branches()
        -&gt; ext3_journal_test_restart()
	    -&gt; ext3_journal_restart()
                -&gt; journal_restart()
                transaction-&gt;t_updates--;
                /* another process aborted journal */
                    -&gt; start_this_handle()
		    returns -EROFS without transaction-&gt;t_updates++;

    -&gt; ext3_journal_stop()
        -&gt; journal_stop()
	J_ASSERT(transaction-&gt;t_updates &gt; 0)

If journal was aborted in middle of journal_restart(), ext3_truncate()
may trigger J_ASSERT().

Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] null dereference in fs/jbd/journal.c</title>
<updated>2006-10-11T18:14:14+00:00</updated>
<author>
<name>Eric Sesterhenn</name>
<email>snakebyte@gmx.de</email>
</author>
<published>2006-10-11T08:20:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=41716c7c21b15e7ecf14f0caf1eef3980707fb74'/>
<id>41716c7c21b15e7ecf14f0caf1eef3980707fb74</id>
<content type='text'>
Since commit d1807793e1e7e502e3dc047115e9dbc3b50e4534 we dereference a NULL
pointer.  Coverity id #1432.  We set journal to NULL, and use it directly
afterwards.

Signed-off-by: Eric Sesterhenn &lt;snakebyte@gmx.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit d1807793e1e7e502e3dc047115e9dbc3b50e4534 we dereference a NULL
pointer.  Coverity id #1432.  We set journal to NULL, and use it directly
afterwards.

Signed-off-by: Eric Sesterhenn &lt;snakebyte@gmx.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix file specification in comments</title>
<updated>2006-10-03T21:01:26+00:00</updated>
<author>
<name>Uwe Zeisberger</name>
<email>Uwe_Zeisberger@digi.com</email>
</author>
<published>2006-10-03T21:01:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f30c2269544bffc7bf1b0d7c0abe5be1be83b8cb'/>
<id>f30c2269544bffc7bf1b0d7c0abe5be1be83b8cb</id>
<content type='text'>
Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Zeisberger &lt;Uwe_Zeisberger@digi.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Zeisberger &lt;Uwe_Zeisberger@digi.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] JBD: memory leak in "journal_init_dev()"</title>
<updated>2006-09-29T16:18:03+00:00</updated>
<author>
<name>Zoltan Menyhart</name>
<email>Zoltan.Menyhart@bull.net</email>
</author>
<published>2006-09-29T08:58:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d1807793e1e7e502e3dc047115e9dbc3b50e4534'/>
<id>d1807793e1e7e502e3dc047115e9dbc3b50e4534</id>
<content type='text'>
We leak a bh ref in "journal_init_dev()" in case of failure.

Signed-off-by: Zoltan Menyhart &lt;Zoltan.Menyhart@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We leak a bh ref in "journal_init_dev()" in case of failure.

Signed-off-by: Zoltan Menyhart &lt;Zoltan.Menyhart@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] JBD: Make journal_brelse_array() static</title>
<updated>2006-09-29T16:18:03+00:00</updated>
<author>
<name>Dave Kleikamp</name>
<email>shaggy@austin.ibm.com</email>
</author>
<published>2006-09-29T08:58:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f71b2f10f56802075d67c5710cd9f1816382d720'/>
<id>f71b2f10f56802075d67c5710cd9f1816382d720</id>
<content type='text'>
It's always good to make symbols static when we can, and this also eliminates
the need to rename the function in jbd2

Suggested by Eric Sandeen.

Signed-off-by: Dave Kleikamp &lt;shaggy@austin.ibm.com&gt;
Cc: Eric Sandeen &lt;sandeen@sandeen.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's always good to make symbols static when we can, and this also eliminates
the need to rename the function in jbd2

Suggested by Eric Sandeen.

Signed-off-by: Dave Kleikamp &lt;shaggy@austin.ibm.com&gt;
Cc: Eric Sandeen &lt;sandeen@sandeen.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ext3: Fix sparse warnings</title>
<updated>2006-09-27T15:26:10+00:00</updated>
<author>
<name>Dave Kleikamp</name>
<email>shaggy@austin.ibm.com</email>
</author>
<published>2006-09-27T08:49:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a4e4de36dc446b2193bdc8ebb96a96e44b69dd94'/>
<id>a4e4de36dc446b2193bdc8ebb96a96e44b69dd94</id>
<content type='text'>
Fixing up some endian-ness warnings in preparation to clone ext4 from ext3.

Signed-off-by: Dave Kleikamp &lt;shaggy@austin.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixing up some endian-ness warnings in preparation to clone ext4 from ext3.

Signed-off-by: Dave Kleikamp &lt;shaggy@austin.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ext3: More whitespace cleanups</title>
<updated>2006-09-27T15:26:10+00:00</updated>
<author>
<name>Dave Kleikamp</name>
<email>shaggy@austin.ibm.com</email>
</author>
<published>2006-09-27T08:49:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e9ad5620bfb901df8a7a2603c88689ededeecaf1'/>
<id>e9ad5620bfb901df8a7a2603c88689ededeecaf1</id>
<content type='text'>
More white space cleanups in preparation of cloning ext4 from ext3.
Removing spaces that precede a tab.

Signed-off-by: Dave Kleikamp &lt;shaggy@austin.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
More white space cleanups in preparation of cloning ext4 from ext3.
Removing spaces that precede a tab.

Signed-off-by: Dave Kleikamp &lt;shaggy@austin.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] JBD: 16T fixes</title>
<updated>2006-09-27T15:26:09+00:00</updated>
<author>
<name>Eric Sandeen</name>
<email>esandeen@redhat.com</email>
</author>
<published>2006-09-27T08:49:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=37ed322290eb6d5cf2ab33915793ed4219eae1d6'/>
<id>37ed322290eb6d5cf2ab33915793ed4219eae1d6</id>
<content type='text'>
These are a few places I've found in jbd that look like they may not be
16T-safe, or consistent with the use of unsigned longs for block
containers.  Problems here would be somewhat hard to hit, would require
journal blocks past the 8T boundary, which would not be terribly common.
Still, should fix.

(some of these have come from the ext4 work on jbd as well).

I think there's one more possibility that the wrap() function may not be
safe IF your last block in the journal butts right up against the 232 block
boundary, but that seems like a VERY remote possibility, and I'm not
worrying about it at this point.

Signed-off-by: Eric Sandeen &lt;esandeen@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are a few places I've found in jbd that look like they may not be
16T-safe, or consistent with the use of unsigned longs for block
containers.  Problems here would be somewhat hard to hit, would require
journal blocks past the 8T boundary, which would not be terribly common.
Still, should fix.

(some of these have come from the ext4 work on jbd as well).

I think there's one more possibility that the wrap() function may not be
safe IF your last block in the journal butts right up against the 232 block
boundary, but that seems like a VERY remote possibility, and I'm not
worrying about it at this point.

Signed-off-by: Eric Sandeen &lt;esandeen@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] jbd: use BUILD_BUG_ON in journal init</title>
<updated>2006-09-27T15:26:09+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2006-09-27T08:49:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2aed3484695ecb03f1395bb62f1099e8b0826124'/>
<id>2aed3484695ecb03f1395bb62f1099e8b0826124</id>
<content type='text'>
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Acked-by: Stephen Tweedie &lt;sct@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Acked-by: Stephen Tweedie &lt;sct@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
