From f94c116f56cb821bfd619481d94fcd78ab8b53c0 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 22 Nov 2010 19:35:25 +1100 Subject: detail/wait: better handling of monitoring sync action. Detail: report reshape and check as well as resync and recovery Wait: if the resync is pending or delayed, wait for that too. Signed-off-by: NeilBrown --- Detail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Detail.c') diff --git a/Detail.c b/Detail.c index e0817aac..fdfffb72 100644 --- a/Detail.c +++ b/Detail.c @@ -355,6 +355,7 @@ int Detail(char *dev, int brief, int export, int test, char *homehost) if (atime) printf(" Update Time : %.24s\n", ctime(&atime)); if (array.raid_disks) { + static char *sync_action[] = {", recovering",", resyncing",", reshaping",", checking"}; char *st; if (avail_disks == array.raid_disks) st = ""; @@ -367,8 +368,7 @@ int Detail(char *dev, int brief, int export, int test, char *homehost) printf(" State : %s%s%s%s\n", (array.state&(1<percent < 0) ? "" : - (e->resync) ? ", resyncing": ", recovering", + (!e || e->percent < 0) ? "" : sync_action[e->resync], larray_size ? "": ", Not Started"); } if (array.raid_disks) -- cgit v1.2.3