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
This commit is contained in:
Greg Lehey 2000-03-01 07:20:32 +00:00
parent cef69d78bb
commit d07abdea38
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57642

View File

@ -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);
}