]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
10 years agoMFC r253850:
markj [Wed, 14 Aug 2013 02:37:07 +0000 (02:37 +0000)]
MFC r253850:
Properly print arguments to vfork(2) and rfork(2).

git-svn-id: svn://svn.freebsd.org/base/stable/8@254314 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254020:
markj [Wed, 14 Aug 2013 01:55:44 +0000 (01:55 +0000)]
MFC r254020:
Add a missing module version declaration to if_tun(4).

git-svn-id: svn://svn.freebsd.org/base/stable/8@254311 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r253926
smh [Sun, 11 Aug 2013 01:06:35 +0000 (01:06 +0000)]
MFC: r253926

zfs_ioc_rename should not leave the value of zc_name passed in via zc altered
on return.

git-svn-id: svn://svn.freebsd.org/base/stable/8@254201 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 253887,253977:
hrs [Thu, 8 Aug 2013 17:20:09 +0000 (17:20 +0000)]
MFC 253887,253977:

- Use pget(PGET_CANDEBUG | PGET_NOTWEXIT) to determine if the specified
  PID is valid for monitoring in FILEMON_SET_PID ioctl.

- Set the monitored PID to -1 when the process exits.

Suggested by: jilles
Tested by: sjg

git-svn-id: svn://svn.freebsd.org/base/stable/8@254096 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253859:
kib [Thu, 8 Aug 2013 05:41:55 +0000 (05:41 +0000)]
MFC r253859:
Remove unused malloc type.

git-svn-id: svn://svn.freebsd.org/base/stable/8@254084 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253073: zfs: try to properly handle i/o errors in mappedread_sf
avg [Wed, 7 Aug 2013 07:44:13 +0000 (07:44 +0000)]
MFC r253073: zfs: try to properly handle i/o errors in mappedread_sf

git-svn-id: svn://svn.freebsd.org/base/stable/8@254050 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253070: zfs: load zpool.cache after a root fs is mounted
avg [Wed, 7 Aug 2013 07:42:09 +0000 (07:42 +0000)]
MFC r253070: zfs: load zpool.cache after a root fs is mounted

git-svn-id: svn://svn.freebsd.org/base/stable/8@254048 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253602: newvers.sh: add another git-svn fallback
avg [Wed, 7 Aug 2013 07:39:52 +0000 (07:39 +0000)]
MFC r253602: newvers.sh: add another git-svn fallback

git-svn-id: svn://svn.freebsd.org/base/stable/8@254046 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253601: newvers.sh: fix the fallback case of git-svn detection
avg [Wed, 7 Aug 2013 07:38:18 +0000 (07:38 +0000)]
MFC r253601: newvers.sh: fix the fallback case of git-svn detection

git-svn-id: svn://svn.freebsd.org/base/stable/8@254044 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253072: amd64: use -mno-omit-leaf-frame-pointer in addition to
avg [Wed, 7 Aug 2013 07:36:37 +0000 (07:36 +0000)]
MFC r253072: amd64: use -mno-omit-leaf-frame-pointer in addition to
-fno-omit-frame-pointer

git-svn-id: svn://svn.freebsd.org/base/stable/8@254042 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253605: zfsboottest: remove explicit -Werror
avg [Wed, 7 Aug 2013 07:34:59 +0000 (07:34 +0000)]
MFC r253605: zfsboottest: remove explicit -Werror

git-svn-id: svn://svn.freebsd.org/base/stable/8@254040 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253068: zfsboottest.sh: remove checks for things that are not
avg [Wed, 7 Aug 2013 07:33:19 +0000 (07:33 +0000)]
MFC r253068: zfsboottest.sh: remove checks for things that are not
strictly required

git-svn-id: svn://svn.freebsd.org/base/stable/8@254038 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253067: zfsboottest: sync with changes in zfs boot code
avg [Wed, 7 Aug 2013 07:31:41 +0000 (07:31 +0000)]
MFC r253067: zfsboottest: sync with changes in zfs boot code

git-svn-id: svn://svn.freebsd.org/base/stable/8@254036 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253076: rc.d/zfs: pass -v option to zfs mount
avg [Wed, 7 Aug 2013 07:28:00 +0000 (07:28 +0000)]
MFC r253076: rc.d/zfs: pass -v option to zfs mount

git-svn-id: svn://svn.freebsd.org/base/stable/8@254034 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253328:
kib [Wed, 7 Aug 2013 06:32:13 +0000 (06:32 +0000)]
MFC r253328:
Create a proper stack frame for i386 version of bcopy().

git-svn-id: svn://svn.freebsd.org/base/stable/8@254027 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253417:
kib [Wed, 7 Aug 2013 06:23:28 +0000 (06:23 +0000)]
MFC r253417:
Clear the vnode knotes before destroying vpollinfo.

MFC r253737:
Split the destruction into the helper destroy_vpollinfo_free(), and
call it when raced, instead of destroy_vpollinfo().

git-svn-id: svn://svn.freebsd.org/base/stable/8@254026 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253818:
smh [Fri, 2 Aug 2013 23:33:40 +0000 (23:33 +0000)]
MFC r253818:

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

git-svn-id: svn://svn.freebsd.org/base/stable/8@253903 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253754:
mav [Thu, 1 Aug 2013 09:48:12 +0000 (09:48 +0000)]
MFC r253754:
Partially close race between calls of orphan() method from GEOM and close()
method from ZFS core, that reliably causes use-after-free panic if SSD vdev
detached during inititial erase.

git-svn-id: svn://svn.freebsd.org/base/stable/8@253856 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoFix Denial of Service vulnerability in named(8). [13:07]
delphij [Fri, 26 Jul 2013 22:53:17 +0000 (22:53 +0000)]
Fix Denial of Service vulnerability in named(8). [13:07]

Security: CVE-2013-4854
Security: FreeBSD-SA-13:07.bind
Approved by: so

git-svn-id: svn://svn.freebsd.org/base/stable/8@253696 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253532:
hselasky [Fri, 26 Jul 2013 06:28:41 +0000 (06:28 +0000)]
MFC r253532:

Fix an XHCI regression:

The Block Event Interrupts, BEI, feature does not
work like expected with the Renesas XHCI chipsets.
Revert feature.

While at it correct the TD SIZE computation in
case of Zero Length Packet, ZLP, in the end of a
multi frame USB transfer.

PR: usb/180726

git-svn-id: svn://svn.freebsd.org/base/stable/8@253666 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253404:
yongari [Fri, 26 Jul 2013 06:23:57 +0000 (06:23 +0000)]
MFC r253404:
   o TxD ring requires 8 bytes alignment to work so change alignment
     constraint to 8. Previously it may have triggered watchdog
     timeouts.
   o Check whether interrupt is ours or not.
   o Enable interrupts before attemping to transmit queued packets.
     This will slightly improve TX performance.
   o No need to clear IFF_DRV_OACTIVE in a loop. AE_FLAG_TXAVAIL is
     used to know whether there are enough available TxD ring space.
   o Added missing bus_dmamap_sync(9) in ae_rx_intr() and rearranged
     code to avoid unncessary register access.
   o Make sure to clear TxD, TxS, RxD rings in driver initialization.
     Otherwise some data in these rings could be interpreted as
     'updated' which in turn will advance internally maintained
     pointers and can trigger watchdog timeouts.

  PR: kern/180382

git-svn-id: svn://svn.freebsd.org/base/stable/8@253664 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r253455
jkim [Wed, 24 Jul 2013 22:26:58 +0000 (22:26 +0000)]
MFC: r253455

Decode PCIe ASPM capability and status.

git-svn-id: svn://svn.freebsd.org/base/stable/8@253623 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253380,253413: name passed into __setenv is not necessarily NUL-terminated
avg [Wed, 24 Jul 2013 08:56:59 +0000 (08:56 +0000)]
MFC r253380,253413: name passed into __setenv is not necessarily NUL-terminated

git-svn-id: svn://svn.freebsd.org/base/stable/8@253600 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 252576:
jhb [Wed, 17 Jul 2013 14:05:35 +0000 (14:05 +0000)]
MFC 252576:
Don't perform the acpi_DeviceIsPresent() check for PCI-PCI bridges.  If
we are probing a PCI-PCI bridge it is because we found one by enumerating
the devices on a PCI bus, so the bridge is definitely present.  A few
BIOSes report incorrect status (_STA) for some bridges that claimed they
were not present when in fact they were.

While here, move this check earlier for Host-PCI bridges so attach fails
before doing any work that needs to be torn down.

PR: kern/91594

git-svn-id: svn://svn.freebsd.org/base/stable/8@253428 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253141:
kib [Wed, 17 Jul 2013 10:53:11 +0000 (10:53 +0000)]
MFC r253141:
When panicing due to the gjournal overflow, print the geom metadata
journal id.

git-svn-id: svn://svn.freebsd.org/base/stable/8@253416 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253079: dtrace/fasttrap: install hook functions only after all data
avg [Tue, 16 Jul 2013 11:54:25 +0000 (11:54 +0000)]
MFC r253079: dtrace/fasttrap: install hook functions only after all data
is initialized

git-svn-id: svn://svn.freebsd.org/base/stable/8@253389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253078: audit_proc_coredump: check return value of audit_new
avg [Tue, 16 Jul 2013 10:43:44 +0000 (10:43 +0000)]
MFC r253078: audit_proc_coredump: check return value of audit_new

git-svn-id: svn://svn.freebsd.org/base/stable/8@253387 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253075: namecache sdt: freebsd doesn't support structured
avg [Tue, 16 Jul 2013 07:28:38 +0000 (07:28 +0000)]
MFC r253075: namecache sdt: freebsd doesn't support structured
characters yet

git-svn-id: svn://svn.freebsd.org/base/stable/8@253381 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253290:
gjb [Mon, 15 Jul 2013 15:00:17 +0000 (15:00 +0000)]
MFC r253290:
 Document that a literal jail name of 0 (zero) is not allowed.

PR: 174436

git-svn-id: svn://svn.freebsd.org/base/stable/8@253364 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r253138,r253258): install authpf-noip
des [Mon, 15 Jul 2013 09:02:57 +0000 (09:02 +0000)]
MFH (r253138,r253258): install authpf-noip

git-svn-id: svn://svn.freebsd.org/base/stable/8@253358 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r221845: Update sticky(7) cross references.
pluknet [Sun, 14 Jul 2013 21:57:25 +0000 (21:57 +0000)]
MFC r221845: Update sticky(7) cross references.

MFC reminded by: Torfinn Ingolfsen <torfinn.ingolfsen@getmail.no>

git-svn-id: svn://svn.freebsd.org/base/stable/8@253343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253105:
tuexen [Fri, 12 Jul 2013 13:52:27 +0000 (13:52 +0000)]
MFC r253105:
Fix the handling of SCTP_CURRENT_ASSOC and SCTP_ALL_ASSOC in
sctp_opt_info().

git-svn-id: svn://svn.freebsd.org/base/stable/8@253265 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253104:
tuexen [Fri, 12 Jul 2013 13:51:19 +0000 (13:51 +0000)]
MFC r253104:
Fix a bug where SCTP_ENABLE_STREAM_RESET is not handled by
sctp_opt_info().

git-svn-id: svn://svn.freebsd.org/base/stable/8@253264 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253134:
yongari [Fri, 12 Jul 2013 02:28:35 +0000 (02:28 +0000)]
MFC r253134:
  Avoid controller reinitialization which could be triggered by
  dhclient(8) or alias addresses are added.

git-svn-id: svn://svn.freebsd.org/base/stable/8@253246 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r252673
rmacklem [Fri, 12 Jul 2013 00:59:03 +0000 (00:59 +0000)]
MFC: r252673
A problem with the old NFS client where large writes to large files
would sometimes result in a corrupted file was reported via email.
This problem appears to have been caused by r251719 (reverting
r251719 fixed the problem). Although I have not been able to
reproduce this problem, I suspect it is caused by another thread
increasing np->n_size after the mtx_unlock(&np->n_mtx) but before
the vnode_pager_setsize() call. Since the np->n_mtx mutex serializes
updates to np->n_size, doing the vnode_pager_setsize() with the
mutex locked appears to avoid the problem.
Unfortunately, vnode_pager_setsize() where the new size is smaller,
cannot be called with a mutex held.
This patch returns the semantics to be close to pre-r251719 such that the
call to the vnode_pager_setsize() is only delayed until after the mutex is
unlocked when np->n_size is shrinking. Since the file is growing
when being written, I believe this will fix the corruption.

Tested by: remy.nonnenmacher@activnetworks.com

git-svn-id: svn://svn.freebsd.org/base/stable/8@253229 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253091:
smh [Thu, 11 Jul 2013 09:13:05 +0000 (09:13 +0000)]
MFC r253091:
Added 4K QUIRK for OCZ Vertex 4 SSDs

git-svn-id: svn://svn.freebsd.org/base/stable/8@253201 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r245926, r245931
yongari [Thu, 11 Jul 2013 08:50:30 +0000 (08:50 +0000)]
MFC r245926, r245931
  - Improve some comments.
  - Make bge_lookup_{rev,vendor}() static.
  - Factor out chip identification rather than duplicating the code.
  - Sanitize bge_probe() a bit (don't hardcode buffer sizes, allow
    bge_lookup_vendor() to return NULL so the excessive panic() can
    be removed there, etc.) and return BUS_PROBE_DEFAULT rather than
    hardcoding 0.
  - According to the Linux tg3 driver, BCM57791 and BCM57795 aren't
    capable of Gigabit Ethernet.
  - Check the return value of taskqueue_start_threads().
  - Mention NetLink controllers in the fallback description, too.

git-svn-id: svn://svn.freebsd.org/base/stable/8@253199 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r245867:
yongari [Thu, 11 Jul 2013 08:42:17 +0000 (08:42 +0000)]
MFC r245867:
  For 57765 class controllers, set low watermark max receive frames to 1.

git-svn-id: svn://svn.freebsd.org/base/stable/8@253198 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r245870:
yongari [Thu, 11 Jul 2013 08:18:46 +0000 (08:18 +0000)]
MFC r245870:
  bge_attach() can fail before attaching mii(4). So make sure to check
  bge_miibus before detaching mii(4).

git-svn-id: svn://svn.freebsd.org/base/stable/8@253196 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252404:
yongari [Wed, 10 Jul 2013 01:33:49 +0000 (01:33 +0000)]
MFC r252404:
  Fix triggering false watchdog timeout as done in bce(4) when
  controller is in PAUSE state.

git-svn-id: svn://svn.freebsd.org/base/stable/8@253131 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252402:
yongari [Wed, 10 Jul 2013 01:30:35 +0000 (01:30 +0000)]
MFC r252402:
  Fix triggering false watchdog timeout when controller is in PAUSE
  state.  Previously it used to check if controller has sent a
  PAUSE frame to the remote peer.

git-svn-id: svn://svn.freebsd.org/base/stable/8@253129 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252227:
yongari [Wed, 10 Jul 2013 01:27:05 +0000 (01:27 +0000)]
MFC r252227:
  Don't blidly clear GPIOs configuration. Just use firmware configured
  one.  This change also fixes non-working traffic LED on BCM57780.

git-svn-id: svn://svn.freebsd.org/base/stable/8@253127 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoDon't keep a pointer to freed memory.
tuexen [Mon, 8 Jul 2013 13:22:58 +0000 (13:22 +0000)]
Don't keep a pointer to freed memory.
This is a direct commit, since this code is gone in head.

git-svn-id: svn://svn.freebsd.org/base/stable/8@253034 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250963, r251013, r251056: Driver 'aacraid' added to support Adaptec by PMC RAID...
achim [Mon, 8 Jul 2013 12:17:06 +0000 (12:17 +0000)]
MFC r250963, r251013, r251056: Driver 'aacraid' added to support Adaptec by PMC RAID controller families Series 6, 7, 8 and upcoming products.

Approved by: emaste (co-mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@253033 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC of tzdata2013d, 253009
edwin [Sun, 7 Jul 2013 22:27:47 +0000 (22:27 +0000)]
MFC of tzdata2013d, 253009

- Morocco:
  announced that the year's Ramadan daylight-savings transitions
  would be 2013-07-07 and 2013-08-10.

- Israel:
  As of 2013, DST starts at 02:00 on the Friday before the last
  Sunday in March.  DST ends at 02:00 on the first Sunday after
  October 1, unless it occurs on the second day of the Jewish Rosh
  Hashana holiday, in which case DST ends a day later (i.e. at 02:00
  the first Monday after October 2).  [Rosh Hashana holidays are
  factored in until 2100.]

git-svn-id: svn://svn.freebsd.org/base/stable/8@253011 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252779:
tuexen [Sun, 7 Jul 2013 19:07:00 +0000 (19:07 +0000)]
MFC r252779:
Fix a bug were only 2048 streams where usable even though more than
2048 streams were negotiated on the wire. While there, remove the
hard coded limit of 2048 streams.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252994 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252718:
tuexen [Sun, 7 Jul 2013 19:04:10 +0000 (19:04 +0000)]
MFC r252718:
When processing an incoming ABORT, SHUTDOWN_COMPLETE or ERROR (NAT related)
chunk, take always the T-bit into account, when checking the verification
tag.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252992 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252585:
tuexen [Sun, 7 Jul 2013 19:01:34 +0000 (19:01 +0000)]
MFC r252585:
Code cleanups.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252991 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251248:
tuexen [Sun, 7 Jul 2013 18:58:49 +0000 (18:58 +0000)]
MFC r251248:
Use LIST_EMPTY when appropriate.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252990 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251054:
tuexen [Sun, 7 Jul 2013 18:56:43 +0000 (18:56 +0000)]
MFC r251054:
Remove redundant checks.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252989 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250756:
tuexen [Sun, 7 Jul 2013 18:53:43 +0000 (18:53 +0000)]
MFC r250756:
Set errno to ETIMEDOUT if an SCTP association times out during
setup.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252988 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250754:
tuexen [Sun, 7 Jul 2013 18:50:26 +0000 (18:50 +0000)]
MFC r250754:
Don't send an ABORT chunk with verification 0.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252986 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250466:
tuexen [Sun, 7 Jul 2013 18:48:21 +0000 (18:48 +0000)]
MFC r250466:
Honor the net.inet6.ip6.v6only sysctl variable and the IPV6_V6ONLY
socket option for SCTP sockets in the same way as for UDP or TCP
sockets.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252985 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249333:
tuexen [Sun, 7 Jul 2013 18:43:48 +0000 (18:43 +0000)]
MFC r249333:
Remove the number of addresses restriction from sctp_connectx().
Remove unused code.
While there, do some cleanup of the code.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252984 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248953:
tuexen [Sun, 7 Jul 2013 18:41:25 +0000 (18:41 +0000)]
MFC r248953:
Add a macro for checking for IPv4 link local addresses.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252983 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248172 (partially):
tuexen [Sun, 7 Jul 2013 18:31:02 +0000 (18:31 +0000)]
MFC r248172 (partially):
Return an error if sctp_peeloff() fails because a socket can't be allocated.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252981 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252504:
lstewart [Sun, 7 Jul 2013 14:20:00 +0000 (14:20 +0000)]
MFC r252504:

Import an implementation of the CAIA Delay-Gradient (CDG) congestion control
algorithm, which is based on the 2011 v0.1 patch release and described in the
paper "Revisiting TCP Congestion Control using Delay Gradients" by David Hayes
and Grenville Armitage. It is implemented as a kernel module compatible with the
modular congestion control framework.

CDG is a hybrid congestion control algorithm which reacts to both packet loss
and inferred queuing delay. It attempts to operate as a delay-based algorithm
where possible, but utilises heuristics to detect loss-based TCP cross traffic
and will compete effectively as required. CDG is therefore incrementally
deployable and suitable for use on shared networks.

In collaboration with: David Hayes <david.hayes at ieee.org> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: Cisco University Research Program and FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/8@252952 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252732:
mm [Sun, 7 Jul 2013 09:22:03 +0000 (09:22 +0000)]
MFC r252732:
Fix misleading or remove irrelevant illumos messages and manpage references
in the zfs command.

PR: bin/178996
Submitted by: Peter Schaefer <peter.schaefer@wilhelmheinrichs.de>

git-svn-id: svn://svn.freebsd.org/base/stable/8@252921 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248820: rc.subr: disabling globbing while processing devfs rules
avg [Sat, 6 Jul 2013 09:03:02 +0000 (09:03 +0000)]
MFC r248820: rc.subr: disabling globbing while processing devfs rules

git-svn-id: svn://svn.freebsd.org/base/stable/8@252878 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249139: strncmp for boot code: fix an off by one error
avg [Sat, 6 Jul 2013 08:59:27 +0000 (08:59 +0000)]
MFC r249139: strncmp for boot code: fix an off by one error

git-svn-id: svn://svn.freebsd.org/base/stable/8@252876 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248641: libdwarf: anonymous types are expected to have empty type names
avg [Sat, 6 Jul 2013 08:43:49 +0000 (08:43 +0000)]
MFC r248641: libdwarf: anonymous types are expected to have empty type names

git-svn-id: svn://svn.freebsd.org/base/stable/8@252873 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r246243: uart: add resume method and enable it for attachments on
avg [Sat, 6 Jul 2013 08:37:43 +0000 (08:37 +0000)]
MFC r246243: uart: add resume method and enable it for attachments on
the most common x86 buses

git-svn-id: svn://svn.freebsd.org/base/stable/8@252870 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252325:
markj [Sat, 6 Jul 2013 03:40:00 +0000 (03:40 +0000)]
MFC r252325:
The dtmalloc provider uses the short description of a malloc type as the
function name of its corresponding DTrace probes. These descriptions may
contain whitespace, but probe names cannot, so just replace any whitespace
with underscores when creating probes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252861 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251238:
markj [Sat, 6 Jul 2013 02:50:22 +0000 (02:50 +0000)]
MFC r251238:
SDT probes can directly pass up to five arguments as arguments to
dtrace_probe(). Arguments beyond these five must be obtained in an
architecture-specific way; this can be done through the getargval provider
method, and through dtrace_getarg() if getargval isn't overridden.

This change fixes two off-by-one bugs in the way these arguments are fetched
in FreeBSD's DTrace implementation. First, the SDT provider must set the
aframes parameter to 1 when creating a probe. The aframes parameter controls
the number of frames that dtrace_getarg() will step over in order to find
the frame containing the extra arguments. On FreeBSD, dtrace_getarg() is
called in SDT probe context via

dtrace_probe()->dtrace_dif_emulate()->dtrace_dif_variable->dtrace_getarg()

so aframes must be 3 since the arguments are in dtrace_probe()'s frame; it
was previously being called with a value of 2 instead. illumos uses a
different aframes value for SDT probes, but this is because illumos SDT
probes fire by triggering the #UD fault handler rather than calling
dtrace_probe() directly.

The second bug has to do with the way arguments are grabbed out
dtrace_probe()'s frame on amd64. The code currently jumps over the first
stack argument and retrieves the rest of them using a pointer into the
stack. This works on i386 because all of dtrace_probe()'s arguments will be
on the stack and the first argument is the probe ID, which should be
ignored. However, it is incorrect to ignore the first stack argument on
amd64, so we correct the pointer used to access the arguments.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252859 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252516, r252540:
trociny [Fri, 5 Jul 2013 18:47:25 +0000 (18:47 +0000)]
MFC r252516, r252540:

Add a mib for worker process ID.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252821 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252472:
trociny [Fri, 5 Jul 2013 18:44:41 +0000 (18:44 +0000)]
MFC r252472:

Make hastctl(1) ('list' command) output a worker pid.

Reviewed by: pjd

git-svn-id: svn://svn.freebsd.org/base/stable/8@252819 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoFinish MFC of r248291,249741:
marck [Fri, 5 Jul 2013 08:17:48 +0000 (08:17 +0000)]
Finish MFC of r248291,249741:

Change 'status' command to produce one-line easy-parseable output.

Approved by: trociny

git-svn-id: svn://svn.freebsd.org/base/stable/8@252777 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252218:
delphij [Fri, 5 Jul 2013 04:16:52 +0000 (04:16 +0000)]
MFC r252218:

Diff reduction against Illumos, no real change to code itself.

This marks vendor branch revision 252213 as merged, the actual code was
committed in r245479.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252767 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251646 + r252219:
delphij [Fri, 5 Jul 2013 04:11:34 +0000 (04:11 +0000)]
MFC r251646 + r252219:

MFV r251644:

Poor ZFS send / receive performance due to snapshot
hold / release processing (by smh@)

Illumos ZFS issues:
3740 Poor ZFS send / receive performance due to snapshot
     hold / release processing

MFV r252215:

Restore a previous behavior before r251646, where when destructing
ZFS snapshot, the ioctl would return ENOENT when it hit any of
them in the errlist (the new behavior was only return ENOENT when
all returns error).

Illumos ZFS issues:
  3829 fix for 3740 changed behavior of zfs destroy/hold/release ioctl

git-svn-id: svn://svn.freebsd.org/base/stable/8@252765 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251636: illumos #3749 zfs event processing should work on R/O root
delphij [Fri, 5 Jul 2013 04:02:15 +0000 (04:02 +0000)]
MFC r251636: illumos #3749 zfs event processing should work on R/O root
filesystems

This log is a modified version of the original one written by gibbs@,
to account for changes made during the illumos RTI process.

Allow ZFS asynchronous event handling to proceed even if the root file
system is mounted read-only.  This restriction appears to have been put
in place to avoid errors with updating the configuration cache file.
However:

 o The majority of asynchronous event handling does not involve
   configuration cache file updates.
 o The configuration cache file need not be on the root file system,
   so the check was not complete.
 o Other classes of errors (e.g. file system full) can also prevent
   a successful update yet do not prevent asynchronous event processing.
 o Configurations such as NanoBSD never have a read-write root,
   so ZFS event processing is permanently disabled in these systems.
 o Failure to handle asynchronous events promptly can extend the
   window of time that a pool is in a critical state.

At worst, a missed configuration cache update will force the operator to
perform a manual "zfs import" (note -f is not required) to inform the
system about a newly created pool.  To minimize the likelihood of this
rare occurrence, configuration cache write failures now emit FMA events
(via devctl) so the operator can take corrective action, and the write
is retried every 5 minutes.  The retry interval, in seconds, is tunable
via the sysctl "vfs.zfs.ccw_retry_interval".

As a side effect of reporting configuration cache events, other sysevents,
such as re-silver start/stop, are now also reported via devctl.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c:
o As is done in zfs_fm.c, provide a manual declaration for
  devctl_notify().  Both declarations could be combined
  into spa_impl.h, but the declaration is fault management
  related, not spa specific.  sys/fm/fs/zfs.h would be ideal
  if it weren't so public and reserved for FMA string
  definitions.  I'm open to suggestions on how to improve
  this nit while minimizing our divergence from Solaris.
o Use devctl_notify() to implement sysevent support in
  spa_event_notify().  The subsystem is EC_ZFS so that
  these events can never collide with those emitted in
  zfs_fm.c.
o Add the sysctl "vfs.zfs.ccw_retry_interval".  The value
  defaults to 5 minutes and is used to rate limit, on a
  per-pool basis, configuration cache file write attempts.
o Modify spa_async_dispatch to honor configuration cache
  write limiting.  If other events are pending, a configuration
  cache write will be attempted at the same time, so the
  rate limiting only applies when the asynchronous dispatch
  system is otherwise idle.  Async events should be rare
  (e.g. device arrival/departure) and configuration cache
  writes rarer, so a more complicated system to strictly
  honor the retry limit seems unwarranted.
o Remove check in spa_async_dispatch() for the root file
  system being read-write.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c:
Instead of silently ignoring configuration cache write
failures, report them via a new FMA event as well as
to the console.  The current zfs_ereport_post() doesn't
allow arbitrary name=value pairs to be appended to the
report, so the configuration cache file name is only
available on the console output.  This limitation should
be addressed in a future update.

Note: This error report is only posted once per incident,
to avoid spamming.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h:
Add a hrtime_t to the spa data structure to track the
time (via gethrtime()) of the last configuration cache file
write failure.  This is referenced in spa_async_dispatch()
to effect the rate limiting.

sys/cddl/contrib/opensolaris/uts/common/sys/fm/fs/zfs.h:
  Add FM_EREPORT_ZFS_CONFIG_CACHE_WRITE as an ereport class.

Submitted by: gibbs
Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Eric Schrock <eric.schrock@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/8@252763 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251635: illumos #3747 txg commit callbacks don't work
delphij [Fri, 5 Jul 2013 03:55:13 +0000 (03:55 +0000)]
MFC r251635: illumos #3747 txg commit callbacks don't work

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c:
Fix commit callbacks by moving them to the task's list.
Previously, list_move_tail() returned without doing anything because
the task list was passed as the source rather than destination.

cddl/contrib/opensolaris/cmd/ztest/ztest.c:
Check the commit callback threshold correctly.

Submitted by: will
Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/8@252761 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251634: illumos #3745 zpool create should treat -O mountpoint and -m the same
delphij [Fri, 5 Jul 2013 03:50:11 +0000 (03:50 +0000)]
MFC r251634: illumos #3745 zpool create should treat -O mountpoint and -m the same

cddl/contrib/opensolaris/cmd/zpool/zpool_main.c:  (change 644608)
This allows specifying a mountpoint using the latter form and having
its value checked and used as it would be using the former form.

As a consequence of this change:

1. The mountpoint property is set in the fsprops nvlist prior
   to creating the pool, rather than being set after creating
   the pool.  To me, this is the proper approach, since it
   avoids creating the pool if the mountpoint setting would
   cause the command to fail.
2. The mountpoint property, unlike all others, can be specified
   more than once.  Only the last setting takes effect.  This
   is to avoid breaking potential existing users that specify
   -m more than once.

Submitted by: will

cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
Fix "zpool create -R <whatever> -m <whatever>".  Ever since
change 644608, this has been broken.  The problem is that some
old code in libzfs_pool.c would force a pool's mountpoint to
"/" when creating a pool with an altroot.  That probably
implemented some old policy decision regarding altroots, but it
conflicts with the current manpage.  It also had no effect
until 644608, because the zpool command would _always_ change
the pool's mountpoint after creating it.  The solution is to
delete the old code from libzfs_pool.c.

Submitted by: asomers

Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/8@252759 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251633: illumos #3744 zfs shouldn't ignore errors unmounting
delphij [Fri, 5 Jul 2013 03:44:49 +0000 (03:44 +0000)]
MFC r251633: illumos #3744 zfs shouldn't ignore errors unmounting
snapshots

Propagate errors from zfs_unmount_snap() up to its callers wherever
feasible.

Submitted by: will
Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/8@252757 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251632: illumos #3743 zfs needs a refcount audit
delphij [Fri, 5 Jul 2013 03:38:53 +0000 (03:38 +0000)]
MFC r251632: illumos #3743 zfs needs a refcount audit

Audit zap cursor usage and correct missing calls to zap_cursor_fini().

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c:
Correct early exit handling of several functions that
previously failed to close a cursor prior to returning.

Submitted by: gibbs

Audit holders of dmu_bufs and correct missing calls to dmu_buf_rele().

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c:
Correct early exit handling of several functions that
previously failed to release a dmu_buf prior to returning.

Submitted by: will

Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Eric Schrock <eric.schrock@delphix.com>,
George Wilson <george.wilson@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/8@252755 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251631: illumos #3742 zfs comments need cleaner, more consistent style
delphij [Fri, 5 Jul 2013 03:06:36 +0000 (03:06 +0000)]
MFC r251631: illumos #3742 zfs comments need cleaner, more consistent style

- Make more of ZFS's comments use a natural English writing flow.
- Break up long paragraphs, fix various typos and spelling errors.
- Don't prefix a function description with its name when the function
  definition immediately follows.
- Remove useless comments.
- Add extra whitespace where it makes the comments more readable.

New comments were separated from this change and added in r251629.

Submitted by: asomers, gibbs, will
Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
George Wilson <george.wilson@delphix.com>,
Eric Schrock <eric.schrock@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/8@252752 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251629: 3741 zfs needs better comments
delphij [Fri, 5 Jul 2013 03:02:19 +0000 (03:02 +0000)]
MFC r251629: 3741 zfs needs better comments

Embellish the comments in various components of ZFS.  Move some comments
around closer to what they describe.  Specifically, answer the questions:

- What are some of the edge cases of the dbuf state machine?
- What does a txg quiesce do?
- When does the DMU notify threads waiting on txg's that they may
  proceed?
- How do the calculations for RAIDZ map allocations work?
- What process do the RAIDZ I/O start and done callbacks follow?

While here, adjust the function prototype of dmu_zfetch.c:dmu_zfetch_colinear()
to match its comment which describes its return as a boolean.

Submitted by: asomers, gibbs, will
Reviewed by: Matthew Ahrens <mahrens@delphix.com>,
Eric Schrock <eric.schrock@delphix.com>,
Christopher Siden <christopher.siden@delphix.com>
Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/8@252750 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252387:
dim [Thu, 4 Jul 2013 22:09:14 +0000 (22:09 +0000)]
MFC r252387:

Make libsupc++'s __cxa_call_terminate() prototype consistent with the
definition.

Submitted by: dt71@gmx.com

git-svn-id: svn://svn.freebsd.org/base/stable/8@252731 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252262:
jimharris [Wed, 3 Jul 2013 23:28:07 +0000 (23:28 +0000)]
MFC r252262:

  For ATA_PASSTHROUGH commands, pretend isci(4) supports multiword DMA
  by treating it as UDMA.

  This fixes a problem introduced in r249933/r249939, where CAM sends
  ATA_DSM_TRIM to SATA devices using ATA_PASSTHROUGH_16.  scsi_ata_trim()
  sets protocol as DMA (not UDMA) which is for multi-word DMA, even
  though no such mode is selected for the device.  isci(4) would fail
  these commands which is the correct behavior but not consistent with
  other HBAs, namely LSI's.

  smh@ did some further testing on an LSI controller, which rejected
  ATA_PASSTHROUGH_16 commands with mode=UDMA_OUT, even though only
  a UDMA mode was selected on the device.  So this precludes adding
  any kind of mode detection in CAM to determine which mode to use on
  a per-device basis.

Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/8@252650 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r242726 (ambrisko):
markj [Wed, 3 Jul 2013 23:16:33 +0000 (23:16 +0000)]
MFC r242726 (ambrisko):
Add support for SCSI pass through devices to be attached and detached.

MFC r251172 (sbruno):
xpt_create_path() requires mfi_io_lock to be held, so do it.

mfi(4) doesn't panic on host startup now.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252644 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMF9: r252635, r252638:
obrien [Wed, 3 Jul 2013 22:59:46 +0000 (22:59 +0000)]
MF9: r252635, r252638:
     MFC: r252348, r252363: sysconf(3) returns a long, not an int.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252639 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252600: Fix grammar in a comment.
dteske [Wed, 3 Jul 2013 20:55:49 +0000 (20:55 +0000)]
MFC r252600: Fix grammar in a comment.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252601 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252471:
smh [Wed, 3 Jul 2013 08:35:14 +0000 (08:35 +0000)]
MFC r252471:
Remove forced timeout of in-flight commands from mfi_timeout.

While this prevents commands getting stuck forever there is no way to guarantee
that data from the command hasn't been committed to the device.

In addition older mfi firmware has a bug that would cause the controller to
frequently stall IO for over our timeout value, which when combined with
a forced timeout often resulted in panics in UFS; which would otherwise be
avoided when the command eventually completed if left alone.

For reference this timeout issue is resolved in Dell FW package 21.2.1-0000.
Fixed FW package version for none Dell controller will likely vary.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252553 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252052:
lstewart [Wed, 3 Jul 2013 08:21:05 +0000 (08:21 +0000)]
MFC r252052:

Non-virtualised hhook points are supported as of r251732.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251789:
lstewart [Wed, 3 Jul 2013 07:58:14 +0000 (07:58 +0000)]
MFC r251789:

Now that the necessary infrastructure is in place to ensure hhook points which
register after a khelp module will get hooked, move khelp module initialisation
to the earlier SI_SUB_KLD stage.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252550 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251787:
lstewart [Wed, 3 Jul 2013 06:23:46 +0000 (06:23 +0000)]
MFC r251787:

Move hhook's per-vnet initialisation to an earlier SYSINIT SI_SUB stage to
ensure all per-vnet related hhook initialisation is completed prior to any
virtualised hhook points attempting registration.

vnet_register_sysinit() requires that a stage later than SI_SUB_VNET be chosen.
There are no per-vnet initialisors in the source tree at this time which run
earlier than SI_SUB_INIT_IF. A quick audit of non-virtualised SYSINITs indicates
there are no subsystems pre SI_SUB_MBUF that would likely be interested in
registering a virtualised hhook point.

Settle on SI_SUB_MBUF as hhook's per-vnet initialisation stage as it's the first
overtly network-related initilisation stage to run after SI_SUB_VNET. If a
subsystem that initialises earlier than SI_SUB_MBUF ends up wanting to register
virtualised hhook points in future, hhook's use of SI_SUB_MBUF will need to be
revisited and would probably warrant creating a dedicated SI_SUB_HHOOK which
runs immediately after SI_SUB_VNET.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252544 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251778:
lstewart [Wed, 3 Jul 2013 05:59:48 +0000 (05:59 +0000)]
MFC r251778:

Cleanup and simplification in khelp_{register|deregister}_helper(). No
functional changes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252542 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251774:
lstewart [Wed, 3 Jul 2013 05:47:28 +0000 (05:47 +0000)]
MFC r251774:

Add a private KPI between hhook and khelp that allows khelp modules to insert
hook functions into hhook points which register after the modules were loaded -
potentially useful during boot or if hhook points are dynamically registered.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252538 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251770:
lstewart [Wed, 3 Jul 2013 05:29:21 +0000 (05:29 +0000)]
MFC r251770:

Internalise handling of virtualised hook points inside
hhook_{add|remove}_hook_lookup() so that khelp (and other potential API
consumers) do not have to care when they attempt to (un)hook a particular hook
point identified by id and type.

Reviewed by: scottl

git-svn-id: svn://svn.freebsd.org/base/stable/8@252537 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251732,251752:
lstewart [Wed, 3 Jul 2013 04:21:29 +0000 (04:21 +0000)]
MFC r251732,251752:

Add support for non-virtualised hhook points, which are uniquely identified by
type and id, as compared to virtualised hook points which are now uniquely
identified by type, id and a vid (which for vimage is the pointer to the vnet
that the hhook resides in).

All hhook_head structs for both virtualised and non-virtualised hook points
coexist in hhook_head_list, and a separate list is maintained for hhook points
within each vnet to simplify some vimage-related housekeeping.

Reviewed by: scottl

git-svn-id: svn://svn.freebsd.org/base/stable/8@252535 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoWhen a previous call to sbsndptr() leaves sb->sb_sndptroff at the start of an
lstewart [Wed, 3 Jul 2013 03:40:06 +0000 (03:40 +0000)]
When a previous call to sbsndptr() leaves sb->sb_sndptroff at the start of an
mbuf that was fully consumed by the previous call, the mbuf ptr returned by the
current call ends up being the previous mbuf in the sb chain to the one that
contains the data we want.

This does not cause any observable issues because the mbuf copy routines happily
walk the mbuf chain to get to the data at the moff offset, which in this case
means they effectively skip over the mbuf returned by sbsndptr().

We can't adjust sb->sb_sndptr during the previous call for this case because the
next mbuf in the chain may not exist yet. We therefore need to detect the
condition and make the adjustment during the current call.

Fix by detecting the special case of moff being at the start of the next mbuf in
the chain and adjust the required accounting variables accordingly.

Reviewed by: andre

git-svn-id: svn://svn.freebsd.org/base/stable/8@252533 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252380:
mm [Tue, 2 Jul 2013 19:45:14 +0000 (19:45 +0000)]
MFC r252380:
Unbreak "zfs jail" and "zfs unjail" (broken in stable/8 since r251757)

I missed to register zfs_ioc_jail and zfs_ioc_unjail as legacy ioctl's
with the new zfs_ioctl_register_legacy() function.

These operations do not modify pools or datasets so there is no need to
log them to pool history.

Reported by: Alexander Leidinger <netchild@FreeBSD.org> on current@

git-svn-id: svn://svn.freebsd.org/base/stable/8@252525 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248286 (pjd):
trociny [Tue, 2 Jul 2013 19:29:45 +0000 (19:29 +0000)]
MFC r248286 (pjd):

Removed redundant includes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252520 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248294, r248296:
trociny [Tue, 2 Jul 2013 19:28:16 +0000 (19:28 +0000)]
MFC r248294, r248296:

r248294 (pjd):

Delete requests can be larger than MAXPHYS.

r248296 (pjd):

Minor corrections.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252518 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251859:
delphij [Mon, 1 Jul 2013 22:07:01 +0000 (22:07 +0000)]
MFC r251859:

Return ENETDOWN instead of ENOENT when all lagg(4) links are
inactive when upper layer tries to transmit packet.  This
gives better feedback and meaningful errors for applications.

Reviewed by: thompsa

git-svn-id: svn://svn.freebsd.org/base/stable/8@252490 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251825,252486:
delphij [Mon, 1 Jul 2013 22:02:39 +0000 (22:02 +0000)]
MFC r251825,252486:

Remove vfs_mount(9), it have been died since 2004.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252488 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252062:
delphij [Mon, 1 Jul 2013 20:46:35 +0000 (20:46 +0000)]
MFC r252062:

Call sshd_precmd instead of sshd_configtest when the operator
requests reload or restart, which, in addition of testing the
configuration, will also generate host keys when they are not
present (previous behavior).

Obtained from: FreeNAS
Ok'ed by: bdrewery, des

git-svn-id: svn://svn.freebsd.org/base/stable/8@252478 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252392:
smh [Mon, 1 Jul 2013 08:27:15 +0000 (08:27 +0000)]
MFC r252392:
style(9) fixes

git-svn-id: svn://svn.freebsd.org/base/stable/8@252462 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252390:
smh [Mon, 1 Jul 2013 08:25:50 +0000 (08:25 +0000)]
MFC r252390:
Remove invalid ASSERT

git-svn-id: svn://svn.freebsd.org/base/stable/8@252461 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251482,251733:
yongari [Mon, 1 Jul 2013 07:03:38 +0000 (07:03 +0000)]
MFC r251482,251733:
r251482:
  Correct setting TX random backoff register. This register is
  implemented as a 10 bits linear feedback shift register so only
  lower 10 bits are valid.
  Because this register is used to initialize random backoff interval
  register only when resolved duplex is half-duplex, it wouldn't have
  caused issues in these days.

r251733:
  Fix a typo introduced in r213280. IFM_OPTIONS macro should see
  current media word.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252456 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251481:
yongari [Mon, 1 Jul 2013 06:58:35 +0000 (06:58 +0000)]
MFC r251481:
  Do not report current link status if driver is not running.
  Reporting link status in driver has a side-effect that makes mii(4)
  check current link status.  mii(4) will call link status change
  callback when it sees link state change.  Normally this wouldn't
  have problems. However, ASF/IPMI firmware can actively access PHY
  regardless of driver's running state such that reporting link
  status for not-running interface can generate meaningless link
  UP/DOWN messages.

  This change also makes dhclient think driver got a valid link
  regardless of link establishment so it will bypass dhclient's
  initial link status check. I think that wouldn't be issue
  though.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252453 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f