diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-06 15:50:11 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-06 15:50:11 -0800 |
commit | 71fe3fcaf67cec856650e12979b282428ed806a3 (patch) | |
tree | 27d111834aa6a7b58f0ed6cdd5f61fa3aeee8562 /drivers/md/linear.c | |
parent | 38407aad0d1860515223075f33843a386277a30a (diff) | |
parent | f1cd14ae52985634d0389e934eba25b5ecf24565 (diff) |
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
md: linear: Fix a division by zero bug for very small arrays.
md: fix bug in raid10 recovery.
md: revert the recent addition of a call to the BLKRRPART ioctl.
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r-- | drivers/md/linear.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index 190147c79e7..3b90c5c924e 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c @@ -148,6 +148,8 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) min_sectors = conf->array_sectors; sector_div(min_sectors, PAGE_SIZE/sizeof(struct dev_info *)); + if (min_sectors == 0) + min_sectors = 1; /* min_sectors is the minimum spacing that will fit the hash * table in one PAGE. This may be much smaller than needed. |