lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Sep 2012 23:39:35 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Tao Ma <tm@....ma>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: Only call update_backups if necessary in online
 resize.

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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ