summaryrefslogtreecommitdiffstats
path: root/sbin/vinum
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2000-03-01 07:20:32 +0000
committergrog <grog@FreeBSD.org>2000-03-01 07:20:32 +0000
commit090cc794ba52b78d9643f20233b2a0ad4dd53237 (patch)
tree3ede55fd93e39785e706b026614c580098a30c8a /sbin/vinum
parent9301681b2f2fd2daa5e6580a249cc9a524581db2 (diff)
downloadFreeBSD-src-090cc794ba52b78d9643f20233b2a0ad4dd53237.zip
FreeBSD-src-090cc794ba52b78d9643f20233b2a0ad4dd53237.tar.gz
Increase the time we'll wait for a reviving disk to carry on and not
be marked as stalled, from 1 second to 5 seconds. Implicitly-sanctioned-by: jkh
Diffstat (limited to 'sbin/vinum')
-rw-r--r--sbin/vinum/list.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/sbin/vinum/list.c b/sbin/vinum/list.c
index bf120b0..b876cb0 100644
--- a/sbin/vinum/list.c
+++ b/sbin/vinum/list.c
@@ -59,6 +59,16 @@
#include <dev/vinum/vinumhdr.h>
#include "vext.h"
#include <dev/vinum/request.h>
+
+/*
+ * When a subdisk is reviving or initializing, we
+ * check to see whether it is still progressing
+ * and print a warning if not. We check every 50
+ * ms, up to a maximum of 5 seconds. This is the
+ * counter value.
+ */
+#define STALLCOUNT 100
+
/*
* Take a size in sectors and return a pointer to
* a string which represents the size best. If lj
@@ -615,13 +625,13 @@ vinum_lsi(int sdno, int recurse)
* Do it like this so we don't have
* annoying delays in the listing.
*/
- for (times = 0; times < 20; times++) {
+ for (times = 0; times < STALLCOUNT; times++) {
get_sd_info(&sd, sdno);
if (sd.revived != revived) /* progress? */
break;
usleep(50000);
}
- if (times == 10)
+ if (times == STALLCOUNT)
printf("\t\t*** Revive has stalled ***\n");
}
}
@@ -696,13 +706,13 @@ vinum_lsi(int sdno, int recurse)
* Do it like this so we don't have
* annoying delays in the listing.
*/
- for (times = 0; times < 20; times++) {
+ for (times = 0; times < STALLCOUNT; times++) {
get_sd_info(&sd, sdno);
if (sd.revived != revived) /* progress? */
break;
usleep(50000);
}
- if (times == 10)
+ if (times == STALLCOUNT)
printf("\t\t\t*** Revive of %s has stalled ***\n",
sd.name);
}
OpenPOWER on IntegriCloud