]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoAdd offsetof.3 man page
kevlo [Wed, 8 Feb 2012 08:42:17 +0000 (08:42 +0000)]
Add offsetof.3 man page

Obtained from: OpenBSD

12 years agoUpdate the 802.11s IE numbers to represent the latest 802.11 amendment standard.
adrian [Wed, 8 Feb 2012 06:56:19 +0000 (06:56 +0000)]
Update the 802.11s IE numbers to represent the latest 802.11 amendment standard.

Submitted by: monthadar@gmail.com
Reviewed by: rpaulo

12 years agoIt's not an error if unlink(2) fails because the pathname doesn't exist.
wollman [Wed, 8 Feb 2012 05:03:04 +0000 (05:03 +0000)]
It's not an error if unlink(2) fails because the pathname doesn't exist.

Noticed by: kevlo
Pointy hat to: wollman

12 years agoRev. 228360 moved the call to cpu_set_upcall() to happen before
marcel [Wed, 8 Feb 2012 04:05:38 +0000 (04:05 +0000)]
Rev. 228360 moved the call to cpu_set_upcall() to happen before
td_proc gets initialized in td (=newtd). Use td0 instead.

MFC after: 3 days

12 years agoAllocate the BAR for userspace doorbells after the is_offload check
np [Wed, 8 Feb 2012 03:02:12 +0000 (03:02 +0000)]
Allocate the BAR for userspace doorbells after the is_offload check
is functional.

MFC after: 3 days

12 years agoProgram the MAC exact match table in batches of 7 addresses at
np [Wed, 8 Feb 2012 00:36:36 +0000 (00:36 +0000)]
Program the MAC exact match table in batches of 7 addresses at
a time when possible.  This is more efficient than one at a time.

Submitted by: gnn
MFC after: 3 days

12 years agoAdd an option to 404.status-zfs (enabled by default) to list all
gjb [Wed, 8 Feb 2012 00:08:21 +0000 (00:08 +0000)]
Add an option to 404.status-zfs (enabled by default) to list all
zfs pools on the system.

While here, document daily_status_zfs_enable in periodic.conf(5).

Discussed on: -fs [1]
Reviewed by: netchild [1]
Approved by: jhb
MFC after: 1 week

[1] - http://lists.freebsd.org/pipermail/freebsd-fs/2011-June/011869.html

12 years agoUpdate the mps(4) man page for the changes in the new LSI-supported driver.
ken [Tue, 7 Feb 2012 23:43:29 +0000 (23:43 +0000)]
Update the mps(4) man page for the changes in the new LSI-supported driver.

This should have been included in change 230592.

The supported hardware section still needs some updating to reflect
the current reality.

MFC after: 3 days

12 years agoDo not EOI local APIC too early. Just do doreti normally after resuming.
jkim [Tue, 7 Feb 2012 23:24:29 +0000 (23:24 +0000)]
Do not EOI local APIC too early.  Just do doreti normally after resuming.

12 years agoUpdate the data structures with some fields reserved for
pfg [Tue, 7 Feb 2012 22:31:28 +0000 (22:31 +0000)]
Update the data structures with some fields reserved for
ext4 but that can be used in ext3 mode.

Also adjust the internal inode to carry the birthtime,
like in UFS, which is starting to get some use when
big inodes are available.

Right now these are just placeholders for features
to come.

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

12 years ago- Give all clocks and timers on acpi0 the equal probing order.
jkim [Tue, 7 Feb 2012 20:54:44 +0000 (20:54 +0000)]
- Give all clocks and timers on acpi0 the equal probing order.
- Increase probing order for ECDT table to match HID-based probing.
- Decrease probing order for HPET table to match HID-based probing.
- Decrease probing order for CPUs and system resources.
- Fix ACPI_DEV_BASE_ORDER to reflect the reality.

12 years agoIn the original days of BSD, a sync was issued on every filesystem
mckusick [Tue, 7 Feb 2012 20:43:28 +0000 (20:43 +0000)]
In the original days of BSD, a sync was issued on every filesystem
every 30 seconds. This spike in I/O caused the system to pause every
30 seconds which was quite annoying. So, the way that sync worked
was changed so that when a vnode was first dirtied, it was put on
a 30-second cleaning queue (see the syncer_workitem_pending queues
in kern/vfs_subr.c). If the file has not been written or deleted
after 30 seconds, the syncer pushes it out. As the syncer runs once
per second, dirty files are trickled out slowly over the 30-second
period instead of all at once by a call to sync(2).

The one drawback to this is that it does not cover the filesystem
metadata. To handle the metadata, vfs_allocate_syncvnode() is called
to create a "filesystem syncer vnode" at mount time which cycles
around the cleaning queue being sync'ed every 30 seconds. In the
original design, the only things it would sync for UFS were the
filesystem metadata: inode blocks, cylinder group bitmaps, and the
superblock (e.g., by VOP_FSYNC'ing devvp, the device vnode from
which the filesystem is mounted).

Somewhere in its path to integration with FreeBSD the flushing of
the filesystem syncer vnode got changed to sync every vnode associated
with the filesystem. The result of this change is to return to the
old filesystem-wide flush every 30-seconds behavior and makes the
whole 30-second delay per vnode useless.

This change goes back to the originally intended trickle out sync
behavior. Key to ensuring that all the intended semantics are
preserved (e.g., that all inode updates get flushed within a bounded
period of time) is that all inode modifications get pushed to their
corresponding inode blocks so that the metadata flush by the
filesystem syncer vnode gets them to the disk in a timely way.
Thanks to Konstantin Belousov (kib@) for doing the audit and commit
-r231122 which ensures that all of these updates are being made.

Reviewed by:    kib
Tested by:      scottl
MFC after:      2 weeks

12 years agoCall bge_add_sysctls() early and especially before bge_can_use_msi() so
marius [Tue, 7 Feb 2012 20:24:52 +0000 (20:24 +0000)]
Call bge_add_sysctls() early and especially before bge_can_use_msi() so
r230337 actually has a chance of working and doesn't always unconditionally
disable the use of MSIs.

12 years agoThe bus resource adjustment API is not meant to work on active resources.
nwhitehorn [Tue, 7 Feb 2012 19:14:13 +0000 (19:14 +0000)]
The bus resource adjustment API is not meant to work on active resources.
Return an error if a driver attempts this, and, if INVARIANTS is on,
panic.

Reviewed by: jhb

12 years agoMerge illumos revision 13594:
mm [Tue, 7 Feb 2012 18:35:18 +0000 (18:35 +0000)]
Merge illumos revision 13594:

uninitialized variables in zfs(8) may make snapshots undestroyable [1]

References:
https://www.illumos.org/issues/2067 [1]

Obtained from: illumos (issue #2067)
MFC after: 3 days

12 years agoFix Coverity defects in isci(4) driver.
jimharris [Tue, 7 Feb 2012 17:45:11 +0000 (17:45 +0000)]
Fix Coverity defects in isci(4) driver.

Sponsored by: Intel
Approved by: scottl

12 years agoFix r231134. svn:keywords needs to be 'FreeBSD=%H', not 'FreeBSD:%H'.
jimharris [Tue, 7 Feb 2012 17:43:58 +0000 (17:43 +0000)]
Fix r231134.  svn:keywords needs to be 'FreeBSD=%H', not 'FreeBSD:%H'.

Approved by: scottl

12 years agoAdd svn:keywords for isci driver files.
jimharris [Tue, 7 Feb 2012 17:21:54 +0000 (17:21 +0000)]
Add svn:keywords for isci driver files.

Sponsored by: Intel
Approved by: scottl

12 years agor228827 fixed a problem where copying of NFSv4 open credentials into
rmacklem [Tue, 7 Feb 2012 16:32:43 +0000 (16:32 +0000)]
r228827 fixed a problem where copying of NFSv4 open credentials into
a credential structure would corrupt it. This happened when the
p argument was != NULL. However, I now realize that the copying of
open credentials should only happen for p == NULL, since that indicates
that it is a read-ahead or write-behind. This patch fixes this.
After this commit, r228827 could be reverted, but I think the code is
clearer and safer with the patch, so I am going to leave it in.
Without this patch, it was possible that a NFSv4 VOP_SETATTR() could have
changed the credentials of the caller. This would have happened if
the process doing the VOP_SETATTR() did not have the file open, but
some other process running as a different uid had the file open for writing
at the same time.

MFC after: 5 days

12 years agoAllow to set if_bridge(4) sysctls from /boot/loader.conf.
pjd [Tue, 7 Feb 2012 14:50:33 +0000 (14:50 +0000)]
Allow to set if_bridge(4) sysctls from /boot/loader.conf.

MFC after: 3 days

12 years agoAdd BSD copyright notice.
emaste [Tue, 7 Feb 2012 14:06:30 +0000 (14:06 +0000)]
Add BSD copyright notice.

Approved by: gordon@

12 years agoRecord my ports mentor relationship.
uqs [Tue, 7 Feb 2012 11:53:08 +0000 (11:53 +0000)]
Record my ports mentor relationship.

Approved by: beat (mentor)

12 years ago- Set TERM to cons25w on pc98 because we still use old cons25w terminal
nyan [Tue, 7 Feb 2012 10:59:19 +0000 (10:59 +0000)]
- Set TERM to cons25w on pc98 because we still use old cons25w terminal
  to show Japanese.
- Add cons25w to terminal lists.

Reviewed by: nwhitehorn
MFC after: 1 week

12 years agoSprinkle missed calls to asynchronous UFS_UPDATE() in attempt to
kib [Tue, 7 Feb 2012 09:51:41 +0000 (09:51 +0000)]
Sprinkle missed calls to asynchronous UFS_UPDATE() in attempt to
guarantee that all UFS inode metadata changes results in the dirtiness
of the inodeblock.  Due to missed inodeblock updates, syncer was
required to fsync each mount point' vnode to guarantee periodic
metadata flush.

Reviewed by: mckusick
Tested by: scottl
MFC after: 2 weeks

12 years agoAcquire the adapter lock before updating fields of the filter structure.
np [Tue, 7 Feb 2012 09:39:46 +0000 (09:39 +0000)]
Acquire the adapter lock before updating fields of the filter structure.

Submitted by: gnn (different version)
MFC after: 3 days

12 years agoConsistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
dim [Tue, 7 Feb 2012 09:27:07 +0000 (09:27 +0000)]
Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.

MFC after: 1 week

12 years agoRemove if_start from cxgb and cxgbe.
np [Tue, 7 Feb 2012 07:32:39 +0000 (07:32 +0000)]
Remove if_start from cxgb and cxgbe.

Submitted by: jhb
MFC after: 3 days

12 years agocxgbe: reduce diffs with other branches.
np [Tue, 7 Feb 2012 06:21:59 +0000 (06:21 +0000)]
cxgbe: reduce diffs with other branches.
Will help future MFCs from HEAD.

MFC after: 3 days

12 years agoports(7) currently makes no mention of LOCALBASE: fix that
eadler [Tue, 7 Feb 2012 04:00:57 +0000 (04:00 +0000)]
ports(7) currently makes no mention of LOCALBASE: fix that

PR: docs/159551
Submitted by: Matthew Seaman <m.seaman@infracaninophile.co.uk>
Approved by: gjb
MFC after: 3 days

12 years agoPlug a memory leak. When a cached thread is reused, don't clear sleep
davidxu [Tue, 7 Feb 2012 02:57:36 +0000 (02:57 +0000)]
Plug a memory leak. When a cached thread is reused, don't clear sleep
queue pointers, just reuse it.

PR: 164828
MFC after: 1 week

12 years agoImprove sparse file handling when printing the block list for an inode by
truckman [Mon, 6 Feb 2012 21:50:11 +0000 (21:50 +0000)]
Improve sparse file handling when printing the block list for an inode by
not bailing out early when a hole is encountered in the direct block list.
Print NULL block pointers in the direct block list.  Simplify the
code that prints the fragment count.

Match the style of the existing code.

Reviewed by: mckusick
MFC after: 1 week

12 years agoIn usr.bin/rpcgen/rpc_main.c, use execvp(3) instead of execv(3), so
dim [Mon, 6 Feb 2012 21:35:11 +0000 (21:35 +0000)]
In usr.bin/rpcgen/rpc_main.c, use execvp(3) instead of execv(3), so
rpcgen will search the current PATH for the preprocessor.  This makes it
possible to run a preprocessor built during the cross-tools stage of
buildworld.

MFC after: 1 week

12 years agoContribute some example code which demonstrates how to initialise the
adrian [Mon, 6 Feb 2012 20:23:21 +0000 (20:23 +0000)]
Contribute some example code which demonstrates how to initialise the
radar parameters for the AR5416 and later NICs.

These parameters have been tested on the following NICs:

* AR5416
* AR9160
* AR9220
* AR9280

And yes, these will return radar pulse parameters and (for AR9160 and later)
radar FFT information as PHY errors.

This is again not enough to do radar detection, it's just here to faciliate
development and validation of radar detection algorithms.

The (pulse, not FFT) decoding code for AR5212, AR5416 and later NICs exist
in the HAL.

This code is disabled for now as generating radar PHY errors can quickly
cause issues in busy environment.s  Some further debugging of the RX path
is needed.

Finally, these parameters are likely not useful for the AR5212 era NICs.
The madwifi-dfs branch should have suitable example parameters for the
11a era NICs.

12 years agoAdd a `fix' for another whitespace bug.
ed [Mon, 6 Feb 2012 18:52:40 +0000 (18:52 +0000)]
Add a `fix' for another whitespace bug.

If the sentence starts with a multiple of eight spaces, the sentence
should in almost all practical cases have started with tabs instead.
Replace these spaces by tabs.

12 years agoFix whitespace inconsistencies in TTY code.
ed [Mon, 6 Feb 2012 18:15:46 +0000 (18:15 +0000)]
Fix whitespace inconsistencies in TTY code.

12 years agoAvoid panic from unlocking a not locked mutex (in some error cases).
emaste [Mon, 6 Feb 2012 18:11:00 +0000 (18:11 +0000)]
Avoid panic from unlocking a not locked mutex (in some error cases).

Reviewed by: ken@

12 years agoAdd missing opt_quota.h include to activate #ifdef QUOTA blocks,
kib [Mon, 6 Feb 2012 17:59:14 +0000 (17:59 +0000)]
Add missing opt_quota.h include to activate #ifdef QUOTA blocks,
apparently a step in unbreaking QUOTA support.

Reported and tested by: Adam Strohl <adams-freebsd ateamsystems com>
MFC after: 1 week

12 years agoRename cache_lookup_times() to cache_lookup() and retire the old API and
jhb [Mon, 6 Feb 2012 17:00:28 +0000 (17:00 +0000)]
Rename cache_lookup_times() to cache_lookup() and retire the old API and
ABI stub for cache_lookup().

12 years agoUsing the O_CLOEXEC flag on open(2) caused the pidfile lock to be lost
ghelmer [Mon, 6 Feb 2012 14:11:24 +0000 (14:11 +0000)]
Using the O_CLOEXEC flag on open(2) caused the pidfile lock to be lost
when the child process execs daemon's target program thanks to flock(2)
semantics. So, we apparently have to leak the open pidfile's file
descriptor to keep the lock for the pidfile(3) functions to work properly.

Test case demonstrated by trociny:

ref8-amd64:/home/trociny% uname -r
8.2-STABLE
ref8-amd64:/home/trociny% daemon -p /tmp/sleep.pid sleep 10
ref8-amd64:/home/trociny% daemon -p /tmp/sleep.pid sleep 10
daemon: process already running, pid: 19799

kopusha:~% uname -r
10.0-CURRENT
kopusha:~% daemon -p /tmp/sleep.pid sleep 10
kopusha:~% daemon -p /tmp/sleep.pid sleep 10
kopusha:~%

12 years agoAmend r231079 by properly shifting up the existing arguments in
dim [Mon, 6 Feb 2012 12:08:41 +0000 (12:08 +0000)]
Amend r231079 by properly shifting up the existing arguments in
rpc_main.c's insarg() function.  I had forgotten to put this in my patch
queue, sorry.

Pointy hat to: me
MFC after: 1 week

12 years agoLet rpcgen(1) support an environment variable RPCGEN_CPP to find the C
dim [Mon, 6 Feb 2012 12:03:21 +0000 (12:03 +0000)]
Let rpcgen(1) support an environment variable RPCGEN_CPP to find the C
preprocessor to run.  Previously, it always ran /usr/bin/cpp, unless you
used the -Y option, and even then you could not set the basename.  It
also attempted to run /usr/ccs/lib/cpp for SVR4 compatibility, but this
is obsolete, and has been removed.

Note that setting RPCGEN_CPP to a command with arguments is supported,
though the command line parsing is simplistic.  However, setting it to
e.g. "gcc46 -E" or "clang -E" will lead to problems, because both gcc
and clang in -E mode will consider files with unknown extensions (such
as .x) as object files, and attempt to link them.

This could be worked around by also adding "-x c", but it is much safer
to set RPCGEN_CPP to e.g. "cpp46" or "clang-cpp" instead.

MFC after: 1 week

12 years agoBump .Dd for r231076.
glebius [Mon, 6 Feb 2012 11:51:04 +0000 (11:51 +0000)]
Bump .Dd for r231076.

Submitted by: bz

12 years agoJNEWBLK dependency may legitimately appear on the buf dependency
kib [Mon, 6 Feb 2012 11:47:24 +0000 (11:47 +0000)]
JNEWBLK dependency may legitimately appear on the buf dependency
list. If softdep_sync_buf() discovers such dependency, it should do
nothing, which is safe as it is only waiting on the parent buffer to
be written, so it can be removed.

Committed on behalf of:  jeff
MFC after:   1 week

12 years agoMake the 'tcpwin' option of ipfw(8) accept ranges and lists.
glebius [Mon, 6 Feb 2012 11:35:29 +0000 (11:35 +0000)]
Make the 'tcpwin' option of ipfw(8) accept ranges and lists.

Submitted by: sem

12 years agoCurrent implementations of sync(2) and syncer vnode fsync() VOP uses
kib [Mon, 6 Feb 2012 11:04:36 +0000 (11:04 +0000)]
Current implementations of sync(2) and syncer vnode fsync() VOP uses
mnt_noasync counter to temporary remove MNTK_ASYNC mount option, which
is needed to guarantee a synchronous completion of the initiated i/o
before syscall or VOP return.  Global removal of MNTK_ASYNC option is
harmful because not only i/o started from corresponding thread becomes
synchronous, but all i/o is synchronous on the filesystem which is
initiated during sync(2) or syncer activity.

Instead of removing MNTK_ASYNC from mnt_kern_flag, provide a local
thread flag to disable async i/o for current thread only. Use the
opportunity to move DOINGASYNC() macro into sys/vnode.h and
consistently use it through places which tested for MNTK_ASYNC.

Some testing demonstrated 60-70% improvements in run time for the
metadata-intensive operations on async-mounted UFS volumes, but still
with great deviation due to other reasons.

Reviewed by: mckusick
Tested by: scottl
MFC after: 2 weeks

12 years agoFix a typo which was already fixed by eadler in r227489. We missed
tuexen [Mon, 6 Feb 2012 10:47:12 +0000 (10:47 +0000)]
Fix a typo which was already fixed by eadler in r227489. We missed
to integrate this fix in our code base, so it was removed in r227755.

MFC after: 3 days.

12 years agoAdd fixwhite(1).
ed [Mon, 6 Feb 2012 10:23:11 +0000 (10:23 +0000)]
Add fixwhite(1).

This small utility can be used to `sanitize' the whitespace in source
code. It does the following things:

Global:
- Remove empty lines at the beginning and the end of a file.
- Merge successive empty lines into a single empty line.

Per-line:
- Remove trailing whitespace.
- Merge spaces preceeding tabs into the tabs.

It operated on stdin/stdout. This means that if you use vi(1), you can
just run :%!fixwhite to reorganize the file.

12 years ago- Use uint8_t for the variable x and spell the size of the variable
kevlo [Mon, 6 Feb 2012 06:03:16 +0000 (06:03 +0000)]
- Use uint8_t for the variable x and spell the size of the variable
  as sizeof(x)
- Capitalized comment
- Parentheses around return value

Requested by: bde

12 years agoUpdate the mesh reason codes to match the latest 802.11s specification.
adrian [Mon, 6 Feb 2012 00:26:29 +0000 (00:26 +0000)]
Update the mesh reason codes to match the latest 802.11s specification.

Submitted by: <monthadar@gmail.com>
Reviewed by: rpaulo

12 years agoAdd a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,
dim [Sun, 5 Feb 2012 23:56:22 +0000 (23:56 +0000)]
Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,
that builds the following additional llvm/clang tools:

- bugpoint
- llc
- lli
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-diff
- llvm-dis
- llvm-extract
- llvm-ld
- llvm-link
- llvm-mc
- llvm-nm
- llvm-objdump
- llvm-prof
- llvm-ranlib
- llvm-rtdyld
- llvm-stub
- macho-dump
- opt

These tools are mainly useful for people that want to manipulate llvm
bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker
with llvm and clang themselves.

MFC after: 2 weeks

12 years agoRegenerate src.conf.5, after r230972 added the WITHOUT_SOURCELESS build
dim [Sun, 5 Feb 2012 23:02:13 +0000 (23:02 +0000)]
Regenerate src.conf.5, after r230972 added the WITHOUT_SOURCELESS build
options.

MFC after: 2 weeks

12 years agoIn usr.bin/rpcgen/rpc_main.c, properly check the return value of
dim [Sun, 5 Feb 2012 20:55:38 +0000 (20:55 +0000)]
In usr.bin/rpcgen/rpc_main.c, properly check the return value of
strlcpy(), in addition to checking that of strlcat().

MFC after: 1 week

12 years agoInherit from PCI bridge driver instead of manually specifying all of its
nwhitehorn [Sun, 5 Feb 2012 20:07:45 +0000 (20:07 +0000)]
Inherit from PCI bridge driver instead of manually specifying all of its
methods.

Obtained from: sparc64
MFC after: 1 week

12 years agoReplace the assembler macro WEAK_ALIAS with a new macro WEAK_REFERENCE which
andreast [Sun, 5 Feb 2012 20:04:43 +0000 (20:04 +0000)]
Replace the assembler macro WEAK_ALIAS with a new macro WEAK_REFERENCE which
has the same API as __weak_reference(). Give 'x' in SYS.h a more meaningful
name.

Tested on 32- and 64-bit PowerMac.

Reviewed by: bde

12 years agoFix clang warnings.
rpaulo [Sun, 5 Feb 2012 20:00:39 +0000 (20:00 +0000)]
Fix clang warnings.

12 years agoMake sure to remap adjusted resources.
nwhitehorn [Sun, 5 Feb 2012 16:54:26 +0000 (16:54 +0000)]
Make sure to remap adjusted resources.

12 years agoAdd new socket options: TCP_KEEPINIT, TCP_KEEPIDLE, TCP_KEEPINTVL and
glebius [Sun, 5 Feb 2012 16:53:02 +0000 (16:53 +0000)]
Add new socket options: TCP_KEEPINIT, TCP_KEEPIDLE, TCP_KEEPINTVL and
TCP_KEEPCNT, that allow to control initial timeout, idle time, idle
re-send interval and idle send count on a per-socket basis.

Reviewed by: andre, bz, lstewart

12 years agoRemove extra semicolon.
mav [Sun, 5 Feb 2012 16:41:06 +0000 (16:41 +0000)]
Remove extra semicolon.

Submitted by: emaste

12 years agoRevert the _NOPROF entries on cpu_throw, cpu_switch and savectx. They can be
andreast [Sun, 5 Feb 2012 15:59:18 +0000 (15:59 +0000)]
Revert the _NOPROF entries on cpu_throw, cpu_switch and savectx. They can be
profiled too now.

MFC after: 2 weeks

12 years agoIf a local write request is from the synchronization thread, when it
trociny [Sun, 5 Feb 2012 15:23:32 +0000 (15:23 +0000)]
If a local write request is from the synchronization thread, when it
is synchronizing data that is out of date on the local component, we
should not send G_GATE_CMD_DONE acknowledge to the kernel.

This fixes the issue, observed in async mode, when on synchronization
from the remote component the worker terminated with "G_GATE_CMD_DONE
failed" error.

Reported by: Artem Kajalainen <artem kayalaynen ru>
Reviewed by: pjd
MFC after: 1 week

12 years agoFix the regression introduced in r226859: if the local component is
trociny [Sun, 5 Feb 2012 15:21:08 +0000 (15:21 +0000)]
Fix the regression introduced in r226859: if the local component is
out of date BIO_READ requests got lost instead of being sent to the
remote component.

Reviewed by: pjd
MFC after: 1 week

12 years agoAdd exca to powerpc modules build as a dependency for cbb.
jhibbits [Sun, 5 Feb 2012 13:29:01 +0000 (13:29 +0000)]
Add exca to powerpc modules build as a dependency for cbb.

12 years agoFix typo in r231010.
glebius [Sun, 5 Feb 2012 12:52:28 +0000 (12:52 +0000)]
Fix typo in r231010.

Submitted by: linimon

12 years agoAnalogous to r230407 a separate path buffer in vfs_mount.c is required
mm [Sun, 5 Feb 2012 10:59:50 +0000 (10:59 +0000)]
Analogous to r230407 a separate path buffer in vfs_mount.c is required
for r230129. Fixes a out of bounds write to fspath.

MFC after: 10 days

12 years agoWhitespace fixes.
ed [Sun, 5 Feb 2012 09:17:49 +0000 (09:17 +0000)]
Whitespace fixes.

- Remove redundant empty lines.
- Replace ^L by \014. This allows you to safely cat/grep/etc this file
  without causing confusion.

12 years agoBetter comment for ifa_init(), ifa_ref(), ifa_free().
glebius [Sun, 5 Feb 2012 08:53:05 +0000 (08:53 +0000)]
Better comment for ifa_init(), ifa_ref(), ifa_free().

12 years agoIn ifa_init() initialize if_data.ifi_datalen. This would be
glebius [Sun, 5 Feb 2012 08:31:15 +0000 (08:31 +0000)]
In ifa_init() initialize if_data.ifi_datalen. This would be
required after upcoming changes from bz@.

Discussed with: bz

12 years agoAdd 32-bit compat code for AIO kevent flags introduced in revision 230857.
davidxu [Sun, 5 Feb 2012 04:49:31 +0000 (04:49 +0000)]
Add 32-bit compat code for AIO kevent flags introduced in revision 230857.

12 years agoAdd support for bus_adjust_resource() on all PowerPC/AIM PCI bridges. With
nwhitehorn [Sun, 5 Feb 2012 00:51:59 +0000 (00:51 +0000)]
Add support for bus_adjust_resource() on all PowerPC/AIM PCI bridges. With
this change, NEW_PCIB appears to work without incident at least on a G5
iMac. More testing will be required before it is turned on in GENERIC.

12 years agosh: Fix swapped INTON/INTOFF.
jilles [Sat, 4 Feb 2012 23:29:07 +0000 (23:29 +0000)]
sh: Fix swapped INTON/INTOFF.

A possible consequence of this bug was a memory leak if SIGINT arrived
during a 'set' command (listing variables).

MFC after: 1 week

12 years agoCompatibility with IBM firmware.
nwhitehorn [Sat, 4 Feb 2012 23:25:18 +0000 (23:25 +0000)]
Compatibility with IBM firmware.

12 years agosh: Use vfork in a few common cases.
jilles [Sat, 4 Feb 2012 23:12:14 +0000 (23:12 +0000)]
sh: Use vfork in a few common cases.

This uses vfork() for simple commands and command substitutions containing a
single simple command, invoking an external program under certain conditions
(no redirections or variable assignments, non-interactive shell, no job
control). These restrictions limit the amount of code executed in a vforked
child.

There is a large speedup (for example 35%) in microbenchmarks. The
difference in buildkernel is smaller (for example 0.5%) but still
statistically significant. See
http://lists.freebsd.org/pipermail/freebsd-hackers/2012-January/037581.html
for some numbers.

The use of vfork() can be disabled by setting a variable named
SH_DISABLE_VFORK.

12 years agoFix installation script after r230482 -- a missing character apparently.
nwhitehorn [Sat, 4 Feb 2012 23:00:27 +0000 (23:00 +0000)]
Fix installation script after r230482 -- a missing character apparently.
Now, back to convalescing.

12 years agoAfter multiple requests for back out, after multiple promisses from adrian@
pjd [Sat, 4 Feb 2012 20:17:07 +0000 (20:17 +0000)]
After multiple requests for back out, after multiple promisses from adrian@
to fix it (without fixing it), after making one of my servers unbootable,
after now making also my laptop unbootable and after running out of patiance
back out r229800 until better solution is found.

12 years agoMissed file in r230993.
nwhitehorn [Sat, 4 Feb 2012 20:09:06 +0000 (20:09 +0000)]
Missed file in r230993.

12 years agoMiffed r230993 due to a one-character typo while reviewing the patch.
nwhitehorn [Sat, 4 Feb 2012 20:04:35 +0000 (20:04 +0000)]
Miffed r230993 due to a one-character typo while reviewing the patch.

12 years agoUnify OF PCI infrastructure, including changing from parsing the device
nwhitehorn [Sat, 4 Feb 2012 19:54:13 +0000 (19:54 +0000)]
Unify OF PCI infrastructure, including changing from parsing the device
tree based on heuristics to parsing it based on the spec. This should also
lay the foundation for NEW_PCIB on PowerPC.

MFC after: 3 months

12 years agoAvoid warnings about duplicate modules.
nwhitehorn [Sat, 4 Feb 2012 19:50:26 +0000 (19:50 +0000)]
Avoid warnings about duplicate modules.

MFC after: 2 weeks

12 years agoFix $ipv6_network_interfaces handling in rc.d/routing. It could fail when
hrs [Sat, 4 Feb 2012 18:14:49 +0000 (18:14 +0000)]
Fix $ipv6_network_interfaces handling in rc.d/routing.  It could fail when
it was set to "auto", for example.

MFC after: 3 days

12 years agoCorrect typo in comment (numbver)
emaste [Sat, 4 Feb 2012 18:14:39 +0000 (18:14 +0000)]
Correct typo in comment (numbver)

12 years agoFix a possible infinite loop in "route flush" on 64-bit archs.
hrs [Sat, 4 Feb 2012 17:53:22 +0000 (17:53 +0000)]
Fix a possible infinite loop in "route flush" on 64-bit archs.

MFC after: 3 days

12 years agoWhenever a new kernel thread is spawned, explicitly clear any CPU affinity
rstone [Sat, 4 Feb 2012 16:49:29 +0000 (16:49 +0000)]
Whenever a new kernel thread is spawned, explicitly clear any CPU affinity
set on the new thread.  This prevents the thread from inadvertently
inheriting affinity from a random sibling.

Submitted by: attilio
Tested by: pho
MFC after: 1 week

12 years agoFix input validation in SO_SETFIB.
hrs [Sat, 4 Feb 2012 15:00:26 +0000 (15:00 +0000)]
Fix input validation in SO_SETFIB.

Reviewed by: bz
MFC after: 1 day

12 years agoAdd "nodevice adw" to WITHOUT_SOURCELESS_UCODE.
rmh [Sat, 4 Feb 2012 13:45:39 +0000 (13:45 +0000)]
Add "nodevice adw" to WITHOUT_SOURCELESS_UCODE.

Approved by: kib (mentor)
MFC after: 13 days

12 years agoRemove useless and potentially dangerous rw() function which tries to
jh [Sat, 4 Feb 2012 13:37:31 +0000 (13:37 +0000)]
Remove useless and potentially dangerous rw() function which tries to
update access and modification times by reading and writing the file.
chmod(2) in rw() doesn't help because utimes(2) allow owner and the
super-user to change times. Using just utimes(2) should be sufficient.

The -f option becomes no-op.

Reviewed by: jilles

12 years agoBe as explicit as possible when describing relation between the -m mask
kib [Sat, 4 Feb 2012 13:12:52 +0000 (13:12 +0000)]
Be as explicit as possible when describing relation between the -m mask
argument and slices. Adjust example for the same reason.

Submitted by: Valentin Nechayev <netch netch kiev ua>
MFC after: 3 days

12 years agoAdd /usr/src/cddl/ to the hierarchy.
joel [Sat, 4 Feb 2012 08:03:01 +0000 (08:03 +0000)]
Add /usr/src/cddl/ to the hierarchy.

12 years agoFix typo in comment.
pjd [Sat, 4 Feb 2012 07:59:12 +0000 (07:59 +0000)]
Fix typo in comment.

MFC after: 3 days

12 years agoAdd MK_SOURCELESS build option. Setting MK_SOURCELESS to "no" will disable
rmh [Sat, 4 Feb 2012 00:54:43 +0000 (00:54 +0000)]
Add MK_SOURCELESS build option. Setting MK_SOURCELESS to "no" will disable
kernel modules that include binary-only code.

More fine-grained control is provided via MK_SOURCELESS_HOST (for native code
that runs on host CPU) and MK_SOURCELESS_UCODE (for microcode).

Reviewed by: julian, delphij, freebsd-arch
Approved by: kib (mentor)
MFC after: 2 weeks

12 years agoRestore callee saved registers later and micro-optimize.
jkim [Fri, 3 Feb 2012 21:24:28 +0000 (21:24 +0000)]
Restore callee saved registers later and micro-optimize.

12 years agoFix a function prototype to reflect reality. No functional change.
jkim [Fri, 3 Feb 2012 21:21:00 +0000 (21:21 +0000)]
Fix a function prototype to reflect reality.  No functional change.

12 years agoRevert r230913 and r230914.
mm [Fri, 3 Feb 2012 13:40:51 +0000 (13:40 +0000)]
Revert r230913 and r230914.

The initialization was correct, the problem needs deeper analysis.

12 years agoPrint the owner process for unix domain sockets when restricted to the
pluknet [Fri, 3 Feb 2012 09:07:53 +0000 (09:07 +0000)]
Print the owner process for unix domain sockets when restricted to the
specified files.

PR: bin/143962
MFC after: 2 weeks

12 years agoWhitespace removal.
rpaulo [Fri, 3 Feb 2012 02:06:14 +0000 (02:06 +0000)]
Whitespace removal.

12 years agoAdd some missing radar config parameters to athradar.
adrian [Thu, 2 Feb 2012 21:04:24 +0000 (21:04 +0000)]
Add some missing radar config parameters to athradar.

12 years agoInsert ordered command every 1/4 of the current command timeout, not 1/4
mav [Thu, 2 Feb 2012 19:02:15 +0000 (19:02 +0000)]
Insert ordered command every 1/4 of the current command timeout, not 1/4
of the default one.

Without this change setting kern.cam.ada.default_timeout to 1 instead of 30
allowed me to trigger several false positive command timeouts under heavy
ZFS load on a SiI3132 siis(4) controller with 5 HDDs on a port multiplier.

MFC after: 1 week

12 years agoFix the netback driver build for i386.
ken [Thu, 2 Feb 2012 17:54:35 +0000 (17:54 +0000)]
Fix the netback driver build for i386.

netback.c: Add missing VM includes.

xen/xenvar.h,
xen/xenpmap.h: Move some XENHVM macros from <machine/xen/xenpmap.h> to
<machine/xen/xenvar.h> on i386 to match the amd64 headers.

conf/files: Add netback to the build.

Submitted by: jhb
MFC after: 3 days

12 years agoRemove leftovers from previous commits.
joel [Thu, 2 Feb 2012 17:25:39 +0000 (17:25 +0000)]
Remove leftovers from previous commits.

Approved by: jhb

12 years agoAdd copyright information on last commits to comply with CDDL.
mm [Thu, 2 Feb 2012 16:33:58 +0000 (16:33 +0000)]
Add copyright information on last commits to comply with CDDL.

Discussed with: pluknet@
MFC after: 3 days

12 years agoFix out of bounds write causing random panics,
mm [Thu, 2 Feb 2012 16:18:40 +0000 (16:18 +0000)]
Fix out of bounds write causing random panics,
uncovered by the change in r230256

Reviewed by: pluknet@
MFC after: 3 days