>From ac2d3550f2bd4fafb6497b881cac3c02d147c21a Mon Sep 17 00:00:00 2001 From: Anna Czarnowska <anna.czarnowska@xxxxxxxxx> Date: Thu, 13 Jan 2011 15:58:39 +0100 Subject: [PATCH] fix: Monitor: min_size must be set to 0 Otherwise a random value will be used for comparison later for native and ddf metadata (until min_acceptable_spare_size is defined). Signed-off-by: Anna Czarnowska <anna.czarnowska@xxxxxxxxx> --- Monitor.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/Monitor.c b/Monitor.c index ab1ae26..9e2a478 100644 --- a/Monitor.c +++ b/Monitor.c @@ -707,8 +707,10 @@ static int get_min_spare_size_required(struct state *st, unsigned long long *siz int fd; if (!st->metadata || - !st->metadata->ss->min_acceptable_spare_size) + !st->metadata->ss->min_acceptable_spare_size) { + *sizep = 0; return 0; + } fd = open(st->devname, O_RDONLY); if (fd < 0) -- 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