]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agozfs_ioc_rename should not leave the value of zc_name passed in via zc altered
Steven Hartland [Sun, 4 Aug 2013 11:38:08 +0000 (11:38 +0000)]
zfs_ioc_rename should not leave the value of zc_name passed in via zc altered
on return.

MFC after: 1 week

10 years agoMove the call to Job_SetPrefix() to Job_Init() so that
Simon J. Gerraty [Sun, 4 Aug 2013 07:10:16 +0000 (07:10 +0000)]
Move the call to Job_SetPrefix() to Job_Init() so that
makefiles have had a chance to set .MAKE.JOB.PREFIX

10 years ago- Reimplement $gif_interfaces as a variant of $cloned_interfaces.
Hiroki Sato [Sun, 4 Aug 2013 06:36:17 +0000 (06:36 +0000)]
- Reimplement $gif_interfaces as a variant of $cloned_interfaces.
  Newly-configured systems should use $cloned_interfaces.

- Call clone_{up,down}() and ifnet_rename() in rc.d/netif {start,stop}.
  ifnet_rename() now accepts an interface name list as its argument.

- Add rc.d/netif clear.  The "clear" subcommand is basically equivalent to
  "stop" but it does not call clone_down().

- Add "ifname:sticky" keyword into $cloned_interfaces.  If :sticky is
  specified, the interface will not be destroyed in rc.d/netif stop.

- Add cloned_interfaces_sticky={YES,NO}.  This variable globally sets
  :sticky keyword above for all interfaces.  The default value is NO.
  When cloned_interfaces_sticky=YES, :nosticky keyword can be used to
  override it on per interface basis.

10 years agoMake r253899 compile.
Marius Strobl [Sat, 3 Aug 2013 21:24:52 +0000 (21:24 +0000)]
Make r253899 compile.

10 years agoFix the bootable CD:
Marcel Moolenaar [Sat, 3 Aug 2013 20:14:29 +0000 (20:14 +0000)]
Fix the bootable CD:
o   We need wait a bit before attempting the root mount. The CD drives
    on HP machines (typical) go through the management controller so
    that it can be virtualized. In practice what this means is that it
    is slow to detect and attach.
o   Tell the kernel what to use as the root file system. The /etc/fstab
    trick doesn't work, because we're on the EFI-compatble file system.

10 years agoRemove duplicate definition of SPR MMCR0.
Justin Hibbits [Sat, 3 Aug 2013 18:05:12 +0000 (18:05 +0000)]
Remove duplicate definition of SPR MMCR0.

MFC after: 3 days

10 years agoAfter r253839, which modifies ld's behaviour to not automatically pull
Dimitry Andric [Sat, 3 Aug 2013 16:23:43 +0000 (16:23 +0000)]
After r253839, which modifies ld's behaviour to not automatically pull
in needed libraries, change libc++.so into a linker script, so it can
automatically pull in libcxxrt.so.

MFC after: 1 week

10 years agoFix typo.
Edward Tomasz Napierala [Sat, 3 Aug 2013 13:38:56 +0000 (13:38 +0000)]
Fix typo.

10 years agoTweak the imx debug console code so that it works with multiple SoCs.
Ian Lepore [Sat, 3 Aug 2013 13:31:10 +0000 (13:31 +0000)]
Tweak the imx debug console code so that it works with multiple SoCs.

Instead of hard-coding the uart register addresses for the imx51, use
a variable that defaults to the imx51 address.  When debugging another
imx-family SoC, the variable can be set early in initarm() to provide
full console/printf support for debugging early boot.

10 years agoAdd missing depend.
Ulrich Spörlein [Sat, 3 Aug 2013 08:21:35 +0000 (08:21 +0000)]
Add missing depend.

10 years agoAdd a tunable for the default timeout.
Marcel Moolenaar [Sat, 3 Aug 2013 04:25:25 +0000 (04:25 +0000)]
Add a tunable for the default timeout.

10 years agoFollow-up commit to fix CR0 issues. Maintain
Peter Grehan [Sat, 3 Aug 2013 03:16:42 +0000 (03:16 +0000)]
Follow-up commit to fix CR0 issues. Maintain
architectural state on CR vmexits by guaranteeing
that EFER, CR0 and the VMCS entry controls are
all in sync when transitioning to IA-32e mode.

Submitted by: Tycho Nightingale (tycho.nightingale <at> plurisbusnetworks.com)

10 years agoConst'ify scc_driver_name.
Marius Strobl [Fri, 2 Aug 2013 23:31:51 +0000 (23:31 +0000)]
Const'ify scc_driver_name.

10 years ago- Use NULL instead of 0 for pointers.
Marius Strobl [Fri, 2 Aug 2013 23:30:32 +0000 (23:30 +0000)]
- Use NULL instead of 0 for pointers.
- Remove unnecessary __RMAN_RESOURCE_VISIBLE.

10 years ago- Implement iclear methods for QUICC and SAB 82532. With r253161 in place,
Marius Strobl [Fri, 2 Aug 2013 23:28:49 +0000 (23:28 +0000)]
- Implement iclear methods for QUICC and SAB 82532. With r253161 in place,
  this is is crucial at least for the latter.
  What happens is that attaching uart(4) to scc(4) causes the SAB 82532 to
  "receive" something and trigger a SER_INT_RXREADY interrupt, given that
  at least fast/filter interrupts are already enabled. Prior to r253161,
  uart_bus_ihand() was set up at this point and handled that condition,
  i. e. read the RX FIFO and issued a Receive Message Complete.
  Now, uart_bus_ihand() and uart_intr() are setup after attaching uart(4),
  leaving the SER_INT_RXREADY interrupt triggered during the latter to
  be handled by the iclear method. However, with that method not implement,
  this in turn causes SAB 82532 to not issue any further SER_INT_RXREADY
  interrupts until the RX FIFO is full again. Thus, 15 received bytes go
  to nowhere, given that "the other half" of the RX FIFO is used for status
  information. Hence, implementing sab82532_bfe_iclear() fixes things again.
  Potentially, the same problem exists for QUICC.
- Remove unnecessary __RMAN_RESOURCE_VISIBLE.
- Remove a superfluous header.
- Use KOBJMETHOD_END.
- Mark unused arguments as such.
- Remove variables unused after initialization.

Reviewed by: marcel (earlier version)

10 years agoAdd in some definitions required for later iwn(4) device support.
Adrian Chadd [Fri, 2 Aug 2013 21:28:36 +0000 (21:28 +0000)]
Add in some definitions required for later iwn(4) device support.

This also clarifies a few existing fields.

Tested:

* Intel 5100

Submitted by: Cedric GROSS <cg@gross.info>

10 years agoBreak out the iwn(4) device IDs into if_iwn_devid.h, as well as add
Adrian Chadd [Fri, 2 Aug 2013 21:23:28 +0000 (21:23 +0000)]
Break out the iwn(4) device IDs into if_iwn_devid.h, as well as add
IDs for new devices.

* Add new device IDs
* Extend the ID probe code to include the newer range of bits used
  by later model devices

Tested:

* Intel 5100, STA mode

TODO:

* Test on Intel 4965, just to be sure

Submitted by: Cedric GROSS <cg@gross.info>

10 years agoOnly receive the interrupts on the first core, to avoid duplicate interrupts.
Olivier Houchard [Fri, 2 Aug 2013 20:32:26 +0000 (20:32 +0000)]
Only receive the interrupts on the first core, to avoid duplicate interrupts.

10 years agoUpdate serf 1.2.1 -> 1.3.0 for svn
Peter Wemm [Fri, 2 Aug 2013 19:21:46 +0000 (19:21 +0000)]
Update serf 1.2.1 -> 1.3.0 for svn

10 years agoImport serf-1.3.0
Peter Wemm [Fri, 2 Aug 2013 19:12:12 +0000 (19:12 +0000)]
Import serf-1.3.0

10 years agoDisplay temperature sensor data. Shows -1 if sensor not
Navdeep Parhar [Fri, 2 Aug 2013 18:05:42 +0000 (18:05 +0000)]
Display temperature sensor data.  Shows -1 if sensor not
available on the card.

# sysctl dev.t4nex.0.temperature
# sysctl dev.t5nex.0.temperature

10 years agoFix previous commit (r253873). "cong" has one bit per channel but the
Navdeep Parhar [Fri, 2 Aug 2013 17:44:19 +0000 (17:44 +0000)]
Fix previous commit (r253873).  "cong" has one bit per channel but the
congestion channel map has 1 nibble per channel.  So bits wxyz need to
be blown up into 000w000x000y000z.

10 years agoAdd p_candebug() check to FILEMON_SET_PID ioctl.
Hiroki Sato [Fri, 2 Aug 2013 14:44:11 +0000 (14:44 +0000)]
Add p_candebug() check to FILEMON_SET_PID ioctl.

Discussed with: sjg
MFC after: 3 days

10 years agofind: Allow -delete to delete files given as arguments.
Jilles Tjoelker [Fri, 2 Aug 2013 14:14:23 +0000 (14:14 +0000)]
find: Allow -delete to delete files given as arguments.

Formerly, a command like find dir1/dir2 -delete would delete everything
under dir1/dir2 but not dir1/dir2 itself.

When -L is not specified and "." can be opened, the fts(3) code underlying
find(1) is careful to avoid following symlinks or being dropped in different
locations by moving the directory fts is currently traversing. If a
problematic concurrent modification is detected, fts will not enter the
directory or abort. Files found in the search are returned via the current
working directory and a pathname not containing a slash.

For paranoia, find(1) verifies this when -delete is used. However, it is too
paranoid about the root of the traversal. It is already assumed that the
initial pathname does not refer to directories or symlinks that might be
replaced by untrusted users; otherwise, the whole traversal would be unsafe.
Therefore, it is not necessary to do the check for fts_level ==
FTS_ROOTLEVEL.

Deleting the pathnames given as arguments can be prevented without error
messages using -mindepth 1 or by changing directory and passing "." as
argument to find. This works in the old as well as the new version of find.

Tested by: Kurt Lidl
Reviewed by: jhb

10 years agoRemove extra zeroing after M_ZERO allocation.
Gleb Smirnoff [Fri, 2 Aug 2013 13:06:49 +0000 (13:06 +0000)]
Remove extra zeroing after M_ZERO allocation.

10 years agoMerge bmake-20130730
Simon J. Gerraty [Fri, 2 Aug 2013 06:25:28 +0000 (06:25 +0000)]
Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX=
to suppress --- job --- tokens.

10 years agoImport bmake-20130730 - allows folk to supress job tokens.
Simon J. Gerraty [Fri, 2 Aug 2013 05:23:57 +0000 (05:23 +0000)]
Import bmake-20130730 - allows folk to supress job tokens.

10 years agoSet up congestion manager context properly for T5 based cards.
Navdeep Parhar [Thu, 1 Aug 2013 23:38:30 +0000 (23:38 +0000)]
Set up congestion manager context properly for T5 based cards.

MFC after: 3 days (will check with re@)

10 years agoTeach cxgbetool to display T5 congestion manager context.
Navdeep Parhar [Thu, 1 Aug 2013 22:48:17 +0000 (22:48 +0000)]
Teach cxgbetool to display T5 congestion manager context.

10 years agoNow that conf/options knows about if_iwn.h, add it to if_iwn.c.
Adrian Chadd [Thu, 1 Aug 2013 21:50:50 +0000 (21:50 +0000)]
Now that conf/options knows about if_iwn.h, add it to if_iwn.c.

This allows for IWN_DEBUG (and maybe more stuff later) to be a build
time configure option.

10 years agoAdd IWN_DEBUG as an option for if_iwn.
Adrian Chadd [Thu, 1 Aug 2013 21:50:13 +0000 (21:50 +0000)]
Add IWN_DEBUG as an option for if_iwn.

10 years agoiwn(4) debugging improvements.
Adrian Chadd [Thu, 1 Aug 2013 21:45:30 +0000 (21:45 +0000)]
iwn(4) debugging improvements.

* Add in some new register debugging under IWN_DEBUG_REGISTER
* Make IWN_DEBUG an option now for building.  I'll chase this up
  with a commit to 'options' soon.

Submitted by: Cedric GROSS <cg@cgross.info>

10 years agoA number of important fixes:
Jack F Vogel [Thu, 1 Aug 2013 20:10:16 +0000 (20:10 +0000)]
A number of important fixes:
  - mbuf reused after an RX_COPY optimized operation can sometimes have
    a bogus cached address, resulting in TCP hangs. Add critical save points
    to the cached address. Thanks to Michael and the team at Verisign for
    finding this problem.
  - A couple more spots where the rxbuf->flags member should be cleared just
    to be sure no incorrect RX_COPY state is left around. Thanks to Adrian
    for tracking these down.
  - Remove the rearm_queues function from the driver, this was found to be
    responsible for some out-of-order packets by Verisign, and was always a
    bandaid, with the other fixes in this delta the bandaid can finally be
    removed.
  - In the other/link interrupt handler the entire state of the EICS register
    was being writen back into EICR (which clears causes and thus re-enables
    those interrupts), this was wrong, so now mask off the queue portion of
    the register value, so we only clear the other/link interrupt we intend.
    Marc from Verisign found this.
  - Make the SFP+ unsupported option tuneable now, by customer request.
  - Finally, just a couple of minor DEBUG string fixes.

I want to call out and thank all the participants in the 10G community/Intel
calls for helping track down these problems and make the driver better for
everyone!

MFC after: 3 days, these are critical fixes for 9.2!

10 years agoFix the build of the testmain target. This target compiles a Forth
Marcel Moolenaar [Thu, 1 Aug 2013 18:06:58 +0000 (18:06 +0000)]
Fix the build of the testmain target. This target compiles a Forth
interpreter that can be run on the system and as such cannot be
compiled against libbstand. On the one hand this means we need to
include the usual headers for system interfaces that we use and
on the the other hand we can only use standard system interfaces.

While here, define local variables only when needed to make this
WARNS=2 clean on amd64.

PR: 172542
Obtained from: peterj@
Pointed out by: Jan Beich <jbeich@tormail.org>

10 years agoAdd license for the half MD4 algorithm used in ext2_half_md4().
Pedro F. Giffuni [Thu, 1 Aug 2013 16:04:48 +0000 (16:04 +0000)]
Add license for the half MD4 algorithm used in ext2_half_md4().

The htree implementation uses code derived from the
RSA Data Security, Inc. MD4 Message-Digest Algorithm.

Add a proper licensing statement for the code and clarify
the corresponding comments.

Approved by: core (hrs)

10 years agoRemove unused malloc type.
Konstantin Belousov [Thu, 1 Aug 2013 12:55:41 +0000 (12:55 +0000)]
Remove unused malloc type.

Requested by: alc
MFC after: 1 week

10 years agoMicro-optimization suggested in
Michael Tuexen [Thu, 1 Aug 2013 12:05:23 +0000 (12:05 +0000)]
Micro-optimization suggested in
https://bugzilla.mozilla.org/show_bug.cgi?id=898234
by pchang9. While there simplify the code.

MFC after: 1 week

10 years agoAdd identification for Cortex-A7 (R0) cores.
Ganbold Tsagaankhuu [Thu, 1 Aug 2013 10:06:19 +0000 (10:06 +0000)]
Add identification for Cortex-A7 (R0) cores.

Reviewed by: cognet@

10 years agoMoved clearing of vmm_initialized to avoid the case
Peter Grehan [Thu, 1 Aug 2013 05:59:28 +0000 (05:59 +0000)]
Moved clearing of vmm_initialized to avoid the case
of unloading the module while VMs existed. This would
result in EBUSY, but would prevent further operations
on VMs resulting in the module being impossible to
unload.

Submitted by:   Tycho Nightingale (tycho.nightingale <at> plurisbusnetworks.com)
Reviewed by: grehan, neel

10 years agoInclude /usr/local/etc/libmap.d/ by default.
Jeremie Le Hen [Thu, 1 Aug 2013 05:50:42 +0000 (05:50 +0000)]
Include /usr/local/etc/libmap.d/ by default.

PR: 180568
Reviewed by: bapt
Obtained from: kib
MFC after: 3 days

10 years agoFix boundary check of sockaddr array.
Hiroki Sato [Thu, 1 Aug 2013 04:50:46 +0000 (04:50 +0000)]
Fix boundary check of sockaddr array.

Reported by: uqs

10 years agoProperly print arguments to vfork(2) and rfork(2).
Mark Johnston [Thu, 1 Aug 2013 02:57:04 +0000 (02:57 +0000)]
Properly print arguments to vfork(2) and rfork(2).

PR: 180976
Submitted by: Yuri <yuri@tsoft.com> (original patch)
MFC after: 1 week

10 years agoCorrectly maintain the CR0/CR4 shadow registers.
Peter Grehan [Thu, 1 Aug 2013 01:18:51 +0000 (01:18 +0000)]
Correctly maintain the CR0/CR4 shadow registers.
This was exposed with AP spinup of Linux, and
booting OpenBSD, where the CR0 register is unconditionally
written to prior to the longjump to enter protected
mode. The CR-vmexit handling was not updating CPU state which
resulted in a vmentry failure with invalid guest state.

A follow-on submit will fix the CPU state issue, but this
fix prevents the CR-vmexit prior to entering protected
mode by properly initializing and maintaining CR* state.

Reviewed by: neel
Reported by: Gopakumar.T @ netapp

10 years agoChanges to allow using BOOTP_NFSROOT and mounting an nfs root filesystem
Ian Lepore [Wed, 31 Jul 2013 19:14:00 +0000 (19:14 +0000)]
Changes to allow using BOOTP_NFSROOT and mounting an nfs root filesystem
other than the one specified by the BOOTP server.  This configures NFS
using the BOOTP protocol while also respecting other root-path options such
as setting vfs.root.mountfrom in the environment or using the RB_DFLTROOT
boot option.  It allows you to override the root path provided by the
server, or to supply a root path when the server provides IP configuration
but no root path info.

This maintains the historical BOOTP_NFSROOT behavior of panicking on a
failure to mount the root path provided by the server, unless you've
provided an alternative via the ROOTDEVNAME kernel option or by setting
vfs.root.mountfrom.  The behavior of panicking when given no other options
is preserved because it amounts to a bit of a retry loop that could
eventually recover from a transient network or server problem.

The user can now override the root path from loader(8) even if the
kernel is compiled with BOOTP_NFSROOT.  If vfs.root.mountfrom is set in
the environment it is used unconditionally -- it always overrides the
BOOTP info.  If it begins with [old]nfs: then the BOOTP code uses it
instead of the server-provided info.  If it specifies some other
filesystem then the bootp code will not panic like it used to and the code
in vfs_mountroot.c will invoke the right filesystem to do the mount.

If the kernel is compiled with the ROOTDEVNAME option, then that name is
used by the BOOTP code if either
      * The server doesn't provide a pathname.
      * The boothowto flags include RB_DFLTROOT.
The latter allows the user to compile in alternate path in ROOTDEVNAME
such as ufs:/dev/da0s1a and boot from that path by setting
boot_dftlroot=1 in loader(8) or using the '-r' option in boot(8).

The one thing not provided here is automatic failover from a
server-provided path to a compiled-in one without the user manually
requesting that.  The code just isn't currently structured in a way that
makes that possible with a lot of rewrite.  I think the ability to set
vfs.root.mountfrom and to use ROOTDEVNAME automatically when the server
doesn't provide a name covers the most common needs.

A set of patches submitted by Lars Eggert provided the part I couldn't
figure out by myself when I tried to do this last year; many thanks.

Reviewed by: rodrigc

10 years agoAdd myself as maintainer for nvme(4), nvd(4) and nvmecontrol(8).
Jim Harris [Wed, 31 Jul 2013 18:18:02 +0000 (18:18 +0000)]
Add myself as maintainer for nvme(4), nvd(4) and nvmecontrol(8).

10 years agoBack out r253779 & r253786.
David E. O'Brien [Wed, 31 Jul 2013 17:21:18 +0000 (17:21 +0000)]
Back out r253779 & r253786.

10 years agoAdjust magic numbers to allow attachment of ath(4) modules.
Sean Bruno [Wed, 31 Jul 2013 16:27:56 +0000 (16:27 +0000)]
Adjust magic numbers to allow attachment of ath(4) modules.

10 years agoDocument net.link.bridge.allow_llz_overlap.
Hiroki Sato [Wed, 31 Jul 2013 16:26:41 +0000 (16:26 +0000)]
Document net.link.bridge.allow_llz_overlap.

10 years agodevice if_bridge gets me a bridge device
Sean Bruno [Wed, 31 Jul 2013 16:26:34 +0000 (16:26 +0000)]
device if_bridge gets me a bridge device

10 years agoAllocate in6_ifextra (ifp->if_afdata[AF_INET6]) only for IPv6-capable
Hiroki Sato [Wed, 31 Jul 2013 16:24:49 +0000 (16:24 +0000)]
Allocate in6_ifextra (ifp->if_afdata[AF_INET6]) only for IPv6-capable
interfaces.  This eliminates unnecessary IPv6 processing for non-IPv6
interfaces.

MFC after: 3 days

10 years agoAnother fix for r253823; retain the default of 1 readahead block for sendfile.
Scott Long [Wed, 31 Jul 2013 15:55:01 +0000 (15:55 +0000)]
Another fix for r253823; retain the default of 1 readahead block for sendfile.

Submitted by: glebius
Obtained from: Netflix
MFC after: 3 days

10 years agoChange default behaviour of ld(1) to not recursively copy DT_NEEDED
Baptiste Daroussin [Wed, 31 Jul 2013 12:35:06 +0000 (12:35 +0000)]
Change default behaviour of ld(1) to not recursively copy DT_NEEDED

This is the default behaviour of the newer binutils as well as most alternative linkers.
All the ports tree has been fixed to be able to link properly with this new behaviour.

10 years agoMake two buffer variables static for now. It is not safe to
Xin LI [Wed, 31 Jul 2013 07:09:35 +0000 (07:09 +0000)]
Make two buffer variables static for now.  It is not safe to
reference stack memory after return.

MFC after: 2 weeks

10 years agoResolve fflag with realpath().
Xin LI [Wed, 31 Jul 2013 07:06:58 +0000 (07:06 +0000)]
Resolve fflag with realpath().

MFC after: 2 weeks

10 years agoAdd definitions for the Mailbox, Spinlock and PRU-ICSS devices.
Rui Paulo [Wed, 31 Jul 2013 06:23:10 +0000 (06:23 +0000)]
Add definitions for the Mailbox, Spinlock and PRU-ICSS devices.

10 years agoCleanup the allocations when the attachment fails.
Rui Paulo [Wed, 31 Jul 2013 06:05:34 +0000 (06:05 +0000)]
Cleanup the allocations when the attachment fails.

10 years agoInitialisation routines for the mailbox, spinlock and PRU-ICSS clocks.
Rui Paulo [Wed, 31 Jul 2013 05:52:03 +0000 (05:52 +0000)]
Initialisation routines for the mailbox, spinlock and PRU-ICSS clocks.

10 years agoDisplay SGE tunables in the sysctl tree.
Navdeep Parhar [Wed, 31 Jul 2013 05:12:51 +0000 (05:12 +0000)]
Display SGE tunables in the sysctl tree.

dev.t5nex.0.fl_pktshift: payload DMA offset in rx buffer (bytes)
dev.t5nex.0.fl_pad: payload pad boundary (bytes)
dev.t5nex.0.spg_len: status page size (bytes)
dev.t5nex.0.cong_drop: congestion drop setting

Discussed with: scottl

10 years agoDocument the -S flag to fsck_ffs
Scott Long [Wed, 31 Jul 2013 04:51:12 +0000 (04:51 +0000)]
Document the -S flag to fsck_ffs

Obtained from: Netflix

10 years agoWhen using tcpdump -I -i wlanN and wlanN is not a monitor mode VAP,
Rui Paulo [Wed, 31 Jul 2013 02:13:18 +0000 (02:13 +0000)]
When using tcpdump -I -i wlanN and wlanN is not a monitor mode VAP,
tcpdump will print an error message saying rfmon is not supported.
Give a concise explanation as to how one might solve this problem by
creating a monitor mode VAP.

10 years agoRemove duplicate SRCS include block. Spotted by jmallett.
Justin Hibbits [Wed, 31 Jul 2013 01:42:59 +0000 (01:42 +0000)]
Remove duplicate SRCS include block.  Spotted by jmallett.

10 years agoAdd the macio attachment for wi(4). Partially obtained from NetBSD.
Justin Hibbits [Wed, 31 Jul 2013 01:13:29 +0000 (01:13 +0000)]
Add the macio attachment for wi(4).  Partially obtained from NetBSD.

Reviewed by: adrian
Obtained from: NetBSD (partially)

10 years agoFix r253823. Some WIP patches snuck in.
Scott Long [Tue, 30 Jul 2013 23:50:09 +0000 (23:50 +0000)]
Fix r253823.  Some WIP patches snuck in.

Submitted by: zont

10 years agoCreate a knob, kern.ipc.sfreadahead, that allows one to tune the amount of
Scott Long [Tue, 30 Jul 2013 23:26:05 +0000 (23:26 +0000)]
Create a knob, kern.ipc.sfreadahead, that allows one to tune the amount of
readahead that sendfile() will do.  Default remains the same.

Obtained from: Netflix
MFC after: 3 days

10 years agoAdd a 'surrender' mode to fsck_ffs. With the -S flag, once hard read errors
Scott Long [Tue, 30 Jul 2013 22:57:12 +0000 (22:57 +0000)]
Add a 'surrender' mode to fsck_ffs.  With the -S flag, once hard read errors
are encountered, the fsck will stop instead of wasting time chewing through
possibly other errors.

Obtained from: Netflix
MFC after: 3 days

10 years agoMFV r253783:
Xin LI [Tue, 30 Jul 2013 21:35:02 +0000 (21:35 +0000)]
MFV r253783:

Skip eviction step of processing free records when doing ZFS
receive to avoid the expensive search operation of non-existent
dbufs in dn_dbufs.

Illumos ZFS issues:
  3834 incremental replication of 'holey' file systems is slow

MFC after:      2 weeks

10 years agoMFV r253782:
Xin LI [Tue, 30 Jul 2013 21:20:12 +0000 (21:20 +0000)]
MFV r253782:

To quote Illumos issue #3888:

When 'zfs recv -F' is used with an incremental recv it rolls
back any changes made since the last snapshot in case new
changes were made to the file system while the recv is in
progress (without -F the recv would fail when it does it's
final check to commit the recv-ed data as the recv-ed data
conflicts with the newly written data).

However, if there is a snapshot taken after the recv began
rolling back to the 'latest' snapshot will not help and the
recv will still fail. 'zfs recv -F' should be extended to
destroy any snapshots created since the source snapshot when
finishing the recv (effectively rolling back through all
snapshots, instead of just to the latest snapshot).

Illumos ZFS issues:
  3888 zfs recv -F should destroy any snapshots created since the
       incremental source

MFC after: 2 weeks

10 years agoMFV r253781 + r253871:
Xin LI [Tue, 30 Jul 2013 21:02:09 +0000 (21:02 +0000)]
MFV r253781 + r253871:

Illumos ZFS issues:
  3894 zfs should not allow snapshot of inconsistent dataset

MFC after: 2 weeks

10 years agoMFV r253784:
Steven Hartland [Tue, 30 Jul 2013 20:45:27 +0000 (20:45 +0000)]
MFV r253784:

Fix zfs send -D hang after processing requiring a CTRL+C to interrupt due to
pthread_join prior to fd close.

This was introduced by r251646 (MFV r251644)

Illumos ZFS issue:
  3909 "zfs send -D" does not work

MFC after: 1 day

10 years agoCommit a missed file in r253781:
Xin LI [Tue, 30 Jul 2013 20:45:27 +0000 (20:45 +0000)]
Commit a missed file in r253781:

Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 14089:520f3adc5d46:

Illumos ZFS issues:
  3894 zfs should not allow snapshot of inconsistent dataset

10 years agoMFV r253780:
Xin LI [Tue, 30 Jul 2013 20:37:32 +0000 (20:37 +0000)]
MFV r253780:

To quote Illumos #3875:

The problem here is that if we ever end up in the error
path, we drop the locks protecting access to the zfsvfs_t
prior to forcibly unmounting the filesystem. Because z_os
is NULL, any thread that had already picked up the zfsvfs_t
and was sitting in ZFS_ENTER() when we dropped our locks
in zfs_resume_fs() will now acquire the lock, attempt to
use z_os, and panic.

Illumos ZFS issues:
  3875 panic in zfs_root() after failed rollback

MFC after: 2 weeks

10 years agoMFC'ing to 9.2.
David E. O'Brien [Tue, 30 Jul 2013 19:21:36 +0000 (19:21 +0000)]
MFC'ing to 9.2.

10 years agoCheck for ipmi_attached in ipmi_isa_probe as a suggested alternative to
Sean Bruno [Tue, 30 Jul 2013 18:54:24 +0000 (18:54 +0000)]
Check for ipmi_attached in ipmi_isa_probe as a suggested alternative to
ipmi_isa_attach.  This keeps unintended but harmless noise about "ipmi1"
from appearing in the boot up sequence.

Submitted by: jbh@ (suggested by)
Sponsored by: Yahoo! Inc.

10 years agoempirical testing showed that 3 seconds is just too slow for GET_DEVICE_ID
Sean Bruno [Tue, 30 Jul 2013 18:44:29 +0000 (18:44 +0000)]
empirical testing showed that 3 seconds is just too slow for GET_DEVICE_ID
to return on newer Dell hardware.  Bump to 6 second timeouts until someone
has a better idea on how to handle this

Reviewed by: jhb@
MFC after: 2 weeks
Sponsored by: Yahoo! Inc.

10 years agoAfter discussions, revert svn r253708.
Sean Bruno [Tue, 30 Jul 2013 18:41:36 +0000 (18:41 +0000)]
After discussions, revert svn r253708.

Changelog for 253708 was completely wrong and the code implemented something
non-standard for the wrong reasons.

Sponsored by: Yahoo! Inc.

10 years agogrep -i does not work for simple patterns and single byte locales, like
Andrey A. Chernov [Tue, 30 Jul 2013 18:16:43 +0000 (18:16 +0000)]
grep -i does not work for simple patterns and single byte locales, like
LANG=ru_RU.KOI8-R grep -i <some single KOI8-R letter>
Fix it.

MFC after:      3 days

10 years agoFix a printf typo.
Scott Long [Tue, 30 Jul 2013 17:35:06 +0000 (17:35 +0000)]
Fix a printf typo.

Obtained from: LSI

10 years agoApply a casting sledgehammer.
John Baldwin [Tue, 30 Jul 2013 16:20:54 +0000 (16:20 +0000)]
Apply a casting sledgehammer.

Submitted by: dhw

10 years agoUnbreak sparc64 LINT. Need to fix this correctly at some point in the future.
Rui Paulo [Tue, 30 Jul 2013 16:17:30 +0000 (16:17 +0000)]
Unbreak sparc64 LINT. Need to fix this correctly at some point in the future.

10 years agoAllow three IOCTLs to be used on suspended pool, restoring state that
Alexander Motin [Tue, 30 Jul 2013 14:50:44 +0000 (14:50 +0000)]
Allow three IOCTLs to be used on suspended pool, restoring state that
existed before IOCTL code refactoring merged change 4445fffb from illumos
at r248571.

This change allows `zpool clear` to be used again to recover suspended pool.
It seems the only was supposed by the code to restore pool operation after
reconnecting lost disks that were required for data completeness.  There
are still cases where `zpool clear` command can just safely stuck due to
deadlocks inside ZFS kernel part, but probably that is better then having
no chances to recover at all.

10 years agoInclude an Accept header in requests.
Dag-Erling Smørgrav [Tue, 30 Jul 2013 13:07:55 +0000 (13:07 +0000)]
Include an Accept header in requests.

PR: kern/180917
MFC after: 1 week

10 years agoAdd Michael Gmelin's name to the copyright statement.
Dag-Erling Smørgrav [Tue, 30 Jul 2013 13:05:51 +0000 (13:05 +0000)]
Add Michael Gmelin's name to the copyright statement.

10 years agoAdd NO_RC16 quirk to make da driver avoid using READ CAPACITY(16) command
Alexander Motin [Tue, 30 Jul 2013 13:00:09 +0000 (13:00 +0000)]
Add NO_RC16 quirk to make da driver avoid using READ CAPACITY(16) command
if possible.  Use it for Kingston JetFlash USB sticks, that are known to
return garbage in response to that command.

10 years agoPull in r186696 from upstream clang trunk:
Dimitry Andric [Tue, 30 Jul 2013 12:33:21 +0000 (12:33 +0000)]
Pull in r186696 from upstream clang trunk:

  This patch implements __get_cpuid_max() as an inline and __cpuid()
  and __cpuid_count() as macros to be compatible with GCC's cpuid.h.
  It also adds bit_<foo> constants for the various feature bits as
  described in version 039 (May 2011) of Intel's SDM Volume 2 in the
  description of the CPUID instruction.  The list of bit_<foo>
  constants is a bit exhaustive (GCC doesn't do near this many).  More
  bits could be added from a newer version of SDM if desired.

  Patch by John Baldwin!

This should fix several ports which depend on this functionality being
available.

MFC after: 1 week

10 years agoFix up paths after r253790.
Sergey Kandaurov [Tue, 30 Jul 2013 08:09:48 +0000 (08:09 +0000)]
Fix up paths after r253790.
While here, use $? contraction.

Reported by: O. Hartmann

10 years agoMove runfw to modules/usb.
Rui Paulo [Tue, 30 Jul 2013 02:26:06 +0000 (02:26 +0000)]
Move runfw to modules/usb.
While there, respect MK_SOURCELESS_UCODE.

Discussed with: kevlo

10 years agoImport OpenBSD's rsu(4) WLAN driver.
Rui Paulo [Tue, 30 Jul 2013 02:07:57 +0000 (02:07 +0000)]
Import OpenBSD's rsu(4) WLAN driver.
Support chipsets are the Realtek RTL8188SU, RTL8191SU, and RTL8192SU.

Many thanks to Idwer Vollering for porting/writing the man page and for
testing.

Reviewed by: adrian, hselasky
Obtained from: OpenBSD
Tested by: kevlo, Idwer Vollering <vidwer at gmail.com>

10 years agoThe errata 727915 requires a different workaround for r2p0, we have to
Olivier Houchard [Mon, 29 Jul 2013 21:45:39 +0000 (21:45 +0000)]
The errata 727915 requires a different workaround for r2p0, we have to
explicitely clean/invalidate every cache line using way/set operations.

10 years agoRemove useless cache operations.
Olivier Houchard [Mon, 29 Jul 2013 21:32:57 +0000 (21:32 +0000)]
Remove useless cache operations.

10 years agoDecouple yarrow from random(4) device.
David E. O'Brien [Mon, 29 Jul 2013 20:58:09 +0000 (20:58 +0000)]
Decouple yarrow from random(4) device.

* Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option.
  The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow.

* random(4) device doesn't really depend on rijndael-*.  Yarrow, however, does.

* Add random_adaptors.[ch] which is basically a store of random_adaptor's.
  random_adaptor is basically an adapter that plugs in to random(4).
  random_adaptor can only be plugged in to random(4) very early in bootup.
  Unplugging random_adaptor from random(4) is not supported, and is probably a
  bad idea anyway, due to potential loss of entropy pools.
  We currently have 3 random_adaptors:
  + yarrow
  + rdrand (ivy.c)
  + nehemeiah

* Remove platform dependent logic from probe.c, and move it into
  corresponding registration routines of each random_adaptor provider.
  probe.c doesn't do anything other than picking a specific random_adaptor
  from a list of registered ones.

* If the kernel doesn't have any random_adaptor adapters present then the
  creation of /dev/random is postponed until next random_adaptor is kldload'ed.

* Fix randomdev_soft.c to refer to its own random_adaptor, instead of a
  system wide one.

Submitted by: arthurmesh@gmail.com, obrien
Obtained from: Juniper Networks
Reviewed by: obrien

10 years agoAdd a missing prototype.
John Baldwin [Mon, 29 Jul 2013 20:48:10 +0000 (20:48 +0000)]
Add a missing prototype.

Pointy hat: me

10 years agoUpdate vendor/illumos/dist to illumos-gate 14096:12d3631da129:
Xin LI [Mon, 29 Jul 2013 20:36:27 +0000 (20:36 +0000)]
Update vendor/illumos/dist to illumos-gate 14096:12d3631da129:

Illumos ZFS issues:
  3909 "zfs send -D" does not work

10 years agoUpdate vendor-sys/illumos/dist to illumos-gate 14095:277fa158020c:
Xin LI [Mon, 29 Jul 2013 20:35:12 +0000 (20:35 +0000)]
Update vendor-sys/illumos/dist to illumos-gate 14095:277fa158020c:

Illumos ZFS issues:
  3834 incremental replication of 'holey' file systems is slow

10 years agoUpdate vendor-sys/illumos/dist to illumos-gate 14094:8a2884391fc2:
Xin LI [Mon, 29 Jul 2013 20:33:49 +0000 (20:33 +0000)]
Update vendor-sys/illumos/dist to illumos-gate 14094:8a2884391fc2:

Illumos ZFS issues:
  3888 zfs recv -F should destroy any snapshots created since the
       incremental source

10 years agoUpdate vendor/illumos/dist and vendor-sys/illumos/dist
Xin LI [Mon, 29 Jul 2013 20:31:44 +0000 (20:31 +0000)]
Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 14089:520f3adc5d46:

Illumos ZFS issues:
  3894 zfs should not allow snapshot of inconsistent dataset

10 years agoUpdate vendor-sys/illumos/dist to illumos-gate 14088:3ca4e9e72fe7:
Xin LI [Mon, 29 Jul 2013 20:26:33 +0000 (20:26 +0000)]
Update vendor-sys/illumos/dist to illumos-gate 14088:3ca4e9e72fe7:

Illumos ZFS issues:
  3875 panic in zfs_root() after failed rollback

10 years agoDecouple yarrow from random(4) device.
David E. O'Brien [Mon, 29 Jul 2013 20:26:27 +0000 (20:26 +0000)]
Decouple yarrow from random(4) device.

* Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option.
  The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow.

* random(4) device doesn't really depend on rijndael-*.  Yarrow, however, does.

* Add random_adaptors.[ch] which is basically a store of random_adaptor's.
  random_adaptor is basically an adapter that plugs in to random(4).
  random_adaptor can only be plugged in to random(4) very early in bootup.
  Unplugging random_adaptor from random(4) is not supported, and is probably a
  bad idea anyway, due to potential loss of entropy pools.
  We currently have 3 random_adaptors:
  + yarrow
  + rdrand (ivy.c)
  + nehemeiah

* Remove platform dependent logic from probe.c, and move it into
  corresponding registration routines of each random_adaptor provider.
  probe.c doesn't do anything other than picking a specific random_adaptor
  from a list of registered ones.

* If the kernel doesn't have any random_adaptor adapters present then the
  creation of /dev/random is postponed until next random_adaptor is kldload'ed.

* Fix randomdev_soft.c to refer to its own random_adaptor, instead of a
  system wide one.

Submitted by: arthurmesh@gmail.com, obrien
Obtained from: Juniper Networks
Reviewed by: obrien

10 years agoUnbreak sysctl ABI changes introduced in r253662
Andrey Zonov [Mon, 29 Jul 2013 18:48:51 +0000 (18:48 +0000)]
Unbreak sysctl ABI changes introduced in r253662

Requested by: bde

10 years agoVarious fixes to the mlxen(4) driver:
John Baldwin [Mon, 29 Jul 2013 18:44:52 +0000 (18:44 +0000)]
Various fixes to the mlxen(4) driver:
- Remove an incorrect assertion that can trigger when downing an interface.
- Stop the interface during detach to avoid panics when unloading the
  driver.
- A few locking fixes to be more consistent with other FreeBSD drivers:
  - Protect if_drv_flags with the driver lock, not atomic ops
  - Hold the driver lock when adjusting multicast state.
  - Hold the driver lock while adjusting if_capenable.

PR: kern/180791 [1,2]
Submitted by: Shakar Klein @ Mellanox [1,2]
MFC after: 3 days

10 years ago[fixup] add Makefile changes that should have been committed in r253772
Andriy Gapon [Mon, 29 Jul 2013 17:03:42 +0000 (17:03 +0000)]
[fixup] add Makefile changes that should have been committed in r253772

MFC after: 3 weeks
X-MFC with: r253772