]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoBack out r205134. It is not stable.
pjd [Tue, 11 May 2010 15:32:21 +0000 (15:32 +0000)]
Back out r205134. It is not stable.

MFC after: 3 days

14 years agoFix failed assertion on destroying datasets from an older pool version.
mm [Tue, 11 May 2010 09:26:46 +0000 (09:26 +0000)]
Fix failed assertion on destroying datasets from an older pool version.

OpenSolaris onnv revision: 9390:887948510f80

PR: kern/146471
Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6826861)
MFC after: 3 days

14 years agoFix possible panic with zfs destroy.
mm [Tue, 11 May 2010 09:23:46 +0000 (09:23 +0000)]
Fix possible panic with zfs destroy.

OpenSolaris onnv revision: 8779:f164e0e90508

PR: kern/146471
Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6784924)
MFC after: 3 days

14 years agoFix zfs rename (may occasionally fail with dataset busy).
mm [Tue, 11 May 2010 09:19:41 +0000 (09:19 +0000)]
Fix zfs rename (may occasionally fail with dataset busy).

OpenSolaris onnv revision: 8517:41a0783dde17

PR: kern/146471
Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6784757)
MFC after: 3 days

14 years agoFix endianess bug in ZFS intent log (ZIL).
mm [Tue, 11 May 2010 07:25:13 +0000 (07:25 +0000)]
Fix endianess bug in ZFS intent log (ZIL).

OpenSolaris onnv revision: 8109:6147a1bdd359

Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6760048)
MFC after: 3 days

14 years agoUpdate synchronization annotations for struct vm_page. Add a comment
alc [Tue, 11 May 2010 01:29:18 +0000 (01:29 +0000)]
Update synchronization annotations for struct vm_page.  Add a comment
explaining how the setting of PG_WRITEABLE is synchronized.

14 years agoboot time size the flowtable
kmacy [Mon, 10 May 2010 21:31:20 +0000 (21:31 +0000)]
boot time size the flowtable

MFC after: 3 days

14 years agoMFV of tzdata2010j, r207896
edwin [Mon, 10 May 2010 21:02:16 +0000 (21:02 +0000)]
MFV of tzdata2010j, r207896

- Bahia de Banderas (Mexican state of Nayarit) changed time zone
  UTC-7 to new time zone UTC-6 on April 4, 2010 (to share the same
  time zone as nearby city Puerto Vallarta, Jalisco).

Obtained from: ftp://elsie.nci.nih.gov/pub/

14 years agoInclude <machine/ofw_machdep.h> for OF_getscsinitid().
marius [Mon, 10 May 2010 20:02:39 +0000 (20:02 +0000)]
Include <machine/ofw_machdep.h> for OF_getscsinitid().

14 years ago- Don't return EAGAIN from gv_unload(). It was used to work around the
jh [Mon, 10 May 2010 19:12:23 +0000 (19:12 +0000)]
- Don't return EAGAIN from gv_unload(). It was used to work around the
  deadlock fixed in r207671.
- Wait for worker process to exit at class unload. The worker process
  was not guaranteed to exit before the linker unloaded the module.
- Use 0 as the worker process exit status instead of ENXIO and style
  the NOTREACHED comment.

Reviewed by: lulf
X-MFC after: r207671

14 years agoIn g_zero_destroy_geom(), return 0 instead of EBUSY in the success case.
jh [Mon, 10 May 2010 19:08:53 +0000 (19:08 +0000)]
In g_zero_destroy_geom(), return 0 instead of EBUSY in the success case.
EBUSY was probably used as a workaround for the deadlock fixed in r207671.

Approved by: pjd
X-MFC after: r207671

14 years agoFormatting nit
imp [Mon, 10 May 2010 18:23:00 +0000 (18:23 +0000)]
Formatting nit

14 years agoNow sge(4) supports TCP segmentation offload (TSO).
yongari [Mon, 10 May 2010 17:48:00 +0000 (17:48 +0000)]
Now sge(4) supports TCP segmentation offload (TSO).

14 years agoSiS190 supports RX 10 bytes padding, CRC stripping as well as VLAN
yongari [Mon, 10 May 2010 17:35:17 +0000 (17:35 +0000)]
SiS190 supports RX 10 bytes padding, CRC stripping as well as VLAN
hardware tag insertion/stripping. Remove conditional code that
disables these hardware features on SiS190. Also nuke RX fixup code
which is no more required on strict-alignment architectures because
SiS190 supports RX 10 bytes padding.
Now all hardware features except jumbo frame and WOL are supported.
Thanks to Masa Murayama who confirmed SiS190 also has the same
hardware features of SiS191.
I guess the only difference between SiS191 and SiS190 would be
jumbo frame support. It will be implemented in near future.

14 years agoImplement TSO and TSO over VLAN. Increase number of allowed
yongari [Mon, 10 May 2010 17:14:14 +0000 (17:14 +0000)]
Implement TSO and TSO over VLAN. Increase number of allowed
fragmentation of mbuf chain to 32 from 16 because TSO can send 64KB
sized packet which in turn requires long list of mbuf chain. Due to
lack of documentation, I'm not sure whether driver have to pull up
ethernet/IP/TCP header with options to make controller work but
driver have to parse TCP header to update pseudo TCP checksum
anyway. The controller expects pseudo TCP checksum computed by
upper stack and the checksum should follow the MS NDIS
specification to make TSO work.

Tested by: xclin <xclin <> cs dot nctu dot edu dot tw >

14 years agoEnable liblzma support in libarchive
mm [Mon, 10 May 2010 15:28:44 +0000 (15:28 +0000)]
Enable liblzma support in libarchive
Adjust dependencies for programs using libarchive
Add xz and linkage against liblzma to rescue system

Approved by: kientzle, delphij (mentor)
MFC after: 2 weeks

14 years agoThe thread_unsuspend() requires both process mutex and process spinlock
kib [Mon, 10 May 2010 15:19:12 +0000 (15:19 +0000)]
The thread_unsuspend() requires both process mutex and process spinlock
locked. Postpone the process unlock till the thread_unsuspend() is called.

Approved by: des (procfs maintainer)
MFC after: 1 week

14 years agoFor detach procfs ctl command, also clear P_STOPPED_TRACE process stop
kib [Mon, 10 May 2010 15:18:03 +0000 (15:18 +0000)]
For detach procfs ctl command, also clear P_STOPPED_TRACE process stop
flag, and for each thread, TDB_SUSPEND debug flag, same as it is done by
exit1() for orphaned debugee.

Approved by: des (procfs maintainer)
MFC after: 1 week

14 years agoContinue cleaning the queue instead of moving to the next queue or
kib [Mon, 10 May 2010 11:53:40 +0000 (11:53 +0000)]
Continue cleaning the queue instead of moving to the next queue or
bailing out if acquisition of page lock caused page position in the
queue to change.

Pointed out by: alc

14 years agoAdd two public headers missing in r207842
mm [Mon, 10 May 2010 07:47:31 +0000 (07:47 +0000)]
Add two public headers missing in r207842
Adjust CFLAGS for lzmainfo, xz, xzdec

Approved by: delphij (mentor)
MFC after: 2 weeks

14 years agoImport of liblzma, xz, xzdec, lzmainfo from vendor branch
mm [Mon, 10 May 2010 06:59:50 +0000 (06:59 +0000)]
Import of liblzma, xz, xzdec, lzmainfo from vendor branch
Add support for xz and lzma to lesspipe.sh (xzless, lzless)
Bump __FreeBSD_version

Approved by: delphij (mentor)
MFC after: 2 weeks

14 years agoExport hardware MAC statistics through sysctl node. Previously
yongari [Sun, 9 May 2010 22:16:15 +0000 (22:16 +0000)]
Export hardware MAC statistics through sysctl node. Previously
fxp(4) already used to extract most hardware MAC statistics but it
didn't show them. With this change, all MAC statistics counters
are exported. Because there are a couple of new counters for 82558
and 82559, enable extended MAC statistics functionality to get
these counters. Accoring to public data sheet, 82559 MAC statistics
return 24 DWORD counters(3 counters are unknown at this moment) so
increase MAC counter structure to meet the MAC statistics block size.
The completion of MAC counter dump is now checked against
FXP_STATS_DR_COMPLETE status code which is appended at the end of
status block. Previously fxp(4) ignored the status of the
FXP_SCB_COMMAND_CU_DUMPRESET command. fxp(4) does not wait for the
completion of pending command before issuing
FXP_SCB_COMMAND_CU_DUMPRESET. Instead it skips the command and try
it next time. This scheme may show better performance but there is
chance to loose updated counters after stopping controller. So make
sure to update MAC statistics in fxp_stop().
While I'm here move sysctl node creation to fxp_sysctl_node().

Tested by: Larry Baird < lab <> gta dot com >

14 years agosh(1): Fix "reserved word" vs "keyword" inconsistency.
jilles [Sun, 9 May 2010 22:03:18 +0000 (22:03 +0000)]
sh(1): Fix "reserved word" vs "keyword" inconsistency.
Use "keyword" everywhere, like the output of the 'type' builtin, and only
mention "reserved word" once to say it is the same thing.

14 years agostrptime(3) confused July with June with the fr_FR locale.
edwin [Sun, 9 May 2010 22:01:35 +0000 (22:01 +0000)]
strptime(3) confused July with June with the fr_FR locale.

When parsing the month "juillet" (abbr "jul"), %B recognized it as
"juin" (abbr "jui") because the full name of the month names is
checked at the same time as the abbrevation.

The new behaviour checks the full names first before checking the
abbrevation names.

PR: kern/141939
Submitted by: Denis Chatelain <denis@tikuts.com>
MFC after: 1 week

14 years agoVarious wording, spelling and markup fixes.
brueffer [Sun, 9 May 2010 21:34:05 +0000 (21:34 +0000)]
Various wording, spelling and markup fixes.

PR: 145251
Submitted by: Hywel Mallett <hywel@hmallett.co.uk> (partly)
MFC after: 3 week

14 years agoAdd flowtable support to IPv6
kmacy [Sun, 9 May 2010 20:32:00 +0000 (20:32 +0000)]
Add flowtable support to IPv6

Tested by: qingli@

Reviewed by: qingli@
MFC after: 3 days

14 years agoFix error in comment.
jilles [Sun, 9 May 2010 17:15:26 +0000 (17:15 +0000)]
Fix error in comment.

14 years agosh: Add some parser tests.
jilles [Sun, 9 May 2010 17:10:50 +0000 (17:10 +0000)]
sh: Add some parser tests.

case1.0 tests POSIX requirements and one more for keywords in case
statements. The others test very special cases of command substitution.

These also work on stable/8.

14 years agoPush down the acquisition of the page queues lock into vm_pageq_remove().
alc [Sun, 9 May 2010 16:55:42 +0000 (16:55 +0000)]
Push down the acquisition of the page queues lock into vm_pageq_remove().
(This eliminates a surprising number of page queues lock acquisitions by
vm_fault() because the page's queue is PQ_NONE and thus the page queues
lock is not needed to remove the page from a queue.)

14 years agoCall vm_page_deactivate() rather than vm_page_dontneed() in
alc [Sun, 9 May 2010 16:27:42 +0000 (16:27 +0000)]
Call vm_page_deactivate() rather than vm_page_dontneed() in
swp_pager_force_pagein().  By dirtying the page, swp_pager_force_pagein()
forces vm_page_dontneed() to insert the page at the head of the inactive
queue, just like vm_page_deactivate() does.  Moreover, because the page
was invalid, it can't have been mapped, and thus the other effect of
vm_page_dontneed(), clearing the page's reference bits has no effect.  In
summary, there is no reason to call vm_page_dontneed() since its effect
will be identical to calling the simpler vm_page_deactivate().

14 years agoGenerate some tests for sh's case command from the fnmatch tests.
jilles [Sun, 9 May 2010 16:15:40 +0000 (16:15 +0000)]
Generate some tests for sh's case command from the fnmatch tests.

I'm committing the generated files because I don't like a build dependency
for the sh(1) tests, and they are small and will not change much.

14 years agosh: Fix bug in assignment error test.
jilles [Sun, 9 May 2010 16:04:32 +0000 (16:04 +0000)]
sh: Fix bug in assignment error test.

The test failed if the command returned nonzero exit status, and it really
should return that.

14 years agobuiltin(1): sh has no @ builtin command.
jilles [Sun, 9 May 2010 15:00:30 +0000 (15:00 +0000)]
builtin(1): sh has no @ builtin command.

MFC after: 1 week

14 years agoDocument clock and pshared condvar attributes.
jilles [Sun, 9 May 2010 14:21:34 +0000 (14:21 +0000)]
Document clock and pshared condvar attributes.

Note: clock accepts CLOCK_VIRTUAL and CLOCK_PROF too, but this seems broken
as it simply waits for the difference of the current and given value of the
clock as if it were CLOCK_MONOTONIC. So document only CLOCK_REALTIME and
CLOCK_MONOTONIC as allowed.

MFC after: 1 week

14 years agoCatch up with libusbhid merge (rev 205728).
kaiw [Sun, 9 May 2010 09:20:25 +0000 (09:20 +0000)]
Catch up with libusbhid merge (rev 205728).

hid_get_data() now expects that the hid data passed in always contains
the report ID byte. Thus we should not skip the the report ID byte in
hid_interrupt().  Also, if HUP_KEYBOARD usage is an array, do not try
to modify the 'data' pointer, instead, increase the hid_item_t field
'pos' by 'report_size' before calling hid_get_data() during each
iteration.

PR: usb/146367
Reported and tested by: Alex Deiter
Pointy hat to:      kaiw
Reviewed by:      emax

14 years agoRemove the page queues lock around a call to vm_page_activate(). Make the
alc [Sun, 9 May 2010 00:32:52 +0000 (00:32 +0000)]
Remove the page queues lock around a call to vm_page_activate().  Make the
page dirty before adding it to the active queue.

14 years agoUpdate a comment: It no longer makes sense to talk about the page queues
alc [Sat, 8 May 2010 23:01:47 +0000 (23:01 +0000)]
Update a comment: It no longer makes sense to talk about the page queues
lock here.

14 years agoMinimize the scope of the page queues lock in vm_fault().
alc [Sat, 8 May 2010 21:35:51 +0000 (21:35 +0000)]
Minimize the scope of the page queues lock in vm_fault().

14 years agoPush down the page queues into vm_page_cache(), vm_page_try_to_cache(), and
alc [Sat, 8 May 2010 20:34:01 +0000 (20:34 +0000)]
Push down the page queues into vm_page_cache(), vm_page_try_to_cache(), and
vm_page_try_to_free().  Consequently, push down the page queues lock into
pmap_enter_quick(), pmap_page_wired_mapped(), pmap_remove_all(), and
pmap_remove_write().

Push down the page queues lock into Xen's pmap_page_is_mapped().  (I
overlooked the Xen pmap in r207702.)

Switch to a per-processor counter for the total number of pages cached.

14 years agobsdcpio 2.8.3
kientzle [Sat, 8 May 2010 16:47:33 +0000 (16:47 +0000)]
bsdcpio 2.8.3

14 years agoFreeBSD is now using bsdtar 2.8.3.
kientzle [Sat, 8 May 2010 16:29:02 +0000 (16:29 +0000)]
FreeBSD is now using bsdtar 2.8.3.

14 years agoConfig updates.
kientzle [Sat, 8 May 2010 16:28:22 +0000 (16:28 +0000)]
Config updates.

14 years ago- Remove obsolete flags.
lulf [Sat, 8 May 2010 16:19:17 +0000 (16:19 +0000)]
- Remove obsolete flags.

MFC after: 1 week

14 years agoVarious manpage updates, including many long-option synonyms that were previously...
kientzle [Sat, 8 May 2010 15:43:59 +0000 (15:43 +0000)]
Various manpage updates, including many long-option synonyms that were previously undocumented.

14 years agoFix typos in macros.
rmacklem [Sat, 8 May 2010 14:50:12 +0000 (14:50 +0000)]
Fix typos in macros.

PR: kern/146375
Submitted by: simon AT comsys.ntu-kpi.kiev.ua
MFC after: 1 week

14 years agosh: Have only one copy of _PATH_STDPATH in the binary.
jilles [Sat, 8 May 2010 14:00:01 +0000 (14:00 +0000)]
sh: Have only one copy of _PATH_STDPATH in the binary.

14 years agoAdd dummy function for ic_update_mcast (a la if_urtw) to avoid console
emaste [Sat, 8 May 2010 11:56:00 +0000 (11:56 +0000)]
Add dummy function for ic_update_mcast (a la if_urtw) to avoid console
spam.

14 years agoPatch the experimental NFS client so that it works for NFSv2
rmacklem [Sat, 8 May 2010 01:24:18 +0000 (01:24 +0000)]
Patch the experimental NFS client so that it works for NFSv2
by adding the necessary mapping from NFSv3 procedure numbers
to NFSv2 procedure numbers when doing NFSv2 RPCs.

MFC after: 1 week

14 years agoDon't change PCIe maximum read request size to 2048 on RTL810x
yongari [Fri, 7 May 2010 23:05:27 +0000 (23:05 +0000)]
Don't change PCIe maximum read request size to 2048 on RTL810x
controllers. It caused device timeouts.

Reported by: McLone < mclone <> gmail dot com >
Tested by: McLone < mclone <> gmail dot com >
MFC after: 5 days

14 years agoAdd a fastpath to allocate from packet zone when using m_getjcl.
fabient [Fri, 7 May 2010 22:09:17 +0000 (22:09 +0000)]
Add a fastpath to allocate from packet zone when using m_getjcl.
This will add support for packet zone for at least igb and ixgbe
and will avoid to check for that in bce and mxge.

MFC after: 1 week

14 years agoFix a typo in the previous commit.
jkim [Fri, 7 May 2010 21:06:52 +0000 (21:06 +0000)]
Fix a typo in the previous commit.

14 years agosigprocmask(2): pthread_sigmask(3) must be used in threaded processes.
jilles [Fri, 7 May 2010 20:46:22 +0000 (20:46 +0000)]
sigprocmask(2): pthread_sigmask(3) must be used in threaded processes.
Although libthr's pthread_sigmask() just calls sigprocmask() and this is
unlikely to change, mention this POSIX requirement on applications.

MFC after: 1 week

14 years agoRework the calltree top view by critical callchain.
fabient [Fri, 7 May 2010 19:48:50 +0000 (19:48 +0000)]
Rework the calltree top view by critical callchain.
The percentage show is the sum of the cost for the codepath.

MFC after: 1 week

14 years agoVendor import of xz (stripped)
mm [Fri, 7 May 2010 18:59:06 +0000 (18:59 +0000)]
Vendor import of xz (stripped)
Git revision: a290cfee3e23f046889c022aa96b4eca2016fdda

Approved by: delphij (mentor)

14 years agoOne more use for vm_pageout_init_marker().
kib [Fri, 7 May 2010 18:57:26 +0000 (18:57 +0000)]
One more use for vm_pageout_init_marker().

Reviewed by: alc

14 years ago8255x configure command requires number of bytes of configuration
yongari [Fri, 7 May 2010 18:03:35 +0000 (18:03 +0000)]
8255x configure command requires number of bytes of configuration
table. The default size of the configuration table was 22 bytes. To
use extended feature of 82550/82551 the configuration table size
was expanded to 32 bytes. The added configuration for 82550/82551
specifies VLAN hardware tagging and IPSec configuration as well as
TCO.
To make configuration easier fxp(4) used a configuration template
and the template was copied to configuration table. After that,
some parameters of the configuration table was changed depending on
controller type and operation mode. However the size of template
was 22 bytes so some configuration parameters were not properly
initialized on 82550/82551.
Fix this by increasing the template size. For 82557, 82558 and
82559 the size of the configuration is still 22 bytes.

14 years agoraise(3): Note that this sends a signal to the current thread, not process.
jilles [Fri, 7 May 2010 17:20:15 +0000 (17:20 +0000)]
raise(3): Note that this sends a signal to the current thread, not process.

This is how it works (with threading libraries loaded) and what POSIX
requires.

MFC after: 1 week

14 years agoIt seems controller has two types of promiscuous control, one for
yongari [Fri, 7 May 2010 16:43:00 +0000 (16:43 +0000)]
It seems controller has two types of promiscuous control, one for
unicast and the other for multicast. To receive multicast frames
that host didn't join in promiscuous mode, driver have to set
promiscuous mode for multicast frames as well.
The Open Source Software Developer Manual for i8255x was not clear
how to handle promiscuous mode.

PR: kern/145905
MFC after: 5 days

14 years agoEliminate unnecessary page queues locking.
alc [Fri, 7 May 2010 16:22:06 +0000 (16:22 +0000)]
Eliminate unnecessary page queues locking.

14 years agoPush down the page queues lock into vm_page_activate().
alc [Fri, 7 May 2010 15:49:43 +0000 (15:49 +0000)]
Push down the page queues lock into vm_page_activate().

14 years agoEnforce RLIMIT_FSIZE in ZFS.
trasz [Fri, 7 May 2010 14:30:21 +0000 (14:30 +0000)]
Enforce RLIMIT_FSIZE in ZFS.

Reviewed by: pjd@

14 years ago - Call softdep_prealloc() before any of the balloc routines in the
jeff [Fri, 7 May 2010 08:45:21 +0000 (08:45 +0000)]
 - Call softdep_prealloc() before any of the balloc routines in the
   snapshot code.
 - Don't fsync() vnodes in prealloc if copy on write is in progress.  It
   is not safe to recurse back into the write path here.

Reported by: Vladimir Grebenschikov <vova@fbsd.ru>

14 years ago - Use the correct flag mask when determining whether an inode has
jeff [Fri, 7 May 2010 08:20:56 +0000 (08:20 +0000)]
 - Use the correct flag mask when determining whether an inode has
   successfully made it to the free list yet or not.  This fixes
   a deadlock that can occur with unlinked but referenced files.
   Journal space and inodedeps were not correctly reclaimed because
   the inode block was not left dirty.

Tested/Reported by: lwindschuh@googlemail.com

14 years agoUpdate the synchronization requirements for the page usage count.
alc [Fri, 7 May 2010 06:58:53 +0000 (06:58 +0000)]
Update the synchronization requirements for the page usage count.

14 years agoEliminate acquisitions of the page queues lock that are no longer needed.
alc [Fri, 7 May 2010 05:23:15 +0000 (05:23 +0000)]
Eliminate acquisitions of the page queues lock that are no longer needed.

Switch to a per-processor counter for the number of pages freed during
process termination.

14 years agoPush down the page queues lock into vm_page_deactivate(). Eliminate an
alc [Fri, 7 May 2010 04:14:07 +0000 (04:14 +0000)]
Push down the page queues lock into vm_page_deactivate().  Eliminate an
incorrect comment.

14 years agoMerger of the quota64 project into head.
mckusick [Fri, 7 May 2010 00:41:12 +0000 (00:41 +0000)]
Merger of the quota64 project into head.

This joint work of Dag-Erling Smørgrav and myself updates the
FFS quota system to support both traditional 32-bit and new 64-bit
quotas (for those of you who want to put 2+Tb quotas on your users).

By default quotas are not compiled into the kernel. To include them
in your kernel configuration you need to specify:

options         QUOTA                   # Enable FFS quotas

If you are already running with the current 32-bit quotas, they
should continue to work just as they have in the past. If you
wish to convert to using 64-bit quotas, use `quotacheck -c 64';
if you wish to revert from 64-bit quotas back to 32-bit quotas,
use `quotacheck -c 32'.

There is a new library of functions to simplify the use of the
quota system, do `man quotafile' for details. If your application
is currently using the quotactl(2), it is highly recommended that
you convert your application to use the quotafile interface.
Note that existing binaries will continue to work.

Special thanks to John Kozubik of rsync.net for getting me
interested in pursuing 64-bit quota support and for funding
part of my development time on this project.

14 years agoUpdate xrefs from 4.3BSD to modern signal functions in various man pages.
jilles [Thu, 6 May 2010 22:49:54 +0000 (22:49 +0000)]
Update xrefs from 4.3BSD to modern signal functions in various man pages.

sigvec(2) references have been updated to sigaction(2), sigsetmask(2) and
sigblock(2) to sigprocmask(2), sigpause(2) to sigsuspend(2).

Some legacy man pages still refer to them, that is OK.

14 years agosigaltstack(2): document some modernizations:
jilles [Thu, 6 May 2010 22:06:14 +0000 (22:06 +0000)]
sigaltstack(2): document some modernizations:
* un-document 'struct sigaltstack' tag for stack_t as this is BSD-specific;
  this doesn't seem useful enough to document as such
* alternate stacks are per thread, not per process
* update error codes to what the kernel does and POSIX requires

MFC after: 1 week

14 years agoPlug a memory leak.
delphij [Thu, 6 May 2010 21:57:38 +0000 (21:57 +0000)]
Plug a memory leak.

MFC after: 2 weeks

14 years agoFix an invalid parameter detected by INVARIANT and confirmed by r193272.
fabient [Thu, 6 May 2010 20:58:23 +0000 (20:58 +0000)]
Fix an invalid parameter detected by INVARIANT and confirmed by r193272.

14 years agoExclude undefined symbol from ELF file when doing function resolve.
fabient [Thu, 6 May 2010 20:54:19 +0000 (20:54 +0000)]
Exclude undefined symbol from ELF file when doing function resolve.

MFC after: 3 days

14 years agoDocument MAKEDEV_NOWAIT flag for make_dev_credf(9).
kib [Thu, 6 May 2010 19:23:49 +0000 (19:23 +0000)]
Document MAKEDEV_NOWAIT flag for  make_dev_credf(9).

Reviewed by: jh
MFC after: 2 weeks

14 years agoAdd MAKEDEV_NOWAIT flag to make_dev_credf(9), to create a device node
kib [Thu, 6 May 2010 19:22:50 +0000 (19:22 +0000)]
Add MAKEDEV_NOWAIT flag to make_dev_credf(9), to create a device node
in a no-sleep context. If resource allocation cannot be done without
sleep, make_dev_credf() fails and returns NULL.

Reviewed by: jh
MFC after: 2 weeks

14 years agoEliminate page queues locking around most calls to vm_page_free().
alc [Thu, 6 May 2010 18:58:32 +0000 (18:58 +0000)]
Eliminate page queues locking around most calls to vm_page_free().

14 years agoAvoid overflow.
trasz [Thu, 6 May 2010 18:52:41 +0000 (18:52 +0000)]
Avoid overflow.

Submitted by: bde@

14 years agoStyle fixes and removal of unneeded variable.
trasz [Thu, 6 May 2010 18:43:19 +0000 (18:43 +0000)]
Style fixes and removal of unneeded variable.

Submitted by: bde@

14 years agoAdd a workaround for a bug in the firmware regarding the transition
bschmidt [Thu, 6 May 2010 17:53:04 +0000 (17:53 +0000)]
Add a workaround for a bug in the firmware regarding the transition
from passive to active scans. Basicly disable it by increasing the
amount packets to be received to an amount which can't be reached
during dwell times.

Approved by: rpaulo (mentor)
MFC after: 3 days

14 years agoRemove page queues locking from all sf_buf_mext()-like functions. The page
alc [Thu, 6 May 2010 17:43:41 +0000 (17:43 +0000)]
Remove page queues locking from all sf_buf_mext()-like functions.  The page
lock now suffices.

Fix a couple nearby style violations.

14 years agoFinal update to current version of head in preparation for reintegration.
mckusick [Thu, 6 May 2010 17:37:23 +0000 (17:37 +0000)]
Final update to current version of head in preparation for reintegration.

14 years agoUpdate a comment to say that access to a page's wire count is now
alc [Thu, 6 May 2010 17:28:59 +0000 (17:28 +0000)]
Update a comment to say that access to a page's wire count is now
synchronized by the page lock.

14 years agoRevert r207677 which is considered a violation of style(9).
delphij [Thu, 6 May 2010 17:06:36 +0000 (17:06 +0000)]
Revert r207677 which is considered a violation of style(9).

Pointed out by: bde
Pointy hat to: delphij

14 years agoWhile I am here, add more missing (unsigned char) casts to ctype() macros
ache [Thu, 6 May 2010 16:54:46 +0000 (16:54 +0000)]
While I am here, add more missing (unsigned char) casts to ctype() macros

14 years agoPush down the page queues lock inside of vm_page_free_toq() and
alc [Thu, 6 May 2010 16:39:43 +0000 (16:39 +0000)]
Push down the page queues lock inside of vm_page_free_toq() and
pmap_page_is_mapped() in preparation for removing page queues locking
around calls to vm_page_free().  Setting aside the assertion that calls
pmap_page_is_mapped(), vm_page_free_toq() now acquires and holds the page
queues lock just long enough to actually add or remove the page from the
paging queues.

Update vm_page_unhold() to reflect the above change.

14 years agoFix recent space skipping:
ache [Thu, 6 May 2010 16:37:50 +0000 (16:37 +0000)]
Fix recent space skipping:
1) add missing (unsigned char) cast to ctype() macro
2) fix off-by-one error causing last letter always doubled

14 years agoEliminate a small bit of unneeded code from kern_sendfile(): While
alc [Thu, 6 May 2010 15:52:08 +0000 (15:52 +0000)]
Eliminate a small bit of unneeded code from kern_sendfile(): While
kern_sendfile() is running, the file's vm object can't be destroyed
because kern_sendfile() increments the vm object's reference count.  (Once
kern_sendfile() decrements the reference count and returns, the vm object
can, however, be destroyed.  So, sf_buf_mext() must handle the case where
the vm object is destroyed.)

Reviewed by: kib

14 years agoFix polled operation. Now it is possible to dump kernel via mvs(4).
mav [Thu, 6 May 2010 06:44:26 +0000 (06:44 +0000)]
Fix polled operation. Now it is possible to dump kernel via mvs(4).

14 years agoAdd a helper function vm_pageout_page_lock(), similar to tegge'
kib [Thu, 6 May 2010 04:57:33 +0000 (04:57 +0000)]
Add a helper function vm_pageout_page_lock(), similar to tegge'
vm_pageout_fallback_object_lock(), to obtain the page lock
while having page queue lock locked, and still maintain the
page position in a queue.

Use the helper to lock the page in the pageout daemon and contig launder
iterators instead of skipping the page if its lock is contested.
Skipping locked pages easily causes pagedaemon or launder to not make a
progress with page cleaning.

Proposed and reviewed by: alc

14 years agoEliminate dead code.
alc [Thu, 6 May 2010 04:23:52 +0000 (04:23 +0000)]
Eliminate dead code.

14 years agoIf the "-alldirs" export option was used for the V4: line, mountd
rmacklem [Thu, 6 May 2010 00:24:08 +0000 (00:24 +0000)]
If the "-alldirs" export option was used for the V4: line, mountd
would crash in check_options() since dp == NULL for the V4: line.
This patch moves the check for options allowed on the V4: line to
ahead of where dp is used to avoid this crash.

Reported by: mamalos AT eng.auth.gr
MFC after: 1 week

14 years agoDon't ring the tx doorbell for every frame when we know more frames
np [Wed, 5 May 2010 22:52:06 +0000 (22:52 +0000)]
Don't ring the tx doorbell for every frame when we know more frames
will follow.  Adjust the freelist and response queue doorbells too.

Discussed with: kmacy

14 years agoDo not hold the T3 firmware in memory all the time. firmware(9) can
np [Wed, 5 May 2010 22:29:54 +0000 (22:29 +0000)]
Do not hold the T3 firmware in memory all the time. firmware(9) can
load/unload it as needed.

14 years ago- Fix broken symlinks on cross platform zfs send/recv. [1]
marius [Wed, 5 May 2010 22:15:20 +0000 (22:15 +0000)]
- Fix broken symlinks on cross platform zfs send/recv. [1]
- Enable zfs_ace_byteswap() on FreeBSD as it works just fine (tested between
  amd64 and sparc64 in both directions by Michael Moll).

PR: 146272
Approved by: mm, pjd
Obtained from: OpenSolaris (onnv rev. 8283:1ca59f393041; Bug ID 6764193) [1]
MFC after: 3 days

14 years agoAdd an optional "persistent" flag to ng_hub and ng_bridge, which if set,
zec [Wed, 5 May 2010 22:06:05 +0000 (22:06 +0000)]
Add an optional "persistent" flag to ng_hub and ng_bridge, which if set,
disables automatic node shutdown when the last hook gets disconnected.

Reviewed by: julian

14 years agosh: Apply locale vars on builtins, recognize LC_MESSAGES as a locale var.
jilles [Wed, 5 May 2010 21:48:40 +0000 (21:48 +0000)]
sh: Apply locale vars on builtins, recognize LC_MESSAGES as a locale var.

This allows doing things like LC_ALL=C some_builtin to run a builtin under a
different locale, just like is possible with external programs. The
immediate reason is that this allows making printf(1) a builtin without
breaking things like LC_NUMERIC=C printf '%f\n' 1.2

This change also affects special builtins, as even though the assignment is
persistent, the export is only to the builtin (unless the variable was
already exported).

Note: for this to work for builtins that also exist as external programs
such as /bin/test, the setlocale() call must be under #ifndef SHELL. The
shell will do the setlocale() calls which may not agree with the environment
variables.

14 years agoMove SCCS tags to comments as they were already #if 0'ed.
delphij [Wed, 5 May 2010 21:24:18 +0000 (21:24 +0000)]
Move SCCS tags to comments as they were already #if 0'ed.

14 years agoAdd definitions for Intel AESNI CPUID bits and print the capabilities
kib [Wed, 5 May 2010 21:07:47 +0000 (21:07 +0000)]
Add definitions for Intel AESNI CPUID bits and print the capabilities
on boot.

Hardware provided by: Sentex Communications
MFC after: 1 week

14 years agoSwitch to our preferred 2-clause BSD license.
joel [Wed, 5 May 2010 20:39:02 +0000 (20:39 +0000)]
Switch to our preferred 2-clause BSD license.

Approved by: kmacy

14 years agoForced commit to set MFC period for r207670.
mm [Wed, 5 May 2010 18:57:55 +0000 (18:57 +0000)]
Forced commit to set MFC period for r207670.

Approved by: delphij (mentor)
MFC after: 2 weeks

14 years agoFix deadlock between GEOM class unloading and withering. Withering can't
jh [Wed, 5 May 2010 18:53:24 +0000 (18:53 +0000)]
Fix deadlock between GEOM class unloading and withering. Withering can't
proceed while g_unload_class() blocks the event thread. Fix this by not
running g_unload_class() as a GEOM event and dropping the topology lock
when withering needs to proceed.

PR: kern/139847
Silence on: freebsd-geom