101362 Commits

Author SHA1 Message Date
mav
004861f324 MFC r274081: Fix residual copy/paste in r274080. 2014-11-11 17:18:51 +00:00
mav
2be19bde46 MFC r274080: Improve error handling around duplicate lun and port enable.
This fixes kernel panic if port enabled twice and then disabled.
2014-11-11 17:17:41 +00:00
mav
2a51a4259a MFC r274253: Fix LUN resize broken by r272911 commit. 2014-11-11 17:14:35 +00:00
mav
e4a81f9ddf MFC r272936:
Update isp_tgt_map and send new arrival notification if target that departed
earlier has returned.  Previously that code worked only once, confusing CTL.
2014-11-11 17:13:03 +00:00
kib
c7b266cfad MFC r274100:
Fix mis-spelling of bits and types names in the
default_pager_putpages() and swap_pager_putpages().
2014-11-11 11:06:10 +00:00
jfv
33ec143df3 MFC Intel I40E drivers: r274205,r274218, and r274228
The MFC was pushed early as it fixes a panic in the
	exiting driver of 10.1 that Intel discovered in validation.
2014-11-10 23:56:06 +00:00
kib
9f76ecdf89 MFC r274038:
Clean up confusing comment.
2014-11-10 09:11:23 +00:00
jpaetzel
00ea043c2a MFC: 273641
This change addresses 4 bugs in ZFS exposed by Richard Kojedzinszky's
crash.sh script attached to FreeNAS bug 4109:
https://bugs.freenas.org/issues/4109

Three are in the snapshot layer:
a) AVG explains in his notes: https://wiki.freebsd.org/AvgVfsSolarisVsFreeBSD

"VOP_INACTIVE must not do any destructive actions to a vnode
and its filesystem node, nor invalidate them in any way."
gfs_vop_inactive and zfsctl_snapshot_inactive did just that. In
OpenSolaris VOP_INACTIVE is much closer to FreeBSD's VOP_RECLAIM.
Rename & move them to gfs_vop_reclaim and zfsctl_snapshot_reclaim
and merge in the requisite vnode_destroy from zfsctl_common_reclaim.

b) gfs_lookup_dot and various zfsctl functions do not honor the
FreeBSD VFS convention of only locking from the root downward. When
looking up ".." the convention is to drop the current leaf vnode lock before
acquiring the directory vnode and then subsequently re-acquiring the lock on the
leaf vnode. This fixes that in all the places that our exercised by crash.sh.

c) The snapshot may already be unmounted when the directory vnode is reclaimed.
Check for this case and return.

One in the common layer:
d) Callers of traverse expect the reference to the vnode passed in to be
maintained. Don't release it.

This last one may be an unclear contract. There may in fact be some callers that
do expect the reference to be dropped on success in addition to callers that
expect it to be released. In this case a further audit of the callers is needed
and a consensus on the correct behavior.

PR:     184677
Submitted by:	kmacy
Reviewed by:	delphij, will, avg
Sponsored by:	iXsystems
2014-11-09 20:04:29 +00:00
kib
7c9ec90843 MFC r273967:
Only trigger a panic when forced operation is done.  Convert direct
panic() call into KASSERT().
2014-11-09 09:44:09 +00:00
ian
cdce53b945 MFC r268836: Fix a typo in a gpio node name. 2014-11-08 04:18:33 +00:00
ian
ccec47a8b5 MFC r273703:
Remove the ARM_DEVICE_MULTIPASS option and make its effect be the default.
2014-11-08 03:42:19 +00:00
bryanv
8677516401 MFC r272844:
Add missing UDP multicast receive dtrace probes
2014-11-08 02:53:55 +00:00
bryanv
018ace964f MFC r272801:
Move the calls to u_tun_func() into udp6_append()

A similar cleanup for UDPv4 was performed in r220620.
2014-11-08 02:47:23 +00:00
bryanv
520007fcf4 MFC r272797:
Check for mbuf copy failure when there are multiple multicast sockets

This partitular case is the only path where the mbuf could be NULL.
udp_append() checked for a NULL mbuf only after invoking the tunneling
callback. Our only in tree tunneling callback - SCTP - assumed a non
NULL mbuf, and it is a bit odd to make the callbacks responsible for
checking this condition.

This also reduces the differences between the IPv4 and IPv6 code.
2014-11-08 02:40:00 +00:00
gnn
52c05ed231 MFC: 273279
Add new quirks for the latest Samsung SSD, model 850.

Submitted by:	sbruno
2014-11-08 00:47:16 +00:00
trasz
11e554c92e MFC r272931:
Add assertion to catch duplicated nodes.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:52:32 +00:00
trasz
44b7c0743b MFC r272836:
Remove remnants of some cleanup; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:50:40 +00:00
trasz
5217262cb3 MFC r272743:
Simplify; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:49:04 +00:00
trasz
a6df93e354 MFC r272512:
Make autofs use shared vnode locks.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:47:22 +00:00
trasz
f72fde1ec0 MFC r272471:
Fix autofs debug macros.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:45:34 +00:00
trasz
603b73d3cc MFC r272470:
Make autofs(4) use shared lock for lookups, instead of exclusive one.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:44:03 +00:00
trasz
c03d95d341 MFC r272405:
Call uma_zfree() outside of lock, and improve comment.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:42:11 +00:00
trasz
aba7b57a35 MFC r272403:
Make autofs timeout handling use timeout task instead of callout;
that's because the handler can sleep on sx lock.

Sponsored by:	The FreeBSD Foundation
2014-11-07 15:40:34 +00:00
ae
b0344a7d0f MFC r273855:
Fix mbuf leak in IPv6 multicast code.
  When multicast capable interface goes away, it leaves multicast groups,
  this leads to generate MLD reports, but MLD code does deffered send and
  MLD reports are queued in the in6_multi's in6m_scq ifq. The problem is
  that in6_multi structures are freed when interface leaves multicast groups
  and thread that does deffered send will not take these queued packets.

  PR:		194577

MFC r273857:
  Move ifq drain into in6m_purge().

  Suggested by:	bms

Sponsored by:	Yandex LLC
2014-11-06 09:16:52 +00:00
gjb
9bbd5a3136 Bump __FreeBSD_version after SA-14:23, SA-14:24,
SA-14:25.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2014-11-06 02:41:38 +00:00
markj
4520b8ad04 MFC r273342:
Fix a typo from r189544, which replaced unp_global_rwlock with unp_list_lock
and unp_link_rwlock.
2014-11-06 01:34:43 +00:00
markj
0413ac300f MFC r273236:
Use pmc_destroy_pmc_descriptor() to actually free the pmc, which is
consistent with pmc_destroy_owner_descriptor(). Also be sure to destroy
PMCs if a process exits or execs without explicitly releasing them.
2014-11-06 01:30:13 +00:00
rmacklem
1dc5bfe0b1 MFC: r273486
Clip the settings for the NFS rsize, wsize mount options
to a power of 2. For non-power of 2 settings, intermittent
page faults have been reported. Although the bug that causes
these page faults/crashes has not been identified, it does
not appear to occur when rsize, wsize is a power of 2.
2014-11-05 23:12:39 +00:00
lwhsu
7cb84aa335 MFC r271992
Reflect the chanages in sleepqueue.h and subr_sleepqueue.c
  - Priority argument is introduced to sleepq_*wait* in r177085
  - sleepq_calc_signal_retval is removed from implementation
  - sleepq_catch_signals is internal now

MFC r272475

  - Bump .Dd

Approved by:  kevlo
2014-11-05 16:24:57 +00:00
ae
6933957ccb MFC r266800 by vanhu:
IPv4-in-IPv6 and IPv6-in-IPv4 IPsec tunnels.
  For IPv6-in-IPv4, you may need to do the following command
  on the tunnel interface if it is configured as IPv4 only:
  ifconfig <interface> inet6 -ifdisabled

  Code logic inspired from NetBSD.
  PR: kern/169438

MC r266822 by bz:
  Use IPv4 statistics in ipsec4_process_packet() rather than the IPv6
  version.  This also unbreaks the NOINET6 builds after r266800.

MFC r268083 by zec:
  The assumption in ipsec4_process_packet() that the payload may be
  only IPv4 is wrong, so check the IP version before mangling the
  payload header.

MFC r272394:
  Do not strip outer header when operating in transport mode.
  Instead requeue mbuf back to IPv4 protocol handler. If there is one extra IP-IP
  encapsulation, it will be handled with tunneling interface. And thus proper
  interface will be exposed into mbuf's rcvif. Also, tcpdump that listens on tunneling
  interface will see packets in both directions.

PR:		194761
2014-11-05 09:23:29 +00:00
des
39bef15648 [SA-14:25] Fix kernel stack disclosure in setlogin(2) / getlogin(2).
[SA-14:26] Fix remote command execution in ftp(1).

Approved by:	so (des)
2014-11-04 23:29:57 +00:00
hselasky
fa183f0174 MFC r271946 and r272595:
Improve transmit sending offload, TSO, algorithm in general. This
change allows all HCAs from Mellanox Technologies to function properly
when TSO is enabled. See r271946 and r272595 for more details about
this commit.

Sponsored by:	Mellanox Technologies
2014-11-03 12:38:29 +00:00
nyan
8dd879bfaf MFC: r268474 and r268476 (by imp)
- Merge the clang support from i386.
  - Compile boot2 with clang on pc98.

MFC: r272250 (by nyan)
  - Reduce diffs against i386.
2014-11-03 12:07:04 +00:00
nyan
2b45887284 MFC: r268475 (by imp)
Make SERIAL support optional again. Enable it for i386 because a huge
  percentage of machines has a 16550. Disable it for pc98 since only a
  tiny fraction of them have one.
2014-11-03 11:58:32 +00:00
nyan
562d29cc36 MFC: r272258
- Cosmetic changes.
  - Reduce diffs against i386.

MFC: 272259
  MFi386: Enable QUOTA, PRINTF_BUFR_SIZE and puc.
2014-11-03 11:21:43 +00:00
nyan
027712baa4 MFC: r272256
Switch from lib/libstand to sys/boot/libstand32.
2014-11-03 11:08:00 +00:00
nyan
85b0a19937 MFC: r272255
Supress clang warning for FreeBSD printf %b and %D formats.
2014-11-03 11:01:12 +00:00
nyan
c2e8bf4779 MFC: r272252
Drop the 3rd clause from all 3 clause BSD licenses.
2014-11-03 10:38:03 +00:00
kib
2a026f5937 MFC r273728:
Add a method to iicbus to request IIC_M_NOSTOP behaviour for multibyte
transfers to be default.
2014-11-03 10:33:01 +00:00
kib
9b2eda21cd MFC r273727:
Original commit message was
Allow the vfs.nfsd knobs to be set from loader.conf (or using
kenv(8)).  This is useful when nfsd is loaded as module.

As I understand, automatic fetch from kenv does not work in stable/10.
Merge the change still, to reduce code difference.
2014-11-03 10:30:44 +00:00
nyan
70c10de0a9 MFC: r272248
- Cleanups pc98 code.
  - Remove unworked formats.
2014-11-03 10:26:29 +00:00
mav
edabf036a2 MFC r273809:
Implement better handling for ENOSPC error for both CTL and CAM.

This makes VMWare VAAI Thin Provisioning Stun primitive activate, pausing
the virtual machine, when backing storage (ZFS pool) is getting overflowed.
2014-11-03 03:45:41 +00:00
mav
131eff3491 MFC r273730, r273731:
Reduce code duplication around Write Exclusive persistent reservation.

While there, allow some more commands to pass persistent reservation.
2014-11-03 03:44:59 +00:00
mav
58bf349623 MFC r273711:
Allocate buffer for READ BUFFER/WRITE BUFFER commands on demand.

These commands are rare, but consume additional 256KB RAM per LUN.
2014-11-03 03:43:40 +00:00
rpaulo
ce9598bb33 MFC 273598 273602 273607 273613 273647:
Userland HPET support.
2014-11-03 03:17:58 +00:00
delphij
9a897ad843 MFC r273026:
Add a tunable for arc_shrink_shift (vfs.zfs.arc_shrink_shift) that
controls how much fraction, 1/2^arc_shrink_shift, should be reclaimed
when there is memory pressure.

Submitted by:	Richard Kojedzinszky <krichy at tvnetwork.hu>
2014-11-02 19:16:41 +00:00
delphij
78541e1020 MFC r273267:
Add tunable vfs.zfs.space_map_blksz for space map's maximum block size.
2014-11-02 19:09:34 +00:00
mav
9252414b60 MFC r273708: Fix support for LUN flat space addressing. 2014-11-02 17:31:45 +00:00
mav
9e735a2fb2 MFC r273693: Fix printing non-terminated strings in devlist XML. 2014-11-02 17:31:10 +00:00
mav
c9979422b8 MFC r273687:
Add "rpm" and "formfactor" LUN options to match istgt functionality.
2014-11-02 17:30:30 +00:00