<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/jbd2/journal.c, branch linux-3.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-08-29T02:22:29Z</updated>
<entry>
<title>jbd2: fix descriptor block size handling errors with journal_csum</title>
<updated>2014-08-29T02:22:29Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2014-08-27T22:40:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db9ee220361de03ee86388f9ea5e529eaad5323c'/>
<id>urn:sha1:db9ee220361de03ee86388f9ea5e529eaad5323c</id>
<content type='text'>
It turns out that there are some serious problems with the on-disk
format of journal checksum v2.  The foremost is that the function to
calculate descriptor tag size returns sizes that are too big.  This
causes alignment issues on some architectures and is compounded by the
fact that some parts of jbd2 use the structure size (incorrectly) to
determine the presence of a 64bit journal instead of checking the
feature flags.

Therefore, introduce journal checksum v3, which enlarges the
descriptor block tag format to allow for full 32-bit checksums of
journal blocks, fix the journal tag function to return the correct
sizes, and fix the jbd2 recovery code to use feature flags to
determine 64bitness.

Add a few function helpers so we don't have to open-code quite so
many pieces.

Switching to a 16-byte block size was found to increase journal size
overhead by a maximum of 0.1%, to convert a 32-bit journal with no
checksumming to a 32-bit journal with checksum v3 enabled.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Reported-by: TR Reardon &lt;thomas_reardon@hotmail.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>jbd2: don't hold j_state_lock while calling wake_up()</title>
<updated>2014-03-09T00:11:36Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2014-03-09T00:11:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3469a32a1e948c54204b5dd6f7476a7d11349e9e'/>
<id>urn:sha1:3469a32a1e948c54204b5dd6f7476a7d11349e9e</id>
<content type='text'>
The j_state_lock is one of the hottest locks in the jbd2 layer and
thus one of its scalability bottlenecks.

We don't need to be holding the j_state_lock while we are calling
wake_up(&amp;journal-&gt;j_wait_commit), so release the lock a little bit
earlier.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>jbd2: mark file-local functions as static</title>
<updated>2014-02-18T01:49:04Z</updated>
<author>
<name>Rashika Kheria</name>
</author>
<published>2014-02-18T01:49:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7747e6d028b891f3bd02d93295d80f230ba43f6a'/>
<id>urn:sha1:7747e6d028b891f3bd02d93295d80f230ba43f6a</id>
<content type='text'>
Mark functions as static in jbd2/journal.c because they are not used
outside this file.

This eliminates the following warning in jbd2/journal.c:
fs/jbd2/journal.c:125:5: warning: no previous prototype for ‘jbd2_verify_csum_type’ [-Wmissing-prototypes]
fs/jbd2/journal.c:146:5: warning: no previous prototype for ‘jbd2_superblock_csum_verify’ [-Wmissing-prototypes]
fs/jbd2/journal.c:154:6: warning: no previous prototype for ‘jbd2_superblock_csum_set’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria &lt;rashika.kheria@gmail.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
Reviewed-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;

</content>
</entry>
<entry>
<title>jbd2: rename obsoleted msg JBD-&gt;JBD2</title>
<updated>2013-12-09T02:14:59Z</updated>
<author>
<name>Dmitry Monakhov</name>
</author>
<published>2013-12-09T02:14:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a67c848a8b9aa9e471f9eaadd2cb29cc527462cf'/>
<id>urn:sha1:a67c848a8b9aa9e471f9eaadd2cb29cc527462cf</id>
<content type='text'>
Rename performed via: perl -pi -e 's/JBD:/JBD2:/g' fs/jbd2/*.c

Signed-off-by: Dmitry Monakhov &lt;dmonakhov@openvz.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reviewed-by: Carlos Maiolino &lt;cmaiolino@redhat.com&gt;
</content>
</entry>
<entry>
<title>jbd2: revise KERN_EMERG error messages</title>
<updated>2013-12-09T02:13:59Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2013-12-09T02:13:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=75685071cd5b26d64fd2577330387aeab019ac97'/>
<id>urn:sha1:75685071cd5b26d64fd2577330387aeab019ac97</id>
<content type='text'>
Some of KERN_EMERG printk messages do not really deserve this log
level and the one in log_wait_commit() is even rather useless (the
journal has been previously aborted and *that* is where we should have
been complaining). So make some messages just KERN_ERR and remove the
useless message.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>jbd2: Fix endian mixing problems in the checksumming code</title>
<updated>2013-08-28T18:59:58Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2013-08-28T18:59:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18a6ea1e5cc88ba36e66c193196da802b06d5cb0'/>
<id>urn:sha1:18a6ea1e5cc88ba36e66c193196da802b06d5cb0</id>
<content type='text'>
In the jbd2 checksumming code, explicitly declare separate variables with
endianness information so that we don't get confused and screw things up again.
Also fixes sparse warnings.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>jbd2: move superblock checksum calculation to jbd2_write_superblock()</title>
<updated>2013-07-01T12:12:38Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2013-07-01T12:12:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe52d17cdd343ac43c85cf72940a58865b9d3bfb'/>
<id>urn:sha1:fe52d17cdd343ac43c85cf72940a58865b9d3bfb</id>
<content type='text'>
Some of the functions which modify the jbd2 superblock were not
updating the checksum before calling jbd2_write_superblock().  Move
the call to jbd2_superblock_csum_set() to jbd2_write_superblock(), so
that the checksum is calculated consistently.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>jbd2: use a single printk for jbd_debug()</title>
<updated>2013-06-13T03:04:04Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2013-06-13T03:04:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=169f1a2a87aae44034da4b9f81be1683d33de6d0'/>
<id>urn:sha1:169f1a2a87aae44034da4b9f81be1683d33de6d0</id>
<content type='text'>
Since the jbd_debug() is implemented with two separate printk()
calls, it can lead to corrupted and misleading debug output like
the following (see lines marked with "*"):

[  290.339362] (fs/jbd2/journal.c, 203): kjournald2: kjournald2 wakes
[  290.339365] (fs/jbd2/journal.c, 155): kjournald2: commit_sequence=42103, commit_request=42104
[  290.339369] (fs/jbd2/journal.c, 158): kjournald2: OK, requests differ
[* 290.339376] (fs/jbd2/journal.c, 648): jbd2_log_wait_commit:
[* 290.339379] (fs/jbd2/commit.c, 370): jbd2_journal_commit_transaction: JBD2: want 42104, j_commit_sequence=42103
[* 290.339382] JBD2: starting commit of transaction 42104
[  290.339410] (fs/jbd2/revoke.c, 566): jbd2_journal_write_revoke_records: Wrote 0 revoke records
[  290.376555] (fs/jbd2/commit.c, 1088): jbd2_journal_commit_transaction: JBD2: commit 42104 complete, head 42079

i.e. the debug output from log_wait_commit and journal_commit_transaction
have become interleaved.  The output should have been:

(fs/jbd2/journal.c, 648): jbd2_log_wait_commit: JBD2: want 42104, j_commit_sequence=42103
(fs/jbd2/commit.c, 370): jbd2_journal_commit_transaction: JBD2: starting commit of transaction 42104

It is expected that this is not easy to replicate -- I was only able
to cause it on preempt-rt kernels, and even then only under heavy
I/O load.

Reported-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Suggested-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>jbd2: optimize jbd2_journal_force_commit</title>
<updated>2013-06-13T02:24:07Z</updated>
<author>
<name>Dmitry Monakhov</name>
</author>
<published>2013-06-13T02:24:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ff864462477206bc23b405a6ae506e92fb6dc9c'/>
<id>urn:sha1:9ff864462477206bc23b405a6ae506e92fb6dc9c</id>
<content type='text'>
Current implementation of jbd2_journal_force_commit() is suboptimal because
result in empty and useless commits. But callers just want to force and wait
any unfinished commits. We already have jbd2_journal_force_commit_nested()
which does exactly what we want, except we are guaranteed that we do not hold
journal transaction open.

Signed-off-by: Dmitry Monakhov &lt;dmonakhov@openvz.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>jbd2: transaction reservation support</title>
<updated>2013-06-04T16:35:11Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2013-06-04T16:35:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f7d89f36829b9061a14f9040cda1372f264c4fe'/>
<id>urn:sha1:8f7d89f36829b9061a14f9040cda1372f264c4fe</id>
<content type='text'>
In some cases we cannot start a transaction because of locking
constraints and passing started transaction into those places is not
handy either because we could block transaction commit for too long.
Transaction reservation is designed to solve these issues.  It
reserves a handle with given number of credits in the journal and the
handle can be later attached to the running transaction without
blocking on commit or checkpointing.  Reserved handles do not block
transaction commit in any way, they only reduce maximum size of the
running transaction (because we have to always be prepared to
accomodate request for attaching reserved handle).

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
</feed>
