Re: [PATCH 2/2] ext4: update the s_overhead_clusters in the backup sb's when resizing

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

 



On Jun 28, 2022, at 10:00 PM, Theodore Ts'o <tytso@xxxxxxx> 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@xxxxxxx>

One minor style nit below, but you can take it or leave it...

Reviewed-by: Andreas Dilger <adilger@xxxxxxxxx>

> 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





Attachment: signature.asc
Description: Message signed with OpenPGP


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux