Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139937
b: refs/heads/master
c: 7ec0547
h: refs/heads/master
i:
  139935: 332886f
v: v3
  • Loading branch information
NeilBrown committed Mar 31, 2009
1 parent 2f5c812 commit 15805f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: 34e04e87fb8b2c62c9e8868f41c8179d0e15f51a
refs/heads/master: 7ec0547838976d088dfb9cb0adb073e6e8a15aa3
9 changes: 7 additions & 2 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -4169,8 +4169,13 @@ raid5_size(mddev_t *mddev, sector_t sectors, int raid_disks)

if (!sectors)
sectors = mddev->dev_sectors;
if (!raid_disks)
raid_disks = conf->previous_raid_disks;
if (!raid_disks) {
/* size is defined by the smallest of previous and new size */
if (conf->raid_disks < conf->previous_raid_disks)
raid_disks = conf->raid_disks;
else
raid_disks = conf->previous_raid_disks;
}

sectors &= ~((sector_t)mddev->chunk_size/512 - 1);
return sectors * (raid_disks - conf->max_degraded);
Expand Down

0 comments on commit 15805f4

Please sign in to comment.