Date: Tue, 6 Jul 1999 11:50:01 -0700 (PDT) From: Ted Faber <faber@ISI.EDU> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/11222: MFS does not sync from reboot syscall Message-ID: <199907061850.LAA30826@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/11222; it has been noted by GNATS.
From: Ted Faber <faber@ISI.EDU>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Re: kern/11222: MFS does not sync from reboot syscall
Date: Tue, 6 Jul 1999 11:44:29 -0700 (PDT)
>Submitter-Id: current-users
>Originator: Ted Faber
>Organization: USC/ISI
>Confidential: no
>Synopsis: MFS does not sync from reboot syscall
>Severity: non-critical
>Priority: medium
>Category: kern
>Release: FreeBSD 3.2-RELEASE i386
>Class: sw-bug
>Environment:
Followup to kern/11222
>Description:
see kern/11222
>How-To-Repeat:
see kern/11222
>Fix:
New patch, not MFS-specific, replaces DELAY with tsleep in
reboot syscall
*** ufs/mfs/mfs_vfsops.c.orig Thu Dec 31 20:14:11 1998
--- ufs/mfs/mfs_vfsops.c Sun Apr 18 14:29:24 1999
***************
*** 367,373 ****
}
! static int mfs_pri = PWAIT | PCATCH; /* XXX prob. temp */
/*
* Used to grab the process and keep it in the kernel to service
--- 367,373 ----
}
! static int mfs_pri = PRIBIO | PCATCH; /* XXX prob. temp */
/*
* Used to grab the process and keep it in the kernel to service
*** kern/kern_shutdown.c.orig Mon Dec 28 15:03:00 1998
--- kern/kern_shutdown.c Thu Apr 29 09:15:19 1999
***************
*** 178,183 ****
--- 178,184 ----
int howto;
{
sle_p ep;
+ int to; /* to check tsleep timeouts */
#ifdef SMP
if (smp_active) {
***************
*** 223,229 ****
break;
printf("%d ", nbusy);
sync(&proc0, NULL);
! DELAY(50000 * iter);
}
/*
* Count only busy local buffers to prevent forcing
--- 224,240 ----
break;
printf("%d ", nbusy);
sync(&proc0, NULL);
! /* DELAY(50000 * iter); */
!
! /*
! * Ensure that to is not zero (we don't want
! * to sleep forever)
! */
! if ( (hz * 5 *iter ) / 100 > 0 )
! to = (hz * 5 * iter ) / 100 ;
! else
! to = 1;
! tsleep(&proc0, PWAIT, "reboot", to);
}
/*
* Count only busy local buffers to prevent forcing
***************
*** 259,265 ****
(long)bp->b_lblkno);
}
}
! DELAY(5000000); /* 5 seconds */
#endif
} else {
printf("done\n");
--- 270,277 ----
(long)bp->b_lblkno);
}
}
! /* DELAY(5000000); 5 seconds */
! tsleep(&proc0, PWAIT, "reboot", 5 * hz );
#endif
} else {
printf("done\n");
***************
*** 269,275 ****
if (panicstr == 0)
vfs_unmountall();
}
! DELAY(100000); /* wait for console output to finish */
}
/*
--- 281,292 ----
if (panicstr == 0)
vfs_unmountall();
}
! /*DELAY(100000); wait for console output to finish */
! if ( hz / 10 > 0 ) to = hz/10;
! else to = 1;
!
! tsleep(&proc0, PWAIT, "reboot", to);
!
}
/*
***************
*** 314,320 ****
PANIC_REBOOT_WAIT_TIME);
for (loop = PANIC_REBOOT_WAIT_TIME * 10;
loop > 0; --loop) {
! DELAY(1000 * 100); /* 1/10th second */
/* Did user type a key? */
if (cncheckc() != -1)
break;
--- 331,342 ----
PANIC_REBOOT_WAIT_TIME);
for (loop = PANIC_REBOOT_WAIT_TIME * 10;
loop > 0; --loop) {
! /* DELAY(1000 * 100); 1/10th second */
! if ( hz/10 > 0 ) to = hz/10;
! else to = 1;
!
! tsleep(&proc0, PWAIT, "reboot", to);
!
/* Did user type a key? */
if (cncheckc() != -1)
break;
***************
*** 330,336 ****
}
die:
printf("Rebooting...\n");
! DELAY(1000000); /* wait 1 sec for printf's to complete and be read */
/* cpu_boot(howto); */ /* doesn't do anything at the moment */
cpu_reset();
for(;;) ;
--- 352,360 ----
}
die:
printf("Rebooting...\n");
! /*DELAY(1000000); wait 1 sec for printf's to complete and be read */
! tsleep(&proc0, PWAIT, "reboot", hz);
!
/* cpu_boot(howto); */ /* doesn't do anything at the moment */
cpu_reset();
for(;;) ;
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907061850.LAA30826>
