Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262106
b: refs/heads/master
c: 3eb0865
h: refs/heads/master
v: v3
  • Loading branch information
Dan Ehrenberg authored and Theodore Ts'o committed Jul 18, 2011
1 parent 7532f6e commit d453648
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7a1fee135771e6e5185642bdc17df19bbdbcc48
refs/heads/master: 3eb08658431abd65c0fe6855d1860859c2d416f7
22 changes: 15 additions & 7 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2384,17 +2384,25 @@ static unsigned long ext4_get_stripe_size(struct ext4_sb_info *sbi)
unsigned long stride = le16_to_cpu(sbi->s_es->s_raid_stride);
unsigned long stripe_width =
le32_to_cpu(sbi->s_es->s_raid_stripe_width);
int ret;

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

if (stripe_width <= sbi->s_blocks_per_group)
return stripe_width;
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;
else
ret = 0;

if (stride <= sbi->s_blocks_per_group)
return stride;
/*
* If the stripe width is 1, this makes no sense and
* we set it to 0 to turn off stripe handling code.
*/
if (ret <= 1)
ret = 0;

return 0;
return ret;
}

/* sysfs supprt */
Expand Down

0 comments on commit d453648

Please sign in to comment.