<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/jbd2/transaction.c, branch linux-2.6.28.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-03-17T00:32:33Z</updated>
<entry>
<title>jbd2: Avoid possible NULL dereference in jbd2_journal_begin_ordered_truncate()</title>
<updated>2009-03-17T00:32:33Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2009-02-24T17:14:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=54dc90ea5d01776793da82d345c7164ea28f4718'/>
<id>urn:sha1:54dc90ea5d01776793da82d345c7164ea28f4718</id>
<content type='text'>
(cherry picked from commit 7f5aa215088b817add9c71914b83650bdd49f8a9)

If we race with commit code setting i_transaction to NULL, we could
possibly dereference it.  Proper locking requires the journal pointer
(to access journal-&gt;j_list_lock), which we don't have.  So we have to
change the prototype of the function so that filesystem passes us the
journal pointer.  Also add a more detailed comment about why the
function jbd2_journal_begin_ordered_truncate() does what it does and
how it should be used.

Thanks to Dan Carpenter &lt;error27@gmail.com&gt; for pointing to the
suspitious code.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Acked-by: Joel Becker &lt;joel.becker@oracle.com&gt;
CC: linux-ext4@vger.kernel.org
CC: ocfs2-devel@oss.oracle.com
CC: mfasheh@suse.de
CC: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ext4: Replace hackish ext4_mb_poll_new_transaction with commit callback</title>
<updated>2008-10-17T00:00:24Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2008-10-17T00:00:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e624fc72fba09b6f999a9fbb87b64efccd38036'/>
<id>urn:sha1:3e624fc72fba09b6f999a9fbb87b64efccd38036</id>
<content type='text'>
The multiblock allocator needs to be able to release blocks (and issue
a blkdev discard request) when the transaction which freed those
blocks is committed.  Previously this was done via a polling mechanism
when blocks are allocated or freed.  A much better way of doing things
is to create a jbd2 callback function and attaching the list of blocks
to be freed directly to the transaction structure.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>lockdep: rename map_[acquire|release]() =&gt; lock_map_[acquire|release]()</title>
<updated>2008-08-11T08:30:30Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2008-08-11T08:30:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3295f0ef9ff048a4619ede597ad9ec9cab725654'/>
<id>urn:sha1:3295f0ef9ff048a4619ede597ad9ec9cab725654</id>
<content type='text'>
the names were too generic:

 drivers/uio/uio.c:87: error: expected identifier or '(' before 'do'
 drivers/uio/uio.c:87: error: expected identifier or '(' before 'while'
 drivers/uio/uio.c:113: error: 'map_release' undeclared here (not in a function)

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockdep: map_acquire</title>
<updated>2008-08-11T07:30:23Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2008-08-11T07:30:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f3e7524b2e703d9f8b02ac338153a53dd7ede66'/>
<id>urn:sha1:4f3e7524b2e703d9f8b02ac338153a53dd7ede66</id>
<content type='text'>
Most the free-standing lock_acquire() usages look remarkably similar, sweep
them into a new helper.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>jbd2: Remove data=ordered mode support using jbd buffer heads</title>
<updated>2008-07-11T23:27:31Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2008-07-11T23:27:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87c89c232c8f7b3820c33c3b9bc803e9358027da'/>
<id>urn:sha1:87c89c232c8f7b3820c33c3b9bc803e9358027da</id>
<content type='text'>
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>jbd2: Implement data=ordered mode handling via inodes</title>
<updated>2008-07-11T23:27:31Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2008-07-11T23:27:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c851ed540173736e60d48b53b91a16ea5c903896'/>
<id>urn:sha1:c851ed540173736e60d48b53b91a16ea5c903896</id>
<content type='text'>
This patch adds necessary framework into JBD2 to be able to track inodes
with each transaction and write-out their dirty data during transaction
commit time.

This new ordered mode brings all sorts of advantages such as possibility 
to get rid of journal heads and buffer heads for data buffers in ordered 
mode, better ordering of writes on transaction commit, simplification of
 some JBD code, no more anonymous pages when truncate of data being 
committed happens.  Also with this new ordered mode, delayed allocation 
on ordered mode is much simpler.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>jbd2: fix race between jbd2_journal_try_to_free_buffers() and jbd2 commit transaction</title>
<updated>2008-07-14T01:06:39Z</updated>
<author>
<name>Mingming Cao</name>
</author>
<published>2008-07-14T01:06:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=530576bbf379fc45cfb34f246257d8526db44567'/>
<id>urn:sha1:530576bbf379fc45cfb34f246257d8526db44567</id>
<content type='text'>
journal_try_to_free_buffers() could race with jbd commit transaction
when the later is holding the buffer reference while waiting for the
data buffer to flush to disk. If the caller of
journal_try_to_free_buffers() request tries hard to release the buffers,
it will treat the failure as error and return back to the caller. We
have seen the directo IO failed due to this race.  Some of the caller of
releasepage() also expecting the buffer to be dropped when passed with
GFP_KERNEL mask to the releasepage()-&gt;journal_try_to_free_buffers().

With this patch, if the caller is passing the GFP_KERNEL to indicating
this call could wait, in case of try_to_free_buffers() failed, let's
waiting for journal_commit_transaction() to finish commit the current
committing transaction , then try to free those buffers again with
journal locked.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Reviewed-by: Badari Pulavarty &lt;pbadari@us.ibm.com&gt; 
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>jdb2: replace remaining __FUNCTION__ occurrences</title>
<updated>2008-04-17T14:38:59Z</updated>
<author>
<name>Harvey Harrison</name>
</author>
<published>2008-04-17T14:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=329d291f50d53f77d15769051f3eb494a9fd54b7'/>
<id>urn:sha1:329d291f50d53f77d15769051f3eb494a9fd54b7</id>
<content type='text'>
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>jbd2: fix kernel-doc notation</title>
<updated>2008-04-17T14:38:59Z</updated>
<author>
<name>Randy Dunlap</name>
</author>
<published>2008-04-17T14:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5648ba5b2dc0d07a8108fabc7b9100962e9e1d88'/>
<id>urn:sha1:5648ba5b2dc0d07a8108fabc7b9100962e9e1d88</id>
<content type='text'>
Fix kernel-doc notation in jbd2.

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>jbd2: fix possible journal overflow issues</title>
<updated>2008-04-17T14:38:59Z</updated>
<author>
<name>Josef Bacik</name>
</author>
<published>2008-04-17T14:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1dfc3220d963385a317264b11154c462a83596ed'/>
<id>urn:sha1:1dfc3220d963385a317264b11154c462a83596ed</id>
<content type='text'>
There are several cases where the running transaction can get buffers
added to its BJ_Metadata list which it never dirtied, which makes its
t_nr_buffers counter end up larger than its t_outstanding_credits
counter.

This will cause issues when starting new transactions as while we are
logging buffers we decrement t_outstanding_buffers, so when
t_outstanding_buffers goes negative, we will report that we need less
space in the journal than we actually need, so transactions will be
started even though there may not be enough room for them.  In the worst
case scenario (which admittedly is almost impossible to reproduce) this
will result in the journal running out of space.

The fix is to only refile buffers from the committing transaction to the
running transactions BJ_Modified list when b_modified is set on that
journal, which is the only way to be sure if the running transaction has
modified that buffer.

This patch also fixes an accounting error in journal_forget, it is
possible that we can call journal_forget on a buffer without having
modified it, only gotten write access to it, so instead of freeing a
credit, we only do so if the buffer was modified.  The assert will help
catch if this problem occurs.  Without these two patches I could hit
this assert within minutes of running postmark, with them this issue no
longer arises.

Cc: &lt;linux-ext4@vger.kernel.org&gt;
Cc: Jan Kara &lt;jack@ucw.cz&gt;
Signed-off-by: Josef Bacik &lt;jbacik@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;

</content>
</entry>
</feed>
