All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@dilger.ca>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 2/2] ext4: update the s_overhead_clusters in the backup sb's when resizing
Date: Mon, 4 Jul 2022 14:50:47 -0600	[thread overview]
Message-ID: <68DC6315-7940-48F8-99D9-D26599819EE3@dilger.ca> (raw)
In-Reply-To: <20220629040026.112371-2-tytso@mit.edu>

[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]

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

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

Reviewed-by: Andreas Dilger <adilger@dilger.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






[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 873 bytes --]

  reply	other threads:[~2022-07-04 20:48 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 [this message]
2022-07-07 14:35     ` Theodore Ts'o
2022-07-04 20:47 ` [PATCH 1/2] ext4: update s_overhead_clusters in the superblock during an on-line resize Andreas Dilger
2022-07-07 14:32   ` 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=68DC6315-7940-48F8-99D9-D26599819EE3@dilger.ca \
    --to=adilger@dilger.ca \
    --cc=linux-ext4@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.