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]
Message-id: <20090923093436.GW10562@webber.adilger.int>
Date:	Wed, 23 Sep 2009 03:34:36 -0600
From:	Andreas Dilger <adilger@....com>
To:	Will Drewry <redpig@...aspill.org>
Cc:	tytso@....edu, linux-ext4@...r.kernel.org
Subject: Re: [PATCH][RFC] resize2fs and uninit_bg questions

On Sep 19, 2009  07:19 -0500, Will Drewry wrote:
> @@ -482,6 +482,8 @@ retry:
>  
>  	csum_flag = EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
>  					       EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
> +	lazy_flag = EXT2_HAS_COMPAT_FEATURE(fs->super,
> +					       EXT2_FEATURE_COMPAT_LAZY_BG);
>  	adj = old_fs->group_desc_count;
>  	max_group = fs->group_desc_count - adj;
>  	if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
> @@ -496,9 +498,12 @@ retry:
>  		adjblocks = 0;
>  
>  		fs->group_desc[i].bg_flags = 0;
> -		if (csum_flag)
> -			fs->group_desc[i].bg_flags |= EXT2_BG_INODE_UNINIT |
> -				EXT2_BG_INODE_ZEROED;
> +		if (csum_flag) {
> +			fs->group_desc[i].bg_flags |= EXT2_BG_INODE_UNINIT;
> +			if (!lazy_flag) {
> +				fs->group_desc[i].bg_flags |= EXT2_BG_INODE_ZEROED;
> +			}
> +		}

This code could be cleaned up a bit by assigning "EXT2_BG_INODE_ZEROED" to
lazy_flag so that you don't need to check this each time:

	lazy_flag = EXT2_HAS_COMPAT_FEATURE(fs->super,
					    EXT2_FEATURE_COMPAT_LAZY_BG) ?
				EXT2_BG_INODE_ZEROED : 0;

		if (csum_flag)
			fs->group_desc[i].bg_flags |=
				EXT2_BG_INODE_UNINIT | lazy_flag;

Still waiting to head from Ted on the use of COMPAT_LAZY_BG.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
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