<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ext4/resize.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-11-14T18:10:30Z</updated>
<entry>
<title>ext4: fix overflow when updating superblock backups after resize</title>
<updated>2014-11-14T18:10:30Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2014-10-30T14:52:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8907b5f04fc1c1d9d1a03238eeb2d7f2b47756c'/>
<id>urn:sha1:c8907b5f04fc1c1d9d1a03238eeb2d7f2b47756c</id>
<content type='text'>
commit 9378c6768e4fca48971e7b6a9075bc006eda981d upstream.

When there are no meta block groups update_backups() will compute the
backup block in 32-bit arithmetics thus possibly overflowing the block
number and corrupting the filesystem. OTOH filesystems without meta
block groups larger than 16 TB should be rare. Fix the problem by doing
the counting in 64-bit arithmetics.

Coverity-id: 741252
Signed-off-by: Jan Kara &lt;jack@suse.cz&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: Replace open coded mdata csum feature to helper function</title>
<updated>2014-11-14T18:10:30Z</updated>
<author>
<name>Dmitry Monakhov</name>
</author>
<published>2014-10-13T07:36:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b3b37b28739a07d9daf8a5e8d2415cbc4df1022'/>
<id>urn:sha1:2b3b37b28739a07d9daf8a5e8d2415cbc4df1022</id>
<content type='text'>
commit 9aa5d32ba269bec0e7eaba2697a986a7b0bc8528 upstream.

Besides the fact that this replacement improves code readability
it also protects from errors caused direct EXT4_S(sb)-&gt;s_es manipulation
which may result attempt to use uninitialized  csum machinery.

#Testcase_BEGIN
IMG=/dev/ram0
MNT=/mnt
mkfs.ext4 $IMG
mount $IMG $MNT
#Enable feature directly on disk, on mounted fs
tune2fs -O metadata_csum  $IMG
# Provoke metadata update, likey result in OOPS
touch $MNT/test
umount $MNT
#Testcase_END

# Replacement script
@@
expression E;
@@
- EXT4_HAS_RO_COMPAT_FEATURE(E, EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)
+ ext4_has_metadata_csum(E)

https://bugzilla.kernel.org/show_bug.cgi?id=82201

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: avoid trying to kfree an ERR_PTR pointer</title>
<updated>2014-09-03T13:37:30Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2014-09-03T13:33:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a9cfcd63e8d206ce4235c355d857c4fbdf0f4587'/>
<id>urn:sha1:a9cfcd63e8d206ce4235c355d857c4fbdf0f4587</id>
<content type='text'>
Thanks to Dan Carpenter for extending smatch to find bugs like this.
(This was found using a development version of smatch.)

Fixes: 36de928641ee48b2078d3fe9514242aaa2f92013
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4</title>
<updated>2014-06-08T20:03:35Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2014-06-08T20:03:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f8409abdc592e13cefbe4e4a24a84b3d5741e85f'/>
<id>urn:sha1:f8409abdc592e13cefbe4e4a24a84b3d5741e85f</id>
<content type='text'>
Pull ext4 updates from Ted Ts'o:
 "Clean ups and miscellaneous bug fixes, in particular for the new
  collapse_range and zero_range fallocate functions.  In addition,
  improve the scalability of adding and remove inodes from the orphan
  list"

* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (25 commits)
  ext4: handle symlink properly with inline_data
  ext4: fix wrong assert in ext4_mb_normalize_request()
  ext4: fix zeroing of page during writeback
  ext4: remove unused local variable "stored" from ext4_readdir(...)
  ext4: fix ZERO_RANGE test failure in data journalling
  ext4: reduce contention on s_orphan_lock
  ext4: use sbi in ext4_orphan_{add|del}()
  ext4: use EXT_MAX_BLOCKS in ext4_es_can_be_merged()
  ext4: add missing BUFFER_TRACE before ext4_journal_get_write_access
  ext4: remove unnecessary double parentheses
  ext4: do not destroy ext4_groupinfo_caches if ext4_mb_init() fails
  ext4: make local functions static
  ext4: fix block bitmap validation when bigalloc, ^flex_bg
  ext4: fix block bitmap initialization under sparse_super2
  ext4: find the group descriptors on a 1k-block bigalloc,meta_bg filesystem
  ext4: avoid unneeded lookup when xattr name is invalid
  ext4: fix data integrity sync in ordered mode
  ext4: remove obsoleted check
  ext4: add a new spinlock i_raw_lock to protect the ext4's raw inode
  ext4: fix locking for O_APPEND writes
  ...
</content>
</entry>
<entry>
<title>ext4: add missing BUFFER_TRACE before ext4_journal_get_write_access</title>
<updated>2014-05-13T02:06:43Z</updated>
<author>
<name>liang xie</name>
</author>
<published>2014-05-13T02:06:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d60125530b0122f5a0a57481f3064a6250365dd'/>
<id>urn:sha1:5d60125530b0122f5a0a57481f3064a6250365dd</id>
<content type='text'>
Make them more consistently

Signed-off-by: xieliang &lt;xieliang@xiaomi.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>arch: Mass conversion of smp_mb__*()</title>
<updated>2014-04-18T12:20:48Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2014-03-17T17:06:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e857c58efeb99393cba5a5d0d8ec7117183137c'/>
<id>urn:sha1:4e857c58efeb99393cba5a5d0d8ec7117183137c</id>
<content type='text'>
Mostly scripted conversion of the smp_mb__* barriers.

Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Link: http://lkml.kernel.org/n/tip-55dhyhocezdw1dg7u19hmh1u@git.kernel.org
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: linux-arch@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>ext4: fix online resize with a non-standard blocks per group setting</title>
<updated>2014-02-16T03:42:25Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2014-02-16T03:42:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d2660d0c9c2f296837078c189b68a47f6b2e3b5'/>
<id>urn:sha1:3d2660d0c9c2f296837078c189b68a47f6b2e3b5</id>
<content type='text'>
The set_flexbg_block_bitmap() function assumed that the number of
blocks in a blockgroup was sb-&gt;blocksize * 8, which is normally true,
but not always!  Use EXT4_BLOCKS_PER_GROUP(sb) instead, to fix block
bitmap corruption after:

mke2fs -t ext4 -g 3072 -i 4096 /dev/vdd 1G
mount -t ext4 /dev/vdd /vdd
resize2fs /dev/vdd 8G

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reported-by: Jon Bernard &lt;jbernard@tuxion.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>ext4: fix online resize with very large inode tables</title>
<updated>2014-02-16T02:33:13Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2014-02-16T02:33:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b93c95353413041a8cebad915a8109619f66bcc6'/>
<id>urn:sha1:b93c95353413041a8cebad915a8109619f66bcc6</id>
<content type='text'>
If a file system has a large number of inodes per block group, all of
the metadata blocks in a flex_bg may be larger than what can fit in a
single block group.  Unfortunately, ext4_alloc_group_tables() in
resize.c was never tested to see if it would handle this case
correctly, and there were a large number of bugs which caused the
following sequence to result in a BUG_ON:

kernel bug at fs/ext4/resize.c:409!
   ...
call trace:
 [&lt;ffffffff81256768&gt;] ext4_flex_group_add+0x1448/0x1830
 [&lt;ffffffff81257de2&gt;] ext4_resize_fs+0x7b2/0xe80
 [&lt;ffffffff8123ac50&gt;] ext4_ioctl+0xbf0/0xf00
 [&lt;ffffffff811c111d&gt;] do_vfs_ioctl+0x2dd/0x4b0
 [&lt;ffffffff811b9df2&gt;] ? final_putname+0x22/0x50
 [&lt;ffffffff811c1371&gt;] sys_ioctl+0x81/0xa0
 [&lt;ffffffff81676aa9&gt;] system_call_fastpath+0x16/0x1b
code: c8 4c 89 df e8 41 96 f8 ff 44 89 e8 49 01 c4 44 29 6d d4 0
rip  [&lt;ffffffff81254fa1&gt;] set_flexbg_block_bitmap+0x171/0x180


This can be reproduced with the following command sequence:

   mke2fs -t ext4 -i 4096 /dev/vdd 1G
   mount -t ext4 /dev/vdd /vdd
   resize2fs /dev/vdd 8G

To fix this, we need to make sure the right thing happens when a block
group's inode table straddles two block groups, which means the
following bugs had to be fixed:

1) Not clearing the BLOCK_UNINIT flag in the second block group in
   ext4_alloc_group_tables --- the was proximate cause of the BUG_ON.

2) Incorrectly determining how many block groups contained contiguous
   free blocks in ext4_alloc_group_tables().

3) Incorrectly setting the start of the next block range to be marked
   in use after a discontinuity in setup_new_flex_group_blocks().

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>ext4: fix corruption when online resizing a fs with 1K block size</title>
<updated>2013-07-01T12:12:08Z</updated>
<author>
<name>Maarten ter Huurne</name>
</author>
<published>2013-07-01T12:12:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ca792edc13c409e8d4eb9001e048264c6a2eb64'/>
<id>urn:sha1:6ca792edc13c409e8d4eb9001e048264c6a2eb64</id>
<content type='text'>
Subtracting the number of the first data block places the superblock
backups one block too early, corrupting the file system. When the block
size is larger than 1K, the first data block is 0, so the subtraction
has no effect and no corruption occurs.

Signed-off-by: Maarten ter Huurne &lt;maarten@treewalker.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.org
</content>
</entry>
<entry>
<title>ext4: delete unused variables</title>
<updated>2013-06-17T12:56:26Z</updated>
<author>
<name>Jon Ernst</name>
</author>
<published>2013-06-17T12:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03b40e349695dc700582568e5b410a89058f707e'/>
<id>urn:sha1:03b40e349695dc700582568e5b410a89058f707e</id>
<content type='text'>
This patch removed several unused variables.

Signed-off-by: Jon Ernst &lt;jonernst07@gmx.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
</entry>
</feed>
