<div dir="ltr"><div dir="ltr"><br></div><pre style="color:rgb(0,0,0)">Acked-by: Philip Cox <<a href="mailto:philip.cox@canonical.com">philip.cox@canonical.com</a>>
</pre><br class="gmail-Apple-interchange-newline"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 22, 2023 at 1:07 PM Tim Gardner <<a href="mailto:tim.gardner@canonical.com">tim.gardner@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">BugLink: <a href="https://bugs.launchpad.net/bugs/2003816" rel="noreferrer" target="_blank">https://bugs.launchpad.net/bugs/2003816</a><br>
<br>
Issue<br>
<br>
resize2fs utility is used to resize the filesystem and is idempotent in <br>
nature. But in the 5.15 kernel, successive execution of resize2fs is <br>
returning error.<br>
<br>
Reproduction step (on AWS):<br>
<br>
Create an AWS instance with AMI ami-056a67ea1b8ffa0fc (Linux <br>
5.15.0-1022-aws) in us-west-2 region and attach an EBS volume.<br>
Format and mount the disk - sudo mkfs.ext4 /dev/xvdb, sudo mkdir -p <br>
/mnt/ssd0, sudo mount /dev/xvdb /mnt/ssd0<br>
Increase the size of EBS volume.<br>
Run sudo resize2fs /dev/xvdb multiple times.<br>
<br>
The first execution returns -<br>
<br>
$ sudo resize2fs /dev/xvdb<br>
resize2fs 1.45.5 (07-Jan-2020)<br>
Filesystem at /dev/xvdb is mounted on /mnt/ssd0; on-line resizing required<br>
old_desc_blocks = 2, new_desc_blocks = 3<br>
The filesystem on /dev/xvdb is now 5242880 (4k) blocks long.<br>
<br>
The following execution returns -<br>
<br>
$ sudo resize2fs /dev/xvdb<br>
resize2fs 1.45.5 (07-Jan-2020)<br>
The filesystem is already 5242880 (4k) blocks long. Nothing to do!<br>
<br>
When you run the same step on the latest image ami-0a1d6d351894df6cc <br>
(Linux 5.15.0-1026-aws).<br>
<br>
The first execution returns -<br>
<br>
$ sudo resize2fs /dev/xvdb<br>
resize2fs 1.45.5 (07-Jan-2020)<br>
Filesystem at /dev/xvdb is mounted on /mnt/ssd0; on-line resizing required<br>
old_desc_blocks = 2, new_desc_blocks = 3<br>
The filesystem on /dev/xvdb is now 5242880 (4k) blocks long.<br>
<br>
The following execution returns<br>
<br>
$ sudo resize2fs /dev/xvdb<br>
resize2fs 1.45.5 (07-Jan-2020)<br>
resize2fs: Superblock checksum does not match superblock while trying to <br>
open /dev/xvdb<br>
Couldn't find valid filesystem superblock.<br>
<br>
<br>
This issue has been noted to affect 5.19 kernels as well. A patch set <br>
from 5.15.y has been used as a guide for which cherry<br>
picks to commit.<br>
<br>
------------------------------------------------------------------------<br>
<br>
The following changes since commit 78d54428f16c98b741b3190f1c3f6b0ef0430b3e:<br>
<br>
UBUNTU: Ubuntu-5.19.0-39.40 (2023-03-21 09:35:41 -0700)<br>
<br>
are available in the Git repository at:<br>
<br>
git://<a href="http://git.launchpad.net/~timg-tpi/ubuntu/+source/linux/+git/kinetic" rel="noreferrer" target="_blank">git.launchpad.net/~timg-tpi/ubuntu/+source/linux/+git/kinetic</a> <br>
lp2003816<br>
<br>
for you to fetch changes up to 4b2b6db116cb58b1f0b03db33063e74a72771c49:<br>
<br>
ext4: fix corrupt backup group descriptors after online resize <br>
(2023-03-22 10:32:43 -0600)<br>
<br>
----------------------------------------------------------------<br>
Baokun Li (3):<br>
ext4: fix bad checksum after online resize<br>
ext4: fix corruption when online resizing a 1K bigalloc fs<br>
ext4: fix corrupt backup group descriptors after online resize<br>
<br>
fs/ext4/resize.c | 32 ++++++++++++++++++++------------<br>
1 file changed, 20 insertions(+), 12 deletions(-)<br>
-- <br>
-----------<br>
Tim Gardner<br>
Canonical, Inc<br>
<br>
-- <br>
kernel-team mailing list<br>
<a href="mailto:kernel-team@lists.ubuntu.com" target="_blank">kernel-team@lists.ubuntu.com</a><br>
<a href="https://lists.ubuntu.com/mailman/listinfo/kernel-team" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/kernel-team</a><br>
</blockquote></div></div>