dragonfly.git
4 years agodsched - Periph.: call dsched_exit on thread exit
Alex Hornung [Mon, 19 Apr 2010 16:39:16 +0000 (16:39 +0000)]
dsched - Periph.: call dsched_exit on thread exit

* The previous location of the call to dsched_exit was not right and did
  not allow the use of lockmgr.

* We now call dsched_exit before the thread is completely killed and
  descheduled as to avoid any problems.

4 years agodsched_fq - move to lockmgr
Alex Hornung [Mon, 19 Apr 2010 14:07:25 +0000 (14:07 +0000)]
dsched_fq - move to lockmgr

4 years agoHAMMER VFS - Fix probable corruption case when filesystem becomes nearly full v2.7.2
Matthew Dillon [Mon, 19 Apr 2010 05:36:14 +0000 (22:36 -0700)]
HAMMER VFS - Fix probable corruption case when filesystem becomes nearly full

* The reblocking code was incorrectly assuming the cursor would be pointing
  at a valid node element after an unlock/relock sequence, when it could
  actually be pointing at the EOF of a node.  This case can occur when
  the filesystem is nearly full (possibly due to the reblocking operation
  itself), when the filesystem is also under load from unrelated
  operations.

* This can result in the creation of a corrupted B-Tree leaf node or
  data record.

* Corruption can be checked with hammer checkmap and hammer show
  (as of this rev):

  hammer -f device checkmap

Should output no B-Tree node records or free space mismatches.
You will still get the initial volume summary.

  hammer -f device show | egrep '^B' | egrep -v '^BM'

Should output no records.

* Currently the only recourse if corruption is found is to copy off the
  filesystem, newfs_hammer, and copy it back.

  Full history and snapshots can be retained by using 'hammer -B mirror-read'
  to copy off the filesystem and mirror-write to copy it back.  However,
  pleaes remember you must do this for each PFS individually.  Make sure
  you have a viable backup before newfsing anything.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>, Jan Lentfer <Jan.Lentfer@web.de>
4 years agoath - Fix module loading.
Antonio Huete Jimenez [Sun, 18 Apr 2010 22:44:54 +0000 (00:44 +0200)]
ath - Fix module loading.

This registers the modules ath_hal and ath_rate,
so they are properly handled.
Both are now a dependency for if_ath to provide
automatic loading upon if_ath load.
Also 'if_ath_load=YES' on /boot/loader.conf is
fixed with this commit.

4 years agox86_64 - Sync wlan options with GENERIC
Antonio Huete Jimenez [Sun, 18 Apr 2010 22:39:34 +0000 (00:39 +0200)]
x86_64 - Sync wlan options with GENERIC

4 years agoips - Mark queue_lock as LK_CANRECURSE
YONETANI Tomokazu [Sun, 18 Apr 2010 02:59:11 +0000 (11:59 +0900)]
ips - Mark queue_lock as LK_CANRECURSE

Originally queue_lock was an LWKT reader-writer locks, which permitted
multiple locks by the same thread, and in fact there are few code paths
where such multiple locking is used.  Doing the similar thing with lockmgr
lock without either LK_NOWAIT or LK_CANRECURSE triggers a panic.

4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 17 Apr 2010 18:16:31 +0000 (11:16 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agoHAMMER VFS - Fix assertion panic related to record flush state
Matthew Dillon [Sat, 17 Apr 2010 18:12:02 +0000 (11:12 -0700)]
HAMMER VFS - Fix assertion panic related to record flush state

* This assertion can occur under certain circumstances if a rename
  operation moves a file or directory to a parent directory, due to
  a circular loop in the dependency chain.

* Fix the problem by allowing the case.

Reported-by: Sascha Wildner, Alex Hornung, Venkatesh Srinivas, others
4 years agoFix LINT kernel build.
Alexander Polakov [Sat, 17 Apr 2010 16:31:49 +0000 (20:31 +0400)]
Fix LINT kernel build.

4 years agoConnect mptutil(8) to the build.
Alexander Polakov [Fri, 16 Apr 2010 20:57:50 +0000 (00:57 +0400)]
Connect mptutil(8) to the build.

4 years agomptutil(8): fix build on DragonFly
Alexander Polakov [Fri, 16 Apr 2010 20:54:03 +0000 (00:54 +0400)]
mptutil(8): fix build on DragonFly

 * fix header paths
 * define SPECNAMELEN
 * use scsci_read_capacity_data_16 for scsi_read_capacity_data_long

4 years agoImport mptutil(8) from FreeBSD unmodified.
Alexander Polakov [Fri, 16 Apr 2010 20:41:22 +0000 (00:41 +0400)]
Import mptutil(8) from FreeBSD unmodified.

4 years agosound: implement OSS_GETVERSION.
Alexander Polakov [Fri, 2 Apr 2010 20:23:00 +0000 (00:23 +0400)]
sound: implement OSS_GETVERSION.

 It's required by some software, emulators/qemu to mention.

 Obtained-from: FreeBSD

4 years agodsched_fq - Overhaul locking
Alex Hornung [Sat, 17 Apr 2010 09:51:27 +0000 (09:51 +0000)]
dsched_fq - Overhaul locking

* use lockmgr lock for FQP lock, as some strategy ops can sleep while
  acquiring another lock (CAM SIM lock, for example).

* reduce overall locking when it isn't really required, mainly during
  deallocation (losing last ref) of objects. The locking is only
  explicitly required to protect the internal TAILQs.

* NOTE: this is an _attempt_ to fix some unidentified deadlocks that have
  been reported occasionally. While it shouldn't happen, be aware that
  this might explode.

Reported-by: Antonio Huete, Jan Lentfer
4 years agoFix ACPI global lock acquisition in x86_64.
Sascha Wildner [Sat, 17 Apr 2010 10:43:24 +0000 (13:43 +0300)]
Fix ACPI global lock acquisition in x86_64.

This fixes a number of grave issues on my Sony VAIO VGN-Z51XG, such as
messages about not being able to acquire the global lock, freezes when
ACPI was fully enabled and a panic at shutdown.

BTW, gcc had been warning us about it for a long time. :)

In-collaboration-with: aggelos

4 years agodsched - Correct some length modifiers to fix buildkernel for x86_64. v2.7.1
Antonio Huete Jimenez [Fri, 16 Apr 2010 23:16:31 +0000 (16:16 -0700)]
dsched - Correct some length modifiers to fix buildkernel for x86_64.

4 years agoAdd more __printflike()'s and fix resulting fallout.
Sascha Wildner [Fri, 16 Apr 2010 14:26:21 +0000 (16:26 +0200)]
Add more __printflike()'s and fix resulting fallout.

4 years agoMove memmove(), strcasecmp() and strncasecmp() in !defined(KERNEL_VIRTUAL).
Sascha Wildner [Fri, 16 Apr 2010 14:26:07 +0000 (16:26 +0200)]
Move memmove(), strcasecmp() and strncasecmp() in !defined(KERNEL_VIRTUAL).

This fixes the VKERNEL build.

4 years agoifconfig(1) - fix autoloading of kernel module
YONETANI Tomokazu [Fri, 16 Apr 2010 12:02:47 +0000 (21:02 +0900)]
ifconfig(1) - fix autoloading of kernel module

4 years agommc(4): Remove two unneeded .PATH lines in the Makefiles.
Sascha Wildner [Fri, 16 Apr 2010 12:21:08 +0000 (14:21 +0200)]
mmc(4): Remove two unneeded .PATH lines in the Makefiles.

4 years agoAdd a condvar(9) manual page (based on FreeBSD's).
Sascha Wildner [Fri, 16 Apr 2010 08:37:33 +0000 (10:37 +0200)]
Add a condvar(9) manual page (based on FreeBSD's).

Submitted-by: Venkatesh Srinivas <me@endeavour.zapto.org>
4 years agoBring in FreeBSD's MMC (MultiMediaCard) stack.
Sascha Wildner [Fri, 16 Apr 2010 07:57:29 +0000 (09:57 +0200)]
Bring in FreeBSD's MMC (MultiMediaCard) stack.

mmc(4)   - The MMC bus
sdhci(4) - Host controller driver
mmcsd(4) - Memory card disk device driver

SD, SDHC and MMC cards should be supported (tested with an SDHC card).

4 years ago<sys/kthread.h>: Add some __printflike()'s.
Sascha Wildner [Fri, 16 Apr 2010 07:07:30 +0000 (09:07 +0200)]
<sys/kthread.h>: Add some __printflike()'s.

This guards against wrong conversion from FreeBSD's kthread_create()
which takes two additional parameters.

Fix the resulting fallout in kern_sensors.c

4 years agodsched: Fix x86_64 buildkernel.
Sascha Wildner [Fri, 16 Apr 2010 06:21:51 +0000 (08:21 +0200)]
dsched: Fix x86_64 buildkernel.

4 years agoHAMMER Util - Add 'checkmap', adjust hammer show
Matthew Dillon [Fri, 16 Apr 2010 03:41:18 +0000 (20:41 -0700)]
HAMMER Util - Add 'checkmap', adjust hammer show

* Add a checkmap function which scans the B-Tree, collects byte usage,
  and checks it against the blockmap.  This is still experimental.

* Adjust hammer show to flag zone mismatches instead of asserting.

4 years agodsched - Change loader policy tunables (again)
Alex Hornung [Thu, 15 Apr 2010 22:20:03 +0000 (22:20 +0000)]
dsched - Change loader policy tunables (again)

* Change them to follow the standard, dotted, format. Now the three
  types are:
    - kern.dsched.policy.da0
    - kern.dsched.policy.da
    - kern.dsched.policy.default

Suggested-by: Sascha Wildner
4 years agodsched_fq - bump minor version
Alex Hornung [Wed, 14 Apr 2010 18:11:26 +0000 (18:11 +0000)]
dsched_fq - bump minor version

4 years agodsched_fq - Remove stale comment
Alex Hornung [Wed, 14 Apr 2010 18:05:52 +0000 (18:05 +0000)]
dsched_fq - Remove stale comment

* Remove a useless comment

4 years agodsched - change loader tunables
Alex Hornung [Tue, 13 Apr 2010 18:49:24 +0000 (18:49 +0000)]
dsched - change loader tunables

* Change loader tunables to dsched_pol avoiding the '*' character as it
  isn't supported by the loader.

Reported-by: Petr Janda
4 years agodsched_fq - Avoid a rare div by 0
Alex Hornung [Tue, 13 Apr 2010 18:47:51 +0000 (18:47 +0000)]
dsched_fq - Avoid a rare div by 0

* Avoid a rare division by 0 when calculating how busy the disk has
  been. It seems that sometimes the total disk time is 0, so when this
  happens, just assume that at least 1 us has passed.

4 years agodsched_fq - Refactor fqp allocation/destruction
Alex Hornung [Tue, 13 Apr 2010 07:15:10 +0000 (07:15 +0000)]
dsched_fq - Refactor fqp allocation/destruction

* Accept another argument for fqp allocation which is the corresponding
  fqmp. This is internally stored for proper self-removal out of the
  fqmp list on destruction.

* This parameter is also used to link the fqp into the fqmp list
  automatically on creation, avoiding code duplication and deadlocking.

* Changed the destruction refcount to -0x400 instead of -3 to make
  tracking of these cases simpler and not confuse them with bad
  refcounting.

* NOTE: this also fixes the longstanding issue of an eventual panic
  after a number of policy switches to/from fq.

Reported-by: Antonio Huete (tuxillo@)
4 years agodsched_fq - Avoid int64 overflow on total_budget
Alex Hornung [Fri, 9 Apr 2010 21:59:39 +0000 (21:59 +0000)]
dsched_fq - Avoid int64 overflow on total_budget

* Avoid an int64 overflow when calculating the total disk budget by
  losing bits of precision if needed.

* Note that this might not quite fix the issue yet, as there is one
  other place where the int64 overflow can happen, although it is less
  likely.

* While here, make the rebalancing happen every 0.5s instead of every
  1s, effectively reducing the chance of int64 overflows.

Reported-by: Antonio Huete (tuxillo@)
4 years agodsched_fq - Fix some issues, sprinkle some asserts
Alex Hornung [Fri, 9 Apr 2010 17:52:23 +0000 (17:52 +0000)]
dsched_fq - Fix some issues, sprinkle some asserts

* Add some strategic KKASSERT to catch negative values where they aren't
  allowed.

* Avoid certain race conditions by using a local variable instead of
  using the generally accessible one (budget vs dpriv->budgetpb). Only
  set the final value once we are ready.

4 years agodsched_fq - decentralize balancing code
Alex Hornung [Thu, 1 Apr 2010 11:34:36 +0000 (11:34 +0000)]
dsched_fq - decentralize balancing code

* Move the balancing code out of the fq_balance_thread into
  fq_balance_Self, which should be called from dispatchers.

* This essentially offloads the heavy processing onto (mostly) the
  processes/threads that do the I/O themselves.

4 years agodsched_fq - Refactor fq_balance_thread
Alex Hornung [Thu, 1 Apr 2010 08:40:50 +0000 (08:40 +0000)]
dsched_fq - Refactor fq_balance_thread

* Refactor fq_balance_thread to be an LWKT instead of callout.

* Also make sure fqp->transactions, fqp->avg_latency don't change while
  we use them.

4 years agodsched_fq - Finalize switch to new disk-busy calc
Alex Hornung [Thu, 1 Apr 2010 02:09:59 +0000 (02:09 +0000)]
dsched_fq - Finalize switch to new disk-busy calc

* Don't take the time since the last balancing run as a fixed value,
  instead calculate it.

* Remove extraneous craft that suggested a disk is only busy if it also
  has many incomplete requests.

4 years agodsched_fq - Refactor and clean; handle flushes
Alex Hornung [Thu, 1 Apr 2010 01:09:59 +0000 (01:09 +0000)]
dsched_fq - Refactor and clean; handle flushes

* Factor out an fq_drain which will either cancel or dispatch all the
  bios we have currently in all our fqp queues.

* Clean out old comments and code.

* Deal with flushes by not queuing them but rather letting dsched handle
  them. By returning EINVAL, dsched_queue will dispatch the flush
  itself.

4 years agoprint_backtrace - Take parameter count
Alex Hornung [Wed, 31 Mar 2010 10:44:25 +0000 (10:44 +0000)]
print_backtrace - Take parameter count

* Modify print_backtrace to take a parameter 'count' that specifies the
  maximum number of frames to print for the backtrace.

* Change all current consumers to use the new print_backtrace with count
  -1, resulting in the same behaviour as before this change.

* Remove cruft in dsched_fq that simulated this behaviour previously.

4 years agodsched_fq - properly drain all queues on teardown
Alex Hornung [Wed, 31 Mar 2010 10:19:38 +0000 (10:19 +0000)]
dsched_fq - properly drain all queues on teardown

* Properly drain all fqp queues on teardown to ensure that no bios and
  especially fqps are left dangling around.

* This should fix the occasional panic during policy switches.

4 years agodsched_fq - minor cleanup and fix
Alex Hornung [Wed, 31 Mar 2010 09:58:07 +0000 (09:58 +0000)]
dsched_fq - minor cleanup and fix

* Previously, wakes didn't correctly set the local idle bit in
  fq_dispatcher. Fix this by moving it into the right place.

* Remove old code, replace comments, remove level of indentation.

4 years agodsched_fq - Improve performance, reduce idle time
Alex Hornung [Wed, 31 Mar 2010 01:11:29 +0000 (01:11 +0000)]
dsched_fq - Improve performance, reduce idle time

* Boost performance by dynamically adapting the rate limit on throttled
  threads if the disk becomes idle. This will ensure that the disk is
  always > 90% used if there are requests queued.

4 years agodsched_fq - Improve disk busy-% calculation
Alex Hornung [Tue, 30 Mar 2010 13:46:01 +0000 (13:46 +0000)]
dsched_fq - Improve disk busy-% calculation

* Use the disk idle time to account for disk business instead of the
  number of in-flight requests.

Suggested-by: Simon "corecode" Schubert
4 years agodsched - Implement priorities and other improvements
Alex Hornung [Tue, 30 Mar 2010 02:18:32 +0000 (02:18 +0000)]
dsched - Implement priorities and other improvements

* Implemented fq priority support. This also includes the userland tool
  ionice.

* Implement an exit_buffer hook to be able to clean up bufs before they
  are reused.

* Some minor performance improvements in fq.

4 years agodsched - Add the FQ policy
Alex Hornung [Thu, 25 Feb 2010 08:55:55 +0000 (08:55 +0000)]
dsched - Add the FQ policy

* Add the FQ (fair queueing) policy for the dsched I/O scheduler
  framework.

* Right now, this is at best experimental; it only starts rate limiting
  when the disk is busy. Each process is allocated an equal fair amount
  of disk time, based on the average request latency and tps.
  If the disk is busy and one process exceeeds its fair share, its bios
  are queued for later dispatch.
  To avoid starvation of heavy write processes, heavy writes are
  interleaved once every 3 scheduler rebalances. The scheduler rebalance
  time is currently set to 1s, so that exceeding processes will be
  limited after this period.

* While I've done some limited testing on switching policies at runtime
  and even under heavy I/O going on, it is not recommended to do this,
  as some problems will crop up.

* Future work to do:
- stabilization pass
- adding bucket support (i.e. having different priority buckets
  for groups of processes, so that for example processes A,B and
  C get a total aggregate of 80% disk time, while processes D
  and E get a total aggregate of 20%, instead of each process
  getting 20%)
- adding an "ionice" userland tool to allow to change the
  bucket/priority of a process

4 years agodsched - Tie the dsched framework into the system
Alex Hornung [Thu, 25 Feb 2010 08:54:32 +0000 (08:54 +0000)]
dsched - Tie the dsched framework into the system

* tie the dsched framework into the system by binding it into the build,
  adding all the necessary hooks and other calls.

4 years agodsched - import the I/O scheduler framework dsched
Alex Hornung [Thu, 25 Feb 2010 08:53:01 +0000 (08:53 +0000)]
dsched - import the I/O scheduler framework dsched

* Import my branch of the I/O scheduler framework. This commit only
  introduces the core dsched framework, without binding it into the
  system and without any policy except for the default one.

4 years agoif_ath - Properly remove sysctls on detach.
Antonio Huete Jimenez [Thu, 15 Apr 2010 17:37:19 +0000 (19:37 +0200)]
if_ath - Properly remove sysctls on detach.

Submitted-by: Johannes Hofmann <johannes.hofmann@gmx.de>
4 years agosystem boot - Fix savecore when swapdev != dumpdev
Matthew Dillon [Thu, 15 Apr 2010 17:36:40 +0000 (10:36 -0700)]
system boot - Fix savecore when swapdev != dumpdev

* Specify the dumpdev on the savecore line.  Fixed issues when the swapdev
  is not the same as the dumpdev.

Reported-by: Alexander Polakov <polachok@gmail.com>
4 years ago<sys/buf2.h>: Add bioq_takefirst() from FreeBSD for easier driver porting.
Sascha Wildner [Thu, 15 Apr 2010 15:44:22 +0000 (17:44 +0200)]
<sys/buf2.h>: Add bioq_takefirst() from FreeBSD for easier driver porting.

4 years agoRemove the inclusion of <machine/bus_at386.h> from some WLAN drivers.
Sascha Wildner [Thu, 15 Apr 2010 15:37:49 +0000 (17:37 +0200)]
Remove the inclusion of <machine/bus_at386.h> from some WLAN drivers.

This file exists only on i386. Including it is not needed at all since
<sys/bus.h> on i386 already brings it in (via <machine/bus_dma.h>) and
also does the right thing in x86_64.

This fixes module building on x86_64.

4 years agoMerge remote branch 'rpaulo/net80211-update'
Matthew Dillon [Wed, 14 Apr 2010 15:30:28 +0000 (08:30 -0700)]
Merge remote branch 'rpaulo/net80211-update'

4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 14 Apr 2010 15:30:15 +0000 (08:30 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agoFix build with DIAGNOSTIC.
Rui Paulo [Wed, 14 Apr 2010 11:40:21 +0000 (12:40 +0100)]
Fix build with DIAGNOSTIC.

4 years agoUpdate to new if_clone API.
Rui Paulo [Wed, 14 Apr 2010 11:38:03 +0000 (12:38 +0100)]
Update to new if_clone API.

4 years agoFix kernel build.
Rui Paulo [Wed, 14 Apr 2010 11:37:48 +0000 (12:37 +0100)]
Fix kernel build.

4 years agoFix build.
Rui Paulo [Wed, 14 Apr 2010 11:37:27 +0000 (12:37 +0100)]
Fix build.

4 years agoDisable not yet ported drivers.
Rui Paulo [Wed, 14 Apr 2010 11:37:04 +0000 (12:37 +0100)]
Disable not yet ported drivers.

4 years agoFix wlan_acl and replace kern_firmware with subr_firmware.
Rui Paulo [Wed, 14 Apr 2010 11:36:39 +0000 (12:36 +0100)]
Fix wlan_acl and replace kern_firmware with subr_firmware.

4 years agoRemove references to ether_snprintf.
Rui Paulo [Wed, 14 Apr 2010 11:35:49 +0000 (12:35 +0100)]
Remove references to ether_snprintf.

4 years agolibc - Return ENOSYS in both mlockall() / munlockall()
Antonio Huete Jimenez [Tue, 13 Apr 2010 09:57:51 +0000 (11:57 +0200)]
libc - Return ENOSYS in both mlockall() / munlockall()

Submitted-by: Venkatesh Srinivas <me@endeavour.zapto.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1712>

4 years agoHAMMER VFS - Fix hammer lock assertion panic when REDO recovery fails
Matthew Dillon [Wed, 14 Apr 2010 04:27:49 +0000 (21:27 -0700)]
HAMMER VFS - Fix hammer lock assertion panic when REDO recovery fails

* REDO recovery failed to release a buffer in its error path, resulting
  in a panic later on.  This patch adds the proper release.

Reported-by: Venkatesh Srinivas <me@acm.jhu.edu>
4 years agoClean up some remains from the gcc2 days.
Sascha Wildner [Wed, 14 Apr 2010 00:07:41 +0000 (02:07 +0200)]
Clean up some remains from the gcc2 days.

In gcc2, we kept __FreeBSD__ as a compiler built-in. Starting with gcc3,
we only define __DragonFly__.

* Remove the general definition of __FreeBSD_version from <sys/param.h>
  and <osreldate.h>. However, ipftest(1) and ipsend(1) still need it, so
  define it from their Makefiles.

* Remove the definition of __FreeBSD__ from the Makefiles of ipmon(8)
  and openssl(1), both of which don't need this anymore.

4 years agoMerge remote branch 'rpaulo/net80211-update'
Matthew Dillon [Tue, 13 Apr 2010 19:59:50 +0000 (12:59 -0700)]
Merge remote branch 'rpaulo/net80211-update'

4 years agoAdd AH_SUPPORT_AR5416 always.
Rui Paulo [Tue, 13 Apr 2010 19:49:57 +0000 (20:49 +0100)]
Add AH_SUPPORT_AR5416 always.

4 years agoDisable ndis for now.
Rui Paulo [Tue, 13 Apr 2010 19:49:32 +0000 (20:49 +0100)]
Disable ndis for now.

4 years agoFix for new net80211 options
Rui Paulo [Tue, 13 Apr 2010 19:49:08 +0000 (20:49 +0100)]
Fix for new net80211 options

4 years agoMerge remote branch 'crater/master' into net80211-update
Matthew Dillon [Tue, 13 Apr 2010 19:11:08 +0000 (12:11 -0700)]
Merge remote branch 'crater/master' into net80211-update

4 years agoUpdate for new ratectl.
Rui Paulo [Tue, 13 Apr 2010 18:38:09 +0000 (19:38 +0100)]
Update for new ratectl.

4 years agoMerge branch 'master' into net80211-update
Rui Paulo [Tue, 13 Apr 2010 18:34:34 +0000 (19:34 +0100)]
Merge branch 'master' into net80211-update

4 years agonata - Drop pending requests on dump
Alex Hornung [Tue, 13 Apr 2010 16:32:08 +0000 (16:32 +0000)]
nata - Drop pending requests on dump

* Drop all pending requests in the ata queue when we are about to dump.

* This should solve issues that have been appearing lately causing a
  TAILQ_NEXT panic on dumps with nata under heavy I/O.

Reported-by: Jan Lentfer (lentferj@), Antonio Huete (tuxillo@)
Obtained-from: FreeBSD

4 years agoata - Fix dumping of old ata driver
Alex Hornung [Tue, 13 Apr 2010 16:29:47 +0000 (16:29 +0000)]
ata - Fix dumping of old ata driver

* While we still have ata(4) around, make addump work properly again
  with the new dumping infrastructure.

4 years agoFix i386 buildworld.
Sascha Wildner [Tue, 13 Apr 2010 06:38:19 +0000 (08:38 +0200)]
Fix i386 buildworld.

4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 12 Apr 2010 17:15:51 +0000 (10:15 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agoMerge branch 'net80211-update' of git://leaf.dragonflybsd.org/~rpaulo/dragonfly into...
Matthew Dillon [Mon, 12 Apr 2010 16:45:53 +0000 (09:45 -0700)]
Merge branch 'net80211-update' of git://leaf.dragonflybsd.org/~rpaulo/dragonfly into net80211-update

4 years agosleep.9: Document mtxsleep() and tsleep_interlock().
Sascha Wildner [Mon, 12 Apr 2010 00:35:32 +0000 (02:35 +0200)]
sleep.9: Document mtxsleep() and tsleep_interlock().

Also, update HISTORY a bit.

Submitted-by: Venkatesh Srinivas <me@endeavour.zapto.org>
4 years agoFix LINT build.
Sascha Wildner [Sat, 10 Apr 2010 22:17:32 +0000 (00:17 +0200)]
Fix LINT build.

4 years agoAdd -Wold-style-definition to WARNS >= 3 and fix the resulting fallout.
Sascha Wildner [Sat, 10 Apr 2010 20:41:24 +0000 (22:41 +0200)]
Add -Wold-style-definition to WARNS >= 3 and fix the resulting fallout.

* Ansify a function in mount_smbfs(8).

* Lower the WARNS of some contrib/ stuff from 3 to 2.

4 years agoIn man9 manual pages, add some references to where the code is.
Sascha Wildner [Sat, 10 Apr 2010 17:24:49 +0000 (19:24 +0200)]
In man9 manual pages, add some references to where the code is.

Submitted-by: Venkatesh Srinivas <me@endeavour.zapto.org>
4 years agoACPI: Don't unlock in lock's error path
Stathis Kamperis [Sat, 10 Apr 2010 15:56:28 +0000 (18:56 +0300)]
ACPI: Don't unlock in lock's error path

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

Submitted-by: Edward O'Callaghan
4 years agoACPI - disable ACPIIO_ACKSLPSTATE
YONETANI Tomokazu [Sat, 10 Apr 2010 07:24:28 +0000 (16:24 +0900)]
ACPI - disable ACPIIO_ACKSLPSTATE

It's incomplete and an undocumented option in acpiconf can trigger
a kernel panic (only as root, though).

4 years agomount_portal(8): Raise WARNS to 6.
Sascha Wildner [Sat, 10 Apr 2010 08:10:49 +0000 (10:10 +0200)]
mount_portal(8): Raise WARNS to 6.

4 years agomount_nwfs(8): Raise WARNS to 6.
Sascha Wildner [Sat, 10 Apr 2010 07:06:08 +0000 (09:06 +0200)]
mount_nwfs(8): Raise WARNS to 6.

4 years agoConstify ncp_error()'s fmt argument.
Sascha Wildner [Sat, 10 Apr 2010 07:05:33 +0000 (09:05 +0200)]
Constify ncp_error()'s fmt argument.

4 years agosysctl(8): Raise WARNS to 6.
Sascha Wildner [Sat, 10 Apr 2010 06:38:14 +0000 (08:38 +0200)]
sysctl(8): Raise WARNS to 6.

4 years agoInstall the boot(8) manual page too during 64 bit install.
Sascha Wildner [Sat, 10 Apr 2010 06:09:06 +0000 (08:09 +0200)]
Install the boot(8) manual page too during 64 bit install.

4 years agomalloc.3: Remove some phkmalloc specific info in the HISTORY section.
Sascha Wildner [Sat, 10 Apr 2010 05:18:04 +0000 (07:18 +0200)]
malloc.3: Remove some phkmalloc specific info in the HISTORY section.

Reported-by: Venkatesh Srinivas <me@endeavour.zapto.org>
4 years agowindow(1): Perform NULL check before strcmp() rather than after.
YONETANI Tomokazu [Sat, 10 Apr 2010 01:47:16 +0000 (10:47 +0900)]
window(1): Perform NULL check before strcmp() rather than after.

Fixes segfault upon TERM=cons25.

4 years agosili.4: Mention support for both versions of 3124 chips.
Jan Lentfer [Fri, 9 Apr 2010 18:39:48 +0000 (20:39 +0200)]
sili.4: Mention support for both versions of 3124 chips.

4 years agolinux emu - Refactor open code
Alex Hornung [Fri, 9 Apr 2010 07:24:53 +0000 (07:24 +0000)]
linux emu - Refactor open code

* Factor out a linux_open_common that both open() and openat() use.

* While here, also use CACHE_*MPLOCK*, as is done in vfs_syscalls.c.

4 years agolinux emu - support O_DIRECTORY for open syscall
Alex Hornung [Fri, 9 Apr 2010 06:49:06 +0000 (06:49 +0000)]
linux emu - support O_DIRECTORY for open syscall

* Linux opendir seems to rely on O_DIRECTORY to avoid certain race
  conditions, so introduce O_DIRECTORY support which just returns
  ENOTDIR even if the open is successful, if the opened path is not a
  directory.

* This fixes Ant's directory scanner.

Submitted-by: Johannes Hofmann
4 years agowindow(1): Remove __RCSID & friends.
Sascha Wildner [Fri, 9 Apr 2010 05:38:27 +0000 (07:38 +0200)]
window(1): Remove __RCSID & friends.

4 years agorcorder(8): Remove __RCSID & friends.
Sascha Wildner [Fri, 9 Apr 2010 04:36:05 +0000 (06:36 +0200)]
rcorder(8): Remove __RCSID & friends.

4 years agohotplugd(8): We have __dead2 for __attribute__((__noreturn__)).
Sascha Wildner [Thu, 8 Apr 2010 21:34:12 +0000 (23:34 +0200)]
hotplugd(8): We have __dead2 for __attribute__((__noreturn__)).

Why? Don't ask me.

4 years agohotplugd(8): Raise WARNS to 6.
Sascha Wildner [Thu, 8 Apr 2010 21:25:52 +0000 (23:25 +0200)]
hotplugd(8): Raise WARNS to 6.

4 years agolook(1): Fix my previous commit.
Sascha Wildner [Thu, 8 Apr 2010 14:17:05 +0000 (16:17 +0200)]
look(1): Fix my previous commit.

I broke i386 behavior. Instead, take a nicer fix from NetBSD.

4 years agonrelease: Remove LiveDVD specific kernel configs and loader menu.
Sascha Wildner [Thu, 8 Apr 2010 13:36:51 +0000 (15:36 +0200)]
nrelease: Remove LiveDVD specific kernel configs and loader menu.

These were introduced in order to also offer SMP kernels (with and
without APIC_IO) from the LiveDVD. But we don't want to maintain 4
extra kernel configs just for that purpose, especially since we
have x86_64 support now which would require introducing even more
configs. The whole concept has to be re-thought.

So until we come up with a better solution, get rid of it and go
with the usual GENERIC/VKERNEL (X86_64_GENERIC/VKERNEL64 on
x86_64) combination just like we do for the LiveCD.

4 years agoFix look(1) on x86_64.
Sascha Wildner [Thu, 8 Apr 2010 13:09:21 +0000 (15:09 +0200)]
Fix look(1) on x86_64.

SIZE_T_MAX, being ULONG_MAX, was -1 when cast to off_t (int64_t).

Reported-by: Urmas Reinsalu <urki@klaasikoda.ee>
4 years agos/firmware.h/fbsd_firmware.h/
Rui Paulo [Thu, 8 Apr 2010 12:50:44 +0000 (13:50 +0100)]
s/firmware.h/fbsd_firmware.h/

4 years agofirmware - Import FreeBSD's firmware API.
Joe Talbott [Wed, 31 Mar 2010 23:39:44 +0000 (19:39 -0400)]
firmware - Import FreeBSD's firmware API.

This should be considered experimental.  When porting code from
FreeBSD instances of #include <sys/firmware.h> should be converted
to #include <sys/fbsd_firmware.h>.  I have also taken out some of
the firmware file locking code.

4 years agoupdate
Rui Paulo [Thu, 8 Apr 2010 12:46:40 +0000 (13:46 +0100)]
update