Skip to content

Commit

Permalink
[PATCH] md: only try to print recovery/resync status for personalitie…
Browse files Browse the repository at this point in the history
…s that support recovery

The introduction of 'resync=PENDING' (for read-only devices) caused that
message to appear for non-syncable arrays like raid0 and linear.  Simplest
thing is to not try to print any resync info unless the personality clearly
supports it.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Nov 9, 2005
1 parent 411036f commit 8e1b39d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -3722,13 +3722,15 @@ static int md_seq_show(struct seq_file *seq, void *v)
if (mddev->pers) {
mddev->pers->status (seq, mddev);
seq_printf(seq, "\n ");
if (mddev->curr_resync > 2) {
status_resync (seq, mddev);
seq_printf(seq, "\n ");
} else if (mddev->curr_resync == 1 || mddev->curr_resync == 2)
seq_printf(seq, "\tresync=DELAYED\n ");
else if (mddev->recovery_cp < MaxSector)
seq_printf(seq, "\tresync=PENDING\n ");
if (mddev->pers->sync_request) {
if (mddev->curr_resync > 2) {
status_resync (seq, mddev);
seq_printf(seq, "\n ");
} else if (mddev->curr_resync == 1 || mddev->curr_resync == 2)
seq_printf(seq, "\tresync=DELAYED\n ");
else if (mddev->recovery_cp < MaxSector)
seq_printf(seq, "\tresync=PENDING\n ");
}
} else
seq_printf(seq, "\n ");

Expand Down

0 comments on commit 8e1b39d

Please sign in to comment.