All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Tao Ma <tm@tao.ma>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: Only call update_backups if necessary in online resize.
Date: Tue, 25 Sep 2012 23:39:35 -0400	[thread overview]
Message-ID: <20120926033935.GD11468@thunk.org> (raw)
In-Reply-To: <1348498817-3598-1-git-send-email-tm@tao.ma>

On Mon, Sep 24, 2012 at 11:00:17PM +0800, Tao Ma wrote:
> @@ -1355,8 +1356,16 @@ exit_journal:
>  			int gdb_num;
>  			gdb_num = group / EXT4_BLOCKS_PER_GROUP(sb);
>  			gdb_bh = sbi->s_group_desc[gdb_num];
> -			update_backups(sb, gdb_bh->b_blocknr, gdb_bh->b_data,
> -				       gdb_bh->b_size);
> +			/*
> +			 * only backup the group descriptor block
> +			 * which hasn't been updated before.
> +			 */
> +			if (old_gdb != gdb_bh->b_blocknr) {
> +				update_backups(sb, gdb_bh->b_blocknr,
> +					       gdb_bh->b_data,
> +					       gdb_bh->b_size);
> +				old_gdb = gdb_bh->b_blocknr;
> +			}
>  		}
>  	}

Don't we also need to add a call to update_backups() at the end of the
loop so we update the backup block descriptors for the very last set
of block groups?

Thanks,

						- Ted

  reply	other threads:[~2012-09-26  3:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24 15:00 [PATCH] ext4: Only call update_backups if necessary in online resize Tao Ma
2012-09-26  3:39 ` Theodore Ts'o [this message]
2012-09-26  3:51   ` Tao Ma
2012-09-26  4:03     ` Theodore Ts'o
2012-09-26  5:26       ` Kevin Liao
2012-09-26 13:57         ` 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=20120926033935.GD11468@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tm@tao.ma \
    /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.