From owner-freebsd-hackers Thu Feb 25 14: 4:29 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (Postfix) with ESMTP id 38E8214D74 for ; Thu, 25 Feb 1999 14:04:27 -0800 (PST) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id NAA13502; Thu, 25 Feb 1999 13:58:13 -0800 (PST) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpdW13493; Thu Feb 25 21:58:02 1999 Date: Thu, 25 Feb 1999 13:57:56 -0800 (PST) From: Julian Elischer To: Matthew Dillon Cc: Luoqi Chen , dfr@nlsystems.com, freebsd-hackers@FreeBSD.ORG, mjacob@feral.com Subject: Re: Panic in FFS/4.0 as of yesterday - update In-Reply-To: <199902252003.MAA08737@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On a related note.... and something PHK has been on about... the BUF struct.. (yech) this is overlayed with two totally separate functions. one id to keep track of IO states, and the other is to track content of the buf and the state of the contents. Poul has talked of splitting these tow functions and I tend to agree with him.. take this line from the patch file Matt posted about.. (not actually a line h changed, but in the patch) } else if ((bp->b_flags & (B_NOCACHE | B_INVAL | B_ERROR | B_FREEBUF)) || (bp->b_bufsize <= 0)) { bp->b_flags |= B_INVAL; now the flag B_ERROR being true indicates tha the last IO failed. Because of other code nearby we know it was a read. This says that the contents are invalid. This is stupid. Whatever failed the IO should have set the B_INVAL bit and thrown the buf into whatever resource pool is for invalid bufs. The B_ERROR bit really might only be useful as a -ve cache reference.. (don't bother try read this again.. it will fail) but other than this, it is not a state of the buffer. It's a report of a requested operation on the buffer. This is one of the reasons that the vfs, device and vm systems often get confused about buffer states.. The buffer is overloaded. Has anyone got suggestions about this? As I said earlier, I know PHK had some... julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message