[PATCH] fix: mdstat_read() incorrectly translates value ofmdstat_ent->reshape for recovering

[PATCH] fix: mdstat_read() incorrectly translates value ofmdstat_ent->reshape for recovering

am 08.12.2010 12:30:28 von unknown

it results in wrong output of mdadm --detail (shows reshaping instead
of recovering)

Signed-off-by: Przemyslaw Czarnowski
---
mdstat.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mdstat.c b/mdstat.c
index fdce516..c5a07b5 100644
--- a/mdstat.c
+++ b/mdstat.c
@@ -253,7 +253,7 @@ struct mdstat_ent *mdstat_read(int hold, int start)
if (strncmp(w, "reshape", 7)==0)
ent->resync = 2;
if (strncmp(w, "recovery", 8)==0)
- ent->resync = 2;
+ ent->resync = 0;
if (strncmp(w, "check", 5)==0)
ent->resync = 3;

--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] fix: mdstat_read() incorrectly translates value ofmdstat_ent->reshape for recovering

am 08.12.2010 22:43:20 von NeilBrown

On Wed, 8 Dec 2010 11:30:28 +0000 "Hawrylewicz Czarnowski, Przemyslaw"
wrote:

> it results in wrong output of mdadm --detail (shows reshaping instead
> of recovering)
>
> Signed-off-by: Przemyslaw Czarnowski
> ---
> mdstat.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/mdstat.c b/mdstat.c
> index fdce516..c5a07b5 100644
> --- a/mdstat.c
> +++ b/mdstat.c
> @@ -253,7 +253,7 @@ struct mdstat_ent *mdstat_read(int hold, int start)
> if (strncmp(w, "reshape", 7)==0)
> ent->resync = 2;
> if (strncmp(w, "recovery", 8)==0)
> - ent->resync = 2;
> + ent->resync = 0;
> if (strncmp(w, "check", 5)==0)
> ent->resync = 3;
>


Thanks.
Applied.

NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html