freebsd.git
9 years agoRemove incorrect props
des [Mon, 15 Sep 2014 09:45:10 +0000 (09:45 +0000)]
Remove incorrect props

9 years agoMake net.inet.ip.sourceroute, net.inet.ip.accept_sourceroute, and
hrs [Mon, 15 Sep 2014 07:20:40 +0000 (07:20 +0000)]
Make net.inet.ip.sourceroute, net.inet.ip.accept_sourceroute, and
net.inet.ip.process_options vnet-aware.  Revert changes in r271545.

Suggested by: bz

9 years agoadd gptzfsboot.8, zfsboot.8 and zfsloader.8 manual pages
avg [Mon, 15 Sep 2014 06:21:28 +0000 (06:21 +0000)]
add gptzfsboot.8, zfsboot.8 and zfsloader.8 manual pages

Many thanks to Warren Block for his reviews, corrections and additions.

Reviewed by: Warren Block <wblock@FreeBSD.org>
MFC after: 1 week

9 years agoUse gic_decode_fdt() rather than a local routine to parse fdt interrupt
ian [Sun, 14 Sep 2014 23:48:18 +0000 (23:48 +0000)]
Use gic_decode_fdt() rather than a local routine to parse fdt interrupt
properties.  Move fdt_pic_table and fdt_fixup_table into imx6_machdep.c,
which means imx6 doesn't need imx_common.c anymore.

9 years agoAlways report that we support REPORT TARGET PORT GROUPS command.
mav [Sun, 14 Sep 2014 23:39:13 +0000 (23:39 +0000)]
Always report that we support REPORT TARGET PORT GROUPS command.

Without clustering support we any way have only one group of permanently
active ports, but that gives us one more supported VMWare feature. ;)

Solaris' Comstar also reports it even when only one port is present.

9 years agoAdd couple memory barries to serialize tdq_cpu_idle and tdq_load accesses.
mav [Sun, 14 Sep 2014 22:13:19 +0000 (22:13 +0000)]
Add couple memory barries to serialize tdq_cpu_idle and tdq_load accesses.

This change fixes transient performance drops in some of my benchmarks,
vanishing as soon as I am trying to collect any stats from the scheduler.
It looks like reordered access to those variables sometimes caused loss of
IPI_PREEMPT, that delayed thread execution until some later interrupt.

MFC after: 3 days

9 years agoAdd DEF_CLONE_CMD_ARG2
bryanv [Sun, 14 Sep 2014 22:10:35 +0000 (22:10 +0000)]
Add DEF_CLONE_CMD_ARG2

This will be used in the forthcoming vxlan import.

Reviewed by: gnn
Phabric: https://reviews.freebsd.org/D382

9 years agoFix PowerPC backtraces. Since kernel and user have completely separate address
jhibbits [Sun, 14 Sep 2014 22:03:41 +0000 (22:03 +0000)]
Fix PowerPC backtraces.  Since kernel and user have completely separate address
spaces, rather than a split address, we actually can't check for being within
the kernel's address range.  Instead, do what other backtraces do, and use
trapexit()/asttrapexit() as the stack sentinel.

MFC after: 3 weeks

9 years agoAdd a common routine for parsing FDT data describing an ARM GIC interrupt.
ian [Sun, 14 Sep 2014 21:21:03 +0000 (21:21 +0000)]
Add a common routine for parsing FDT data describing an ARM GIC interrupt.

In the fdt data we've written for ourselves, the interrupt properties
for GIC interrupts have just been a bare interrupt number.  In standard
data that conforms to the published bindings, GIC interrupt properties
contain 3-tuples that describe the interrupt as shared vs private, the
interrupt number within the shared/private address space, and configuration
info such as level vs edge triggered.

The new gic_decode_fdt() function parses both types of data, based on the
#interrupt-cells property.  Previously, each platform implemented a decode
routine and put a pointer to it into fdt_pic_table.  Now they can just
list this function in their table instead if they use arm/gic.c.

9 years agoPull in r217410 from upstream llvm trunk (by Bob Wilson):
dim [Sun, 14 Sep 2014 18:50:38 +0000 (18:50 +0000)]
Pull in r217410 from upstream llvm trunk (by Bob Wilson):

  Set trunc store action to Expand for all X86 targets.

  When compiling without SSE2, isTruncStoreLegal(F64, F32) would return
  Legal, whereas with SSE2 it would return Expand. And since the Target
  doesn't seem to actually handle a truncstore for double -> float, it
  would just output a store of a full double in the space for a float
  hence overwriting other bits on the stack.

  Patch by Luqman Aden!

This should fix clang -O0 on i386 assigning garbage to floats, in
certain scenarios.

PR: 187437
Submitted by: cebd@gmail.com
Obtained from: http://llvm.org/viewvc/llvm-project?rev=217410&view=rev
MFC after: 3 days

9 years agoAvoid an exclusive acquisition of the object lock on the expected execution
alc [Sun, 14 Sep 2014 18:07:55 +0000 (18:07 +0000)]
Avoid an exclusive acquisition of the object lock on the expected execution
path through the NFS clients' getpages functions.

Introduce vm_pager_free_nonreq().  This function can be used to eliminate
code that is duplicated in many getpages functions.  Also, in contrast to
the code that currently appears in those getpages functions,
vm_pager_free_nonreq() avoids acquiring an exclusive object lock in one
case.

Reviewed by: kib
MFC after: 6 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd compat strings for all the flavors of GIC this driver should support.
ian [Sun, 14 Sep 2014 17:47:04 +0000 (17:47 +0000)]
Add compat strings for all the flavors of GIC this driver should support.
Also allow the driver to attach to ofwbus as well as simplebus, some FDT
data puts the root interrupt controller on the root bus.

9 years agoFix an undefined variable that was accidentally not causing an error.
ian [Sun, 14 Sep 2014 17:36:57 +0000 (17:36 +0000)]
Fix an undefined variable that was accidentally not causing an error.

The code had references to both intr_offset and intr_parent variable names
as referring to the parent interrupt node.  The intr_parent variable
wasn't actually defined anywhere, but the only references to it were as
an argument to a macro that didn't use that argument in expansion, so
the undefined variable accidentally didn't cause an error.

The intr_parent name makes more sense in context, so change all occurrances
of intr_offset to intr_parent.

9 years agosh: Remove arbitrary length limit on << EOF markers.
jilles [Sun, 14 Sep 2014 16:46:30 +0000 (16:46 +0000)]
sh: Remove arbitrary length limit on << EOF markers.

This also simplifies the code.

9 years agosh: Make checkend() a real function instead of an emulated nested function.
jilles [Sun, 14 Sep 2014 16:27:49 +0000 (16:27 +0000)]
sh: Make checkend() a real function instead of an emulated nested function.

No functional change is intended, but the generated code is slightly
different.

9 years agoAdd a comment giving an overview of the driver. Remove leftover debugging.
ian [Sun, 14 Sep 2014 16:12:43 +0000 (16:12 +0000)]
Add a comment giving an overview of the driver.  Remove leftover debugging.

9 years agosh: Add some const keywords.
jilles [Sun, 14 Sep 2014 15:59:15 +0000 (15:59 +0000)]
sh: Add some const keywords.

9 years agoAdded missing ZFS sysctls
smh [Sun, 14 Sep 2014 12:23:00 +0000 (12:23 +0000)]
Added missing ZFS sysctls
* vfs.zfs.vdev.async_write_active_min_dirty_percent
* vfs.zfs.vdev.async_write_active_max_dirty_percent

Added validation of min / max for ZFS sysctl
* vfs.zfs.dirty_data_max_percent

MFC after: 3 days

9 years agoUpdate CAM CCB accounting for the new status quo.
mav [Sun, 14 Sep 2014 11:59:49 +0000 (11:59 +0000)]
Update CAM CCB accounting for the new status quo.

devq_openings counter lost its meaning after allocation queues has gone.
held counter is still meaningful, but problematic to update due to separate
locking of CCB allocation and queuing.

To fix that replace devq_openings counter with allocated counter.  held is
now calculated on request as difference between number of allocated, queued
and active CCBs.

MFC after: 1 month

9 years agoFix mis-spelling of bits and types names in the vnode_pager_putpages().
kib [Sun, 14 Sep 2014 10:27:36 +0000 (10:27 +0000)]
Fix mis-spelling of bits and types names in the vnode_pager_putpages().
The changes should not modify the generated code.

The pager->pgo_putpages() method takes int flags as its fourth
argument, while vnode_pager_putpages() used boolean_t (which is
typedef'ed to int).  The flags are from VM_PAGER_* namespace, while
vnode_pager_putpages() passed TRUE and OBJPC_SYNC to VOP_PUTPAGES(),
which both are numerically equal to VM_PAGER_PUT_SYNC.

Noted and reviewed by: alc (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoUse non-recursive algorithm for traversing nvlists. This also removes
pjd [Sun, 14 Sep 2014 09:30:09 +0000 (09:30 +0000)]
Use non-recursive algorithm for traversing nvlists. This also removes
the limit on number of nested nvlists.

Submitted by: Mariusz Zaborski

9 years agoRemove the limit on descriptors that can be send in one nvlist.
pjd [Sun, 14 Sep 2014 09:27:12 +0000 (09:27 +0000)]
Remove the limit on descriptors that can be send in one nvlist.

Submitted by: Mariusz Zaborski

9 years agoFix descriptors leak.
pjd [Sun, 14 Sep 2014 09:26:33 +0000 (09:26 +0000)]
Fix descriptors leak.

PR: bin/191002
Reported by: Ryan Steinmetz
Submitted by: mjg

9 years agoFix two small nits in ctl.conf(5).
trasz [Sun, 14 Sep 2014 08:35:44 +0000 (08:35 +0000)]
Fix two small nits in ctl.conf(5).

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoZFS support isn't actually experimental anymore, so no need to scare
nwhitehorn [Sun, 14 Sep 2014 02:31:53 +0000 (02:31 +0000)]
ZFS support isn't actually experimental anymore, so no need to scare
people.

9 years agoMake the root-on-zfs part of the installer warn a user who booted the installer via...
allanjude [Sun, 14 Sep 2014 01:57:22 +0000 (01:57 +0000)]
Make the root-on-zfs part of the installer warn a user who booted the installer via UEFI that we do not support booting ZFS via UEFI yet

PR: 193595
Approved by: nwhitehorn
MFC after: 5 days
Sponsored by: ScaleEngine Inc.
CR: https://reviews.freebsd.org/D782

9 years agoFix RTC clock writes on many Octeon boards.
kan [Sun, 14 Sep 2014 00:02:40 +0000 (00:02 +0000)]
Fix RTC clock writes on many Octeon boards.

The struct clocktime uses 0-based week day number, so back out part of
r229161 by gonzo, which actually broke the RTC clock writes on Sundays.

9 years agoAdd delay to Octeon MDIO access routines.
kan [Sun, 14 Sep 2014 00:02:37 +0000 (00:02 +0000)]
Add delay to Octeon MDIO access routines.

Prevent saturattion of the bus by constant polling which in
extreme cases can cause interface lockup. This makes FreeBSD
match similar case in the executive.

9 years agoResolve an ambiguity with the definition of a new auth-group
allanjude [Sat, 13 Sep 2014 23:50:51 +0000 (23:50 +0000)]
Resolve an ambiguity with the definition of a new auth-group
Resolve a markup mistake

Reviewed by: trasz
Approved by: bcr (mentor), wblock (mentor)
Sponsored by: ScaleEngine Inc.
CR: https://reviews.freebsd.org/D735

9 years agoRename the choices in the partitioning methods dialog to reflect current
nwhitehorn [Sat, 13 Sep 2014 22:14:19 +0000 (22:14 +0000)]
Rename the choices in the partitioning methods dialog to reflect current
reality. In particular, draw a connection between the auto ZFS script and
the auto UFS one, since they fulfill similar functions. I'm not sure the
auto ZFS code is actually experimental anymore, so it might be worth
changing that label still.

9 years agoMake the default choice for the chroot shell at the end be "No". This allows
nwhitehorn [Sat, 13 Sep 2014 22:03:51 +0000 (22:03 +0000)]
Make the default choice for the chroot shell at the end be "No". This allows
just pressing enter repeatedly to successfully install a reasonable system.

9 years agoRevert r271504. A new patch to solve this issue will be made.
hselasky [Sat, 13 Sep 2014 20:52:01 +0000 (20:52 +0000)]
Revert r271504. A new patch to solve this issue will be made.

Suggested by: adrian @

9 years agoReplace the imx5 and imx6 iomux drivers with a single common driver that
ian [Sat, 13 Sep 2014 20:09:34 +0000 (20:09 +0000)]
Replace the imx5 and imx6 iomux drivers with a single common driver that
uses the new fdt_pinctrl interface.

9 years agoCreate /tmp/bsdinstall_etc even if we aren't starting the installer so that
nwhitehorn [Sat, 13 Sep 2014 20:09:02 +0000 (20:09 +0000)]
Create /tmp/bsdinstall_etc even if we aren't starting the installer so that
dhclient can write resolv.conf when used from the live environment.

PR: 176078
MFC after: 3 days

9 years agoConvert the at91_pinctrl driver to use the new fdt_pinctrl interface.
ian [Sat, 13 Sep 2014 19:59:16 +0000 (19:59 +0000)]
Convert the at91_pinctrl driver to use the new fdt_pinctrl interface.

9 years agoCreate an interface and support routines for drivers that handle IO pin
ian [Sat, 13 Sep 2014 19:03:32 +0000 (19:03 +0000)]
Create an interface and support routines for drivers that handle IO pin
multiplexing and configuration based on FDT data.

Reviewed by: imp

9 years agoDo not set net.inet.ip.{sourceroute,accept_sourceroute} in a vnet jail.
hrs [Sat, 13 Sep 2014 18:54:15 +0000 (18:54 +0000)]
Do not set net.inet.ip.{sourceroute,accept_sourceroute} in a vnet jail.
The following warnings were displayed:

 sysctl: net.inet.ip.sourceroute=0: Operation not permitted
 sysctl: net.inet.ip.accept_sourceroute=0: Operation not permitted

9 years agoSwitch if_vlan(4) to rmlock.
melifaro [Sat, 13 Sep 2014 18:41:24 +0000 (18:41 +0000)]
Switch if_vlan(4) to rmlock.

MFC after: 2 weeks

9 years agoAdd the new iscsi(4) man page
allanjude [Sat, 13 Sep 2014 18:40:12 +0000 (18:40 +0000)]
Add the new iscsi(4) man page
Cross reference it from iscsid(8) and iscsictl(8)

Reviewed by: trasz
Approved by: bcr (mentor), wblock (mentor)
Sponsored by: ScaleEngine Inc.
CR: https://reviews.freebsd.org/D741

9 years agoWe don't need an exclusive object lock on the expected execution path
alc [Sat, 13 Sep 2014 18:26:13 +0000 (18:26 +0000)]
We don't need an exclusive object lock on the expected execution path
through {ext2,ffs}_getpages().

Reviewed by: kib, pfg
MFC after: 6 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd ZFS support to the bsdinstall partition editor and sade.
nwhitehorn [Sat, 13 Sep 2014 18:24:54 +0000 (18:24 +0000)]
Add ZFS support to the bsdinstall partition editor and sade.

Submitted by: Kurt Lidl (original version)
MFC after: 6 weeks

9 years agoSwitch if_vlan(4) to use counter(9) using new
melifaro [Sat, 13 Sep 2014 18:13:08 +0000 (18:13 +0000)]
Switch if_vlan(4) to use counter(9) using new
  if_get_counter api.

9 years agoMFV r271518:
delphij [Sat, 13 Sep 2014 17:48:44 +0000 (17:48 +0000)]
MFV r271518:

Correctly report hole at end of file.

When asked to find a hole, the DMU sees that there are no holes in the
object, and returns ESRCH.  The ZPL interprets this as "no holes before
the end of the file", and therefore inserts the "virtual hole" at the
end of the file.  Because DMU and ZPL have different ideas of where the
end of an object/file is, we will end up returning the end of file,
which is generally larger, instead of returning the end of object.

The fix is to handle the "virtual hole" in the DMU. If no hole is found,
the DMU will return a hole at the end of the file, rather than an error.

Illumos issue:
    5139 SEEK_HOLE failed to report a hole at end of file

MFC after: 1 week

9 years agoMake inclusion of fdt clock support conditional on fdt_clock, not just fdt.
ian [Sat, 13 Sep 2014 17:38:26 +0000 (17:38 +0000)]
Make inclusion of fdt clock support conditional on fdt_clock, not just fdt.
There are plenty of platforms that use fdt without needing the overhead of
the new clock support routines.

9 years agoMFV r271517:
delphij [Sat, 13 Sep 2014 17:36:34 +0000 (17:36 +0000)]
MFV r271517:

In zil_claim, don't issue warning if we get EBUSY (inconsistent) when
opening an objset, instead, ignore it silently.

Illumos issue:

    5140 message about "%recv could not be opened" is printed when booting after crash

MFC after: 1 week

9 years agoMFV r271516:
delphij [Sat, 13 Sep 2014 17:30:46 +0000 (17:30 +0000)]
MFV r271516:

Enable debug printf's when ZFS_DEBUG or debug= is set.

Illumos issue:

    5134 if ZFS_DEBUG or debug= is set, libzpool should enable debug prints

MFC after: 2 weeks

9 years agoMFV r271515:
delphij [Sat, 13 Sep 2014 17:24:56 +0000 (17:24 +0000)]
MFV r271515:

Add a new tunable/sysctl, vfs.zfs.free_max_blocks, which can be used to
limit how many blocks can be free'ed before a new transaction group is
created.  The default is no limit (infinite), but we should probably have
a lower default, e.g. 100,000.

With this limit, we can guard against the case where ZFS could run out of
memory when destroying large numbers of blocks in a single transaction
group, as the entire DDT needs to be brought into memory.

Illumos issue:
    5138 add tunable for maximum number of blocks freed in one txg

MFC after: 2 weeks

9 years agoMFV r271512:
delphij [Sat, 13 Sep 2014 16:51:23 +0000 (16:51 +0000)]
MFV r271512:

Illumos issue:
    5136 fix write throttle comment in dsl_pool.c

MFC after: 2 weeks

9 years agoMFV r271511:
delphij [Sat, 13 Sep 2014 16:41:39 +0000 (16:41 +0000)]
MFV r271511:

Use fnvlist_* to make code more readable.

Illumos issue:
    5135 zpool_find_import_cached() can use fnvlist_*

MFC after: 2 weeks

9 years agoMFV r271510:
delphij [Sat, 13 Sep 2014 16:26:14 +0000 (16:26 +0000)]
MFV r271510:

Enforce 4K as smallest indirect block size (previously the smallest
indirect block size was 1K but that was never used).

This makes some space estimates more accurate and uses less memory
for some data structures.

Illumos issue:
    5141 zfs minimum indirect block size is 4K

MFC after: 2 weeks

9 years agoDo not try to read i2c info when no transceiver is present.
melifaro [Sat, 13 Sep 2014 16:04:55 +0000 (16:04 +0000)]
Do not try to read i2c info when no transceiver is present.

MFC with: r270064
Sponsored by: Yandex LLC

9 years agoFix error handling in cpuset_setithread() introduced in r267716.
melifaro [Sat, 13 Sep 2014 13:46:16 +0000 (13:46 +0000)]
Fix error handling in cpuset_setithread() introduced in r267716.

Noted by: kib
MFC after: 1 week

9 years agoImplement control over command reordering via options and control mode page.
mav [Sat, 13 Sep 2014 10:34:23 +0000 (10:34 +0000)]
Implement control over command reordering via options and control mode page.

It allows to bypass range checks between UNMAP and READ/WRITE commands,
which may introduce additional delays while waiting for UNMAP parameters.
READ and WRITE commands are always processed in safe order since their
range checks are almost free.

9 years agovt(4): Enclose vt_mouse_paste() prototype inside #ifndef SC_NO_CUTPASTE/#endif
dumbbell [Sat, 13 Sep 2014 09:33:37 +0000 (09:33 +0000)]
vt(4): Enclose vt_mouse_paste() prototype inside #ifndef SC_NO_CUTPASTE/#endif

This fixes the build with sparc64 LINT for instance.

Reported by: bz@
MFC after: 3 days

9 years agoAdd "readcache" and "writecache" LUN options to control default behavior.
mav [Sat, 13 Sep 2014 08:55:22 +0000 (08:55 +0000)]
Add "readcache" and "writecache" LUN options to control default behavior.

Default values are "on".  Disabling requires backend to support IO_DIRECT
and IO_SYNC flags respectively, or some alternatives.

9 years agoImprove transmit sending offload, TSO, algorithm in general.
hselasky [Sat, 13 Sep 2014 08:26:09 +0000 (08:26 +0000)]
Improve transmit sending offload, TSO, algorithm in general.

The current TSO limitation feature only takes the total number of
bytes in an mbuf chain into account and does not limit by the number
of mbufs in a chain. Some kinds of hardware is limited by two
factors. One is the fragment length and the second is the fragment
count. Both of these limits need to be taken into account when doing
TSO. Else some kinds of hardware might have to drop completely valid
mbuf chains because they cannot loaded into the given hardware's DMA
engine. The new way of doing TSO limitation has been made backwards
compatible as input from other FreeBSD developers and will use
defaults for values not set.

MFC after: 1 week
Sponsored by: Mellanox Technologies

9 years agoImplement range checks between UNMAP and READ/WRITE commands.
mav [Sat, 13 Sep 2014 07:45:03 +0000 (07:45 +0000)]
Implement range checks between UNMAP and READ/WRITE commands.

Before this change UNMAP completely blocked other I/Os while running.
Now it blocks only colliding ones, slowing down others only due to ZFS
locks collisions.

Sponsored by: iXsystems, Inc.

9 years agoPropagate the error status of /usr/sbin/bhyve out of the vmrun.sh script.
rodrigc [Sat, 13 Sep 2014 05:08:35 +0000 (05:08 +0000)]
Propagate the error status of /usr/sbin/bhyve out of the vmrun.sh script.
Clean up the /dev/vmm entry for this VM when vmrun.sh exits.

Reviewed by: neel
Phabric:     D767

9 years agoAdd a sysctl to export the EFI memory map along with a handler in the
jhb [Sat, 13 Sep 2014 03:10:02 +0000 (03:10 +0000)]
Add a sysctl to export the EFI memory map along with a handler in the
sysctl(8) binary to format it.

Reviewed by: emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D771

9 years agoRegen.
delphij [Sat, 13 Sep 2014 02:18:54 +0000 (02:18 +0000)]
Regen.

9 years agoImport HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
delphij [Sat, 13 Sep 2014 02:15:31 +0000 (02:15 +0000)]
Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
many thanks for their continued support of FreeBSD.

While I'm there, also implement a new build knob, WITHOUT_HYPERV to
disable building and installing of the HyperV utilities when necessary.

The HyperV utilities are only built for i386 and amd64 targets.

This is a stable/10 candidate for inclusion with 10.1-RELEASE.

Submitted by: Wei Hu <weh microsoft com>
MFC after: 1 week

9 years agoWorkaround for receiving Voice Calls using the E1750 dongle from
hselasky [Fri, 12 Sep 2014 22:40:12 +0000 (22:40 +0000)]
Workaround for receiving Voice Calls using the E1750 dongle from
Huawei. It might appear as if the firmware is allocating memory blocks
according to the USB transfer size and if there is initially a lot of
data, like at the answering machine prompt, it simply dies without any
apparent reason. The simple workaround for this is to force a zero
length packet at hardware level after every 512 bytes of data. This
will force the other side to use smaller memory blocks aswell.

MFC after: 1 week

9 years agoSimplify dvd package population with pkg-1.3.
gjb [Fri, 12 Sep 2014 22:20:07 +0000 (22:20 +0000)]
Simplify dvd package population with pkg-1.3.

Submitted by: bdrewery
MFC after: 3 days
X-MFC-With: r271480, r271483
Sponsored by: The FreeBSD Foundation

9 years agocxgbe(4): add support for the SIOCGI2C ioctl.
np [Fri, 12 Sep 2014 21:56:57 +0000 (21:56 +0000)]
cxgbe(4): add support for the SIOCGI2C ioctl.

9 years agoFix various issues with invalid file operations:
jhb [Fri, 12 Sep 2014 21:29:10 +0000 (21:29 +0000)]
Fix various issues with invalid file operations:
- Add invfo_rdwr() (for read and write), invfo_ioctl(), invfo_poll(),
  and invfo_kqfilter() for use by file types that do not support the
  respective operations.  Home-grown versions of invfo_poll() were
  universally broken (they returned an errno value, invfo_poll()
  uses poll_no_poll() to return an appropriate event mask).  Home-grown
  ioctl routines also tended to return an incorrect errno (invfo_ioctl
  returns ENOTTY).
- Use the invfo_*() functions instead of local versions for
  unsupported file operations.
- Reorder fileops members to match the order in the structure definition
  to make it easier to spot missing members.
- Add several missing methods to linuxfileops used by the OFED shim
  layer: fo_write(), fo_truncate(), fo_kqfilter(), and fo_stat().  Most
  of these used invfo_*(), but a dummy fo_stat() implementation was
  added.

9 years agoTweak pipe_truncate() to more closely match pipe_chown() and pipe_chmod()
jhb [Fri, 12 Sep 2014 21:20:36 +0000 (21:20 +0000)]
Tweak pipe_truncate() to more closely match pipe_chown() and pipe_chmod()
by checking PIPE_NAMED and using invfo_truncate() for unnamed pipes.

9 years agoPass the length of an structure to the pretty-printer backends as a
jhb [Fri, 12 Sep 2014 21:01:39 +0000 (21:01 +0000)]
Pass the length of an structure to the pretty-printer backends as a
size_t instead of an int.

9 years agoSimplify vntype_to_kinfo() by returning when the desired value is found
jhb [Fri, 12 Sep 2014 20:56:09 +0000 (20:56 +0000)]
Simplify vntype_to_kinfo() by returning when the desired value is found
instead of breaking out of the loop and then immediately checking the loop
index so that if it was broken out of the proper value can be returned.

While here, use nitems().

9 years agoFix 'function declaration isn't a prototype' warning.
ray [Fri, 12 Sep 2014 20:55:17 +0000 (20:55 +0000)]
Fix 'function declaration isn't a prototype' warning.

Pointed by: ian
MFC after: 1 week

9 years ago- Don't let rman_reserve_resource() activate the resource in
jhb [Fri, 12 Sep 2014 20:34:19 +0000 (20:34 +0000)]
- Don't let rman_reserve_resource() activate the resource in
  nexus_alloc_resource() and don't set a bushandle.
  nexus_activate_resource() will set a proper bushandle.
- Implement a proper nexus_release_resource().
- Fix ixppcib_activate_resource() to call rman_activate_resource()
  before creating a mapping for the resource.

Tested by: jmg

9 years agoFix duplicate PKG_ABI in the PKG_CACHEDIR path.
gjb [Fri, 12 Sep 2014 20:16:55 +0000 (20:16 +0000)]
Fix duplicate PKG_ABI in the PKG_CACHEDIR path.

MFC after: 3 days
X-MFC-With: r271480
Sponsored by: The FreeBSD Foundation

9 years agoAdd support for adding empty partition entries. I.e. skip partition
marcel [Fri, 12 Sep 2014 20:05:08 +0000 (20:05 +0000)]
Add support for adding empty partition entries. I.e. skip partition
numbers or names. This gives more control over the actual layout and
helps to construct BSD disklabels with /usr or /var at dedicated
partitions.

Obtained from: Juniper Networks, Inc.
MFC after: 3 days
Relnotes: yes

9 years agoSet PKG_CACHEDIR to an 'All/' directory one level lower
gjb [Fri, 12 Sep 2014 18:52:01 +0000 (18:52 +0000)]
Set PKG_CACHEDIR to an 'All/' directory one level lower
to fix 'pkg repo' generating repository metadata for the
on-disc packages.

MFC after: 3 days
X-MFC-to-10.1: yes
Sponsored by: The FreeBSD Foundation

9 years agoAdd support for serial and null console to UEFI boot loader.
ambrisko [Fri, 12 Sep 2014 17:32:28 +0000 (17:32 +0000)]
Add support for serial and null console to UEFI boot loader.

9 years agoExtra space from r271467.
pfg [Fri, 12 Sep 2014 15:54:18 +0000 (15:54 +0000)]
Extra space from r271467.

MFC after: 2 months

9 years agoext2fs: add ext2_getpages().
pfg [Fri, 12 Sep 2014 15:49:21 +0000 (15:49 +0000)]
ext2fs: add ext2_getpages().

Literally copy/pasted from ffs_getpages().

Tested with: fsx
MFC after: 2 months

9 years agoFix stray char on paste.
ray [Fri, 12 Sep 2014 14:17:09 +0000 (14:17 +0000)]
Fix stray char on paste.

Tested by: dumbbell and me
MFC after: 1 week

9 years agoSwitch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
ray [Fri, 12 Sep 2014 14:16:10 +0000 (14:16 +0000)]
Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
(forgetted in last commit)

Reviewed by: dumbbell (as D755)
MFC after: 1 week

9 years agoSwitch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
ray [Fri, 12 Sep 2014 14:14:50 +0000 (14:14 +0000)]
Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.

Reviewed by: dumbbell (as D755)
MFC after: 1 week

9 years agoRemove stray whitespaces.
ray [Fri, 12 Sep 2014 14:07:20 +0000 (14:07 +0000)]
Remove stray whitespaces.

9 years agoInitialize variables before resource_int_value().
mav [Fri, 12 Sep 2014 12:04:51 +0000 (12:04 +0000)]
Initialize variables before resource_int_value().

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

9 years agoFix ACL tests to correctly work with ZFS; previous version used wrong
trasz [Fri, 12 Sep 2014 09:50:32 +0000 (09:50 +0000)]
Fix ACL tests to correctly work with ZFS; previous version used wrong
paths.

PR: 191545
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years ago- Provide a sleepable lock to protect against ioctl() vs ioctl() races.
glebius [Fri, 12 Sep 2014 08:39:15 +0000 (08:39 +0000)]
- Provide a sleepable lock to protect against ioctl() vs ioctl() races.
- Use the new lock to protect against simultaneous DIOCSTART and/or
  DIOCSTOP ioctls.

Reported & tested by: jmallett
Sponsored by: Nginx, Inc.

9 years agoInitialize variables before resource_int_value().
mav [Fri, 12 Sep 2014 08:37:21 +0000 (08:37 +0000)]
Initialize variables before resource_int_value().

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

9 years ago- Fix argument list after 271387.
glebius [Fri, 12 Sep 2014 08:33:53 +0000 (08:33 +0000)]
- Fix argument list after 271387.
- While here fix typo.

Submitted by: markj

9 years agoAdd forgotten keymap files fr.kbd and fr.acc.kbd to the FILES list.
se [Fri, 12 Sep 2014 06:23:57 +0000 (06:23 +0000)]
Add forgotten keymap files fr.kbd and fr.acc.kbd to the FILES list.

Obtained from: thierry
MFC after: 3 days

9 years agoOptimize the common case of injecting an interrupt into a vcpu after a HLT
neel [Fri, 12 Sep 2014 06:15:20 +0000 (06:15 +0000)]
Optimize the common case of injecting an interrupt into a vcpu after a HLT
by explicitly moving it out of the interrupt shadow. The hypervisor is done
"executing" the HLT and by definition this moves the vcpu out of the
1-instruction interrupt shadow.

Prior to this change the interrupt would be held pending because the VMCS
guest-interruptibility-state would indicate that "blocking by STI" was in
effect. This resulted in an unnecessary round trip into the guest before
the pending interrupt could be injected.

Reviewed by: grehan

9 years agocxgbe(4): knobs to enable/disable PAUSE frame based flow control.
np [Fri, 12 Sep 2014 05:25:56 +0000 (05:25 +0000)]
cxgbe(4): knobs to enable/disable PAUSE frame based flow control.

MFC after: 1 week

9 years agoBe compatible with boot code that starts right after the disk label in
marcel [Fri, 12 Sep 2014 04:15:35 +0000 (04:15 +0000)]
Be compatible with boot code that starts right after the disk label in
the second sector by only clearing the amount of bytes needed for the
disklabel in the second sector. Previously we were clearing exactly 1
sector worth of bytes and as such writing over boot code that may have
been there.
Since we do support more than 8 partitions, make sure to set all fields
in d_partitions. For the first 8 partitions this is unneeded, but for
partitioons 9 and up this compensates for the fact that we don't clear
an entire sector anymore.
Obviously, one cannot use more than 8 partitions when using boot code
that starts right after the disk label.

Relevant GRNs:
107879 - Employ unused bytes after the disklabel in the second sector.
189500 - Revert the part of change 107879 that employs the unused bytes
 after the disklabel in the 2nd sector for boot code.

Obtained from: Juniper Networks, Inc.
MFC after: 3 days

9 years agoFix checksum calculation:
marcel [Fri, 12 Sep 2014 03:54:16 +0000 (03:54 +0000)]
Fix checksum calculation:
1.  Iterate over all partitions counted in the label, which can be more
    than the number of partitions given to mkimg(1).
2.  Start the checksum from the beginning of the label; not the beginning
    of the bootarea.

Tested with bsdlabel(8).

MFC after: 3 days

9 years agoAttach the ISO to an ahci-cd emulated device. The
rodrigc [Fri, 12 Sep 2014 02:38:10 +0000 (02:38 +0000)]
Attach the ISO to an ahci-cd emulated device.  The
ISO will appear to be mounted on a /dev/cd device
instead of /dev/vtbd.  This is similar to how other
virtualization environments handle mounting ISO images.

Reviewed by: neel

9 years agoFix minor syntax error
allanjude [Fri, 12 Sep 2014 00:55:42 +0000 (00:55 +0000)]
Fix minor syntax error

Submitted by: bjk
Approved by: bcr (mentor)
Sponsored by: ScaleEngine Inc.

9 years agoImprove markup and language throughout the ctl.conf man page
allanjude [Fri, 12 Sep 2014 00:08:19 +0000 (00:08 +0000)]
Improve markup and language throughout the ctl.conf man page

Reviewed by: trasz
Approved by: bcr (mentor)
Sponsored by: ScaleEngine Inc.

9 years agoAdd support for Extended INQUIRY Data (0x86) VPD page.
mav [Thu, 11 Sep 2014 22:40:11 +0000 (22:40 +0000)]
Add support for Extended INQUIRY Data (0x86) VPD page.

9 years agoAdd device name used in geom_map verbose output. This helps when using
sbruno [Thu, 11 Sep 2014 22:39:27 +0000 (22:39 +0000)]
Add device name used in geom_map verbose output.  This helps when using
geom_map with multiple flash/spi devices.

Phabric:  https://reviews.freebsd.org/D766
Reviewed by: adrian
MFC after: 2 weeks

9 years agoInitialize 'bc_rdonly' to the right value.
neel [Thu, 11 Sep 2014 21:15:20 +0000 (21:15 +0000)]
Initialize 'bc_rdonly' to the right value.

Note that independent of this change a readonly disk file would still be
opened O_RDONLY and protected from writes by the guest.

Reviewed by: grehan

9 years agoRevisions 264905 and 266860 added a "int fib" argument to ifa_ifwithnet and
asomers [Thu, 11 Sep 2014 20:21:03 +0000 (20:21 +0000)]
Revisions 264905 and 266860 added a "int fib" argument to ifa_ifwithnet and
ifa_ifwithdstaddr. For the sake of backwards compatibility, the new
arguments were added to new functions named ifa_ifwithnet_fib and
ifa_ifwithdstaddr_fib, while the old functions became wrappers around the
new ones that passed RT_ALL_FIBS for the fib argument. However, the
backwards compatibility is not desired for FreeBSD 11, because there are
numerous other incompatible changes to the ifnet(9) API. We therefore
decided to remove it from head but leave it in place for stable/9 and
stable/10. In addition, this commit adds the fib argument to
ifa_ifwithbroadaddr for consistency's sake.

sys/sys/param.h
Increment __FreeBSD_version

sys/net/if.c
sys/net/if_var.h
sys/net/route.c
Add fibnum argument to ifa_ifwithbroadaddr, and remove the _fib
versions of ifa_ifwithdstaddr, ifa_ifwithnet, and ifa_ifwithroute.

sys/net/route.c
sys/net/rtsock.c
sys/netinet/in_pcb.c
sys/netinet/ip_options.c
sys/netinet/ip_output.c
sys/netinet6/nd6.c
Fixup calls of modified functions.

share/man/man9/ifnet.9
Document changed API.

CR: https://reviews.freebsd.org/D458
MFC after: Never
Sponsored by: Spectra Logic

9 years agoDon't blindly assume the target agreed to transition to Full Feature Phase;
trasz [Thu, 11 Sep 2014 20:01:57 +0000 (20:01 +0000)]
Don't blindly assume the target agreed to transition to Full Feature Phase;
if we got a Login Response PDU without the "T" bit set, try again with
an empty request.  This fixes interoperability with COMSTAR.

Reviewed by: mav@
Tested by: mav@
MFC after: 1 week

9 years agoFix typo.
trasz [Thu, 11 Sep 2014 19:54:30 +0000 (19:54 +0000)]
Fix typo.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoUpdate motd, clarifying the information and adding pointers to other
wblock [Thu, 11 Sep 2014 18:24:16 +0000 (18:24 +0000)]
Update motd, clarifying the information and adding pointers to other
resources.

MFC after: 3 days