From: Andreas Dilger <adilger@dilger.ca>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>, stable@kernel.org
Subject: Re: [PATCH 1/2] ext4: update s_overhead_clusters in the superblock during an on-line resize
Date: Mon, 4 Jul 2022 14:47:43 -0600 [thread overview]
Message-ID: <2F240021-C24A-4F86-ACDA-2FF944F9FE6F@dilger.ca> (raw)
In-Reply-To: <20220629040026.112371-1-tytso@mit.edu>
[-- Attachment #1: Type: text/plain, Size: 1640 bytes --]
On Jun 28, 2022, at 10:00 PM, Theodore Ts'o <tytso@mit.edu> wrote:
>
> 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").
Would these be better referenced by Fixes: labels?
> 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@mit.edu>
> Cc: stable@kernel.org
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
> ---
> fs/ext4/resize.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
> index 8b70a4701293..e5c2713aa11a 100644
> --- a/fs/ext4/resize.c
> +++ b/fs/ext4/resize.c
> @@ -1484,6 +1484,7 @@ static void ext4_update_super(struct super_block *sb,
> * 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:"
> --
> 2.31.0
>
Cheers, Andreas
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 873 bytes --]
next prev parent reply other threads:[~2022-07-04 20:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 4:00 [PATCH 1/2] ext4: update s_overhead_clusters in the superblock during an on-line resize Theodore Ts'o
2022-06-29 4:00 ` [PATCH 2/2] ext4: update the s_overhead_clusters in the backup sb's when resizing Theodore Ts'o
2022-07-04 20:50 ` Andreas Dilger
2022-07-07 14:35 ` Theodore Ts'o
2022-07-04 20:47 ` Andreas Dilger [this message]
2022-07-07 14:32 ` [PATCH 1/2] ext4: update s_overhead_clusters in the superblock during an on-line resize Theodore Ts'o
2022-07-08 3:19 ` Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2F240021-C24A-4F86-ACDA-2FF944F9FE6F@dilger.ca \
--to=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=stable@kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox