Patch "ext4: update s_overhead_clusters in the superblock during an on-line resize" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ext4: update s_overhead_clusters in the superblock during an on-line resize

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ext4-update-s_overhead_clusters-in-the-superblock-during-an-on-line-resize.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From de394a86658ffe4e89e5328fd4993abfe41b7435 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@xxxxxxx>
Date: Wed, 29 Jun 2022 00:00:25 -0400
Subject: ext4: update s_overhead_clusters in the superblock during an on-line resize

From: Theodore Ts'o <tytso@xxxxxxx>

commit de394a86658ffe4e89e5328fd4993abfe41b7435 upstream.

When doing an online resize, the on-disk superblock on-disk wasn't
updated.  This means that when the file system is unmounted and
remounted, and the on-disk overhead value is non-zero, this would
result in the results of statfs(2) to be incorrect.

This was partially fixed by Commits 10b01ee92df5 ("ext4: fix overhead
calculation to account for the reserved gdt blocks"), 85d825dbf489
("ext4: force overhead calculation if the s_overhead_cluster makes no
sense"), and eb7054212eac ("ext4: update the cached overhead value in
the superblock").

However, since it was too expensive to forcibly recalculate the
overhead for bigalloc file systems at every mount, this didn't fix the
problem for bigalloc file systems.  This commit should address the
problem when resizing file systems with the bigalloc feature enabled.

Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
Cc: stable@xxxxxxxxxx
Reviewed-by: Andreas Dilger <adilger@xxxxxxxxx>
Link: https://lore.kernel.org/r/20220629040026.112371-1-tytso@xxxxxxx
Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/ext4/resize.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1461,6 +1461,7 @@ static void ext4_update_super(struct sup
 	 * Update the fs overhead information
 	 */
 	ext4_calculate_overhead(sb);
+	es->s_overhead_clusters = cpu_to_le32(sbi->s_overhead);
 
 	if (test_opt(sb, DEBUG))
 		printk(KERN_DEBUG "EXT4-fs: added group %u:"


Patches currently in stable-queue which might be from tytso@xxxxxxx are

queue-5.10/ext4-remove-ea-inode-entry-from-mbcache-on-inode-eviction.patch
queue-5.10/jbd2-fix-assertion-jh-b_frozen_data-null-failure-whe.patch
queue-5.10/ext4-check-if-directory-block-is-within-i_size.patch
queue-5.10/jbd2-fix-outstanding-credits-assert-in-jbd2_journal_.patch
queue-5.10/ext4-correct-max_inline_xattr_value_size-computing.patch
queue-5.10/ext4-update-s_overhead_clusters-in-the-superblock-during-an-on-line-resize.patch
queue-5.10/ext4-fix-use-after-free-in-ext4_xattr_set_entry.patch
queue-5.10/ext4-make-sure-ext4_append-always-allocates-new-block.patch
queue-5.10/mbcache-add-functions-to-delete-entry-if-unused.patch
queue-5.10/ext4-correct-the-misjudgment-in-ext4_iget_extra_inode.patch
queue-5.10/ext4-fix-warning-in-ext4_iomap_begin-as-race-between-bmap-and-write.patch
queue-5.10/mbcache-don-t-reclaim-used-entries.patch
queue-5.10/ext4-add-ext4_inode_has_xattr_space-macro-in-xattr.h.patch
queue-5.10/ext4-recover-csum-seed-of-tmp_inode-after-migrating-.patch
queue-5.10/ext4-fix-extent-status-tree-race-in-writeback-error-recovery-path.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux