Alan Cox [Tue, 2 Mar 1999 22:55:02 +0000 (22:55 +0000)]
To avoid a conflict for the vm_map's lock with vm_fault, release
the read lock around the subyte operations in mincore. After the lock is
reacquired, use the map's timestamp to determine if we need to restart
the scan.
Joerg Wunsch [Tue, 2 Mar 1999 19:08:09 +0000 (19:08 +0000)]
Make window(1) actually work again. It has been broken for quite some
time now.
For whatever reason, the kernel seems to have generated SIGIOs
previously without an initial fcntl(...,F_SETOWN), but does no longer.
This caused window(1) to wait indefinitely for input.
Also, undo rev 1.3 of wwspawn.c, it was not well-thought, and
apparently not even tested at all. The blindly (even in a nonsensical
place like the comment on top of the function) applied replacement of
vfork() by fork() totally ignored that window(1) *does* abuse the
feature of vfork() where a modification of the parent's address space
is possible (in this case, to notify the parent of an erred exec*).
Also, with vfork(), it is guaranteed that the parent is only woken up
after the exec*() happened, where the replacement by fork() made the
parent to almost always become runnable again before the child, in
which case the parent simply told `subprocess died'. Unfortunately,
working around _this_ seems to be a lot more of redesign work compared
to little gained value, so i think relying on the specifics of vfork()
is the simpler way.
Submitted by: Philipp Mergenthaler <un1i@rz.uni-karlsruhe.de>
Greg Lehey [Tue, 2 Mar 1999 06:54:57 +0000 (06:54 +0000)]
Change printf() calls to log() calls.
Change VINUM_SAVECONFIG: it now requires a parameter. 0 means
"configuration updates are finished, please save", and 1 means "please
just save the config". This second meaning is invoked by the new
"saveconfig" command to vinum(8).
Greg Lehey [Tue, 2 Mar 1999 06:53:15 +0000 (06:53 +0000)]
change printf() calls to log() calls.
Don't save config while we're reading it from disk.
Change the way we handle the daemon: if we can't communicate with it
for 1 second (which is possible), start a new one. The daemon saves
its pid in daemonpid; on each iteration of the main loop the daemon
checks whether it's still in favour. If not, it silently exits.
Also, when trying to communicate with the daemon, check daemonpid
first. If it's set to 0, don't even try.
Greg Lehey [Tue, 2 Mar 1999 06:52:47 +0000 (06:52 +0000)]
Change printf() calls to log() calls.
Rename the VF_KERNELOP to VF_DISKCONFIG and checkkernel () to
checkdiskconfig (), which better describes their function.
Disable configuration updates if we have an error reading in the
configuration. This stops a "shoot-in-foot" problem where a mistake
can cause the configuration to be obliterated.
Tidy up some messages, which included superfluous \ns.
Recognize RAID-5 configuration information even in the non-RAID-5
version. This fixes shoot-in-foot problems where starting the wrong
version of vinum would kill RAID-5 plexes.
Recognize drives that have been referenced, but for which no physical
location is known. This is part of a modification which will
ultimately allow incrementally reading configurations. Such drives
will have a device name "unknown".
New function return_drive_space () returns space to a drive.
Previously this was part of free_sd ().
give_sd_to_drive: don't do it if the subdisk needs more space than the
drive has available.
config_sd: if reading config from disk, accept plex offset, drive
offset and length specs of -1 to indicate error conditions.
parse_config: return ENOENT if the "read" command doesn't find any
drives.
remove_sd_entry: don't do it, even by force, if it's open.
If the size of a striped or RAID-5 plex is not an integral multiple of
the stripe size, trim the size until it is.
reinstate update_volume_config, which had atrophied, to recalculate
the size of a volume if a plex has shrunk due to stripe size
considerations.
Greg Lehey [Tue, 2 Mar 1999 06:52:11 +0000 (06:52 +0000)]
Change printf() calls to log() calls.
vinumattach: Zero out tables after allocating them
Modify procedure at unload: if a vinum(8) has the superdev open, don't
close down. If only the daemon has it open, send the daemon a stop
request and wait for it to close the superdev, then unload.
In order to do this, create a second superdev which is opened by the
daemon. The open and close routines set a different bit in
vinum_conf.flags; otherwise the treatment is identical.
Remove opencount field in vol structure; replace by a flag bit, since
we can't count the number of opens.
Matt Jacob [Tue, 2 Mar 1999 06:27:59 +0000 (06:27 +0000)]
Print actual density code as well as string for density- I dunno about others,
but I sure remember 0x15 easier than 'ECMA 17'. Also handle density codes
0 (default) and 0x7f ('same') as special cases.
Warner Losh [Tue, 2 Mar 1999 05:31:47 +0000 (05:31 +0000)]
Merge patch to ufs_vnops.c's ufs_rename to the copy of ufs_rename that
lives in ext2_vnops.c for ext2fs. Also remove cast from comparision.
Bruce pointed out that it was bogus since we'd force a signed
comparision when we really wanted an unsigned comparison.
Kirk McKusick [Tue, 2 Mar 1999 04:04:31 +0000 (04:04 +0000)]
When fsync'ing a file on a filesystem using soft updates, we first try
to write all the dirty blocks. If some of those blocks have dependencies,
they will be remarked dirty when the I/O completes. On systems with
really fast I/O systems, it is possible to get in an infinite loop trying
to flush the buffers, because the I/O finishes before we can get all the
dirty buffers off the v_dirtyblkhd list and into the I/O queue. (The
previous algorithm looped over the v_dirtyblkhd list writing out buffers
until the list emptied.) So, now we mark each buffer that we try to
write so that we can distinguish the ones that are being remarked dirty
from those that we have not yet tried to flush. Once we have tried to
push every buffer once, we then push any associated metadata that is
causing the remaining buffers to be redirtied.
Submitted by: Matthew Dillon <dillon@apollo.backplane.com>
Guy Helmer [Tue, 2 Mar 1999 03:45:47 +0000 (03:45 +0000)]
Apply mdoc macros, remove some spacing that caused unexpected line breaking,
and fix some spelling errors. (I also took the liberty of converting the
reference to LKMs to KLDs.)
Kirk McKusick [Tue, 2 Mar 1999 00:19:47 +0000 (00:19 +0000)]
Ensure that softdep_sync_metadata can handle bmsafemap and mkdir entries
if they ever arise (which should not happen as softdep_sync_metadata is
currently used).
Søren Schmidt [Mon, 1 Mar 1999 21:19:19 +0000 (21:19 +0000)]
Finally!!
The much roumored replacement for our current IDE/ATA/ATAPI is
materialising in the CVS repositories around the globe.
So what does this bring us:
A new reengineered ATA/ATAPI subsystem, that tries to overcome
most of the deficiencies with the current drivers.
It supports PCI as well as ISA devices without all the hackery
in ide_pci.c to make PCI devices look like ISA counterparts.
It doesn't have the excessive wait problem on probe, in fact you
shouldn't notice any delay when your devices are getting probed.
Probing and attaching of devices are postponed until interrupts
are enabled (well almost, not finished yet for disks), making
things alot cleaner.
Improved performance, although DMA support is still WIP and not
in this pre alpha release, worldstone is faster with the new
driver compared to the old even with DMA.
So what does it take away:
There is NO support for old MFM/RLL/ESDI disks.
There is NO support for bad144, if your disk is bad, ditch it, it has
already outgrown its internal spare sectors, and is dying.
For you to try this out, you will have to modify your kernel config
file to use the "ata" controller instead of all wdc? entries.
example:
# for a PCI only system (most modern machines)
controller ata0
device atadisk0 # ATA disks
device atapicd0 # ATAPI CDROM's
device atapist0 # ATAPI tapes
#You should add the following on ISA systems:
controller ata1 at isa? port "IO_WD1" bio irq 14
controller ata2 at isa? port "IO_WD2" bio irq 15
You can leave it all in there, the system knows how to manage.
For now this driver reuses the device entries from the old system
(that will probably change later), but remember that disks are
now numbered in the sequence they are found (like the SCSI system)
not as absolute positions as the old system.
Although I have tested this on all the systems I can get my hands on,
there might very well be gremlins in there, so use AT YOU OWN RISK!!
This is still WIP, so there are lots of rough edges and unfinished
things in there, and what I have in my lab might look very different
from whats in CVS at any given time. So please have all eventual
changes go through me, or chances are they just dissapears...
I would very much like to hear from you, both good and bad news
are very welcome.
Luigi Rizzo [Mon, 1 Mar 1999 16:54:28 +0000 (16:54 +0000)]
Fix handling of IFF_ALLMULTI. The code did not call
tulip_addr_filter() on SIOCSIFFLAGS, and was nuking the IFF_ALLMULTI
on entering tulip_addr_filter(). As a result it was impossible to run
a multicast router on a machine with a "de" interface.
Bill Paul [Mon, 1 Mar 1999 16:11:13 +0000 (16:11 +0000)]
Close PR #10264. Don't bail directly out of passwd/chpass in my_yp_match().
Instead, treat the inability to retrieve a record from the server as a
match failure and let things take its course.
Part of the problem here is that NIS _is_ turned on, however the master
server is actually not an NIS server: it's an NIS+ server. And the client
is bound to an NIS+ replica server that's running in YP compat mode.
The code which tries to figure out of the user is local or NIS gets
confused by this.
Brian Somers [Mon, 1 Mar 1999 13:46:45 +0000 (13:46 +0000)]
When negotiating ACCMAPs, sync our ACCMAP with the
peers by ORing the two together and NAKing or REQing
the result rather than allowing seperate local/peer
values.
If the peer REJs our ACCMAP and our ACCMAP isn't 0,
warn about it and ignore the rejection.
Warner Losh [Mon, 1 Mar 1999 06:10:16 +0000 (06:10 +0000)]
Don't define MACHINE, MACHINE_ARCH, _MACHINE or _MACHINE_ARCH if
already defined. This allows for cross building to work because we
need to lie to make to tell it to use the target names rather than the
host names.
This should have no effect on either architecture. I've confirmed
that the intel build by make buildworld's for the past 3 months.
Warner Losh [Mon, 1 Mar 1999 06:01:05 +0000 (06:01 +0000)]
Make MACHINE_ARCH sensitive to the environment, as well as using the
compiled in default in case it isn't defined. This is needed to make
cross compilation work in some edge cases. It also makes cross
compiling on FreeBSD other BSD's easier as well.
Obtained from: NetBSD, OpenBSD (predates the split)
Warner Losh [Mon, 1 Mar 1999 04:01:57 +0000 (04:01 +0000)]
Add TARGET_ARCH=mipsel and TARGET_ARCH=mipseb as a valid targets.
Unlike the unisex architecutres we've had so far, mips is bisexual.
These tools can produce either byte sex, and the compiler/make
determines the proper gender to use. Otherwise, we'd have to have had
mipsel and mipseb in all the places that we have just mips. And there
are other complications with doing that (binutils doesn't like to
build mips tools without both byte genders, it seems).
Introduced BINUTIL_ARCH so that other bisexual architectures can a
generic mechanism.
We cannot just define MACHINE_ARCH as mips because we need to
differentiate big and little endian types of binaries. Discussions on
freebsd-arch have hashed out this issue (and the parallel libc
issues). NetBSD is moving towards mipsel and mipseb for their two
flavors of mips ports (in time for 1.4, if this change hasn't already
been accomplished).
I've been building i386 worlds with this tree for a three months with
these files in place with no ill effects.
Brian Somers [Mon, 1 Mar 1999 02:52:39 +0000 (02:52 +0000)]
Comment why we do a TLF when we get a ``Down'' event in state
``closing''.
Pointed out by: archie
Don't do a TLF when we get a ``Catastrphic Protocol Reject'' event
in state ``closed'' or ``stopped''.
Pointed out but not suggested by: archie
This makes no difference in the current implementation as
LcpLayerFinish() does nothing but log the event, but I disagree
in principle because it unbalances the TLF/TLS calls which
(IMHO) doesn't fit with the intentions of the RFC.
Maybe the RFC author had a reason for this. It can only happen
in two circumstances:
- if LCP has already been negotiated then stopped or closed and we
receive a protocol reject, then we must already have done a TLF.
Why do one again and stay in the same state ?
- if LCP hasn't yet been started and we receive an unsolicted
protocol reject, why should we TLF when we haven't done a TLS ?
Garrett Wollman [Mon, 1 Mar 1999 02:39:45 +0000 (02:39 +0000)]
Don't even attempt to build the assembly-language versions of RIPEMD160
and SHA-1 when OBJFORMAT is not ELF. Add a warning to the man page
about how SHA-1 uses bswapl, which will trap on 80386es (and the kernel
should, but doesn't currently, emulate).
Warner Losh [Mon, 1 Mar 1999 01:09:06 +0000 (01:09 +0000)]
The legacy boot stuff is available only on i386, not all architectures
which aren't the alpha. Test for MACHINE_ARCH == i386 rather than
MACHINE_ARCH != alpha.
Matt Jacob [Mon, 1 Mar 1999 01:07:47 +0000 (01:07 +0000)]
+Match against T4000* for HP QIC quirks (not T4000S* where it doesn't then
catch a T4000s)
+ Set *some* kind of error at EOM if we're in fixed mode and have pending errs.
Do not clear the ERR_PENDING bit if more buffers are queued.
+ Release the start_ccb in this case also, else we hang forever on rewinding.
+ Any kind of error for load to BOT in samount should then cause an attempt
to use REWIND to come back to BOT. Do the initial load command quietly.
+ In samount, if we succeed, set the relative position markers.
Brian Somers [Mon, 1 Mar 1999 00:43:48 +0000 (00:43 +0000)]
Bring up auto links despite there being no data queued if
we're already in network phase and our autoload values
are set with no minimum threshold (the default).
Tell the autoload timer that it's ``coming up'' *before*
calling AutoLoadTimeout() directly... not after. This
prevents the very first demand-dial connection from
immediately disconnecting when there are other auto links.
Problem diagnosis: Ted Mittelstaedt <tedm@toybox.placo.com>
Chuck Robey [Sun, 28 Feb 1999 18:55:39 +0000 (18:55 +0000)]
fix for incorrect specification of alignment (it worked for the elf
build, but broke while doing the aout legacy build). Now using
.p2align instead of .align. Fixes broken buildworld.
Submitted by: John Polstra
Reviewed by: John Polstra
Peter Wemm [Sun, 28 Feb 1999 16:13:25 +0000 (16:13 +0000)]
This code got moved as a result of confusion between union mounts and
unionfs. Julian has already revived the union mount part of this move
in vfs_syscalls.c rev 1.119, but forgot to take it out of here.
Bruce Evans [Sun, 28 Feb 1999 10:53:29 +0000 (10:53 +0000)]
Removed all traces of `p_switchtime'. The relevant timestamp is per-cpu,
not per-process. Keep it in `switchtime' consistently.
It is now clear that the timestamp is always valid in fork_trampoline()
except when the child is running on a previously idle cpu, which
can only happen if there are multiple cpus, so don't check or set
the timestamp in fork_trampoline except in the (i386) SMP case.
Just remove the alpha code for setting it unconditionally, since
there is no SMP case for alpha and the code had rotted.
David E. O'Brien [Sun, 28 Feb 1999 09:11:20 +0000 (09:11 +0000)]
I don't know why the version was bumped to 1.11.3, nothing from the real
GNU 1.11.3 got in when this change was made. thepish's submitted fixes
unbroke --norecurse.
Alan Cox [Sat, 27 Feb 1999 23:39:28 +0000 (23:39 +0000)]
Reviewed by: "John S. Dyson" <dyson@iquest.net>
Submitted by: Matthew Dillon <dillon@apollo.backplane.com>
To prevent a deadlock, if we are extremely low on memory, force synchronous
operation by the VOP_PUTPAGES in vnode_pager_putpages.
Make this work with the new alias library since, evidently, we're
not providing the backwards-compatability routines in libalias anymore
(which I think may have been a mistake).
Doug Rabson [Sat, 27 Feb 1999 18:41:40 +0000 (18:41 +0000)]
* Add support for hw.physmem and hw.usermem sysctls (this allows sysinstall
to calculate a reasonable size for the swap partition).
* Fix a typo in remrq() where a process with idle priority would not be
correctly removed from the relavent queue. Note that realtime and idle
priorities are still not supported since the assembler code in
cpu_switch() does not check the realtime and idle queues.