<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ext4, branch v3.6.8</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/ext4?h=v3.6.8</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/ext4?h=v3.6.8'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-11-26T20:14:31Z</updated>
<entry>
<title>ext4: fix metadata checksum calculation for the superblock</title>
<updated>2012-11-26T20:14:31Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2012-10-10T05:06:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=19dfc178ae0ed43e3cc8407f7876497a3ee5ba95'/>
<id>urn:sha1:19dfc178ae0ed43e3cc8407f7876497a3ee5ba95</id>
<content type='text'>
commit 06db49e68ae70cf16819b85a14057acb2820776a upstream.

The function ext4_handle_dirty_super() was calculating the superblock
on the wrong block data.  As a result, when the superblock is modified
while it is mounted (most commonly, when inodes are added or removed
from the orphan list), the superblock checksum would be wrong.  We
didn't notice because the superblock *was* being correctly calculated
in ext4_commit_super(), and this would get called when the file system
was unmounted.  So the problem only became obvious if the system
crashed while the file system was mounted.

Fix this by removing the poorly designed function signature for
ext4_superblock_csum_set(); if it only took a single argument, the
pointer to a struct superblock, the ambiguity which caused this
mistake would have been impossible.

Reported-by: George Spelvin &lt;linux@horizon.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Tested-by: George Spelvin &lt;linux@horizon.com&gt;

</content>
</entry>
<entry>
<title>ext4: fix unjournaled inode bitmap modification</title>
<updated>2012-11-05T08:56:48Z</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2012-10-29T02:24:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dab43b73a7c7317f941c1314e9a77374ba8999ee'/>
<id>urn:sha1:dab43b73a7c7317f941c1314e9a77374ba8999ee</id>
<content type='text'>
commit ffb5387e85d528fb6d0d924abfa3fbf0fc484071 upstream.

commit 119c0d4460b001e44b41dcf73dc6ee794b98bd31 changed
ext4_new_inode() such that the inode bitmap was being modified
outside a transaction, which could lead to corruption, and was
discovered when journal_checksum found a bad checksum in the
journal during log replay.

Nix ran into this when using the journal_async_commit mount
option, which enables journal checksumming.  The ensuing
journal replay failures due to the bad checksums led to
filesystem corruption reported as the now infamous
"Apparent serious progressive ext4 data corruption bug"

[ Changed by tytso to only call ext4_journal_get_write_access() only
  when we're fairly certain that we're going to allocate the inode. ]

I've tested this by mounting with journal_checksum and
running fsstress then dropping power; I've also tested by
hacking DM to create snapshots w/o first quiescing, which
allows me to test journal replay repeatedly w/o actually
power-cycling the box.  Without the patch I hit a journal
checksum error every time.  With this fix it survives
many iterations.

Reported-by: Nix &lt;nix@esperi.org.uk&gt;
Signed-off-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: Avoid underflow in ext4_trim_fs()</title>
<updated>2012-10-28T17:56:09Z</updated>
<author>
<name>Lukas Czerner</name>
<email>lczerner@redhat.com</email>
</author>
<published>2012-10-22T22:01:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b1f9e723563c5dae07c0c8d49b21ea9602c3e644'/>
<id>urn:sha1:b1f9e723563c5dae07c0c8d49b21ea9602c3e644</id>
<content type='text'>
commit 5de35e8d5c02d271c20e18337e01bc20e6ef472e upstream.

Currently if len argument in ext4_trim_fs() is smaller than one block,
the 'end' variable underflow. Avoid that by returning EINVAL if len is
smaller than file system block.

Also remove useless unlikely().

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: Checksum the block bitmap properly with bigalloc enabled</title>
<updated>2012-10-28T17:56:09Z</updated>
<author>
<name>Tao Ma</name>
<email>boyu.mt@taobao.com</email>
</author>
<published>2012-10-22T04:34:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=462f4e60ea80fc6d82b872243c4d11a9f8286d0d'/>
<id>urn:sha1:462f4e60ea80fc6d82b872243c4d11a9f8286d0d</id>
<content type='text'>
commit 79f1ba49569e5aec919b653c55b03274c2331701 upstream.

In mke2fs, we only checksum the whole bitmap block and it is right.
While in the kernel, we use EXT4_BLOCKS_PER_GROUP to indicate the
size of the checksumed bitmap which is wrong when we enable bigalloc.
The right size should be EXT4_CLUSTERS_PER_GROUP and this patch fixes
it.

Also as every caller of ext4_block_bitmap_csum_set and
ext4_block_bitmap_csum_verify pass in EXT4_BLOCKS_PER_GROUP(sb)/8,
we'd better removes this parameter and sets it in the function itself.

Signed-off-by: Tao Ma &lt;boyu.mt@taobao.com&gt;
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: race-condition protection for ext4_convert_unwritten_extents_endio</title>
<updated>2012-10-28T17:56:09Z</updated>
<author>
<name>Dmitry Monakhov</name>
<email>dmonakhov@openvz.org</email>
</author>
<published>2012-10-10T05:04:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e28b27be06c5e6a5236c0c0b370ca0768ab086bb'/>
<id>urn:sha1:e28b27be06c5e6a5236c0c0b370ca0768ab086bb</id>
<content type='text'>
commit dee1f973ca341c266229faa5a1a5bb268bed3531 upstream.

We assumed that at the time we call ext4_convert_unwritten_extents_endio()
extent in question is fully inside [map.m_lblk, map-&gt;m_len] because
it was already split during submission.  But this may not be true due to
a race between writeback vs fallocate.

If extent in question is larger than requested we will split it again.
Special precautions should being done if zeroout required because
[map.m_lblk, map-&gt;m_len] already contains valid data.

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 mtime update in nodelalloc mode</title>
<updated>2012-10-12T20:50:25Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2012-10-01T03:04:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=92b77229ee73413c1ebfe793ed0085eb1ff794f1'/>
<id>urn:sha1:92b77229ee73413c1ebfe793ed0085eb1ff794f1</id>
<content type='text'>
commit 041bbb6d369811e948ae01f3d00414264076be35 upstream.

Commits 5e8830dc85d0 and 41c4d25f78c0 introduced a regression into
v3.6-rc1 for ext4 in nodealloc mode, such that mtime updates would not
take place for files modified via mmap if the page was already in the
page cache.  This would also affect ext3 file systems mounted using
the ext4 file system driver.

The problem was that ext4_page_mkwrite() had a shortcut which would
avoid calling __block_page_mkwrite() under some circumstances, and the
above two commit transferred the responsibility of calling
file_update_time() to __block_page_mkwrite --- which woudln't get
called in some circumstances.

Since __block_page_mkwrite() only has three callers,
block_page_mkwrite(), ext4_page_mkwrite, and nilfs_page_mkwrite(), the
best way to solve this is to move the responsibility for calling
file_update_time() to its caller.

This problem was found via xfstests #215 with a file system mounted
with -o nodelalloc.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Cc: KONISHI Ryusuke &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix fdatasync() for files with only i_size changes</title>
<updated>2012-10-12T20:50:24Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-09-27T01:52:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=34414b2bf58b95110bf8ccef77d66c05de9e923c'/>
<id>urn:sha1:34414b2bf58b95110bf8ccef77d66c05de9e923c</id>
<content type='text'>
commit b71fc079b5d8f42b2a52743c8d2f1d35d655b1c5 upstream.

Code tracking when transaction needs to be committed on fdatasync(2) forgets
to handle a situation when only inode's i_size is changed. Thus in such
situations fdatasync(2) doesn't force transaction with new i_size to disk
and that can result in wrong i_size after a crash.

Fix the issue by updating inode's i_datasync_tid whenever its size is
updated.

Reported-by: Kristian Nielsen &lt;knielsen@knielsen-hq.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: always set i_op in ext4_mknod()</title>
<updated>2012-10-12T20:50:24Z</updated>
<author>
<name>Bernd Schubert</name>
<email>bernd.schubert@itwm.fraunhofer.de</email>
</author>
<published>2012-09-27T01:24:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=12ebdf00d08f21da12c85e1800d5d91beaa4bfbe'/>
<id>urn:sha1:12ebdf00d08f21da12c85e1800d5d91beaa4bfbe</id>
<content type='text'>
commit 6a08f447facb4f9e29fcc30fb68060bb5a0d21c2 upstream.

ext4_special_inode_operations have their own ifdef CONFIG_EXT4_FS_XATTR
to mask those methods. And ext4_iget also always sets it, so there is
an inconsistency.

Signed-off-by: Bernd Schubert &lt;bernd.schubert@itwm.fraunhofer.de&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: online defrag is not supported for journaled files</title>
<updated>2012-10-12T20:50:24Z</updated>
<author>
<name>Dmitry Monakhov</name>
<email>dmonakhov@openvz.org</email>
</author>
<published>2012-09-26T16:32:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=22a5672604ff3eef101c83436ee15d8e2e148187'/>
<id>urn:sha1:22a5672604ff3eef101c83436ee15d8e2e148187</id>
<content type='text'>
commit f066055a3449f0e5b0ae4f3ceab4445bead47638 upstream.

Proper block swap for inodes with full journaling enabled is
truly non obvious task. In order to be on a safe side let's
explicitly disable it for now.

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: move_extent code cleanup</title>
<updated>2012-10-12T20:50:24Z</updated>
<author>
<name>Dmitry Monakhov</name>
<email>dmonakhov@openvz.org</email>
</author>
<published>2012-09-26T16:32:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ba57d9ef068e6f55226bfedf0e7cd6adab37a316'/>
<id>urn:sha1:ba57d9ef068e6f55226bfedf0e7cd6adab37a316</id>
<content type='text'>
commit 03bd8b9b896c8e940f282f540e6b4de90d666b7c upstream.

- Remove usless checks, because it is too late to check that inode != NULL
  at the moment it was referenced several times.
- Double lock routines looks very ugly and locking ordering relays on
  order of i_ino, but other kernel code rely on order of pointers.
  Let's make them simple and clean.
- check that inodes belongs to the same SB as soon as possible.

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>
</feed>
