Re: [PATCH v2 2/2] ext4: Ignore a stripe width of 1

From: Ted Ts'o
Date: Sun Jul 17 2011 - 21:21:22 EST


On Fri, Jul 15, 2011 at 02:41:55PM -0700, Dan Ehrenberg wrote:
> If the stripe width was set to 1, then this patch will ignore
> that stripe width and ext4 will act as if the stripe width
> were 0 with respect to optimizing allocations.
>
> Signed-off-by: Dan Ehrenberg <dehrenberg@xxxxxxxxxx>

Applied to the ext4 tree. I did make one formatting change. Please
don't have blank lines between the if and else clauses, like this:

if (sbi->s_stripe && sbi->s_stripe <= sbi->s_blocks_per_group)
ret = sbi->s_stripe;

else if (stripe_width <= sbi->s_blocks_per_group)
ret = stripe_width;

else if (stride <= sbi->s_blocks_per_group)
ret = stride;

it wastes vertical whitespace and makes the control flow harder to
follow. Eliminate the blank lines, and it's easier to read, I think.

if (sbi->s_stripe && sbi->s_stripe <= sbi->s_blocks_per_group)
ret = sbi->s_stripe;
else if (stripe_width <= sbi->s_blocks_per_group)
ret = stripe_width;
else if (stride <= sbi->s_blocks_per_group)
ret = stride;

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/