From owner-freebsd-bugs Tue Jul 6 11:50: 5 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 1010114DA3 for ; Tue, 6 Jul 1999 11:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id LAA30826; Tue, 6 Jul 1999 11:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Tue, 6 Jul 1999 11:50:01 -0700 (PDT) Message-Id: <199907061850.LAA30826@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ted Faber Subject: Re: kern/11222: MFS does not sync from reboot syscall Reply-To: Ted Faber Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/11222; it has been noted by GNATS. From: Ted Faber 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