]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoo Provide function kvm_read_zpcpu() to access UMA_ZONE_PCPU allocations.
glebius [Wed, 10 Apr 2013 20:26:53 +0000 (20:26 +0000)]
o Provide function kvm_read_zpcpu() to access UMA_ZONE_PCPU allocations.
o Provide function kvm_counter_u64_fetch() to fetch valut of a counter(9).

Sponsored by: Nginx, Inc.

11 years agoNeed to call init_mem() to really initialize the MMIO range lookups.
neel [Wed, 10 Apr 2013 18:59:20 +0000 (18:59 +0000)]
Need to call init_mem() to really initialize the MMIO range lookups.

This was working by accident because:
- the RB_HEADs were being initialized to zero as part of BSS
- the pthread_rwlock functions were implicitly initializing the lock object

Obtained from: NetApp

11 years agoRemove obsolete comment about lack of locking for MMIO range lookup.
neel [Wed, 10 Apr 2013 18:53:14 +0000 (18:53 +0000)]
Remove obsolete comment about lack of locking for MMIO range lookup.

Pointed out by: Tycho Nightingale (tycho.nightingale@plurisbusnetworks.com)

11 years agoSimplify allocate_legacy code, txr pointer was breaking LEGACY compile,
jfv [Wed, 10 Apr 2013 17:51:39 +0000 (17:51 +0000)]
Simplify allocate_legacy code, txr pointer was breaking LEGACY compile,
thanks to Nick Rogers for pointing this out.

11 years agoAdd ID for ASMedia ASM1042 USB 3.0 controller.
mav [Wed, 10 Apr 2013 17:43:20 +0000 (17:43 +0000)]
Add ID for ASMedia ASM1042 USB 3.0 controller.

MFC after: 1 week

11 years agoSince UMA_ZONE_PCPU zones put a constraint on sizeof(struct pcpu), declared
glebius [Wed, 10 Apr 2013 16:09:45 +0000 (16:09 +0000)]
Since UMA_ZONE_PCPU zones put a constraint on sizeof(struct pcpu), declared
as CTASSERT in MI pcpu.h, stop including all possible mutually exclusive
PCPU_MD_FIELDS fields into LINT kernels, due to brekaing
aforementioned CTASSERT.

11 years agoFix a time calculation error in ctlstat_standard().
ken [Wed, 10 Apr 2013 16:01:45 +0000 (16:01 +0000)]
Fix a time calculation error in ctlstat_standard().

ctlstat.c: When converting a timeval to a floating point
number in ctlstat_standard(), cast the nanoseconds
calculation to a long double, so we don't lose
precision.  Without the cast, we wind up with a
time in whole seconds only.

Sponsored by: Spectra Logic
MFC after: 3 days

11 years agoRemove the number of addresses restriction from sctp_connectx().
tuexen [Wed, 10 Apr 2013 11:26:30 +0000 (11:26 +0000)]
Remove the number of addresses restriction from sctp_connectx().
Remove unused code.
While there, do some cleanup of the code.

MFC after: 1 week

11 years agoMake ctladm(8) try to load ctl.ko kernel module if needed.
trasz [Wed, 10 Apr 2013 08:48:10 +0000 (08:48 +0000)]
Make ctladm(8) try to load ctl.ko kernel module if needed.

Reviewed by: ken

11 years agoFix build.
glebius [Wed, 10 Apr 2013 08:09:25 +0000 (08:09 +0000)]
Fix build.

11 years agoCast to (void *)(uintptr_t) on copyout and copyin of zfs_iocparm_t.zfs_cmd
mm [Wed, 10 Apr 2013 07:01:17 +0000 (07:01 +0000)]
Cast to (void *)(uintptr_t) on copyout and copyin of zfs_iocparm_t.zfs_cmd

MFC after: 9 days

11 years agoUnsynchronized TSCs on the host require special handling in bhyve:
neel [Wed, 10 Apr 2013 05:59:07 +0000 (05:59 +0000)]
Unsynchronized TSCs on the host require special handling in bhyve:

- use clock_gettime(2) as the time base for the emulated ACPI timer instead
  of directly using rdtsc().

- don't advertise the invariant TSC capability to the guest to discourage it
  from using the TSC as its time base.

Discussed with: jhb@ (about making 'smp_tsc' a global)
Reported by: Dan Mack on freebsd-virtualization@
Obtained from: NetApp

11 years agoswapcontext wrapper can not be implemented in C, the stack pointer saved in
davidxu [Wed, 10 Apr 2013 02:40:03 +0000 (02:40 +0000)]
swapcontext wrapper can not be implemented in C, the stack pointer saved in
the context becomes invalid when the function returns, same as setjmp,
it must be implemented in assemble language, see discussions in PR
misc/177624.

11 years agoChange name of variable from 'rwlock' to more descriptive 'mmio_rwlock'
neel [Wed, 10 Apr 2013 02:18:17 +0000 (02:18 +0000)]
Change name of variable from 'rwlock' to more descriptive 'mmio_rwlock'

Requested by: grehan
Obtained from: NetApp

11 years agoImprove PCI BAR emulation:
neel [Wed, 10 Apr 2013 02:12:39 +0000 (02:12 +0000)]
Improve PCI BAR emulation:
- Respect the MEMEN and PORTEN bits in the command register
- Allow the guest to reprogram the address decoded by the BAR

Submitted by: Gopakumar T
Obtained from: NetApp

11 years agoFix the build.
jimharris [Wed, 10 Apr 2013 00:35:08 +0000 (00:35 +0000)]
Fix the build.

11 years agoZFS expects a copyout of zfs_cmd_t on an ioctl error. Our sys_ioctl()
mm [Tue, 9 Apr 2013 22:27:44 +0000 (22:27 +0000)]
ZFS expects a copyout of zfs_cmd_t on an ioctl error. Our sys_ioctl()
doesn't copyout in this case.

To solve this issue a new struct zfs_iocparm_t is introduced consisting of:
- zfs_ioctl_version (future backwards compatibility purposes)
- user space pointer to zfs_cmd_t (copyin and copyout)
- size of zfs_cmd_t (verification purposes)

The copyin and copyout of zfs_cmd_t is now done the illumos (vendor) way
what makes porting of new changes easier and ensures correct behavior if
returning an error.

MFC after: 10 days

11 years agoChange certain heavily used network related mutexes and rwlocks to
andre [Tue, 9 Apr 2013 21:02:20 +0000 (21:02 +0000)]
Change certain heavily used network related mutexes and rwlocks to
reside on their own cache line to prevent false sharing with other
nearby structures, especially for those in the .bss segment.

NB: Those mutexes and rwlocks with variables next to them that get
changed on every invocation do not benefit from their own cache line.
Actually it may be net negative because two cache misses would be
incurred in those cases.

11 years agoFix a race condition on tcp listen socket teardown with pending
andre [Tue, 9 Apr 2013 20:52:26 +0000 (20:52 +0000)]
Fix a race condition on tcp listen socket teardown with pending
connections in the accept queue and contiguous new incoming SYNs.

Compared to the original submitters patch I've moved the test
next to the SYN handling to have it together in a logical unit
and reworded the comment explaining the issue.

Submitted by: Matt Miller <matt@matthewjmiller.net>
Submitted by: Juan Mojica <jmojica@gmail.com>
Reviewed by: Matt Miller (changes)
Tested by: pho
MFC after: 1 week

11 years agoEnsure make -j N universe works correctly, by checking for an up-to-date
dim [Tue, 9 Apr 2013 20:21:35 +0000 (20:21 +0000)]
Ensure make -j N universe works correctly, by checking for an up-to-date
make before starting the universe targets themselves.  Otherwise, all of
the targets would attempt to build make simultaneously, overwriting each
other's copies of the make object files and executable.  This could lead
to strange errors, for example when partially-written make executables
are invoked.

Also amend r216620, to make the rest of universe wait properly until the
upgrade_checks target is finished, by adding universe_${target}_prologue
to the .ORDER target.  Otherwise, make will be too smart for its own
good, and start building the universe targets simultaneously with the
prologues anyway.

MFC after: 1 week

11 years agoProxy allocation requests for the PCI ROM BAR from child devices similar
jhb [Tue, 9 Apr 2013 19:36:34 +0000 (19:36 +0000)]
Proxy allocation requests for the PCI ROM BAR from child devices similar
to how the VGA bus driver currently proxies allocation requests for other
PCI BARs.

MFC after: 1 week

11 years agoPass the segmented address of the counter, based on %fs, i.e. offset
kib [Tue, 9 Apr 2013 17:55:39 +0000 (17:55 +0000)]
Pass the segmented address of the counter, based on %fs, i.e. offset
from the pcpu[0] to the counter base, instead of the linear address.

11 years agoConvert UMA code to C99 uintXX_t types.
glebius [Tue, 9 Apr 2013 17:43:48 +0000 (17:43 +0000)]
Convert UMA code to C99 uintXX_t types.

11 years agoSwap us_freecount and us_flags, achieving same structure size
glebius [Tue, 9 Apr 2013 17:25:15 +0000 (17:25 +0000)]
Swap us_freecount and us_flags, achieving same structure size
as before previous commit.

Submitted by: alc

11 years agoAdd static/const keywords to the arrays.
ed [Tue, 9 Apr 2013 16:16:34 +0000 (16:16 +0000)]
Add static/const keywords to the arrays.

This theoretically allows a compiler to optimize (parts of) the array
away if unused.

While there, make the array size implicit and use a _Static_assert() to
ensure that the definition matches up with the number of elements in the
list.

11 years agoSince now we support 256 items per slab, we need more bits
glebius [Tue, 9 Apr 2013 15:15:52 +0000 (15:15 +0000)]
Since now we support 256 items per slab, we need more bits
for us_freecount.

This grows uma_slab_head on 32-bit arches, but growth isn't
significant. Taking kmem zones as example, only the 32 byte
zone is affected, ipers is reduced from 113 to 112.

In collaboration with: kib

11 years agoLast remaining prototype issue that still hasn't been fixed upstream.
des [Tue, 9 Apr 2013 13:16:11 +0000 (13:16 +0000)]
Last remaining prototype issue that still hasn't been fixed upstream.

11 years agoRevert local changes and pull in r3828 from upstream.
des [Tue, 9 Apr 2013 13:14:39 +0000 (13:14 +0000)]
Revert local changes and pull in r3828 from upstream.

11 years agoFix KASSERTs: maximum number of items per slab is 256.
glebius [Tue, 9 Apr 2013 12:20:44 +0000 (12:20 +0000)]
Fix KASSERTs: maximum number of items per slab is 256.

11 years agoFix build for AIM 64bit.
kib [Tue, 9 Apr 2013 12:01:54 +0000 (12:01 +0000)]
Fix build for AIM 64bit.

11 years agoFix the assertions for the state of the object under the map entry
kib [Tue, 9 Apr 2013 10:04:10 +0000 (10:04 +0000)]
Fix the assertions for the state of the object under the map entry
with the MAP_ENTRY_VN_WRITECNT flag:
- Move the assertion that verifies the state of the v_writecount and
  vnp.writecount, under the block where the object is locked.
- Check that the object type is OBJT_VNODE before asserting.

Reported by: avg
Reviewed by: alc
MFC after: 1 week

11 years agoFix VIMAGE build.
glebius [Tue, 9 Apr 2013 09:15:26 +0000 (09:15 +0000)]
Fix VIMAGE build.

11 years agoUse IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats.
ae [Tue, 9 Apr 2013 07:11:22 +0000 (07:11 +0000)]
Use IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats.

MFC after: 1 week

11 years agoImport a new version of NetBSD's mtree.
ed [Tue, 9 Apr 2013 06:50:11 +0000 (06:50 +0000)]
Import a new version of NetBSD's mtree.

This version of mtree implements a new flag (-O) that can be used to
restrict the tool to certain pathnames. Also, it fixes a compiler
warning generated by -Wmissing-variable-declarations.

Acked by: brooks

11 years agoFireWire: Don't allow a tlabel to reference an xfer after free.
will [Mon, 8 Apr 2013 23:16:42 +0000 (23:16 +0000)]
FireWire: Don't allow a tlabel to reference an xfer after free.

sys/dev/firewire/firewire.c:
- fw_xfer_unload(): Since we are about to free this xfer, call fw_tl_free()
  to remove the xfer from its tlabel's list, if it has a tlabel.
- In every occasion when a xfer is removed from a tlabel's list, reset
  xfer->tl to -1 while holding fc->tlabel_lock, so that the xfer isn't
  mis-identified as belonging to a tlabel.

This doesn't fix all the use-after-free problems for M_FWMEM, but is an
incremental towards that goal.

Reviewed by: kan, sbruno
Sponsored by: Spectra Logic

11 years agoFix this to compile when ATH_DEBUG_ALQ is defined but ATH_DEBUG isn't.
adrian [Mon, 8 Apr 2013 21:15:43 +0000 (21:15 +0000)]
Fix this to compile when ATH_DEBUG_ALQ is defined but ATH_DEBUG isn't.

11 years agoAdd FreeBSD 8.4.
pluknet [Mon, 8 Apr 2013 20:33:51 +0000 (20:33 +0000)]
Add FreeBSD 8.4.

MFC after: 3 days

11 years agoThe per-page act_count can be made very-easily protected by the
attilio [Mon, 8 Apr 2013 20:02:27 +0000 (20:02 +0000)]
The per-page act_count can be made very-easily protected by the
per-page lock rather than vm_object lock, without any further overhead.
Make the formal switch.

Sponsored by: EMC / Isilon storage division
Reviewed by: alc
Tested by: pho

11 years agoSwitch some "low-hanging fruit" to acquire read lock on vmobjects
attilio [Mon, 8 Apr 2013 19:58:32 +0000 (19:58 +0000)]
Switch some "low-hanging fruit" to acquire read lock on vmobjects
rather than write locks.

Sponsored by: EMC / Isilon storage division
Reviewed by: alc
Tested by: pho

11 years agoMerge from projects/counters: TCP/IP stats.
glebius [Mon, 8 Apr 2013 19:57:21 +0000 (19:57 +0000)]
Merge from projects/counters: TCP/IP stats.

  Convert 'struct ipstat' and 'struct tcpstat' to counter(9).

  This speeds up IP forwarding at extreme packet rates, and
makes accounting more precise.

Sponsored by: Nginx, Inc.

11 years agoVendor import of NetBSD's mtree at 2013-04-08.
ed [Mon, 8 Apr 2013 19:44:30 +0000 (19:44 +0000)]
Vendor import of NetBSD's mtree at 2013-04-08.

11 years agoMerge from projects/counters: counter(9).
glebius [Mon, 8 Apr 2013 19:40:53 +0000 (19:40 +0000)]
Merge from projects/counters: counter(9).

  Introduce counter(9) API, that implements fast and raceless counters,
provided (but not limited to) for gathering of statistical data.

See http://lists.freebsd.org/pipermail/freebsd-arch/2013-April/014204.html
for more details.

In collaboration with: kib
Reviewed by: luigi
Tested by: ae, ray
Sponsored by: Nginx, Inc.

11 years agoForcibly defining _KERNEL is bad idea. Toss some code so that ip_var.h
glebius [Mon, 8 Apr 2013 19:20:27 +0000 (19:20 +0000)]
Forcibly defining _KERNEL is bad idea. Toss some code so that ip_var.h
isn't included with forced _KERNEL define.

11 years agoMerge from projects/counters:
glebius [Mon, 8 Apr 2013 19:19:10 +0000 (19:19 +0000)]
Merge from projects/counters:

  Pad struct pcpu so that its size is denominator of PAGE_SIZE. This
is done to reduce memory waste in UMA_PCPU_ZONE zones.

Sponsored by: Nginx, Inc.

11 years agoMerge from projects/counters: UMA_ZONE_PCPU zones.
glebius [Mon, 8 Apr 2013 19:10:45 +0000 (19:10 +0000)]
Merge from projects/counters: UMA_ZONE_PCPU zones.

  These zones have slab size == sizeof(struct pcpu), but request from VM
enough pages to fit (uk_slabsize * mp_ncpus). An item allocated from such
zone would have a separate twin for each CPU in the system, and these twins
are at a distance of sizeof(struct pcpu) from each other. This magic value
of distance would allow us to make some optimizations later.

  To address private item from a CPU simple arithmetics should be used:

  item = (type *)((char *)base + sizeof(struct pcpu) * curcpu)

  These arithmetics are available as zpcpu_get() macro in pcpu.h.

  To introduce non-page size slabs a new field had been added to uma_keg
uk_slabsize. This shifted some frequently used fields of uma_keg to the
fourth cache line on amd64. To mitigate this pessimization, uma_keg fields
were a bit rearranged and least frequently used uk_name and uk_link moved
down to the fourth cache line. All other fields, that are dereferenced
frequently fit into first three cache lines.

Sponsored by: Nginx, Inc.

11 years agoFix a potential socket leak in the NFS server. If a client closes its
jhb [Mon, 8 Apr 2013 19:03:01 +0000 (19:03 +0000)]
Fix a potential socket leak in the NFS server.  If a client closes its
connection after it was accepted by the userland nfsd process but before
it was handled off to svc_vc_create() in the kernel, then svc_vc_create()
would see it as a new listen socket and try to listen on it leaving a
dangling reference to the socket.  Instead, check for disconnected sockets
and treat them like a connected socket.  The call to pru_getaddr() should
fail and cause svc_vc_create() to fail.  Note that we need to lock the
socket to get a consistent snapshot of so_state since there is a window
in soisdisconnected() where both flags are clear.

Reviewed by: dfr, rmacklem
MFC after: 1 week

11 years agoSwitch to a 2-clause license.
markj [Mon, 8 Apr 2013 18:25:07 +0000 (18:25 +0000)]
Switch to a 2-clause license.

Approved by: emaste (co-mentor)
X-MFC with: r249257

11 years agoAdd support for getting and setting BBU properties related to battery
markj [Mon, 8 Apr 2013 17:46:45 +0000 (17:46 +0000)]
Add support for getting and setting BBU properties related to battery
relearning. Specifically, add subcommands to mfiutil(8) which allow the
user to set the BBU and autolearn modes when the firmware supports it,
and add a subcommand which kicks off a battery relearn.

Reviewed by: sbruno, rstone
Tested by: sbruno
Approved by: rstone (co-mentor)
MFC after: 2 weeks
Sponsored by: Sandvine Incorporated

11 years agoFix a memory leak that showed up when we delete LUNs. The memory used for
ken [Mon, 8 Apr 2013 15:36:26 +0000 (15:36 +0000)]
Fix a memory leak that showed up when we delete LUNs.  The memory used for
the LUN was never freed.

ctl.c: Adjust ctl_alloc_lun() to make sure we don't clear the
CTL_LUN_MALLOCED flag.

Reported by: Sreenivasa Honnur <shonnur@chelsio.com>
Sponsored by: Spectra Logic
MFC after: 3 days

11 years agomdoc: sort cross references.
joel [Mon, 8 Apr 2013 10:53:22 +0000 (10:53 +0000)]
mdoc: sort cross references.

11 years agoRemove reference to the nonexistent sysctl node net.inet6.mld.stats.
ae [Mon, 8 Apr 2013 10:14:50 +0000 (10:14 +0000)]
Remove reference to the nonexistent sysctl node net.inet6.mld.stats.
Also add cross reference to the icmp6(4).

PR: 177696
MFC after: 1 week

11 years agodrm: Right-shift I2C slave address before passing it to aux channel
dumbbell [Mon, 8 Apr 2013 08:37:57 +0000 (08:37 +0000)]
drm: Right-shift I2C slave address before passing it to aux channel

In r249041, I2C slave addresses were left-shifted at creation time to
have the same behavior between i915 and radeon (not committed yet). This
change broke the aux channel. The user-visible change was that display
port on i915 didn't work anymore.

To fix this, we right-shift the address back to restore the original value.

Reported by: Olivier Cochard-LabbĂ© <olivier@cochard.me>
Tested by: Olivier Cochard-LabbĂ© <olivier@cochard.me>
Reviewed by: kib@

11 years agoMark the act_tbl static/const.
ed [Mon, 8 Apr 2013 08:05:15 +0000 (08:05 +0000)]
Mark the act_tbl static/const.

This table is only used within this source file and is only accessed
read-only.

MFC after: 1 week

11 years agoPrevent the creation of an unused variable.
ed [Mon, 8 Apr 2013 08:03:42 +0000 (08:03 +0000)]
Prevent the creation of an unused variable.

We're only interested in the enumeration fields; we don't want to create
a variable to store them.

MFC after: 1 week

11 years agoFix synopsis for sbuf_len.
trociny [Sun, 7 Apr 2013 17:54:38 +0000 (17:54 +0000)]
Fix synopsis for sbuf_len.

MFC after: 3 days

11 years agoUse pget(9) to reduce code duplication.
trociny [Sun, 7 Apr 2013 17:44:30 +0000 (17:44 +0000)]
Use pget(9) to reduce code duplication.

MFC after: 1 week

11 years agoFill p_flags and p_align fields of the core dump note segement.
trociny [Sun, 7 Apr 2013 17:42:27 +0000 (17:42 +0000)]
Fill p_flags and p_align fields of the core dump note segement.

Reviewed by: kib
MFC after: 2 weeks

11 years agoUse 4-byte padding for core dump notes on both 32 and 64bit archs.
trociny [Sun, 7 Apr 2013 17:40:49 +0000 (17:40 +0000)]
Use 4-byte padding for core dump notes on both 32 and 64bit archs.

Although native word padding (i.e. 8-byte on 64bit arch) looks to be
in agreement with standards, other parts of our code and other OSes
use 4-byte alignment.

This is not expected to change alignment for currently generated core
dump notes, as the notes look to consist of structures with sizes
multiple of 8 on 64-bit archs. But there are plans to add additional
notes, where 4-byte vs 8-byte alignment makes difference.

Discussed with: kib
Reviewed by: kib
MFC after: 2 weeks

11 years agosh: Add const to nodesavestr().
jilles [Sun, 7 Apr 2013 16:28:36 +0000 (16:28 +0000)]
sh: Add const to nodesavestr().

11 years agoAdd some missing newlines and static declarations.
marius [Sun, 7 Apr 2013 15:33:06 +0000 (15:33 +0000)]
Add some missing newlines and static declarations.

MFC after: 3 days

11 years agomqueue,ksem,shm: Fix race condition with setting UF_EXCLOSE.
jilles [Sun, 7 Apr 2013 15:26:09 +0000 (15:26 +0000)]
mqueue,ksem,shm: Fix race condition with setting UF_EXCLOSE.

POSIX mqueue, compatibility ksem and POSIX shm create a file descriptor that
has close-on-exec set. However, they do this incorrectly, leaving a window
where a thread may fork and exec while the flag has not been set yet. The
race is easily reproduced on a multicore system with one thread doing
shm_open and close and another thread doing posix_spawnp and waitpid.

Set UF_EXCLOSE via falloc()'s flags argument instead. This also simplifies
the code.

MFC after: 1 week

11 years agoFix regression issue after r248910.
hselasky [Sun, 7 Apr 2013 13:03:57 +0000 (13:03 +0000)]
Fix regression issue after r248910.

PR: arm/177685
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

11 years agoRemove extra semicolons from CAM_SIM_[UN]LOCK() macros.
mav [Sun, 7 Apr 2013 06:47:44 +0000 (06:47 +0000)]
Remove extra semicolons from CAM_SIM_[UN]LOCK() macros.

11 years agoThe CELL fields can be various integer types depending on the platform
kientzle [Sun, 7 Apr 2013 05:53:42 +0000 (05:53 +0000)]
The CELL fields can be various integer types depending on the platform
(ARM uses 'int' and 'unsigned'; i386 uses 'long' and 'unsigned long'),
so we need explicit casts to long and unsigned long here to ensure
that the result matches the printf %ld and %lx specifiers.

11 years agoFix two broken macros.
kientzle [Sun, 7 Apr 2013 05:40:49 +0000 (05:40 +0000)]
Fix two broken macros.

11 years agoMicro-optimize the order of struct vm_radix_node's fields. Specifically,
alc [Sun, 7 Apr 2013 01:30:51 +0000 (01:30 +0000)]
Micro-optimize the order of struct vm_radix_node's fields.  Specifically,
arrange for all of the fields to start at a short offset from the
beginning of the structure.

Eliminate unnecessary masking of VM_RADIX_FLAGS from the root pointer in
vm_radix_getroot().

Sponsored by: EMC / Isilon Storage Division

11 years agosh: Add a variation on builtins/eval4.0 where the cmdsubst returns 0.
jilles [Sat, 6 Apr 2013 22:30:46 +0000 (22:30 +0000)]
sh: Add a variation on builtins/eval4.0 where the cmdsubst returns 0.

11 years agoAdd warning about SOCK_CLOEXEC and SOCK_NONBLOCK (r248534).
jilles [Sat, 6 Apr 2013 22:28:19 +0000 (22:28 +0000)]
Add warning about SOCK_CLOEXEC and SOCK_NONBLOCK (r248534).

Reviewed by: rpaulo

11 years agoPrepare to replace the buf splay with a trie:
jeff [Sat, 6 Apr 2013 22:21:23 +0000 (22:21 +0000)]
Prepare to replace the buf splay with a trie:

 - Don't insert BKGRDMARKER bufs into the splay or dirty/clean buf lists.
   No consumers need to find them there and it complicates the tree.
   These flags are all FFS specific and could be moved out of the buf
   cache.
 - Use pbgetvp() and pbrelvp() to associate the background and journal
   bufs with the vp.  Not only is this much cheaper it makes more sense
   for these transient bufs.
 - Fix the assertions in pbget* and pbrel*.  It's not safe to check list
   pointers which were never initialized.  Use the BX flags instead.  We
   also check B_PAGING in reassignbuf() so this should cover all cases.

Discussed with: kib, mckusick, attilio
Sponsored by: EMC / Isilon Storage Division

11 years agomdoc: new sentence should be on a new line. Also remove EOL whitespace while
joel [Sat, 6 Apr 2013 19:40:04 +0000 (19:40 +0000)]
mdoc: new sentence should be on a new line. Also remove EOL whitespace while
here.

11 years agoRemove atadevel(4), it no longer builds with ATA_CAM and it's unlikely
marius [Sat, 6 Apr 2013 19:33:24 +0000 (19:33 +0000)]
Remove atadevel(4), it no longer builds with ATA_CAM and it's unlikely
that support for new lines of ATA controllers will be added to ata(4).

11 years ago- With the demise of !ATA_CAM, ATA_STATIC_ID is the only ata(4) related
marius [Sat, 6 Apr 2013 19:12:49 +0000 (19:12 +0000)]
- With the demise of !ATA_CAM, ATA_STATIC_ID is the only ata(4) related
  option left but actually consumed by ada(4), so move it to opt_ada.h
  and get rid of opt_ata.h.
- Fix stand-alone build of atacore(4) by adding opt_cam.h.
- Use __FBSDID.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

11 years agoSimplify vm_radix_keybarr().
alc [Sat, 6 Apr 2013 18:04:35 +0000 (18:04 +0000)]
Simplify vm_radix_keybarr().

Sponsored by: EMC / Isilon Storage Division

11 years agoRegenerate usb.conf
hselasky [Sat, 6 Apr 2013 17:25:17 +0000 (17:25 +0000)]
Regenerate usb.conf

MFC after: 1 week

11 years agoMFV r249186:
mm [Sat, 6 Apr 2013 17:24:00 +0000 (17:24 +0000)]
MFV r249186:
Do not list read-only pools in zpool.cache
Reduce diff against vendor in unused vdev_disk.c

Illumos ZFS issues:
  3639 zpool.cache should skip over readonly pools
  3640 want automatic devid updates

MFC after: 1 week

11 years agoMFV r249185:
mm [Sat, 6 Apr 2013 17:18:48 +0000 (17:18 +0000)]
MFV r249185:
Allow zdb to output a histogram of compressed block sizes.

Illumos ZFS issues:
  3641 want a histogram of compressed block sizes

MFC after: 3 weeks

11 years agoMFV r248660:
mm [Sat, 6 Apr 2013 17:15:47 +0000 (17:15 +0000)]
MFV r248660:
Merge vendor change - modify time processing in deadman thread.

Illumos ZFS issues:
  3618 ::zio dcmd does not show timestamp data

MFC after: 3 weeks

11 years agoReplicate r245306 from SCSI to ATA. The problem didn't appear so far,
mav [Sat, 6 Apr 2013 17:14:56 +0000 (17:14 +0000)]
Replicate r245306 from SCSI to ATA.  The problem didn't appear so far,
covered by multilevel freeze mechanism, but it is better to be safe.

11 years agoAdd new USB ID.
hselasky [Sat, 6 Apr 2013 17:00:11 +0000 (17:00 +0000)]
Add new USB ID.

PR: usb/177666
Submitted by: Nicolai Petri <nicolai@petri.dk>

11 years ago- Make ata_str2mode() static, it's not used outside of ata-all.c.
marius [Sat, 6 Apr 2013 15:02:06 +0000 (15:02 +0000)]
- Make ata_str2mode() static, it's not used outside of ata-all.c.
- Move ata_timeout() to ata-all.c so we don't need to expose both this
  function and ata_cam_end_transaction() but only the former.
- Move ata_cmd2str() from ata-queue.c to ata-all.c so we can get rid of
  the former.
- Add some missing prototypes.

MFC after: 3 days

11 years agoRemove some more remnants of !ATA_CAM.
marius [Sat, 6 Apr 2013 13:54:00 +0000 (13:54 +0000)]
Remove some more remnants of !ATA_CAM.

11 years agoDocument legacy ATA stack removal.
mav [Sat, 6 Apr 2013 13:47:44 +0000 (13:47 +0000)]
Document legacy ATA stack removal.

11 years agoCorrect the path.
jh [Sat, 6 Apr 2013 13:42:37 +0000 (13:42 +0000)]
Correct the path.

PR: 176256
Submitted by: jhs

11 years agoUnbreak ATA_NO_48BIT_DMA with ATA_CAM by treating 48-bit DMA as an
marius [Sat, 6 Apr 2013 13:39:02 +0000 (13:39 +0000)]
Unbreak ATA_NO_48BIT_DMA with ATA_CAM by treating 48-bit DMA as an
optional property with PATA transport.

Reviewed by: mav
MFC after: 3 days

11 years agoProvide a fix for kernel panic if receiving recursive deduplicated streams.
mm [Sat, 6 Apr 2013 11:54:41 +0000 (11:54 +0000)]
Provide a fix for kernel panic if receiving recursive deduplicated streams.
Problem reported to vendor.

Illumos ZFS issues:
  3692 Panic on zfs receive of a recursive deduplicated stream

MFC after: 2 weeks

11 years agoMFV r248217:
mm [Sat, 6 Apr 2013 10:39:38 +0000 (10:39 +0000)]
MFV r248217:
Merge change from vendor to reduce diff only.
ZFS dtrace probes are not supported on FreeBSD yet.

Illumos ZFS issues:
  3598 want to dtrace when errors are generated in zfs

MFC after: 3 weeks

11 years agoMake SYNCHRONIZE CACHE work with LUNs backed by device files (as opposed
trasz [Sat, 6 Apr 2013 10:34:02 +0000 (10:34 +0000)]
Make SYNCHRONIZE CACHE work with LUNs backed by device files (as opposed
to regular files, which already worked fine).  With this change, it's no
longer neccessary to use "ctladm realsync off" workaround.

11 years agoMake it possible to submit FLUSH bios through geom_dev strategy. This
trasz [Sat, 6 Apr 2013 10:32:06 +0000 (10:32 +0000)]
Make it possible to submit FLUSH bios through geom_dev strategy.  This
is required for CTL to work with device-backed LUNs.

Reviewed by: mav

11 years agoMove CRITICAL_ASSERT() macro to systm.h, where the critical(9)
glebius [Sat, 6 Apr 2013 08:23:38 +0000 (08:23 +0000)]
Move CRITICAL_ASSERT() macro to systm.h, where the critical(9)
functions are declared.

11 years agoMFV r242816:
mm [Sat, 6 Apr 2013 08:21:37 +0000 (08:21 +0000)]
MFV r242816:
Import vendor change to reduce diff, no effect on FreeBSD.

Illumos ZFS issues:
  3517 importing pool with autoreplace=on and "hole" vdevs crashes syseventd

11 years agoSimplify vm_radix_insert().
alc [Sat, 6 Apr 2013 06:02:55 +0000 (06:02 +0000)]
Simplify vm_radix_insert().

Reviewed by: attilio
Tested by: pho
Sponsored by: EMC / Isilon Storage Division

11 years agoProperly clean "spurious interrupt" state
gonzo [Sat, 6 Apr 2013 03:31:28 +0000 (03:31 +0000)]
Properly clean "spurious interrupt" state

Suggested by: Ian Lepore

11 years agoHide non-assembler bits behind #ifndef __ASSEMBLER__
andrew [Sat, 6 Apr 2013 00:47:33 +0000 (00:47 +0000)]
Hide non-assembler bits behind #ifndef __ASSEMBLER__

11 years agoExtend ath3kfw to include overridable device / vendor IDs.
adrian [Fri, 5 Apr 2013 23:42:22 +0000 (23:42 +0000)]
Extend ath3kfw to include overridable device / vendor IDs.

This is required for ar3k series bluetooth devices who need firmware
but have a different vendor ID than normal.

Reviewed by: maksim

11 years agoAdd blacklist entries for Atheros bluetooth device IDs that are known to
adrian [Fri, 5 Apr 2013 23:41:38 +0000 (23:41 +0000)]
Add blacklist entries for Atheros bluetooth device IDs that are known to
need firmware before they will re-attach as correctly functioning bluetooth
devices.

Reviewed by: maksim
Obtained from: Linux ath3k device driver

11 years agoFix declaration vs. definition inconsistency. No functional change.
jkim [Fri, 5 Apr 2013 23:41:34 +0000 (23:41 +0000)]
Fix declaration vs. definition inconsistency.  No functional change.

11 years agoAdd the hw.floatingpoint sysctl to ARM to tell us if we have vfp support
andrew [Fri, 5 Apr 2013 23:35:23 +0000 (23:35 +0000)]
Add the hw.floatingpoint sysctl to ARM to tell us if we have vfp support
in the kernel and the hardware includes a vfp unit.

11 years agoRemove dangling ISA uart stubs.
grehan [Fri, 5 Apr 2013 22:19:02 +0000 (22:19 +0000)]
Remove dangling ISA uart stubs.

Obtained from: NetApp

11 years agoDon't panic when a valid divisor of 1 has been requested.
grehan [Fri, 5 Apr 2013 22:16:31 +0000 (22:16 +0000)]
Don't panic when a valid divisor of 1 has been requested.

Obtained from: NetApp

11 years agoconfig checksum is over the entire fixed portion, not just the
grehan [Fri, 5 Apr 2013 22:14:07 +0000 (22:14 +0000)]
config checksum is over the entire fixed portion, not just the
config header. FreeBSD doesn't check this but other o/s's do.

Obtained from: NetApp