From owner-freebsd-hackers Tue Aug 21 10:56:37 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id 60F1A37B444 for ; Tue, 21 Aug 2001 10:56:19 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 303C281D0A; Tue, 21 Aug 2001 12:56:09 -0500 (CDT) Date: Tue, 21 Aug 2001 12:56:09 -0500 From: Alfred Perlstein To: Rex Luo Cc: hackers@FreeBSD.ORG Subject: Re: unpaired splbio() and splx() in vfs_unmountall() Message-ID: <20010821125609.F81307@elvis.mu.org> References: <200108210914.RAA02022@synology.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200108210914.RAA02022@synology.com>; from rexluo@synology.com on Tue, Aug 21, 2001 at 05:14:51PM +0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Rex Luo [010821 04:14] wrote: > Dear, > > I modifid kernel to write to disk directly after unmount all mounted > filesystem in boot() kern/kern_shutdown.c. However, I found that my IO requests > wouldn't have callback from device interrupt routine. I traced the codes and use > gdb to find something out. The interesting is after execute > > vfs_unmountall() -> dounmount() -> ffs_unmount() -> ffs_flushfiles() -> > vflush()-> ??? the interrupt mask is set by splbio() without splx(), > therefore, all my following requests cannot return. > > Notice that, the situation only happens after heavy IO, for example: cp 30 files > at the same time. > > I use spl0() to solve the prolbem, but I think it's not the right way to do > that. Can anyone provide some clues or suggestions. That makes no sense. All you need to do is find the where the splbio() is that doesn't have a corresponding splx(). You can use the SPLASSERT functions to do that. -- -Alfred Perlstein [alfred@freebsd.org] Ok, who wrote this damn function called '??'? And why do my programs keep crashing in it? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message