<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ext4, branch v3.8.13</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/ext4?h=v3.8.13</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/ext4?h=v3.8.13'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-05-11T20:53:57Z</updated>
<entry>
<title>ext4: add check for inodes_count overflow in new resize ioctl</title>
<updated>2013-05-11T20:53:57Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2013-04-22T02:56:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8f6aad0d018d11878d49603e017d3f6480488f41'/>
<id>urn:sha1:8f6aad0d018d11878d49603e017d3f6480488f41</id>
<content type='text'>
commit 3f8a6411fbada1fa482276591e037f3b1adcf55b upstream.

Addresses-Red-Hat-Bugzilla: #913245

Reported-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reviewed-by: Carlos Maiolino &lt;cmaiolino@redhat.com&gt;
Signed-off-by: Lingzhu Xiang &lt;lxiang@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix Kconfig documentation for CONFIG_EXT4_DEBUG</title>
<updated>2013-05-08T03:08:24Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2013-04-22T00:32:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=836f410351d004d6a793e3bffe8f11667a932f4f'/>
<id>urn:sha1:836f410351d004d6a793e3bffe8f11667a932f4f</id>
<content type='text'>
commit 7f3e3c7cfcec148ccca9c0dd2dbfd7b00b7ac10f upstream.

Fox the Kconfig documentation for CONFIG_EXT4_DEBUG to match the
change made by commit a0b30c1229: ext4: use module parameters instead
of debugfs for mballoc_debug

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix online resizing for ext3-compat file systems</title>
<updated>2013-05-08T03:08:24Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2013-04-22T00:19:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eb6903e96bdc8192483867048e04407799d85943'/>
<id>urn:sha1:eb6903e96bdc8192483867048e04407799d85943</id>
<content type='text'>
commit c5c72d814cf0f650010337c73638b25e6d14d2d4 upstream.

Commit fb0a387dcdc restricts block allocations for indirect-mapped
files to block groups less than s_blockfile_groups.  However, the
online resizing code wasn't setting s_blockfile_groups, so the newly
added block groups were not available for non-extent mapped files.

Reported-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix big-endian bug in metadata checksum calculations</title>
<updated>2013-05-08T03:08:24Z</updated>
<author>
<name>Dmitry Monakhov</name>
<email>dmonakhov@openvz.org</email>
</author>
<published>2013-04-10T03:56:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2ed87d87342a7de090409bf02b2a86ac32191d4f'/>
<id>urn:sha1:2ed87d87342a7de090409bf02b2a86ac32191d4f</id>
<content type='text'>
commit 171a7f21a76a0958c225b97c00a97a10390d40ee upstream.

Signed-off-by: Dmitry Monakhov &lt;dmonakhov@openvz.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix journal callback list traversal</title>
<updated>2013-05-08T03:08:24Z</updated>
<author>
<name>Dmitry Monakhov</name>
<email>dmonakhov@openvz.org</email>
</author>
<published>2013-04-04T02:08:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5c5c79d431221917eef944c4c026b3044a5acc2a'/>
<id>urn:sha1:5c5c79d431221917eef944c4c026b3044a5acc2a</id>
<content type='text'>
commit 5d3ee20855e28169d711b394857ee608a5023094 upstream.

It is incorrect to use list_for_each_entry_safe() for journal callback
traversial because -&gt;next may be removed by other task:
-&gt;ext4_mb_free_metadata()
  -&gt;ext4_mb_free_metadata()
    -&gt;ext4_journal_callback_del()

This results in the following issue:

WARNING: at lib/list_debug.c:62 __list_del_entry+0x1c0/0x250()
Hardware name:
list_del corruption. prev-&gt;next should be ffff88019a4ec198, but was 6b6b6b6b6b6b6b6b
Modules linked in: cpufreq_ondemand acpi_cpufreq freq_table mperf coretemp kvm_intel kvm crc32c_intel ghash_clmulni_intel microcode sg xhci_hcd button sd_mod crc_t10dif aesni_intel ablk_helper cryptd lrw aes_x86_64 xts gf128mul ahci libahci pata_acpi ata_generic dm_mirror dm_region_hash dm_log dm_mod
Pid: 16400, comm: jbd2/dm-1-8 Tainted: G        W    3.8.0-rc3+ #107
Call Trace:
 [&lt;ffffffff8106fb0d&gt;] warn_slowpath_common+0xad/0xf0
 [&lt;ffffffff8106fc06&gt;] warn_slowpath_fmt+0x46/0x50
 [&lt;ffffffff813637e9&gt;] ? ext4_journal_commit_callback+0x99/0xc0
 [&lt;ffffffff8148cae0&gt;] __list_del_entry+0x1c0/0x250
 [&lt;ffffffff813637bf&gt;] ext4_journal_commit_callback+0x6f/0xc0
 [&lt;ffffffff813ca336&gt;] jbd2_journal_commit_transaction+0x23a6/0x2570
 [&lt;ffffffff8108aa42&gt;] ? try_to_del_timer_sync+0x82/0xa0
 [&lt;ffffffff8108b491&gt;] ? del_timer_sync+0x91/0x1e0
 [&lt;ffffffff813d3ecf&gt;] kjournald2+0x19f/0x6a0
 [&lt;ffffffff810ad630&gt;] ? wake_up_bit+0x40/0x40
 [&lt;ffffffff813d3d30&gt;] ? bit_spin_lock+0x80/0x80
 [&lt;ffffffff810ac6be&gt;] kthread+0x10e/0x120
 [&lt;ffffffff810ac5b0&gt;] ? __init_kthread_worker+0x70/0x70
 [&lt;ffffffff818ff6ac&gt;] ret_from_fork+0x7c/0xb0
 [&lt;ffffffff810ac5b0&gt;] ? __init_kthread_worker+0x70/0x70

This patch fix the issue as follows:
- ext4_journal_commit_callback() make list truly traversial safe
  simply by always starting from list_head
- fix race between two ext4_journal_callback_del() and
  ext4_journal_callback_try_del()

Signed-off-by: Dmitry Monakhov &lt;dmonakhov@openvz.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4/jbd2: don't wait (forever) for stale tid caused by wraparound</title>
<updated>2013-05-08T03:08:24Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2013-04-04T02:02:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aab8960fc9c05f82842586235fae4de1082708e1'/>
<id>urn:sha1:aab8960fc9c05f82842586235fae4de1082708e1</id>
<content type='text'>
commit d76a3a77113db020d9bb1e894822869410450bd9 upstream.

In the case where an inode has a very stale transaction id (tid) in
i_datasync_tid or i_sync_tid, it's possible that after a very large
(2**31) number of transactions, that the tid number space might wrap,
causing tid_geq()'s calculations to fail.

Commit deeeaf13 "jbd2: fix fsync() tid wraparound bug", later modified
by commit e7b04ac0 "jbd2: don't wake kjournald unnecessarily",
attempted to fix this problem, but it only avoided kjournald spinning
forever by fixing the logic in jbd2_log_start_commit().

Unfortunately, in the codepaths in fs/ext4/fsync.c and fs/ext4/inode.c
that might call jbd2_log_start_commit() with a stale tid, those
functions will subsequently call jbd2_log_wait_commit() with the same
stale tid, and then wait for a very long time.  To fix this, we
replace the calls to jbd2_log_start_commit() and
jbd2_log_wait_commit() with a call to a new function,
jbd2_complete_transaction(), which will correctly handle stale tid's.

As a bonus, jbd2_complete_transaction() will avoid locking
j_state_lock for writing unless a commit needs to be started.  This
should have a small (but probably not measurable) improvement for
ext4's scalability.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reported-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Reported-by: George Barnett &lt;gbarnett@atlassian.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix data=journal fast mount/umount hang</title>
<updated>2013-03-28T19:18:00Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2013-03-20T13:42:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b62c7c2a5555ac101c850cd6fa4ca3bcdb877840'/>
<id>urn:sha1:b62c7c2a5555ac101c850cd6fa4ca3bcdb877840</id>
<content type='text'>
commit 2b405bfa84063bfa35621d2d6879f52693c614b0 upstream.

In data=journal mode, if we unmount the file system before a
transaction has a chance to complete, when the journal inode is being
evicted, we can end up calling into jbd2_log_wait_commit() for the
last transaction, after the journalling machinery has been shut down.

Arguably we should adjust ext4_should_journal_data() to return FALSE
for the journal inode, but the only place it matters is
ext4_evict_inode(), and so to save a bit of CPU time, and to make the
patch much more obviously correct by inspection(tm), we'll fix it by
explicitly not trying to waiting for a journal commit when we are
evicting the journal inode, since it's guaranteed to never succeed in
this case.

This can be easily replicated via:

     mount -t ext4 -o data=journal /dev/vdb /vdb ; umount /vdb

------------[ cut here ]------------
WARNING: at /usr/projects/linux/ext4/fs/jbd2/journal.c:542 __jbd2_log_start_commit+0xba/0xcd()
Hardware name: Bochs
JBD2: bad log_start_commit: 3005630206 3005630206 0 0
Modules linked in:
Pid: 2909, comm: umount Not tainted 3.8.0-rc3 #1020
Call Trace:
 [&lt;c015c0ef&gt;] warn_slowpath_common+0x68/0x7d
 [&lt;c02b7e7d&gt;] ? __jbd2_log_start_commit+0xba/0xcd
 [&lt;c015c177&gt;] warn_slowpath_fmt+0x2b/0x2f
 [&lt;c02b7e7d&gt;] __jbd2_log_start_commit+0xba/0xcd
 [&lt;c02b8075&gt;] jbd2_log_start_commit+0x24/0x34
 [&lt;c0279ed5&gt;] ext4_evict_inode+0x71/0x2e3
 [&lt;c021f0ec&gt;] evict+0x94/0x135
 [&lt;c021f9aa&gt;] iput+0x10a/0x110
 [&lt;c02b7836&gt;] jbd2_journal_destroy+0x190/0x1ce
 [&lt;c0175284&gt;] ? bit_waitqueue+0x50/0x50
 [&lt;c028d23f&gt;] ext4_put_super+0x52/0x294
 [&lt;c020efe3&gt;] generic_shutdown_super+0x48/0xb4
 [&lt;c020f071&gt;] kill_block_super+0x22/0x60
 [&lt;c020f3e0&gt;] deactivate_locked_super+0x22/0x49
 [&lt;c020f5d6&gt;] deactivate_super+0x30/0x33
 [&lt;c0222795&gt;] mntput_no_expire+0x107/0x10c
 [&lt;c02233a7&gt;] sys_umount+0x2cf/0x2e0
 [&lt;c02233ca&gt;] sys_oldumount+0x12/0x14
 [&lt;c08096b8&gt;] syscall_call+0x7/0xb
---[ end trace 6a954cc790501c1f ]---
jbd2_log_wait_commit: error: j_commit_request=-1289337090, tid=0

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: use s_extent_max_zeroout_kb value as number of kb</title>
<updated>2013-03-28T19:18:00Z</updated>
<author>
<name>Lukas Czerner</name>
<email>lczerner@redhat.com</email>
</author>
<published>2013-03-12T16:40:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ee0906fc8da3447d168a73570754a160ecbe399b'/>
<id>urn:sha1:ee0906fc8da3447d168a73570754a160ecbe399b</id>
<content type='text'>
commit 4f42f80a8f08d4c3f52c4267361241885d5dee3a upstream.

Currently when converting extent to initialized, we have to decide
whether to zeroout part/all of the uninitialized extent in order to
avoid extent tree growing rapidly.

The decision is made by comparing the size of the extent with the
configurable value s_extent_max_zeroout_kb which is in kibibytes units.

However when converting it to number of blocks we currently use it as it
was in bytes. This is obviously bug and it will result in ext4 _never_
zeroout extents, but rather always split and convert parts to
initialized while leaving the rest uninitialized in default setting.

Fix this by using s_extent_max_zeroout_kb as kibibytes.

Signed-off-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: use atomic64_t for the per-flexbg free_clusters count</title>
<updated>2013-03-28T19:17:59Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2013-03-12T03:39:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=229cf88d53fb74a36fcc7307048666081b283f49'/>
<id>urn:sha1:229cf88d53fb74a36fcc7307048666081b283f49</id>
<content type='text'>
commit 90ba983f6889e65a3b506b30dc606aa9d1d46cd2 upstream.

A user who was using a 8TB+ file system and with a very large flexbg
size (&gt; 65536) could cause the atomic_t used in the struct flex_groups
to overflow.  This was detected by PaX security patchset:

http://forums.grsecurity.net/viewtopic.php?f=3&amp;t=3289&amp;p=12551#p12551

This bug was introduced in commit 9f24e4208f7e, so it's been around
since 2.6.30.  :-(

Fix this by using an atomic64_t for struct orlav_stats's
free_clusters.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reviewed-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix the wrong number of the allocated blocks in ext4_split_extent()</title>
<updated>2013-03-28T19:17:59Z</updated>
<author>
<name>Zheng Liu</name>
<email>wenqing.lz@taobao.com</email>
</author>
<published>2013-03-11T01:20:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=333d96701403259970112ff6c84cac7cb45275a5'/>
<id>urn:sha1:333d96701403259970112ff6c84cac7cb45275a5</id>
<content type='text'>
commit 3a2256702e47f68f921dfad41b1764d05c572329 upstream.

This commit fixes a wrong return value of the number of the allocated
blocks in ext4_split_extent.  When the length of blocks we want to
allocate is greater than the length of the current extent, we return a
wrong number.  Let's see what happens in the following case when we
call ext4_split_extent().

  map: [48, 72]
  ex:  [32, 64, u]

'ex' will be split into two parts:
  ex1: [32, 47, u]
  ex2: [48, 64, w]

'map-&gt;m_len' is returned from this function, and the value is 24.  But
the real length is 16.  So it should be fixed.

Meanwhile in this commit we use right length of the allocated blocks
when get_reserved_cluster_alloc in ext4_ext_handle_uninitialized_extents
is called.

Signed-off-by: Zheng Liu &lt;wenqing.lz@taobao.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: Dmitry Monakhov &lt;dmonakhov@openvz.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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