<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ext4/ext4_jbd2.h, branch linux-4.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-04-24T04:56:08Z</updated>
<entry>
<title>ext4: do not ask jbd2 to write data for delalloc buffers</title>
<updated>2016-04-24T04:56:08Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2016-04-24T04:56:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee0876bc69ee8d24d524fb2e9e41e3682aaebb11'/>
<id>urn:sha1:ee0876bc69ee8d24d524fb2e9e41e3682aaebb11</id>
<content type='text'>
Currently we ask jbd2 to write all dirty allocated buffers before
committing a transaction when doing writeback of delay allocated blocks.
However this is unnecessary since we move all pages to writeback state
before dropping a transaction handle and then submit all the necessary
IO. We still need the transaction commit to wait for all the outstanding
writeback before flushing disk caches during transaction commit to avoid
data exposure issues though. Use the new jbd2 capability and ask it to
only wait for outstanding writeback during transaction commit when
writing back data in ext4_writepages().

Tested-by: "HUANG Weller (CM/ESW12-CN)" &lt;Weller.Huang@cn.bosch.com&gt;
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: add support for avoiding data writes during transaction commits</title>
<updated>2016-04-24T04:56:07Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2016-04-24T04:56:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41617e1a8dec9fe082ba5dec26bacb154eb55482'/>
<id>urn:sha1:41617e1a8dec9fe082ba5dec26bacb154eb55482</id>
<content type='text'>
Currently when filesystem needs to make sure data is on permanent
storage before committing a transaction it adds inode to transaction's
inode list. During transaction commit, jbd2 writes back all dirty
buffers that have allocated underlying blocks and waits for the IO to
finish. However when doing writeback for delayed allocated data, we
allocate blocks and immediately submit the data. Thus asking jbd2 to
write dirty pages just unnecessarily adds more work to jbd2 possibly
writing back other redirtied blocks.

Add support to jbd2 to allow filesystem to ask jbd2 to only wait for
outstanding data writes before committing a transaction and thus avoid
unnecessary writes.

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>ext4: clean up feature test macros with predicate functions</title>
<updated>2015-10-17T20:18:43Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2015-10-17T20:18:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2b911c53584a92266943f3b7f2cdbc19c1a4e80'/>
<id>urn:sha1:e2b911c53584a92266943f3b7f2cdbc19c1a4e80</id>
<content type='text'>
Create separate predicate functions to test/set/clear feature flags,
thereby replacing the wordy old macros.  Furthermore, clean out the
places where we open-coded feature tests.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
</content>
</entry>
<entry>
<title>ext4: don't use MAXQUOTAS value</title>
<updated>2014-09-11T15:15:15Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2014-09-11T15:15:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a2d4a646e619541e803fb52636964df39aed94b7'/>
<id>urn:sha1:a2d4a646e619541e803fb52636964df39aed94b7</id>
<content type='text'>
MAXQUOTAS value defines maximum number of quota types VFS supports.
This isn't necessarily the number of types ext4 supports. Although
ext4 will support project quotas, use ext4 private definition for
consistency with other filesystems.

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>ext4: make local functions static</title>
<updated>2014-05-12T14:50:23Z</updated>
<author>
<name>Stephen Hemminger</name>
</author>
<published>2014-05-12T14:50:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c197855ea14175a25003c276824689e8ba318e53'/>
<id>urn:sha1:c197855ea14175a25003c276824689e8ba318e53</id>
<content type='text'>
I have been running make namespacecheck to look for unneeded globals, and
found these in ext4.

Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext4: Fix misspellings using 'codespell' tool</title>
<updated>2013-08-28T18:40:12Z</updated>
<author>
<name>Anatol Pomozov</name>
</author>
<published>2013-08-28T18:40:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70261f568f3c08552f034742e3d5cb78c3877766'/>
<id>urn:sha1:70261f568f3c08552f034742e3d5cb78c3877766</id>
<content type='text'>
Signed-off-by: Anatol Pomozov &lt;anatol.pomozov@gmail.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext4: use transaction reservation for extent conversion in ext4_end_io</title>
<updated>2013-06-04T17:21:11Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2013-06-04T17:21:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b523df4fb5ae281ddbc817f40504b33e6226554'/>
<id>urn:sha1:6b523df4fb5ae281ddbc817f40504b33e6226554</id>
<content type='text'>
Later we would like to clear PageWriteback bit only after extent
conversion from unwritten to written extents is performed.  However it
is not possible to start a transaction after PageWriteback is set
because that violates lock ordering (and is easy to deadlock).  So we
have to reserve a transaction before locking pages and sending them
for IO and later we use the transaction for extent conversion from
ext4_end_io().

Reviewed-by: Zheng Liu &lt;wenqing.lz@taobao.com&gt;
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>ext4: provide wrappers for transaction reservation calls</title>
<updated>2013-06-04T16:37:50Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2013-06-04T16:37:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5fe2fe895a9a6b857e2f3a7fc5b8f080b03fd55f'/>
<id>urn:sha1:5fe2fe895a9a6b857e2f3a7fc5b8f080b03fd55f</id>
<content type='text'>
Reviewed-by: Zheng Liu &lt;wenqing.lz@taobao.com&gt;
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>ext4: improve credit estimate for EXT4_SINGLEDATA_TRANS_BLOCKS</title>
<updated>2013-04-09T16:39:26Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2013-04-09T16:39:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f45a5ef91bef7e02149a216ed6dc3fcdd8b38268'/>
<id>urn:sha1:f45a5ef91bef7e02149a216ed6dc3fcdd8b38268</id>
<content type='text'>
Estimate of 27 credits for allocation of a block in extent based inode
is unnecessarily high. We can easily argue 20 is enough.

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>ext4: fix journal callback list traversal</title>
<updated>2013-04-04T02:08:52Z</updated>
<author>
<name>Dmitry Monakhov</name>
</author>
<published>2013-04-04T02:08:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d3ee20855e28169d711b394857ee608a5023094'/>
<id>urn:sha1:5d3ee20855e28169d711b394857ee608a5023094</id>
<content type='text'>
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;
Cc: stable@vger.kernel.com
</content>
</entry>
</feed>
