<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ext4/resize.c, branch linux-3.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-04-27T07:30:27Z</updated>
<entry>
<title>ext4: report real fs size after failed resize</title>
<updated>2019-04-27T07:30:27Z</updated>
<author>
<name>Lukas Czerner</name>
</author>
<published>2019-03-15T04:22:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=006aaba6a666af0c96311c6a130bbc23a83e2f49'/>
<id>urn:sha1:006aaba6a666af0c96311c6a130bbc23a83e2f49</id>
<content type='text'>
[ Upstream commit 6c7328400e0488f7d49e19e02290ba343b6811b2 ]

Currently when the file system resize using ext4_resize_fs() fails it
will report into log that "resized filesystem to &lt;requested block
count&gt;".  However this may not be true in the case of failure.  Use the
current block count as returned by ext4_blocks_count() to report the
block count.

Additionally, report a warning that "error occurred during file system
resize"

Signed-off-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ext4: fix crash during online resizing</title>
<updated>2019-03-23T07:19:01Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2019-02-11T18:30:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5df54f47cd02ca7754922b58cc4a16febbc46f86'/>
<id>urn:sha1:5df54f47cd02ca7754922b58cc4a16febbc46f86</id>
<content type='text'>
commit f96c3ac8dfc24b4e38fc4c2eba5fea2107b929d1 upstream.

When computing maximum size of filesystem possible with given number of
group descriptor blocks, we forget to include s_first_data_block into
the number of blocks. Thus for filesystems with non-zero
s_first_data_block it can happen that computed maximum filesystem size
is actually lower than current filesystem size which confuses the code
and eventually leads to a BUG_ON in ext4_alloc_group_tables() hitting on
flex_gd-&gt;count == 0. The problem can be reproduced like:

truncate -s 100g /tmp/image
mkfs.ext4 -b 1024 -E resize=262144 /tmp/image 32768
mount -t ext4 -o loop /tmp/image /mnt
resize2fs /dev/loop0 262145
resize2fs /dev/loop0 300000

Fix the problem by properly including s_first_data_block into the
computed number of filesystem blocks.

Fixes: 1c6bd7173d66 "ext4: convert file system to meta_bg if needed..."
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
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: avoid possible double brelse() in add_new_gdb() on error path</title>
<updated>2018-11-22T06:32:48Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2018-11-06T22:18:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eebf0feb5ddb603025da7c1c6ab40c590b08c529'/>
<id>urn:sha1:eebf0feb5ddb603025da7c1c6ab40c590b08c529</id>
<content type='text'>
commit 4f32c38b4662312dd3c5f113d8bdd459887fb773 upstream.

Fixes: b40971426a83 ("ext4: add error checking to calls to ...")
Reported-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@kernel.org # 2.6.38
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix missing cleanup if ext4_alloc_flex_bg_array() fails while resizing</title>
<updated>2018-11-22T06:32:47Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-06T21:16:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e66a1ebd80b1922312ff9bb315d8263285f38e8d'/>
<id>urn:sha1:e66a1ebd80b1922312ff9bb315d8263285f38e8d</id>
<content type='text'>
commit f348e2241fb73515d65b5d77dd9c174128a7fbf2 upstream.

Fixes: 117fff10d7f1 ("ext4: grow the s_flex_groups array as needed ...")
Signed-off-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@kernel.org # 3.7
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix possible inode leak in the retry loop of ext4_resize_fs()</title>
<updated>2018-11-22T06:32:47Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-06T21:20:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f817fb9e4475a27460fea2e04971e557bdbd85a4'/>
<id>urn:sha1:f817fb9e4475a27460fea2e04971e557bdbd85a4</id>
<content type='text'>
commit db6aee62406d9fbb53315fcddd81f1dc271d49fa upstream.

Fixes: 1c6bd7173d66 ("ext4: convert file system to meta_bg if needed ...")
Signed-off-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@kernel.org # 3.7
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: avoid potential extra brelse in setup_new_flex_group_blocks()</title>
<updated>2018-11-22T06:32:47Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-03T20:13:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ffb0568312920cbfe1c003e84b015a0294cba9f'/>
<id>urn:sha1:1ffb0568312920cbfe1c003e84b015a0294cba9f</id>
<content type='text'>
commit 9e4028935cca3f9ef9b6a90df9da6f1f94853536 upstream.

Currently bh is set to NULL only during first iteration of for cycle,
then this pointer is not cleared after end of using.
Therefore rollback after errors can lead to extra brelse(bh) call,
decrements bh counter and later trigger an unexpected warning in __brelse()

Patch moves brelse() calls in body of cycle to exclude requirement of
brelse() call in rollback.

Fixes: 33afdcc5402d ("ext4: add a function which sets up group blocks ...")
Signed-off-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@kernel.org # 3.3+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: add missing brelse() add_new_gdb_meta_bg()'s error path</title>
<updated>2018-11-22T06:32:47Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-03T20:50:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c6a2eadf20d3bb16e01402f6dd90d18fb2bce41a'/>
<id>urn:sha1:c6a2eadf20d3bb16e01402f6dd90d18fb2bce41a</id>
<content type='text'>
commit 61a9c11e5e7a0dab5381afa5d9d4dd5ebf18f7a0 upstream.

Fixes: 01f795f9e0d6 ("ext4: add online resizing support for meta_bg ...")
Signed-off-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@kernel.org # 3.7
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: add missing brelse() in set_flexbg_block_bitmap()'s error path</title>
<updated>2018-11-22T06:32:47Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-03T20:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9cd2f90b0ad6b37631760963a68f6f7e098800bf'/>
<id>urn:sha1:9cd2f90b0ad6b37631760963a68f6f7e098800bf</id>
<content type='text'>
commit cea5794122125bf67559906a0762186cf417099c upstream.

Fixes: 33afdcc5402d ("ext4: add a function which sets up group blocks ...")
Cc: stable@kernel.org # 3.3
Signed-off-by: Vasily Averin &lt;vvs@virtuozzo.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: add missing brelse() update_backups()'s error path</title>
<updated>2018-11-22T06:32:47Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-03T21:11:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b23c27fb1b995358821989bbcf9710ea2904fb8'/>
<id>urn:sha1:2b23c27fb1b995358821989bbcf9710ea2904fb8</id>
<content type='text'>
commit ea0abbb648452cdb6e1734b702b6330a7448fcf8 upstream.

Fixes: ac27a0ec112a ("ext4: initial copy of files from ext3")
Signed-off-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@kernel.org # 2.6.19
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix online resize's handling of a too-small final block group</title>
<updated>2018-10-13T07:09:23Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2018-09-04T02:19:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c77f7ccd03716b0edb2a89e4bcf611a7221d63a2'/>
<id>urn:sha1:c77f7ccd03716b0edb2a89e4bcf611a7221d63a2</id>
<content type='text'>
commit f0a459dec5495a3580f8d784555e6f8f3bf7f263 upstream.

Avoid growing the file system to an extent so that the last block
group is too small to hold all of the metadata that must be stored in
the block group.

This problem can be triggered with the following reproducer:

umount /mnt
mke2fs -F -m0 -b 4096 -t ext4 -O resize_inode,^has_journal \
	-E resize=1073741824 /tmp/foo.img 128M
mount /tmp/foo.img /mnt
truncate --size 1708M /tmp/foo.img
resize2fs /dev/loop0 295400
umount /mnt
e2fsck -fy /tmp/foo.img

Reported-by: Torsten Hilbrich &lt;torsten.hilbrich@secunet.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
