Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Feb 1999 13:57:56 -0800 (PST)
From:      Julian Elischer <julian@whistle.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Luoqi Chen <luoqi@watermarkgroup.com>, dfr@nlsystems.com, freebsd-hackers@FreeBSD.ORG, mjacob@feral.com
Subject:   Re: Panic in FFS/4.0 as of yesterday - update
Message-ID:  <Pine.BSF.3.95.990225134720.11039F-100000@current1.whistle.com>
In-Reply-To: <199902252003.MAA08737@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.990225134720.11039F-100000>