dragonfly.git
16 years agoSwitch to gcc41 as default compiler.
Simon Schubert [Thu, 9 Aug 2007 22:15:22 +0000 (22:15 +0000)]
Switch to gcc41 as default compiler.

16 years agoFix typo.
Sascha Wildner [Thu, 9 Aug 2007 21:53:02 +0000 (21:53 +0000)]
Fix typo.

Reported by: Michael Neumann <mneumann@ntecs.de>

16 years agoPass address of mbuf pointer to bge_encap(), so the caller could know
Sepherosa Ziehau [Thu, 9 Aug 2007 14:17:51 +0000 (14:17 +0000)]
Pass address of mbuf pointer to bge_encap(), so the caller could know
mbuf is changed due to the defragmentation or error in bge_encap().

Reported-by: km b <kmb810@gmail.com>
16 years agoIntroduce two delays in nfe_stop().
Matthew Dillon [Thu, 9 Aug 2007 07:24:50 +0000 (07:24 +0000)]
Introduce two delays in nfe_stop().

The first seems to fix or greatly reduce instances of watchdog failures.
I theorize that a TX KICK occuring just prior to a nfe_stop() is confusing
the microcontroller due to the polled nature of the rest of the tx/rx control
registers and the (almost certain) hardware aided TX KICK bit.  This
confusion survives the nfe_stop() and nfe_init().  I'll again theorize that
the KICK, which is probably a microcontroller interrupt, is not being reset
and is being handled at some inappropriate point in time in the middle of
nfe_stop() or nfe_init().

The second delay gives the device time to actually stop the DMA engine
before we destroy the ring buffers.  Even if those registers were under
direct hardware control (and I really doubt they are), DMA just doesn't
instantly stop when you tell it to.

16 years agonfe_init() can be called as a side effect of certain ioctl operations with
Matthew Dillon [Thu, 9 Aug 2007 04:24:14 +0000 (04:24 +0000)]
nfe_init() can be called as a side effect of certain ioctl operations with
packet data still queued.  The queue must be restarted since the reinit
will clean out the rings and clear any pending interrupts.

This fixes watchdog timeouts which can occur while dhclient is probing
the network.

16 years ago* Repocopy sys/dev/misc/syscons/daemon -> sys/dev/misc/syscons/fred.
Sascha Wildner [Thu, 9 Aug 2007 02:27:51 +0000 (02:27 +0000)]
* Repocopy sys/dev/misc/syscons/daemon -> sys/dev/misc/syscons/fred.

* Change to display the DragonFly mascot instead of Beastie.

* Remove the old saver and adjust stuff.

16 years agoExplicitly set a large receive buffer for datagram sockets to give syslog
Matthew Dillon [Thu, 9 Aug 2007 02:17:46 +0000 (02:17 +0000)]
Explicitly set a large receive buffer for datagram sockets to give syslog
a better chance at catching large message bursts from today's high-volume
services.

16 years agoAdd the MBUF_DEBUG option. This is a fairly invasive option that should
Matthew Dillon [Thu, 9 Aug 2007 01:10:06 +0000 (01:10 +0000)]
Add the MBUF_DEBUG option.  This is a fairly invasive option that should
not be used on production boxes.  All active mbufs are tracked with a separate
tracking structure and arranged in a RB tree.  A kernel built with this
option can dump all active mbufs with 'sysctl kern.ipc.showmbufs'.

A person debugging the kernel can sprinkle mbuftrackid() calls in the code
to associate an integer id with an mbuf to make the sysctl output more
useful.

The size of the mbuf structure is NOT changed through the use of this option,
but mbuf management overhead will be increased.

16 years agoFix a mbuf leak that was introduced in April. In April I made a change
Matthew Dillon [Thu, 9 Aug 2007 00:55:48 +0000 (00:55 +0000)]
Fix a mbuf leak that was introduced in April.  In April I made a change
that allows sends with control or address information to be discarded
when the target socket buffer is full, but the two macros returned the
wrong error code and prevented the mbuf from being freed.

16 years agoAdjust the shape of the right wings and make the apostrophes more
Sascha Wildner [Thu, 9 Aug 2007 00:28:09 +0000 (00:28 +0000)]
Adjust the shape of the right wings and make the apostrophes more
symmetric (100% symmetry can't be done because unfortunately there
is no comma counterpart).

16 years agoAdjust for Matt's recent changes.
Sascha Wildner [Wed, 8 Aug 2007 22:46:48 +0000 (22:46 +0000)]
Adjust for Matt's recent changes.

16 years agoRemove trailing whitespace.
Sascha Wildner [Wed, 8 Aug 2007 20:15:50 +0000 (20:15 +0000)]
Remove trailing whitespace.

16 years agoAdd hardware csum offload support.
Sepherosa Ziehau [Wed, 8 Aug 2007 11:38:51 +0000 (11:38 +0000)]
Add hardware csum offload support.

Tested-by: "Rumko" <rumcic@gmail.com>
Obtained-from: Peer Chen at nVIDIA via FreeBSD

16 years ago* Start each sentence on a new line.
Sascha Wildner [Wed, 8 Aug 2007 11:21:08 +0000 (11:21 +0000)]
* Start each sentence on a new line.

* Add reference.

* Use .Dv for defined values.

16 years agoImprove indentation.
Sascha Wildner [Wed, 8 Aug 2007 03:11:00 +0000 (03:11 +0000)]
Improve indentation.

16 years agoClean up synopses.
Sascha Wildner [Wed, 8 Aug 2007 01:43:37 +0000 (01:43 +0000)]
Clean up synopses.

16 years agoFix some remaining issues with MSDOSFS_DEBUG and add it as a
Sascha Wildner [Wed, 8 Aug 2007 00:23:40 +0000 (00:23 +0000)]
Fix some remaining issues with MSDOSFS_DEBUG and add it as a
kernel option.

16 years agoAdjust some comments with reality.
Sascha Wildner [Wed, 8 Aug 2007 00:12:52 +0000 (00:12 +0000)]
Adjust some comments with reality.

16 years agoSync with FreeBSD.
Sascha Wildner [Tue, 7 Aug 2007 23:19:14 +0000 (23:19 +0000)]
Sync with FreeBSD.

16 years agoRephrase comments.
Sascha Wildner [Tue, 7 Aug 2007 22:15:53 +0000 (22:15 +0000)]
Rephrase comments.

16 years agoFix build errors when MSDOSFS_DEBUG is defined.
Matthew Dillon [Tue, 7 Aug 2007 20:05:30 +0000 (20:05 +0000)]
Fix build errors when MSDOSFS_DEBUG is defined.

Submitted-by: "Nicolas Thery" <nthery@gmail.com>
16 years agoApply the patch for tcpdump.1 even in the NOINET6 case.
Peter Avalos [Tue, 7 Aug 2007 18:41:18 +0000 (18:41 +0000)]
Apply the patch for tcpdump.1 even in the NOINET6 case.

16 years agoUpgrade to libpcap-0.9.7 and tcpdump-3.9.7.
Peter Avalos [Tue, 7 Aug 2007 18:12:02 +0000 (18:12 +0000)]
Upgrade to libpcap-0.9.7 and tcpdump-3.9.7.

16 years agoMerge from vendor branch TCPDUMP:
Peter Avalos [Tue, 7 Aug 2007 17:58:03 +0000 (17:58 +0000)]
Merge from vendor branch TCPDUMP:
Import tcpdump-3.9.7

16 years agoImport tcpdump-3.9.7
Peter Avalos [Tue, 7 Aug 2007 17:58:03 +0000 (17:58 +0000)]
Import tcpdump-3.9.7

16 years agoMerge from vendor branch LIBPCAP:
Peter Avalos [Tue, 7 Aug 2007 17:55:22 +0000 (17:55 +0000)]
Merge from vendor branch LIBPCAP:
Import libpcap-0.9.7

16 years agoImport libpcap-0.9.7
Peter Avalos [Tue, 7 Aug 2007 17:55:22 +0000 (17:55 +0000)]
Import libpcap-0.9.7

16 years agoThere is no need to explicitly call ttwakeup() and ttwwakeup() after
Hasso Tepper [Tue, 7 Aug 2007 13:14:11 +0000 (13:14 +0000)]
There is no need to explicitly call ttwakeup() and ttwwakeup() after
ttyclose() has been called.  It's already been done once by ttyclose.

Obtained-from: FreeBSD

16 years agoUpdate Marvell PHY supports.
Sepherosa Ziehau [Tue, 7 Aug 2007 11:44:41 +0000 (11:44 +0000)]
Update Marvell PHY supports.
This should pave the way for the driver tgen@ has been working on.

Obtained-from: FreeBSD (yongari@freebsd.org) w/ modification
No-Objection-from: tgen@

16 years agoregen
Sepherosa Ziehau [Tue, 7 Aug 2007 11:37:11 +0000 (11:37 +0000)]
regen

16 years agoMore Marvell PHY IDs.
Sepherosa Ziehau [Tue, 7 Aug 2007 11:36:49 +0000 (11:36 +0000)]
More Marvell PHY IDs.

16 years agottyclose() increments t_gen. Remove redundant increments from drivers.
Hasso Tepper [Tue, 7 Aug 2007 11:30:03 +0000 (11:30 +0000)]
ttyclose() increments t_gen.  Remove redundant increments from drivers.

Obtained-from: FreeBSD

16 years agoHook {wpa_supplicant, hostapd} 0.5.8 into building.
Sepherosa Ziehau [Tue, 7 Aug 2007 11:25:37 +0000 (11:25 +0000)]
Hook {wpa_supplicant, hostapd} 0.5.8 into building.

Thank swildner@ for reviewing the modification to the manual pages.

Obtained-from: FreeBSD (sam@freebsd.org) w/ modification

# wpa_supplicant 0.5.8 is supposed to support 802.1X on wired devices.

16 years agoMerge from vendor branch HOSTAPD:
Sepherosa Ziehau [Tue, 7 Aug 2007 11:18:24 +0000 (11:18 +0000)]
Merge from vendor branch HOSTAPD:
Import hostapd 0.5.8

16 years agoImport hostapd 0.5.8 vendor/HOSTAPD
Sepherosa Ziehau [Tue, 7 Aug 2007 11:18:24 +0000 (11:18 +0000)]
Import hostapd 0.5.8

16 years agoMerge from vendor branch WPA_SUPPLICANT:
Sepherosa Ziehau [Tue, 7 Aug 2007 11:11:50 +0000 (11:11 +0000)]
Merge from vendor branch WPA_SUPPLICANT:
Import wpa_supplicant 0.5.8

16 years agoImport wpa_supplicant 0.5.8 vendor/WPA_SUPPLICANT
Sepherosa Ziehau [Tue, 7 Aug 2007 11:11:50 +0000 (11:11 +0000)]
Import wpa_supplicant 0.5.8

16 years agoReomve unnecessary sys/vnode.h include.
Hasso Tepper [Tue, 7 Aug 2007 10:42:41 +0000 (10:42 +0000)]
Reomve unnecessary sys/vnode.h include.

16 years agoFix warning.
Hasso Tepper [Tue, 7 Aug 2007 10:04:10 +0000 (10:04 +0000)]
Fix warning.

Submitted-by: Sascha Wildner
16 years agoFix driver_t.
Hasso Tepper [Tue, 7 Aug 2007 09:18:11 +0000 (09:18 +0000)]
Fix driver_t.

16 years agoFix typos.
Sascha Wildner [Mon, 6 Aug 2007 23:47:19 +0000 (23:47 +0000)]
Fix typos.

16 years agoAdd missing space.
Sascha Wildner [Sun, 5 Aug 2007 23:24:34 +0000 (23:24 +0000)]
Add missing space.

16 years agoNuke trailing whitespace.
Sascha Wildner [Sun, 5 Aug 2007 23:21:11 +0000 (23:21 +0000)]
Nuke trailing whitespace.

16 years agoSync libfetch and fetch with FreeBSD.
Sascha Wildner [Sun, 5 Aug 2007 21:48:12 +0000 (21:48 +0000)]
Sync libfetch and fetch with FreeBSD.

* Plug a memory leak in libfetch.

* First try to change the entire directory path at once. If an error
  occurs, fall back to the default method of one CWD per directory
  element.

* fetch will now show the transfer speed while fetching (better progress
  output format).

* Numerous other fixes.

16 years agoAdjust the installer to properly install /usr/Makefile.
Matthew Dillon [Sun, 5 Aug 2007 19:26:20 +0000 (19:26 +0000)]
Adjust the installer to properly install /usr/Makefile.

16 years agoSet BINOWN=root explicitly for setuid root binary.
Peter Avalos [Sun, 5 Aug 2007 18:24:29 +0000 (18:24 +0000)]
Set BINOWN=root explicitly for setuid root binary.

Obtained-from: FreeBSD

16 years agoSync program's usage() with manpage's SYNOPSIS.
Peter Avalos [Sun, 5 Aug 2007 16:57:55 +0000 (16:57 +0000)]
Sync program's usage() with manpage's SYNOPSIS.

Obtained-from: FreeBSD

16 years agoIt's ``apply echo *'' that is similar to ``ls -1'', not ``apply echo a*''.
Peter Avalos [Sun, 5 Aug 2007 16:19:56 +0000 (16:19 +0000)]
It's ``apply echo *'' that is similar to ``ls -1'', not ``apply echo a*''.

Document incorrect handling of multibyte characters.

Obtained-from: FreeBSD

16 years agoUse the "builtin" shell function to make sure that the requested
Peter Avalos [Sun, 5 Aug 2007 16:09:50 +0000 (16:09 +0000)]
Use the "builtin" shell function to make sure that the requested
command is handled as a shell function.

Obtained-from: FreeBSD

16 years agoUpgrade to diffutils-2.8.7.
Peter Avalos [Sun, 5 Aug 2007 05:47:00 +0000 (05:47 +0000)]
Upgrade to diffutils-2.8.7.

16 years agoAdd our local files for diffutils-2.8.7.
Peter Avalos [Sun, 5 Aug 2007 05:27:13 +0000 (05:27 +0000)]
Add our local files for diffutils-2.8.7.

16 years agoMerge from vendor branch DIFFUTILS:
Peter Avalos [Sun, 5 Aug 2007 05:20:51 +0000 (05:20 +0000)]
Merge from vendor branch DIFFUTILS:
Import GNU diffutils-2.8.7.

16 years agoImport GNU diffutils-2.8.7. vendor/DIFFUTILS
Peter Avalos [Sun, 5 Aug 2007 05:20:51 +0000 (05:20 +0000)]
Import GNU diffutils-2.8.7.

16 years agoDo not require AHC_PCI_CONFIG to be defined.
Matthew Dillon [Sat, 4 Aug 2007 21:42:15 +0000 (21:42 +0000)]
Do not require AHC_PCI_CONFIG to be defined.

Reported-by: Rumko <sinknull@crater.dragonflybsd.org>
16 years agoMerge from vendor branch TNFTP:
Peter Avalos [Sat, 4 Aug 2007 15:09:31 +0000 (15:09 +0000)]
Merge from vendor branch TNFTP:
Sync with NetBSD:

- Fix up display of interrupted prompts.

- Modify parse_url() to consistently strip the leading `/' off ftp URLs.

- Display times in RFC2822.

- Enforce restriction that (http) proxied URL fetchs don't support
being restarted.

16 years agoSync with NetBSD:
Peter Avalos [Sat, 4 Aug 2007 15:09:31 +0000 (15:09 +0000)]
Sync with NetBSD:

- Fix up display of interrupted prompts.

- Modify parse_url() to consistently strip the leading `/' off ftp URLs.

- Display times in RFC2822.

- Enforce restriction that (http) proxied URL fetchs don't support
being restarted.

16 years ago'phrase' and 'pending_polls' should never be changed by users, since
Sepherosa Ziehau [Sat, 4 Aug 2007 08:25:37 +0000 (08:25 +0000)]
'phrase' and 'pending_polls' should never be changed by users, since
they control polling code execution logic.

16 years agoUse .Dv for ioctls & minor cleanup.
Sascha Wildner [Sat, 4 Aug 2007 03:32:49 +0000 (03:32 +0000)]
Use .Dv for ioctls & minor cleanup.

16 years agoUse pkgsrc packages from a custom location.
Simon Schubert [Sat, 4 Aug 2007 00:52:49 +0000 (00:52 +0000)]
Use pkgsrc packages from a custom location.

16 years agoFix wrong parentheses.
Sascha Wildner [Fri, 3 Aug 2007 21:51:09 +0000 (21:51 +0000)]
Fix wrong parentheses.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
16 years agoICMP Extensions for MPLS is porposed standard now - RFC4950.
Hasso Tepper [Fri, 3 Aug 2007 09:50:05 +0000 (09:50 +0000)]
ICMP Extensions for MPLS is porposed standard now - RFC4950.

16 years agoDocument the getresgid and getresuid system calls.
Sascha Wildner [Fri, 3 Aug 2007 08:40:14 +0000 (08:40 +0000)]
Document the getresgid and getresuid system calls.

Taken-from: FreeBSD

16 years agoUpdate some packages supplied by corecode. The new bootstrap is a binary
Matthew Dillon [Fri, 3 Aug 2007 08:00:06 +0000 (08:00 +0000)]
Update some packages supplied by corecode.  The new bootstrap is a binary
extraction now, not a script.

16 years agoAdd an ISA attachment to the aic7xxx driver to handle 284X controllers.
Peter Avalos [Thu, 2 Aug 2007 23:44:48 +0000 (23:44 +0000)]
Add an ISA attachment to the aic7xxx driver to handle 284X controllers.

This was sleeping in my tree and was somehow forgotten earlier.

16 years agoAdd references to the uftdi(4), umct(4), and umodem(4).
Hasso Tepper [Thu, 2 Aug 2007 23:22:37 +0000 (23:22 +0000)]
Add references to the uftdi(4), umct(4), and umodem(4).

16 years agoSome trivial fixes obtained from NetBSD:
Hasso Tepper [Thu, 2 Aug 2007 22:13:47 +0000 (22:13 +0000)]
Some trivial fixes obtained from NetBSD:

  * Remove duplicate bus/usb/usbdevs.h include
  * Increase maximum numbers of bytes transferred per frame to support
    better really high speed devices
  * Fix function names in debug messages
  * Some whitespace fixes

Also remove duplicate $NetBSD$ cvs id.

Obtained-from: NetBSD with modifications

16 years agoMinimal (relatively) patch to make my Nokia 9300 smartphone which uses
Hasso Tepper [Thu, 2 Aug 2007 16:19:17 +0000 (16:19 +0000)]
Minimal (relatively) patch to make my Nokia 9300 smartphone which uses
union descriptors, work in DF.

Obtained-from: NetBSD with modifications

16 years agoFix select and poll use in LWPs.
Simon Schubert [Thu, 2 Aug 2007 13:29:41 +0000 (13:29 +0000)]
Fix select and poll use in LWPs.

When select(2) or poll(2) puts to sleep a LWP, the LWP may never be woken up
when the events waited for occur because the TID of the LWP is not saved in
the selinfo structure by selrecord().

si_tid is not initialised explicitly anywhere but happens to bet set to 0, so
the problem was not apparent for the initial LWP created at process
construction time.

Submitted-by: Nicolas Thery <nthery@gmail.com>
DragonFly-bug: http://bugs.dragonflybsd.org/issue757

16 years agoAdd support for many new devices into uplcom(4). IDs are obtained from
Hasso Tepper [Thu, 2 Aug 2007 11:53:30 +0000 (11:53 +0000)]
Add support for many new devices into uplcom(4). IDs are obtained from
OpenBSD, NetBSD and Linux (mostly). Also clarify comments in driver and
info in the manpage based on info from vendors (if available).

16 years agoAdd more and fix some IDs, all related to uplcom(4).
Hasso Tepper [Thu, 2 Aug 2007 11:37:24 +0000 (11:37 +0000)]
Add more and fix some IDs, all related to uplcom(4).

16 years agoBetter chips distinguishing code for uplcom(4).
Hasso Tepper [Thu, 2 Aug 2007 11:20:29 +0000 (11:20 +0000)]
Better chips distinguishing code for uplcom(4).

Kill current method to distinguish between old PL-2303(H) and newer
PL-2303(H)X chips. Instead of managing the list which vendor/device
combination in known to use which chip, distinguish chips with algorithm
borrowed from the Linux driver.

16 years agoRetire the getNAME utility which was only used by an old script in
Sascha Wildner [Thu, 2 Aug 2007 10:27:01 +0000 (10:27 +0000)]
Retire the getNAME utility which was only used by an old script in
share/man/man0 (which no longer exists).

16 years agoBreakout a target for preview as well, and use the slip tag for the
Matthew Dillon [Thu, 2 Aug 2007 06:56:05 +0000 (06:56 +0000)]
Breakout a target for preview as well, and use the slip tag for the
release.

16 years agoThe distribution installs a Makefile in /usr with easy-to-use targets to
Matthew Dillon [Thu, 2 Aug 2007 06:53:14 +0000 (06:53 +0000)]
The distribution installs a Makefile in /usr with easy-to-use targets to
create a pkgsrc distribution and to obtain the DragonFly CVS repository
and checkout/update /usr/src.  A make in /usr with no arguments will list
available options.

16 years agoWe have <sys/select.h>. Note that in the SYNOPSIS.
Sascha Wildner [Thu, 2 Aug 2007 00:21:54 +0000 (00:21 +0000)]
We have <sys/select.h>. Note that in the SYNOPSIS.

Submitted-by: Nicolas Thery <nthery@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue756>

16 years agoAdd keys for 'previous screen' (Shift+PrintScr).
Sascha Wildner [Thu, 2 Aug 2007 00:04:59 +0000 (00:04 +0000)]
Add keys for 'previous screen' (Shift+PrintScr).

16 years agos/atacontrol/natacontrol/ in messages.
Sascha Wildner [Wed, 1 Aug 2007 22:54:00 +0000 (22:54 +0000)]
s/atacontrol/natacontrol/ in messages.

16 years agoFix for CVE-2007-3798 obtained from the vendor. This is already included
Peter Avalos [Wed, 1 Aug 2007 22:24:34 +0000 (22:24 +0000)]
Fix for CVE-2007-3798 obtained from the vendor.  This is already included
in a newer version of tcpdump.

16 years agoAdd MLINK for krateprintf().
Sascha Wildner [Wed, 1 Aug 2007 21:56:40 +0000 (21:56 +0000)]
Add MLINK for krateprintf().

16 years agoAdd some words about krateprintf().
Sascha Wildner [Wed, 1 Aug 2007 21:44:07 +0000 (21:44 +0000)]
Add some words about krateprintf().

16 years agoFix return values.
Sascha Wildner [Wed, 1 Aug 2007 21:39:29 +0000 (21:39 +0000)]
Fix return values.

16 years agoRemove some unused variables.
Sascha Wildner [Wed, 1 Aug 2007 12:35:29 +0000 (12:35 +0000)]
Remove some unused variables.

16 years agos/device/drive/ (fixes LINT build)
Sascha Wildner [Wed, 1 Aug 2007 11:46:46 +0000 (11:46 +0000)]
s/device/drive/ (fixes LINT build)

16 years agoThe LWP run/sleep state does not always match the actual state of the
Matthew Dillon [Wed, 1 Aug 2007 08:21:29 +0000 (08:21 +0000)]
The LWP run/sleep state does not always match the actual state of the
thread when the thread is directly descheduled by the kernel.  Add some
logic so the state reported to 'ps' is correct.

16 years agoI missed this file. We are running 9.3.4-P1 now, not 9.3.4.
Matthew Dillon [Tue, 31 Jul 2007 21:47:14 +0000 (21:47 +0000)]
I missed this file.  We are running 9.3.4-P1 now, not 9.3.4.

16 years agoReorder initialization sequence of devclasses.
Simon Schubert [Tue, 31 Jul 2007 20:47:14 +0000 (20:47 +0000)]
Reorder initialization sequence of devclasses.

This fixes a panic triggered by the use of the devclass of a driver
during the attachment of this driver.

Reported-by: Wesley Hearn <wesley.hearn@gmail.com>
Reviewed-by: dillon
16 years agoFix a coding mistake when dequeueing memory disk BIOs.
Matthew Dillon [Tue, 31 Jul 2007 20:04:48 +0000 (20:04 +0000)]
Fix a coding mistake when dequeueing memory disk BIOs.

Reported-by: "km b" <kmb810@gmail.com>
16 years agoFix vinum. Vinum illegally uses device ops such as dev_dopen(),
Matthew Dillon [Tue, 31 Jul 2007 18:13:01 +0000 (18:13 +0000)]
Fix vinum.  Vinum illegally uses device ops such as dev_dopen(),
dev_dclose(), and dev_dstrategy() without following the restrictions and
requirements for those calls.  It does not properly check D_TRACKCLOSE
and does not properly limit DMA.

Access the low level device via the vnode subsystem instead of the device
subsystem.  Use new calls to synthesize appropriate vnodes based on the
requested device name and remove all the manual major/minor conversion junk.

When booting with a vinum root vinum will synthesize appropriate vnodes
to access devices.  If a root mount already exists vinum will simply
open the device vnode via the filesystem.

Reported-by: "Simon 'corecode' Schubert" <bugs@crater.dragonflybsd.org>,
     Chris Turner <c.turner@199technologies.org>

16 years agoDetect the case where rename()ing over a file that has been unlinked but
Matthew Dillon [Tue, 31 Jul 2007 01:16:53 +0000 (01:16 +0000)]
Detect the case where rename()ing over a file that has been unlinked but
is still open was reporting an inode hash collision instead of a fatal
error.  msdosfs uses the position of the directory entry within the directory
to identify the inode and a new file cannot be created if the removed file
is still held open by a program.

Reported-by: walt <wa1ter@myrealbox.com>
16 years agovrecycle() is typically called from a VFS's inactive function, which
Matthew Dillon [Tue, 31 Jul 2007 01:14:50 +0000 (01:14 +0000)]
vrecycle() is typically called from a VFS's inactive function, which
in turn is called when the sysref reference count transitions from
1->0xc0000000.  Fix a test that was causing the vnode to not be immediately
recycled.

msdosfs depended on the recyclement behavior due to rename-over issues -
msdosfs is not allowed to reuse an 'inode' (which is basically the position
of a directory entry in a directory) until the underlying file is entirely
reclaimed.

This also effected ufs somewhat by preventing inodes from being reused as
quickly as they could be, but ufs allocates inodes dynamically and masked
the problem.

Reported-by: walt <wa1ter@myrealbox.com>
16 years agoAllow the compatibility slice (s0) to be specified.
Matthew Dillon [Mon, 30 Jul 2007 23:56:29 +0000 (23:56 +0000)]
Allow the compatibility slice (s0) to be specified.

16 years agoAdd MLINKS.
Sascha Wildner [Mon, 30 Jul 2007 22:49:20 +0000 (22:49 +0000)]
Add MLINKS.

16 years agoDon't require dhclient which is 'nostart' now.
Sascha Wildner [Mon, 30 Jul 2007 22:17:23 +0000 (22:17 +0000)]
Don't require dhclient which is 'nostart' now.

16 years agoUse .Ux for UNIX.
Sascha Wildner [Mon, 30 Jul 2007 22:11:34 +0000 (22:11 +0000)]
Use .Ux for UNIX.

16 years agoRate-limit residual I/O warnings from the VM system that occur when a
Matthew Dillon [Mon, 30 Jul 2007 21:41:30 +0000 (21:41 +0000)]
Rate-limit residual I/O warnings from the VM system that occur when a
filesystem fills up.

Reported-by: Gergo Szakal <bastyaelvtars@gmail.com>
16 years agoIntroduce krateprintf(), a rate-controlled kprintf(), and the related
Matthew Dillon [Mon, 30 Jul 2007 21:40:31 +0000 (21:40 +0000)]
Introduce krateprintf(), a rate-controlled kprintf(), and the related
struct krate structure.  This takes all the effort out of outputting
rate-limited warnings to the console.

16 years agoSpelling corrections.
Peter Avalos [Mon, 30 Jul 2007 17:41:23 +0000 (17:41 +0000)]
Spelling corrections.

16 years agoFix linux.ko linking.
Simon Schubert [Mon, 30 Jul 2007 16:57:49 +0000 (16:57 +0000)]
Fix linux.ko linking.

16 years agoFix a memory leak when kern_execve() fails fatally.
Simon Schubert [Mon, 30 Jul 2007 14:52:40 +0000 (14:52 +0000)]
Fix a memory leak when kern_execve() fails fatally.

The callers of execve() are taking care of releasing the argument
buffer for exec.  However, there might be situations where exec
ran into a dead end and can't come out again because it already
has destroyed the calling process image.  In these cases kern_execve
was calling exit1() to destroy the current process.  This however means
that the argument buffers were never freed, thus causing the leak.

In combination with the recent change to using the objcache with a
hard upper allocation limit, this meant that at some point no binaries
could be execed anymore, stalling callers of sys_exec() in objcache_get.

To fix this business, kern_execve() now does not call exit1() on
leathal errors anymore, but instead returns -1 (in contrast to valid
errno values which are >= 0) to indicate that the current process has
to commit suicide after cleaning up used resources.

16 years agoWhen an inode collision occurs a partially initialized vnode will be
Matthew Dillon [Mon, 30 Jul 2007 14:44:56 +0000 (14:44 +0000)]
When an inode collision occurs a partially initialized vnode will be
destroyed.  Fix several NULL pointer dereferences in msdosfs that could
occur in this case.  Loosely taken from the UFS code.

Inode collision checks were added to DragonFly to close race conditions
in both the creation and termination of a vnode that were found in UFS.
Subsequently other filesystems were found to have the same race conditions.
Because the VM cache is based on filesystem objects and not on physical
disk blocks, such collisions could result in multiple buffers associated
with different vnodes referencing the same physical disk block and I/O
reordering would then cause stale data to be written to disk.

Submitted-by: "Nicolas Thery" <nthery@gmail.com>