>From ce42a88d45e1d901460dd476b8eea46031060570 Mon Sep 17 00:00:00 2001 From: Anna Czarnowska <anna.czarnowska@xxxxxxxxx> Date: Fri, 26 Nov 2010 12:51:59 +0100 Subject: [PATCH 2/4] Monitor: reset dev when size too small Cc: linux-raid@xxxxxxxxxxxxxxx, Williams, Dan J <dan.j.williams@xxxxxxxxx>, Ciechanowski, Ed <ed.ciechanowski@xxxxxxxxx> Otherwise spare will be considered good anyway. Signed-off-by: Anna Czarnowska <anna.czarnowska@xxxxxxxxx> --- Monitor.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Monitor.c b/Monitor.c index beaaa55..cacd2fe 100644 --- a/Monitor.c +++ b/Monitor.c @@ -844,9 +844,10 @@ static dev_t container_choose_spare(struct state *from, struct state *to, if (min_size && dev_size_from_id(dev, &dev_size) && - dev_size < min_size) + dev_size < min_size) { + dev = 0; continue; - + } pol = devnum_policy(dev); if (from->spare_group) pol_add(&pol, pol_domain, -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html