From b1db914dd9080808c9f5378a4a97b7f86a145f96 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 6 Nov 2008 19:41:24 +1100 Subject: [PATCH] --- yaml --- r: 118497 b: refs/heads/master c: f1cd14ae52985634d0389e934eba25b5ecf24565 h: refs/heads/master i: 118495: eefb2e9054b1d63b9f024090c298215a531d76bf v: v3 --- [refs] | 2 +- trunk/drivers/md/linear.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5445edd0d4e2..93d75c2d78a2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a53a6c85756339f82ff19e001e90cfba2d6299a8 +refs/heads/master: f1cd14ae52985634d0389e934eba25b5ecf24565 diff --git a/trunk/drivers/md/linear.c b/trunk/drivers/md/linear.c index 190147c79e79..3b90c5c924ec 100644 --- a/trunk/drivers/md/linear.c +++ b/trunk/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.