dragonfly.git
13 years agodm - Fix a reference leak
Alex Hornung [Wed, 24 Nov 2010 19:52:52 +0000 (19:52 +0000)]
dm - Fix a reference leak

* References to the newly created target would not be released on an
  error, but they should. Otherwise dm_target_rem will never succeed if
  an error occured here.

13 years agoMerge branch 'master' of /repository/git/dragonfly
Venkatesh Srinivas [Wed, 24 Nov 2010 20:41:27 +0000 (12:41 -0800)]
Merge branch 'master' of /repository/git/dragonfly

13 years agokernel - Export vm_map_transition_wait and correct race between sleep/wakeup.
Venkatesh Srinivas [Wed, 24 Nov 2010 20:40:40 +0000 (12:40 -0800)]
kernel - Export vm_map_transition_wait and correct race between sleep/wakeup.

13 years agokernel - Implement munlockall.
Venkatesh Srinivas [Wed, 24 Nov 2010 20:25:07 +0000 (12:25 -0800)]
kernel - Implement munlockall.

13 years agoTest commit
Ilya Dryomov [Wed, 24 Nov 2010 19:26:27 +0000 (21:26 +0200)]
Test commit

13 years agokernel - Add a flags field to the vm_map and a MAP_WIREFUTURE flag.
Venkatesh Srinivas [Wed, 24 Nov 2010 19:15:58 +0000 (11:15 -0800)]
kernel - Add a flags field to the vm_map and a MAP_WIREFUTURE flag.

13 years agolibdm - clean libdm-dragonfly-iface
Alex Hornung [Wed, 24 Nov 2010 17:35:44 +0000 (17:35 +0000)]
libdm - clean libdm-dragonfly-iface

* Remove bogus whitespace.

* Remove dead code.

* Clean up a few comments.

* Remove prop_dictionary_externalize_to_file that were used for debug
  purposes.

13 years agonewfs - add volume name support
Alex Hornung [Wed, 24 Nov 2010 17:20:42 +0000 (17:20 +0000)]
newfs - add volume name support

Obtained-from: FreeBSD

13 years agofsid - clear buffer before reading
Alex Hornung [Wed, 24 Nov 2010 17:20:03 +0000 (17:20 +0000)]
fsid - clear buffer before reading

13 years agoFix a couple of typos in messages & manpages.
Sascha Wildner [Wed, 24 Nov 2010 13:22:06 +0000 (14:22 +0100)]
Fix a couple of typos in messages & manpages.

13 years agoarcmsr(4): Update to vendor release 1.20.00.19.
Sascha Wildner [Tue, 23 Nov 2010 13:08:49 +0000 (14:08 +0100)]
arcmsr(4): Update to vendor release 1.20.00.19.

Bug fixes:
  * Fixed "inquiry data fails comparion at DV1 step"
  * Fixed bad range input in bus_alloc_resource for ADAPTER_TYPE_B
  * Fixed arcmsr driver prevent arcsas support for Areca SAS HBA ARC13x0

Taken-from: FreeBSD

13 years agoarcmsr(4): Fix up the device description a bit.
Sascha Wildner [Tue, 23 Nov 2010 11:41:36 +0000 (12:41 +0100)]
arcmsr(4): Fix up the device description a bit.

13 years agoprintf(1): Fix the printing of floats which I broke back in 2007.
Sascha Wildner [Tue, 23 Nov 2010 09:33:41 +0000 (10:33 +0100)]
printf(1): Fix the printing of floats which I broke back in 2007.

I forgot braces in f386bcf2683a4edef25828e3958ba5b087d702d2

13 years agokernel - Fix namecache memory exhaustion edge case
Matthew Dillon [Tue, 23 Nov 2010 07:24:25 +0000 (23:24 -0800)]
kernel - Fix namecache memory exhaustion edge case

* The namecache has traditionally relied on vnode limits to avoid
  blowing up its memory pool.  However, creating millions of hardlinks
  to the same vnode easily circumvents this assumption.

* Enhance the negative cache hysteresis code with a section for the
  positive cache that does the same thing, preventing the namecache
  from growing greater than 2x maxvnodes.

  This situation will not occur under normal operation, it is strictly
  for correctness.  The kernel should never panic on normal filesystem
  operations even if those operations are unrealistic.

* Tested w/HAMMER and a few million hardlinks to a single file.

Reported-by: Venkatesh Srinivas <me@acm.jhu.edu>
13 years agokernel - AHCI hotplug work to help support AMD chipsets
Matthew Dillon [Tue, 23 Nov 2010 02:25:33 +0000 (18:25 -0800)]
kernel - AHCI hotplug work to help support AMD chipsets

* Change the Hot-plug mechanics to something which appears to work for
  both NVidia and AMD AHCI chipsets, and hopefully Intel too (untested).

  This appears to fix hot-plug for AMD's SB850-based AHCI (circa AM3 socket
  mobos).

* Basically the SCTL.DET and CMD.SUD bits control the behavior of the
  SATA Phy, but in typical Intel fashion the specification is seriously
  lacking on how events such as hot-plug are handled based on what state
  the phy is in.

  Previously we were looking for phy transition events while holding
  the port in the RESET state (DET=1, SUD=1), which worked up till this
  point.  But it doesn't work with AMD's SB850-based AHCI.

  Now we are attempting to do the same thing with the port in
  the SPIN-UP/NORMAL state (DET=0, SUD=1).

* The AHCI documentation wants us to use the LISTEN mode (DET=0, SUD=0)
  and get a SERR.DIAG.X event for hot-plug but this doesn't seem to work
  very reliably.  In fact, 10.10.4 is ambiguous for the case
  where Staggered-spin-up is not supported since SUD is wired to '1'
  in that case (making LISTEN mode impossible).

13 years agokernel - More AHCI work to help support broken AMD chipsets
Matthew Dillon [Mon, 22 Nov 2010 23:34:56 +0000 (15:34 -0800)]
kernel - More AHCI work to help support broken AMD chipsets

This cleans up more of our AHCI support for AMD 880/890/SB850 chipsets.

This does NOT clean up hot-plug issues (fixing those might require actually
probing dead ports every few seconds).

* Better PCS/PRCS masking during low level reset sequences to prevent
  the PCS/PRCS interrupt from poking ports while we are in a hard reset.

* Breakout the COMRESET sequence into its own procedure.

* Make sure SPM is disabled in addition to IPM when doing a hard reset
  of a port.  Also make sure that POD (Power Up Device) is set in
  addition to SUD (Spin up Device) while we are in a hard reset.

* Wait one full second after aftering DET_INIT (sending COMINIT) before
  testing the SSTS bits, to ensure the microcontroller has reinitialized
  itself so we do not get bogus bits and to prevent bogus device detection
  which some chipsets may have left unmasked.

  This may also be needed in general when supporting SATA-III's longer
  training times.

* Do not reinit the port after a PM probe fails as it could undo all of
  the hard work we did initializing it.

* Reissue the COMRESET if a PM probe fails to ensure that any state left
  over from the PM detection gets cleared and to deal with any devices
  which brick when they receive a PM-related command.

13 years agokernel - Add APIC_IO conf option back in / make it adjust hw.apic_io_enable
Matthew Dillon [Mon, 22 Nov 2010 21:46:58 +0000 (13:46 -0800)]
kernel - Add APIC_IO conf option back in / make it adjust hw.apic_io_enable

* APIC_IO again controls whether a SMP kernel will use the io-apic or not.
  All it does now is adjust the hw.apic_io_enable default value.

  Changing the code to allow apic-io to be soft-selectable was great, but
  removing the kernel config option was not so great.

* SMP Kernels compiled without APIC_IO again default to not using it.  You
  can use APIC_IO either by configuring the kernel with the option or
  by setting hw.apic_io_enable=1 in /boot/loader.conf.

* SMP Kernels compiled with APIC_IO default to using APIC_IO.

* Reduces confusion between 2.8 and 2.9 kernel config files.

* Reduces personal frustrations.

13 years agoOpenSSL: Add pre-generated asm files to the build.
Peter Avalos [Sun, 21 Nov 2010 06:25:10 +0000 (20:25 -1000)]
OpenSSL: Add pre-generated asm files to the build.

This causes measurable performance increases.

The Makefile in asm/ will generate the .s files from the vendor-provided
.pl files when a new version of OpenSSL is imported.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1542>

13 years agoMerge branch 'vendor/OPENSSL' into HEAD
Peter Avalos [Mon, 22 Nov 2010 11:11:26 +0000 (01:11 -1000)]
Merge branch 'vendor/OPENSSL' into HEAD

13 years agoOpenSSL: Reduce diffs to vendor source.
Peter Avalos [Sat, 20 Nov 2010 19:50:41 +0000 (09:50 -1000)]
OpenSSL: Reduce diffs to vendor source.

13 years agoMake OpenSSL thread-safe.
Peter Avalos [Sat, 20 Nov 2010 07:41:06 +0000 (21:41 -1000)]
Make OpenSSL thread-safe.

13 years agotmpfs - fix chgrp(), or chown() when one of uid/gid is to be unchanged
YONETANI Tomokazu [Mon, 22 Nov 2010 02:35:48 +0000 (11:35 +0900)]
tmpfs - fix chgrp(), or chown() when one of uid/gid is to be unchanged

uid/gid values from function arguments were being used instead of the ones
arranged by vop_helper_chown(), accidentally setting one of them to -1
(4294967295) instead of leaving it unchanged.

13 years agodebug - Add seekbench.c
Matthew Dillon [Sun, 21 Nov 2010 22:21:31 +0000 (14:21 -0800)]
debug - Add seekbench.c

* Add a little program which purposefully attempts to defeat OS and disk
  caches to calculate seek latencies for different relative seek spans.

  Well, this doesn't tell us anything we didn't know already, that being
  that unless one can make accesses use of the HDs zone cache well anything
  other than a linear read is going to have a fairly huge seek-time cost.

13 years agoFortune: update hammer snapshot info
Dylan Reinhold [Sun, 21 Nov 2010 05:56:45 +0000 (21:56 -0800)]
Fortune: update hammer snapshot info

13 years agokbdmap(1): Fix a segmentation fault with -r.
Sascha Wildner [Sun, 21 Nov 2010 13:23:02 +0000 (14:23 +0100)]
kbdmap(1): Fix a segmentation fault with -r.

Reported-by: Mikael Moghadam <binarybusiness@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1918>

13 years agomount_devfs - don't unconditionally clear rules
Alex Hornung [Sun, 21 Nov 2010 10:03:39 +0000 (10:03 +0000)]
mount_devfs - don't unconditionally clear rules

* mount_devfs was unconditionally clearing all rules of a mountpoint
  after mounting.

* According to the man page (and my original intentions, I'd presume),
  mount_devfs should only clear the rules of a mountpoint if it was
  already mounted. So fix mount_devfs accordingly.

Dragonfly-bug: http://bugs.dragonflybsd.org/issue1885

13 years agokern_shutdown - sync_devs before looking for dumpdev
Alex Hornung [Sun, 21 Nov 2010 08:46:07 +0000 (08:46 +0000)]
kern_shutdown - sync_devs before looking for dumpdev

* We need to sync_devs before starting to look for dumpdev, otherwise it
  might have happened that the probing of the disk hasn't finished yet.

13 years agodevfs - don't propagate on terminate, it's redundant
Alex Hornung [Sun, 21 Nov 2010 08:44:02 +0000 (08:44 +0000)]
devfs - don't propagate on terminate, it's redundant

* Don't propagate the device removal in the cdev terminate op since it
  must have happened before; otherwise something went horribly wrong.

* Verify that the cdev isn't linked into the dev list anymore upon
  terminate. As explained in the commit, this *must* be the case.

13 years agodloader - understand dumpdev
Alex Hornung [Fri, 19 Nov 2010 19:00:52 +0000 (19:00 +0000)]
dloader - understand dumpdev

13 years agodevfs - Only check rules after inserting into topology
Alex Hornung [Fri, 19 Nov 2010 16:09:13 +0000 (16:09 +0000)]
devfs - Only check rules after inserting into topology

* Previously rules were checked in allocp before binding the node into
  the topology. Since the rule checking itself needs the topology,
  stuff(TM) didn't work properly.

* NOTE: this still doesn't fix the issue of rules not being applied
  correctly on mount, but it's the first step towards that end.

Dragonfly-bug: http://bugs.dragonflybsd.org/issue1885

13 years agoAdd files to OpenSSL that will generate optimized asm code.
Peter Avalos [Sun, 21 Nov 2010 05:49:12 +0000 (19:49 -1000)]
Add files to OpenSSL that will generate optimized asm code.

13 years agobuild - Fix IP_DIVERT w/UP build error
Matthew Dillon [Sun, 21 Nov 2010 02:09:23 +0000 (18:09 -0800)]
build - Fix IP_DIVERT w/UP build error

Reported-by: Stephane Russell <srussell@prodigeinfo.com>
13 years agomlxcontrol(8): Sync with FreeBSD.
Sascha Wildner [Sat, 20 Nov 2010 14:58:34 +0000 (15:58 +0100)]
mlxcontrol(8): Sync with FreeBSD.

While here, raise WARNS to 6 and fix the warnings.

13 years agovn - switch to using own malloc type
Alex Hornung [Fri, 19 Nov 2010 15:26:15 +0000 (15:26 +0000)]
vn - switch to using own malloc type

13 years agodevfs - Fix FREEBLKS
Alex Hornung [Fri, 19 Nov 2010 14:49:17 +0000 (14:49 +0000)]
devfs - Fix FREEBLKS

* Since vn and md were changed to use the disk subsystem they
  essentially haven't been able to receive any BUF_CMD_FREEBLKS since
  their D_CANFREE flag was not propagated through the disk subsystem.

* Fix this by making the flag specific to the device via SI_CANFREE and
  propagating the D_CANFREE of even *underlying*/covered devices to the
  top-level device's SI_CANFREE.

13 years agokern_udev - fix the devtype property
Alex Hornung [Fri, 19 Nov 2010 14:48:14 +0000 (14:48 +0000)]
kern_udev - fix the devtype property

* The devtype cannot be extracted from the si_flags in cdev, but only
  from the ops flags.

13 years agovn - Major overhaul
Alex Hornung [Fri, 19 Nov 2010 09:18:18 +0000 (09:18 +0000)]
vn - Major overhaul

* Now that we can do proper disk cloning we do so. vn_create will now
  return the top device of the disk (the one that belongs to the disk
  subsystem and not us) if asked to do so. This is then passed back from
  the clone handler so that we have a real cloned disk.

* Remove all sorts of old hacks, mostly related to finding vn's and
  strange cdev lists that were not being used anymore anyways.

* Avoid the destruction/detachment of devices that are in use by keeping
  track of whether they are open or not and checking the opencount
  provided by the disk susbsystem.

* Fix a memory leak related to adding references to devs but never
  releasing them.

Dragonfly-bug: http://bugs.dragonflybsd.org/issue1561 (partly)

13 years agosubr_disk - Keep an open count
Alex Hornung [Fri, 19 Nov 2010 14:31:26 +0000 (14:31 +0000)]
subr_disk - Keep an open count

13 years agosubr_disk - 'official' support for cloning; cleanup
Alex Hornung [Fri, 19 Nov 2010 09:15:30 +0000 (09:15 +0000)]
subr_disk - 'official' support for cloning; cleanup

* Add 'official' cloning support, so that the top level node is also
  make_only_dev'd in the case of a cloned disk creation. This way
  the top level node can be used as a return value for the clone
  handler.

* Right now we are basically returning the raw underlying device node
  when we clone in vn. This can now be changed to actually do things
  properly so that everything passes through the disk subsystem.

* Clean up some dead code mostly related to the old understanding of
  'cloning', which has nothing to do with what's going on nowadays.

* Fix a leak of cdevs. The underlying 'rawdev' was never being released,
  resulting in a leak of these each time a disk was destroyed.

13 years agokern_conf - add make_only_dev_covering
Alex Hornung [Fri, 19 Nov 2010 09:28:16 +0000 (09:28 +0000)]
kern_conf - add make_only_dev_covering

13 years agolibdm - Be a bit more verbose about ioctl issues
Alex Hornung [Fri, 19 Nov 2010 07:48:16 +0000 (07:48 +0000)]
libdm - Be a bit more verbose about ioctl issues

Reported-by: Sascha Wildner
13 years agodm - Disallow active vol removal; ret err of ioctl cmd
Alex Hornung [Fri, 19 Nov 2010 07:01:11 +0000 (07:01 +0000)]
dm - Disallow active vol removal; ret err of ioctl cmd

* Disallow the removal of volumes that are currently in use (determined
  by whether they are open or not).

* Return the error of the actual ioctl command that was executed and not
  of some prop copyout.

Reported-by: Sascha Wildner
13 years agoinstaller: Remove /dev/mapper/* mappings where necessary.
Sascha Wildner [Thu, 18 Nov 2010 18:24:00 +0000 (19:24 +0100)]
installer: Remove /dev/mapper/* mappings where necessary.

13 years agokernel - Fix global counter used in lockf assertions
Matthew Dillon [Thu, 18 Nov 2010 17:20:23 +0000 (09:20 -0800)]
kernel - Fix global counter used in lockf assertions

* lockf elements can be accessed MP.

* This may fix the 'panic: assertion: lf_global_counter>=0 in lf_destroy_range'
  panic.

Reported-by: Peter Avalos <peter@theshell.com>
13 years agoUpdate build for OpenSSL-1.0.0b import.
Peter Avalos [Thu, 18 Nov 2010 05:57:01 +0000 (19:57 -1000)]
Update build for OpenSSL-1.0.0b import.

13 years agoMerge branch 'vendor/OPENSSL'
Peter Avalos [Thu, 18 Nov 2010 05:49:41 +0000 (19:49 -1000)]
Merge branch 'vendor/OPENSSL'

13 years agoImport OpenSSL-1.0.0b.
Peter Avalos [Thu, 18 Nov 2010 05:41:45 +0000 (19:41 -1000)]
Import OpenSSL-1.0.0b.

This primarily fixes CVE-2010-3864 and CVE-2010-2939.

13 years agoRemove unused file from OpenSSH source.
Peter Avalos [Sun, 14 Nov 2010 20:32:22 +0000 (10:32 -1000)]
Remove unused file from OpenSSH source.

13 years agolibssh: Unset BROKEN_GLOB. Ours works fine.
Peter Avalos [Sun, 14 Nov 2010 19:43:34 +0000 (09:43 -1000)]
libssh: Unset BROKEN_GLOB.  Ours works fine.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1891>

13 years agoFix buildkernel (LINT)
Thomas Nikolajsen [Wed, 17 Nov 2010 05:30:39 +0000 (06:30 +0100)]
Fix buildkernel (LINT)

13 years agolibc: Remove unused bit of code in __ujtoa().
Sascha Wildner [Tue, 16 Nov 2010 17:45:23 +0000 (18:45 +0100)]
libc: Remove unused bit of code in __ujtoa().

All values of val that are <= ULONG_MAX have been handed to __ultoa() previously
so we can safely assume that val is not < 10.

Unless, of course, we're dealing with an architecture where ULONG_MAX <= 8,
which we hope will _never_ happen. :-)

13 years agoRemove hotplug(4) since hotplugd(8) uses udev/devattr now.
Sascha Wildner [Tue, 16 Nov 2010 17:33:22 +0000 (18:33 +0100)]
Remove hotplug(4) since hotplugd(8) uses udev/devattr now.

On-behalf-of: alexh

13 years agoudev_monitor(3) - Add new _property* macros
Alex Hornung [Tue, 16 Nov 2010 14:49:03 +0000 (14:49 +0000)]
udev_monitor(3) - Add new _property* macros

13 years agodm - adjust use of minor numbers to new reality
Alex Hornung [Thu, 4 Nov 2010 20:31:54 +0000 (20:31 +0000)]
dm - adjust use of minor numbers to new reality

* Allocate (theoretical) minor numbers using the devfs_clone_bitmap
  facility instead of an ever-increasing int64.

* Set the actual minor of the dm-specific device information to the
  minor returned by the disk subsystem.

* Undo some of the dkunit() uses as they only covered very specific use
  cases.

13 years agodisk - Add device-mapper specific fallthroughs
Alex Hornung [Thu, 4 Nov 2010 20:28:54 +0000 (20:28 +0000)]
disk - Add device-mapper specific fallthroughs

* Fall through for psize and ioctl if the underlying device is a device
  mapper volume and we aren't operating on a (real) slice or part.

* Enable the code hiding the compatibility slice s0.

13 years agoMove net.wlan.force_swcrypto out of IEEE80211_DEBUG.
Sascha Wildner [Mon, 15 Nov 2010 20:08:30 +0000 (21:08 +0100)]
Move net.wlan.force_swcrypto out of IEEE80211_DEBUG.

This fixes kernel builds that don't have IEEE80211_DEBUG in the config
(such as SOEKRIS).

13 years agofsid - Add to tree but don't build
Alex Hornung [Mon, 15 Nov 2010 17:57:19 +0000 (17:57 +0000)]
fsid - Add to tree but don't build

* Add 'fsid', a proof-of-concept for now that reads volume names from
  hammer and ufs volumes (so far) and creates links to the devices with
  fs volumes in a /dev directory.

13 years agoiostat - undo previous changes
Alex Hornung [Mon, 15 Nov 2010 17:54:52 +0000 (17:54 +0000)]
iostat - undo previous changes

* undo some previous changes that were not intended to be committed.

13 years agohotplugd rc script - add udevd dependency
Alex Hornung [Mon, 15 Nov 2010 17:47:23 +0000 (17:47 +0000)]
hotplugd rc script - add udevd dependency

13 years agoudevd - Break startup into pre and post mount parts
Alex Hornung [Mon, 15 Nov 2010 06:34:34 +0000 (06:34 +0000)]
udevd - Break startup into pre and post mount parts

* Add a SIGHUP handler to udevd that will recreate the socket and pid
  files, flush the current device database and read out a new one.

* Break the udevd rc.d script into udevd_early, to be run before
  mountcritlocal and a dependency of lvm, and udevd, which is the
  regular rc.d script which can be run at any time and on init takes
  over from udevd_early.

* Adjust lvm rc.d script to depend on udevd_early instead of udevd.

Suggested-by: Sascha Wildner
13 years agosubr_disk - Maintain uuid aliases for disk volumes
Alex Hornung [Mon, 15 Nov 2010 04:12:44 +0000 (04:12 +0000)]
subr_disk - Maintain uuid aliases for disk volumes

* Maintain part-by-uuid (partitions on slices) and slice-by-uuid
  (GPT slices) aliases for the respective device nodes.

* This allows for access to a given partition or slice even after moving
  it around on a disk.

13 years agohotplugd - Switch to using udev/devattr
Alex Hornung [Mon, 15 Nov 2010 04:10:30 +0000 (04:10 +0000)]
hotplugd - Switch to using udev/devattr

* Switch hotplugd from using the now removed hotplug devfs magic to
  using the unified device dictionary magic provided by kern_udev via
  devattr.

13 years agodevfs - Add a destroy_dev_alias, remove hotplug
Alex Hornung [Mon, 15 Nov 2010 04:06:34 +0000 (04:06 +0000)]
devfs - Add a destroy_dev_alias, remove hotplug

* Move the wildCmp* functions into devfs_core and expose them to the
  whole of devfs, but renamed as devfs_wildCmp*.

* Add a destroy_dev_alias functionality that will remove specific
  aliases to a cdev that match a given wild string.

* Remove the whole hotplug magic since it was broken already for systems
  with several devfs mount points (it would receive several attaches,
  one for each mount point). It is also redundant now that udev/devattr
  provides that functionality.

13 years agoufs - Adjust the on-disk structure to FreeBSD's
Alex Hornung [Mon, 15 Nov 2010 04:03:13 +0000 (04:03 +0000)]
ufs - Adjust the on-disk structure to FreeBSD's

* Adjust the superblock on-disk structure a bit to include a few things
  like a volume name as FreeBSD does.

* NOTE: This introduces no functional changes but will allow to easily
  extract volume names from volumes.

Obtained-from: FreeBSD

13 years agokern_udev - Also add the device type to the dict
Alex Hornung [Mon, 15 Nov 2010 04:02:25 +0000 (04:02 +0000)]
kern_udev - Also add the device type to the dict

* By default also add the device type (D_DISK, ...) to the initial
  device dictionary.

13 years agoudevd - Change filters to AND instead of OR processing
Alex Hornung [Mon, 15 Nov 2010 04:00:24 +0000 (04:00 +0000)]
udevd - Change filters to AND instead of OR processing

* Now all conditions in filters for monitor and enumerate have to be met
  instead of only one.

* This seems to be the way linux does it and it is
  pretty much the sensible way of doing it.

13 years agoproplib - Don't link unconditionally to libphtread
Alex Hornung [Mon, 15 Nov 2010 03:59:01 +0000 (03:59 +0000)]
proplib - Don't link unconditionally to libphtread

* There is no need to link unconditionally to libpthread, since it can
  also work in single-thread applications using the libc stubs. That is
  after all why we fixed some of them a few months ago.

13 years agodevattr - Add a few more convenience macros
Alex Hornung [Mon, 15 Nov 2010 03:58:06 +0000 (03:58 +0000)]
devattr - Add a few more convenience macros

* Add two more macros that take char* instead of const char* for setting
  monitor filters, as we do for enumerate filters.

13 years agodm/disk - cleanup, add '.' between name and slices
Alex Hornung [Fri, 12 Nov 2010 20:49:09 +0000 (20:49 +0000)]
dm/disk - cleanup, add '.' between name and slices

* Clean up some dm debugging introduced earlier.

* Add a DSO_DEVICEMAPPER option that will cause the disk subsystem to
  introduce a '.' between the base name and the slices (i.e. foo.s0
  instead of foos0).

13 years agodsched - adjust to work nicely with dm disks
Alex Hornung [Fri, 12 Nov 2010 08:41:51 +0000 (08:41 +0000)]
dsched - adjust to work nicely with dm disks

* Substitute the forward slashes ('/') for '-' so that we don't have
  strangely named sysctl entries with slashes in them. This is also
  necessary for the loader, since it doesn't support slashes in the
  name.

13 years agodm/nestbuf - Bind into devstat, clean up
Alex Hornung [Thu, 11 Nov 2010 22:01:50 +0000 (22:01 +0000)]
dm/nestbuf - Bind into devstat, clean up

* Bind dm into devstat via nestbufs.

* Clean up several dm changes.

13 years agodisk_setdiskinfo - correct assertion
Alex Hornung [Thu, 11 Nov 2010 17:35:15 +0000 (17:35 +0000)]
disk_setdiskinfo - correct assertion

* We want to assert that only either the number of blocks or the size in
* bytes is specified, not either the size in bytes or the blocksize.

13 years agodm - bind logical devices into the disk subsystem
Alex Hornung [Thu, 11 Nov 2010 16:24:04 +0000 (16:24 +0000)]
dm - bind logical devices into the disk subsystem

* Bind logical dm devices into the disk subsystem so that they are more
  flexible. This way they'll appear as regular disks, they'll be able to
  have a disk scheduler and disklabels can be created on top of them.

13 years agodisk_create_named - Adapt a bit to work with dm
Alex Hornung [Thu, 11 Nov 2010 16:23:03 +0000 (16:23 +0000)]
disk_create_named - Adapt a bit to work with dm

* Don't add a 'unit' to the name if it's a named disk creation.

13 years agoTemporarily bump the mbuf cluster size
Alex Hornung [Thu, 11 Nov 2010 16:21:10 +0000 (16:21 +0000)]
Temporarily bump the mbuf cluster size

* This solves issues with wpi. Once there is a different solution this
  can be reverted.

Suggested-by: Matthew Dillon (dillon@)
13 years agocam(4): Remove dead code. secs_per_cylinder can't be 0 here.
Sascha Wildner [Mon, 15 Nov 2010 06:54:53 +0000 (07:54 +0100)]
cam(4): Remove dead code. secs_per_cylinder can't be 0 here.

13 years agokernel: Remove some redundant initialization.
Sascha Wildner [Mon, 15 Nov 2010 06:53:21 +0000 (07:53 +0100)]
kernel: Remove some redundant initialization.

13 years agokernel - Add sysctl to bypass wifi chipset hardware crypto
Matthew Dillon [Sun, 14 Nov 2010 16:02:48 +0000 (08:02 -0800)]
kernel - Add sysctl to bypass wifi chipset hardware crypto

* Add sysctl net.wlan.force_swcrypto, default disabled.  If set to 1
  prior to attaching wlan to the underlying wireless interface this
  will force software crypto to be used and bypass the hardware
  crypto implemented by the wireless chipset.

* Currently we know there is at least one serious issue with the
  Atheros 9280 when used with WEP2 (shows up as RSN in list scan) + WPS,
  and possibly other combinations.  The wrong transmit key winds up
  being used for broadcast packets, including ARP.

* This sysctl works around the problem.  If your wpa_supplicant is able
  to connect to a network but you are unable to dhclient / use the
  network you might be hitting this problem and setting the sysctl to
  1 may fix it.

  Note that the sysctl must be set prior to attaching the wlan to the
  underlying wireless driver, so it is typically best to do it at boot
  time or near the top of whatever script you use.

Inspired-by: 2-days of connectivity issues at NYCBSDCON.
13 years agokernel - Misc atheros updates
Matthew Dillon [Sun, 14 Nov 2010 15:14:33 +0000 (07:14 -0800)]
kernel - Misc atheros updates

* Misc atheros updates, but doesn't seem to fix an issue that seems
  to be related to WPA2 + WPS for the 928x chipset

Taken-from: FreeBSD

13 years agokernel - add kern.sysbeep_enable feature
Matthew Dillon [Sun, 14 Nov 2010 15:03:41 +0000 (07:03 -0800)]
kernel - add kern.sysbeep_enable feature

* Add a sysctl kern.sysbeep_enable (default on).  Setting this to 0
  will disable the system beep / bell.

* Useful when messing with a laptop in a conference, those beeps can
  get really annoying.

13 years agodc(4): Add IDs for the Abocom FE2500.
Sascha Wildner [Sun, 14 Nov 2010 10:36:25 +0000 (11:36 +0100)]
dc(4): Add IDs for the Abocom FE2500.

Tested-by: Max Herrgard <herrgard@gmail.com>
13 years agoHAMMER - Check if supplied conf file exists
Stathis Kamperis [Sat, 13 Nov 2010 16:40:48 +0000 (18:40 +0200)]
HAMMER - Check if supplied conf file exists

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1911>

13 years agoRemove useless .PATH targets from kernel module Makefiles.
Sascha Wildner [Sat, 13 Nov 2010 16:07:22 +0000 (17:07 +0100)]
Remove useless .PATH targets from kernel module Makefiles.

All these came in from FreeBSD which keeps their module Makefiles in
sys/modules (that is, separate from the source). We don't, so they are
not needed.

13 years agoMake ubt(4) compilable into the kernel and add it to LINT.
Sascha Wildner [Sat, 13 Nov 2010 15:48:36 +0000 (16:48 +0100)]
Make ubt(4) compilable into the kernel and add it to LINT.

13 years agoifconfig(8): Fix a bug and do some cleanup.
Sascha Wildner [Sat, 13 Nov 2010 14:38:17 +0000 (15:38 +0100)]
ifconfig(8): Fix a bug and do some cleanup.

* Use the correct interface name (ifname instead of name) in a message.

* Remove an unused variable.

* Mark usage() as noreturn.

* Remove DragonFly CVS IDs.

13 years agohammer.8: Add some words about HAMMER version 5 and about upgrading to it.
Sascha Wildner [Sat, 13 Nov 2010 12:59:18 +0000 (13:59 +0100)]
hammer.8: Add some words about HAMMER version 5 and about upgrading to it.

Submitted-by: Ilya Dryomov <idryomov@gmail.com>
13 years agokernel: Silence some warnings that crept up with the APIC_IO changes.
Sascha Wildner [Sat, 13 Nov 2010 06:10:22 +0000 (07:10 +0100)]
kernel: Silence some warnings that crept up with the APIC_IO changes.

13 years agoHAMMER - Implement volume-list command
Stathis Kamperis [Fri, 12 Nov 2010 13:52:07 +0000 (15:52 +0200)]
HAMMER - Implement volume-list command

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1863>

13 years agokernel - Make sure invalidated pages are unmapped in rare situation.
Matthew Dillon [Thu, 11 Nov 2010 18:15:46 +0000 (10:15 -0800)]
kernel - Make sure invalidated pages are unmapped in rare situation.

* vfs_vmio_release() was ignoring pages busied by other MP users while
  releasing VM pages associated with the buffer cache.  This could
  potentially lead to invalida pages remaining memory mapped.

* Ensure that the released pages found to be in this state are still
  unmapped.

13 years agokernel - Close possible hole in hammer inval code
Matthew Dillon [Thu, 11 Nov 2010 18:12:59 +0000 (10:12 -0800)]
kernel - Close possible hole in hammer inval code

* Do not use FINDBLK_TEST, instead have findblk() return a locked buffer
  cache buffer and deal with it from there.  While the original code
  should have been ok (it would getblk() the buffer cache in either case),
  it depended on certain MP race characteristics that might not hold so
  don't take any chances.

* This does not fix any known issues but removes some uncertainty.

13 years agoiir(4): Sync with FreeBSD.
Sascha Wildner [Thu, 11 Nov 2010 02:43:40 +0000 (03:43 +0100)]
iir(4): Sync with FreeBSD.

* Remove an unused function.

* Fix a wrong check (io was checked for NULL twice, instead of io and irq).

13 years agodiskless nfs - Add a remount feature for /conf.
Matthew Dillon [Wed, 10 Nov 2010 20:21:58 +0000 (12:21 -0800)]
diskless nfs - Add a remount feature for /conf.

* Add a feature where you can now remount the dirs in /conf so that
  you can e.g. have a /conf/10.1.2.3 that gets remounted off the local
  hdd of that machine before rc.d/initdiskless actually does it's thing
  and enables you to have private ssh keys that other diskless clients
  cannot access, but still enables you to exploit /conf to it's fullest.

Submitted-by: Rumko
13 years agoHAMMER utility - Handle pruning when only snapshot meta-data present
Matthew Dillon [Wed, 10 Nov 2010 20:12:45 +0000 (12:12 -0800)]
HAMMER utility - Handle pruning when only snapshot meta-data present

* If only snapshot meta-data is present and no snapshot softlinks are found
  hammer prune (and hammer cleanup) previous exited with an error.  This case
  can occur when creating manual snapshot softlinks and/or trying to prune
  a slave PFS.

* In fact this is incorrect.  If meta-data is present we can prune based
  on that.

13 years agokernel - kmem_slab_alloc: Record vm_pages from page alloc for page mapping
Venkatesh Srinivas [Wed, 10 Nov 2010 20:10:25 +0000 (12:10 -0800)]
kernel - kmem_slab_alloc: Record vm_pages from page alloc for page mapping

This eliminates all of the vm map lookups for slab-sized and smaller
allocations and the first 32-or-so for larger ones.

13 years agoRegenerate the pciconf(8) database
Sascha Wildner [Wed, 10 Nov 2010 11:49:56 +0000 (12:49 +0100)]
Regenerate the pciconf(8) database

...from the following files:

Hart:    Jan 22, 2008 (version 671)
Boemler: Nov  1, 2010
Mares:   Oct 20, 2010

13 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Michael Neumann [Mon, 8 Nov 2010 22:45:31 +0000 (23:45 +0100)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

13 years agoRemove remaining APIC_IO usages in bus/pci
Michael Neumann [Mon, 8 Nov 2010 22:41:36 +0000 (23:41 +0100)]
Remove remaining APIC_IO usages in bus/pci

13 years agoinstaller: Ignore the exit status of two grep commands.
Sascha Wildner [Mon, 8 Nov 2010 22:23:25 +0000 (23:23 +0100)]
installer: Ignore the exit status of two grep commands.

These commands may just find nothing which is okay in these cases. So don't
interpret their exit status 1 as failure.

Reported-by: lentferj
13 years agoboot - Remove improper setting of default_kernel
Matthew Dillon [Mon, 8 Nov 2010 21:12:23 +0000 (13:12 -0800)]
boot - Remove improper setting of default_kernel

* Setting default_kernel in loader.conf prevents dloader.menu from
  conditionally setting it according to what it finds in /boot.  Remove
  the set.

* To be symmetrical add a selection (u) for kernel.UP in addition to the
  selection (m) for kernel.SMP, in case someone selects SMP and then wants
  to go back to UP before booting.

13 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 8 Nov 2010 21:10:32 +0000 (13:10 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly