<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ext4, branch v3.16</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/ext4?h=v3.16</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/ext4?h=v3.16'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-07-12T20:11:42Z</updated>
<entry>
<title>ext4: fix potential null pointer dereference in ext4_free_inode</title>
<updated>2014-07-12T20:11:42Z</updated>
<author>
<name>Namjae Jeon</name>
<email>namjae.jeon@samsung.com</email>
</author>
<published>2014-07-12T20:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bf40c92635d63fcc574c52649f7cda13e0418ac1'/>
<id>urn:sha1:bf40c92635d63fcc574c52649f7cda13e0418ac1</id>
<content type='text'>
Fix potential null pointer dereferencing problem caused by e43bb4e612
("ext4: decrement free clusters/inodes counters when block group declared bad")

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Ashish Sangwan &lt;a.sangwan@samsung.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Reviewed-by: Lukas Czerner &lt;lczerner@redhat.com&gt;

</content>
</entry>
<entry>
<title>ext4: fix a potential deadlock in __ext4_es_shrink()</title>
<updated>2014-07-12T19:32:24Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2014-07-12T19:32:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3f1f9b851311a76226140b55b1ea22111234a7c2'/>
<id>urn:sha1:3f1f9b851311a76226140b55b1ea22111234a7c2</id>
<content type='text'>
This fixes the following lockdep complaint:

[ INFO: possible circular locking dependency detected ]
3.16.0-rc2-mm1+ #7 Tainted: G           O  
-------------------------------------------------------
kworker/u24:0/4356 is trying to acquire lock:
 (&amp;(&amp;sbi-&gt;s_es_lru_lock)-&gt;rlock){+.+.-.}, at: [&lt;ffffffff81285fff&gt;] __ext4_es_shrink+0x4f/0x2e0

but task is already holding lock:
 (&amp;ei-&gt;i_es_lock){++++-.}, at: [&lt;ffffffff81286961&gt;] ext4_es_insert_extent+0x71/0x180

which lock already depends on the new lock.

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&amp;ei-&gt;i_es_lock);
                               lock(&amp;(&amp;sbi-&gt;s_es_lru_lock)-&gt;rlock);
                               lock(&amp;ei-&gt;i_es_lock);
  lock(&amp;(&amp;sbi-&gt;s_es_lru_lock)-&gt;rlock);

 *** DEADLOCK ***

6 locks held by kworker/u24:0/4356:
 #0:  ("writeback"){.+.+.+}, at: [&lt;ffffffff81071d00&gt;] process_one_work+0x180/0x560
 #1:  ((&amp;(&amp;wb-&gt;dwork)-&gt;work)){+.+.+.}, at: [&lt;ffffffff81071d00&gt;] process_one_work+0x180/0x560
 #2:  (&amp;type-&gt;s_umount_key#22){++++++}, at: [&lt;ffffffff811a9c74&gt;] grab_super_passive+0x44/0x90
 #3:  (jbd2_handle){+.+...}, at: [&lt;ffffffff812979f9&gt;] start_this_handle+0x189/0x5f0
 #4:  (&amp;ei-&gt;i_data_sem){++++..}, at: [&lt;ffffffff81247062&gt;] ext4_map_blocks+0x132/0x550
 #5:  (&amp;ei-&gt;i_es_lock){++++-.}, at: [&lt;ffffffff81286961&gt;] ext4_es_insert_extent+0x71/0x180

stack backtrace:
CPU: 0 PID: 4356 Comm: kworker/u24:0 Tainted: G           O   3.16.0-rc2-mm1+ #7
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Workqueue: writeback bdi_writeback_workfn (flush-253:0)
 ffffffff8213dce0 ffff880014b07538 ffffffff815df0bb 0000000000000007
 ffffffff8213e040 ffff880014b07588 ffffffff815db3dd ffff880014b07568
 ffff880014b07610 ffff88003b868930 ffff88003b868908 ffff88003b868930
Call Trace:
 [&lt;ffffffff815df0bb&gt;] dump_stack+0x4e/0x68
 [&lt;ffffffff815db3dd&gt;] print_circular_bug+0x1fb/0x20c
 [&lt;ffffffff810a7a3e&gt;] __lock_acquire+0x163e/0x1d00
 [&lt;ffffffff815e89dc&gt;] ? retint_restore_args+0xe/0xe
 [&lt;ffffffff815ddc7b&gt;] ? __slab_alloc+0x4a8/0x4ce
 [&lt;ffffffff81285fff&gt;] ? __ext4_es_shrink+0x4f/0x2e0
 [&lt;ffffffff810a8707&gt;] lock_acquire+0x87/0x120
 [&lt;ffffffff81285fff&gt;] ? __ext4_es_shrink+0x4f/0x2e0
 [&lt;ffffffff8128592d&gt;] ? ext4_es_free_extent+0x5d/0x70
 [&lt;ffffffff815e6f09&gt;] _raw_spin_lock+0x39/0x50
 [&lt;ffffffff81285fff&gt;] ? __ext4_es_shrink+0x4f/0x2e0
 [&lt;ffffffff8119760b&gt;] ? kmem_cache_alloc+0x18b/0x1a0
 [&lt;ffffffff81285fff&gt;] __ext4_es_shrink+0x4f/0x2e0
 [&lt;ffffffff812869b8&gt;] ext4_es_insert_extent+0xc8/0x180
 [&lt;ffffffff812470f4&gt;] ext4_map_blocks+0x1c4/0x550
 [&lt;ffffffff8124c4c4&gt;] ext4_writepages+0x6d4/0xd00
	...

Reported-by: Minchan Kim &lt;minchan@kernel.org&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Reported-by: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: stable@vger.kernel.org
Cc: Zheng Liu &lt;gnehzuil.liu@gmail.com&gt;
</content>
</entry>
<entry>
<title>ext4: revert commit which was causing fs corruption after journal replays</title>
<updated>2014-07-11T17:55:40Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2014-07-11T17:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f9ae9cf5d72b3926ca48ea60e15bdbb840f42372'/>
<id>urn:sha1:f9ae9cf5d72b3926ca48ea60e15bdbb840f42372</id>
<content type='text'>
Commit 007649375f6af2 ("ext4: initialize multi-block allocator before
checking block descriptors") causes the block group descriptor's count
of the number of free blocks to become inconsistent with the number of
free blocks in the allocation bitmap.  This is a harmless form of fs
corruption, but it causes the kernel to potentially remount the file
system read-only, or to panic, depending on the file systems's error
behavior.

Thanks to Eric Whitney for his tireless work to reproduce and to find
the guilty commit.

Fixes: 007649375f6af2 ("ext4: initialize multi-block allocator before checking block descriptors"

Cc: stable@vger.kernel.org  # 3.15
Reported-by: David Jander &lt;david@protonic.nl&gt;
Reported-by: Matteo Croce &lt;technoboy85@gmail.com&gt;
Tested-by: Eric Whitney &lt;enwlinux@gmail.com&gt;
Suggested-by: Eric Whitney &lt;enwlinux@gmail.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;

</content>
</entry>
<entry>
<title>ext4: disable synchronous transaction batching if max_batch_time==0</title>
<updated>2014-07-05T23:18:22Z</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2014-07-05T23:18:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5dd214248f94d430d70e9230bda72f2654ac88a8'/>
<id>urn:sha1:5dd214248f94d430d70e9230bda72f2654ac88a8</id>
<content type='text'>
The mount manpage says of the max_batch_time option,

	This optimization can be turned off entirely
	by setting max_batch_time to 0.

But the code doesn't do that.  So fix the code to do
that.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>ext4: clarify ext4_error message in ext4_mb_generate_buddy_error()</title>
<updated>2014-07-05T23:15:50Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2014-07-05T23:15:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=94d4c066a4ff170a2671b1a9b153febbf36796f6'/>
<id>urn:sha1:94d4c066a4ff170a2671b1a9b153febbf36796f6</id>
<content type='text'>
We are spending a lot of time explaining to users what this error
means.  Let's try to improve the message to avoid this problem.

Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>ext4: clarify error count warning messages</title>
<updated>2014-07-05T22:40:52Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2014-07-05T22:40:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ae0f78de2c43b6fadd007c231a352b13b5be8ed2'/>
<id>urn:sha1:ae0f78de2c43b6fadd007c231a352b13b5be8ed2</id>
<content type='text'>
Make it clear that values printed are times, and that it is error
since last fsck. Also add note about fsck version required.

Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Reviewed-by: Andreas Dilger &lt;adilger@dilger.ca&gt;
Cc: stable@vger.kernel.org

</content>
</entry>
<entry>
<title>ext4: fix unjournalled bg descriptor while initializing inode bitmap</title>
<updated>2014-07-05T20:28:35Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2014-07-05T20:28:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=61c219f5814277ecb71d64cb30297028d6665979'/>
<id>urn:sha1:61c219f5814277ecb71d64cb30297028d6665979</id>
<content type='text'>
The first time that we allocate from an uninitialized inode allocation
bitmap, if the block allocation bitmap is also uninitalized, we need
to get write access to the block group descriptor before we start
modifying the block group descriptor flags and updating the free block
count, etc.  Otherwise, there is the potential of a bad journal
checksum (if journal checksums are enabled), and of the file system
becoming inconsistent if we crash at exactly the wrong time.

Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>ext4: Fix hole punching for files with indirect blocks</title>
<updated>2014-06-26T16:30:54Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2014-06-26T16:30:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a93cd4cf86466caa49cfe64607bea7f0bde3f916'/>
<id>urn:sha1:a93cd4cf86466caa49cfe64607bea7f0bde3f916</id>
<content type='text'>
Hole punching code for files with indirect blocks wrongly computed
number of blocks which need to be cleared when traversing the indirect
block tree. That could result in punching more blocks than actually
requested and thus effectively cause a data loss. For example:

fallocate -n -p 10240000 4096

will punch the range 10240000 - 12632064 instead of the range 1024000 -
10244096. Fix the calculation.

CC: stable@vger.kernel.org
Fixes: 8bad6fc813a3a5300f51369c39d315679fd88c72
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 block zeroing when punching holes in indirect block files</title>
<updated>2014-06-26T16:28:57Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2014-06-26T16:28:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=77ea2a4ba657a1ad4fb7c64bc5cdce84b8a132b6'/>
<id>urn:sha1:77ea2a4ba657a1ad4fb7c64bc5cdce84b8a132b6</id>
<content type='text'>
free_holes_block() passed local variable as a block pointer
to ext4_clear_blocks(). Thus ext4_clear_blocks() zeroed out this local
variable instead of proper place in inode / indirect block. We later
zero out proper place in inode / indirect block but don't dirty the
inode / buffer again which can lead to subtle issues (some changes e.g.
to inode can be lost).

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: decrement free clusters/inodes counters when block group declared bad</title>
<updated>2014-06-26T14:11:53Z</updated>
<author>
<name>Namjae Jeon</name>
<email>namjae.jeon@samsung.com</email>
</author>
<published>2014-06-26T14:11:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e43bb4e612b402a631bc549ac496f78bc7a79438'/>
<id>urn:sha1:e43bb4e612b402a631bc549ac496f78bc7a79438</id>
<content type='text'>
We should decrement free clusters counter when block bitmap is marked
as corrupt and free inodes counter when the allocation bitmap is
marked as corrupt to avoid misunderstanding due to incorrect available
size in statfs result.  User can get immediately ENOSPC error from
write begin without reaching for the writepages.

Cc: Darrick J. Wong&lt;darrick.wong@oracle.com&gt;
Reported-by: Amit Sahrawat &lt;amit.sahrawat83@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Ashish Sangwan &lt;a.sangwan@samsung.com&gt;
</content>
</entry>
</feed>
