linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix: Monitor: min_size must be set to 0
@ 2011-01-13 15:03 Czarnowska, Anna
  2011-01-17  1:46 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Czarnowska, Anna @ 2011-01-13 15:03 UTC (permalink / raw)
  To: NeilBrown
  Cc: linux-raid@vger.kernel.org, Williams, Dan J, Ciechanowski, Ed,
	Hawrylewicz Czarnowski, Przemyslaw, Labun, Marcin,
	Neubauer, Wojciech

From ac2d3550f2bd4fafb6497b881cac3c02d147c21a Mon Sep 17 00:00:00 2001
From: Anna Czarnowska <anna.czarnowska@intel.com>
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@intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix: Monitor: min_size must be set to 0
  2011-01-13 15:03 [PATCH] fix: Monitor: min_size must be set to 0 Czarnowska, Anna
@ 2011-01-17  1:46 ` NeilBrown
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2011-01-17  1:46 UTC (permalink / raw)
  To: Czarnowska, Anna
  Cc: linux-raid@vger.kernel.org, Williams, Dan J, Ciechanowski, Ed,
	Hawrylewicz Czarnowski, Przemyslaw, Labun, Marcin,
	Neubauer, Wojciech

On Thu, 13 Jan 2011 15:03:14 +0000 "Czarnowska, Anna"
<anna.czarnowska@intel.com> wrote:

> >From ac2d3550f2bd4fafb6497b881cac3c02d147c21a Mon Sep 17 00:00:00 2001
> From: Anna Czarnowska <anna.czarnowska@intel.com>
> 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@intel.com>
> ---
>  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)

Applied, thanks.

NeilBrown


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-17  1:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 15:03 [PATCH] fix: Monitor: min_size must be set to 0 Czarnowska, Anna
2011-01-17  1:46 ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).