[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <68DC6315-7940-48F8-99D9-D26599819EE3@dilger.ca>
Date: Mon, 4 Jul 2022 14:50:47 -0600
From: Andreas Dilger <adilger@...ger.ca>
To: Theodore Ts'o <tytso@....edu>
Cc: Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 2/2] ext4: update the s_overhead_clusters in the backup
sb's when resizing
On Jun 28, 2022, at 10:00 PM, Theodore Ts'o <tytso@....edu> wrote:
>
> When the EXT4_IOC_RESIZE_FS ioctl is complete, update the backup
> superblocks. We don't do this for the old-style resize ioctls since
> they are quite ancient, and only used by very old versions of
> resize2fs --- and we don't want to update the backup superblocks every
> time EXT4_IOC_GROUP_ADD is called, since it might get called a lot.
>
> Signed-off-by: Theodore Ts'o <tytso@....edu>
One minor style nit below, but you can take it or leave it...
Reviewed-by: Andreas Dilger <adilger@...ger.ca>
> diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
> index e5c2713aa11a..8abff9400f69 100644
> --- a/fs/ext4/resize.c
> +++ b/fs/ext4/resize.c
> @@ -97,10 +97,14 @@ int ext4_resize_begin(struct super_block *sb)
> return ret;
> }
>
> -void ext4_resize_end(struct super_block *sb)
> +int ext4_resize_end(struct super_block *sb, bool update_backups)
> {
> clear_bit_unlock(EXT4_FLAGS_RESIZING, &EXT4_SB(sb)->s_ext4_flags);
> smp_mb__after_atomic();
> + if (update_backups)
> + return ext4_update_overhead(sb, true);
> + else
> + return 0;
(style) no need for "else" after return.
Cheers, Andreas
Download attachment "signature.asc" of type "application/pgp-signature" (874 bytes)
Powered by blists - more mailing lists