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: <20080109233627.GB3351@webber.adilger.int>
Date:	Wed, 9 Jan 2008 16:36:27 -0700
From:	Andreas Dilger <adilger@....com>
To:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Cc:	cmm@...ibm.com, tytso@....edu, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: Use superblock s_raid_stripe_width as stripe
	size during block allocation.

On Jan 09, 2008  22:37 +0530, Aneesh Kumar K.V wrote:
> The stipe size used during block allocation is calculated as below.
> a) if we specify a stripe=<value> option using mount time. Use that value.
> b) if not use the value specified in super block.
> b) If the value specfied at mount time is greater than blocks per group use
> the value specified ini the super block.

What if the value on disk is also bad?  I'd add (after the second 'b' :-):

d) if s_stripe is still > s_blocks_per_group try s_raid_stride
e) if s_stripe is still > s_blocks_per_group use 0

> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
> ---
>  fs/ext4/super.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index db1edc8..10330eb 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -2136,6 +2136,16 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
>  	sbi->s_rsv_window_head.rsv_alloc_hit = 0;
>  	sbi->s_rsv_window_head.rsv_goal_size = 0;
>  	ext4_rsv_window_add(sb, &sbi->s_rsv_window_head);
> +	/*
> +	 * set the stripe size. If we have specified it via mount option, then
> +	 * use the mount option value. If the value specified at mount time is
> +	 * greater than the blocks per group use the super block value.
> +	 * Allocator needs it be less than blocks per group.
> +	 */
> +	if (!sbi->s_stripe ||
> +			sbi->s_stripe >= sbi->s_blocks_per_group) {

Please fix alignment to be just after '(' on previous line.

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