<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ext4/indirect.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-07-15T10:03:38Z</updated>
<entry>
<title>ext4: fix punch hole on files with indirect mapping</title>
<updated>2014-07-15T10:03:38Z</updated>
<author>
<name>Lukas Czerner</name>
</author>
<published>2014-07-15T10:03:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f579ae7de560e5f449587a6c3f02594d53d4d51'/>
<id>urn:sha1:4f579ae7de560e5f449587a6c3f02594d53d4d51</id>
<content type='text'>
Currently punch hole code on files with direct/indirect mapping has some
problems which may lead to a data loss. For example (from Jan Kara):

fallocate -n -p 10240000 4096

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

Also the code is a bit weird and it's not using infrastructure provided
by indirect.c, but rather creating it's own way.

This patch fixes the issues as well as making the operation to run 4
times faster from my testing (punching out 60GB file). It uses similar
approach used in ext4_ind_truncate() which takes advantage of
ext4_free_branches() function.

Also rename the ext4_free_hole_blocks() to something more sensible, like
the equivalent we have for extent mapped files. Call it
ext4_ind_remove_space().

This has been tested mostly with fsx and some xfstests which are testing
punch hole but does not require unwritten extents which are not
supported with direct/indirect mapping. Not problems showed up even with
1024k block size.

CC: stable@vger.kernel.org
Signed-off-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</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>
</author>
<published>2014-06-26T16:30:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</author>
<published>2014-06-26T16:28:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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: Fix buffer double free in ext4_alloc_branch()</title>
<updated>2014-06-16T03:46:28Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2014-06-16T03:46:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c5c7b8ddfbf8cb3b2291e515a34ab1b8982f5a2d'/>
<id>urn:sha1:c5c7b8ddfbf8cb3b2291e515a34ab1b8982f5a2d</id>
<content type='text'>
Error recovery in ext4_alloc_branch() calls ext4_forget() even for
buffer corresponding to indirect block it did not allocate. This leads
to brelse() being called twice for that buffer (once from ext4_forget()
and once from cleanup in ext4_ind_map_blocks()) leading to buffer use
count misaccounting. Eventually (but often much later because there
are other users of the buffer) we will see messages like:
VFS: brelse: Trying to free free buffer

Another manifestation of this problem is an error:
JBD2 unexpected failure: jbd2_journal_revoke: !buffer_revoked(bh);
inconsistent data on disk

The fix is easy - don't forget buffer we did not allocate. Also add an
explanatory comment because the indexing at ext4_alloc_branch() is
somewhat subtle.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>switch {__,}blockdev_direct_IO() to iov_iter</title>
<updated>2014-05-06T21:32:46Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2014-03-05T06:33:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=31b140398ce56ab41646eda7f02bcb78d6a4c916'/>
<id>urn:sha1:31b140398ce56ab41646eda7f02bcb78d6a4c916</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>get rid of pointless iov_length() in -&gt;direct_IO()</title>
<updated>2014-05-06T21:32:45Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2014-03-05T03:38:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6cbcd4a4a85e2fdb0b3344b88df2e8b3d526b9e'/>
<id>urn:sha1:a6cbcd4a4a85e2fdb0b3344b88df2e8b3d526b9e</id>
<content type='text'>
all callers have iov_length(iter-&gt;iov, iter-&gt;nr_segs) == iov_iter_count(iter)

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ext4: switch the guts of -&gt;direct_IO() to iov_iter</title>
<updated>2014-05-06T21:32:45Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2014-03-05T03:14:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=16b1f05d7f5ab4ce570963aca5f3b2b5d21822fa'/>
<id>urn:sha1:16b1f05d7f5ab4ce570963aca5f3b2b5d21822fa</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ext4: isolate ext4_extents.h file</title>
<updated>2013-08-28T18:47:06Z</updated>
<author>
<name>Zheng Liu</name>
</author>
<published>2013-08-28T18:47:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d7b2a00c2e2eedf460ce2a15237f28de40412d86'/>
<id>urn:sha1:d7b2a00c2e2eedf460ce2a15237f28de40412d86</id>
<content type='text'>
After applied the commit (4a092d73), we have reduced the number of
source files that need to #include ext4_extents.h.  But we can do
better.

This commit defines ext4_zeroout_es() in extents.c and move
EXT_MAX_BLOCKS into ext4.h in order not to include ext4_extents.h in
indirect.c and ioctl.c.  Meanwhile we just need to include this file in
extent_status.c when ES_AGGRESSIVE_TEST is defined.  Otherwise, this
commit removes a duplicated declaration in trace/events/ext4.h.

After applied this patch, we just need to include ext4_extents.h file
in {super,migrate,move_extents,extents}.c, and it is easy for us to
define a new extent disk layout.

Signed-off-by: Zheng Liu &lt;wenqing.lz@taobao.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext4: translate flag bits to strings in tracepoints</title>
<updated>2013-07-01T12:12:40Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2013-07-01T12:12:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=21ddd568c133024196d394c43923f55cad1e7bd0'/>
<id>urn:sha1:21ddd568c133024196d394c43923f55cad1e7bd0</id>
<content type='text'>
Translate the bitfields used in various flags argument to strings to
make the tracepoint output more human-readable.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext4: don't use EXT4_FREE_BLOCKS_FORGET unnecessarily</title>
<updated>2013-06-12T15:48:29Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2013-06-12T15:48:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=981250ca89261f98bdfd2d6be1fcccb96cbbc00d'/>
<id>urn:sha1:981250ca89261f98bdfd2d6be1fcccb96cbbc00d</id>
<content type='text'>
Commit 18888cf0883c: "ext4: speed up truncate/unlink by not using
bforget() unless needed" removed the use of EXT4_FREE_BLOCKS_FORGET in
the most important codepath for file systems using extents, but a
similar optimization also can be done for file systems using indirect
blocks, and for the two special cases in the ext4 extents code.

Cc: Andrey Sidorov &lt;qrxd43@motorola.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
</feed>
