freebsd-dev/sys
Paul Richards 9abd5d84ac This fixes a bug in the bcache code whereby false cache hits occur
the first time block 0 is read. This fix initialises the block
numbers to -1 which isn't the most correct thing for a daddr_t but
it isn't likely to cause a problem in the boot blocks and it could
do with a more thought out fix later.

The bug is probably benign on the i386 but on the alpha it can
cause initial file opens to fail. This is the cause of the "can't
open /boot/boot.conf" errors.

It appears on the alpha because of a number of combining factors.
On the alpha the LABELSECTOR is 0 so block 0 needs to be read in
from the media. The first time this happens you get a false hit
because the bc_blkno field is zero initially. Also, the timestamp
check against this cache hit succeeds because on the alpha a hacked
getsecs() function can return 0 when it starts counting so that
the zero initial timestamp + BCACHE_TIMEOUT is greater than the
current time until getsecs() has counted passed BCACHE_TIMEOUT.

The overall effect is that the first open() that occurs gets a
false cache hit and returns garbage to the bd_strategy() function
which then fails the open() call. This false hit then stays in the
cache until BCACHE_TIMEOUT getsecs() ticks have passed; all open()
calls during this time fail.

This explains why you can generally access the media by the time
you get to interp() and start issuing commands but the earlier
attempts to run the boot scripts are failing.

It's possible that this is causing the problem switching to the
mfsroot floppy as well but I haven't confirmed that.
1998-11-19 18:12:03 +00:00
..
alpha Fix things so that pci interrupts can be registered correctly on apecs 1998-11-18 23:53:12 +00:00
amd64 Remove amd', nca' SCSI devices to match Mike's LINT commit. 1998-11-12 11:29:28 +00:00
boot This fixes a bug in the bcache code whereby false cache hits occur 1998-11-19 18:12:03 +00:00
cam Generalize the quirk entry that disables multi-lun probing for Sony CDROM 1998-11-04 19:56:24 +00:00
coda A few bug fixes for Robert Watson 1998-11-16 19:48:26 +00:00
compat MF22: Bring in some linux sound ioctl support which I committed to 2.2 1998-11-12 00:42:08 +00:00
compile
conf Remove -U__NetBSD__ 1998-11-18 23:51:17 +00:00
contrib/softupdates Change dirty block list handling to use TAILQ macros. 1998-10-31 15:33:32 +00:00
ddb Forgot to commit this; the alpha uses the kld symbol interface now. The 1998-10-15 02:01:50 +00:00
dev Fix ROOL UP/DOWN keys of PC-98. 1998-11-18 08:33:58 +00:00
fs A few bug fixes for Robert Watson 1998-11-16 19:48:26 +00:00
geom Update system to new device statistics code. 1998-09-15 08:15:30 +00:00
gnu Fixed a misspelling of boolean true as MNT_WAIT. 1998-11-15 15:46:33 +00:00
i386 Fix ROOL UP/DOWN keys of PC-98. 1998-11-18 08:33:58 +00:00
isa * Add hooks to allow the X server to access I/O ports and memory. 1998-11-15 18:25:17 +00:00
isofs/cd9660 Don't follow null bdevsw pointers. The `major(dev) < nblkdev' test rotted 1998-10-25 19:26:18 +00:00
kern Closed a very narrow and rare race condition that involved net interrupts, 1998-11-18 09:00:47 +00:00
libkern Converted rcsid to $Id$ again. There shouldn't be any rcsids in the kernel. 1998-08-17 19:26:37 +00:00
miscfs Finished updating module event handlers to be compatible with 1998-11-15 15:33:52 +00:00
modules Install scripts without .sh suffix. 1998-11-12 00:37:39 +00:00
msdosfs add #include <sys/kernel.h> where it's needed by MALLOC_DEFINE() 1998-11-10 09:16:29 +00:00
net I got another batch of suggestions for cosmetic changes from bde. 1998-11-11 10:56:07 +00:00
netatalk Fixed printf format errors. 1998-08-17 01:05:25 +00:00
netatm Unneeded file. 1998-10-31 20:09:25 +00:00
netinet Fix a couple of typos. 1998-11-19 18:07:28 +00:00
netipx Yow! Completely change the way socket options are handled, eliminating 1998-08-23 03:07:17 +00:00
netkey Fixed printf format errors. 1998-08-17 01:05:25 +00:00
netnatm Nitpicking and dusting performed on a train. Removes trivial warnings 1998-10-25 17:44:59 +00:00
netns Make INET a proper option. 1998-01-08 23:42:31 +00:00
nfs Reimplement the NFS ACCESS RPC cache as an "accelerator" rather than a true 1998-11-15 20:36:18 +00:00
nfsclient Reimplement the NFS ACCESS RPC cache as an "accelerator" rather than a true 1998-11-15 20:36:18 +00:00
nfsserver Fix a panic in nfsrv_dorec() where a NULL pointer could be passed to 1998-11-13 09:44:12 +00:00
pc98 Sync with sys/i386/isa/wd.c revision up to 1.180. 1998-11-16 08:13:54 +00:00
pccard Add #include to get a prototype for update_intr_masks(). 1998-11-09 09:30:55 +00:00
pci The Accton 1207D adapter uses a chip called the MXP 5030 (or 5038) 1998-11-18 21:03:58 +00:00
posix4 Set PAGE_SIZE for _SC_PAGESIZE sysconf(). 1998-06-01 21:54:43 +00:00
powerpc * Add hooks to allow the X server to access I/O ports and memory. 1998-11-15 18:25:17 +00:00
rpc
sys Finished updating module event handlers to be compatible with 1998-11-15 15:33:52 +00:00
tools Make the vnode opv vector construction fully dynamic. Previously we 1998-11-10 09:04:09 +00:00
ufs Restored the "reallocblks" code to its former glory. What this does is 1998-11-13 01:01:44 +00:00
vm Fixed a null pointer panic in spc_free(). swap_pager_putpages() 1998-11-19 06:20:42 +00:00
Makefile Build KLD modules, these work for both a.out and elf. 1998-11-03 06:50:58 +00:00