Commit Graph

193568 Commits

Author SHA1 Message Date
Andrey V. Elsukov
4118113fc1 Rework bootparttest to use more code from sys/boot.
Use disk_open() call to emulate loader behavior.
2014-10-05 06:04:47 +00:00
Andrey V. Elsukov
34f50f4c34 Add a bit more debug messages. 2014-10-05 06:00:22 +00:00
Cy Schubert
2777bfabc0 ipfilter bug #537 NAT rules with sticky have incorrect hostmap IP address.
This fixes when an IP address mapping is put in the hostmap table for
sticky NAT rules, it ends up having the wrong byte order.

Obtained from:	ipfilter CVS repo (r1.102), NetBSD CVS repo (r1.12)
2014-10-05 03:58:30 +00:00
Cy Schubert
3a77b75120 ipfilter bug #534 destination list hashing not endian neutral
Obtained from:	ipfilter CVS repo (r1.26), NetBSD CVS repo (r1.8)
2014-10-05 03:52:09 +00:00
Cy Schubert
685545cdc7 ipfilter bug #538 ipf_p_dns_del should return void
Obtained from:	ipfilter cvs repo (r1.8)
2014-10-05 03:48:09 +00:00
Cy Schubert
a7bd2acdab ipfilter bug #554 Determining why a ipf rule matches is hard -- replace
ipfilter rule compare with new ipf_rule_compare() function.

Obtained from:	ipfilter CVS rep (r1.129)
2014-10-05 03:45:19 +00:00
Cy Schubert
7db9f2ba58 ipfiler bug #550 filter rule list corrupted with inserted rules
Obtained from:	ipfilter CVS repo (r1.128); NetBSD CVS repo (r1.15)
2014-10-05 03:41:47 +00:00
Bryan Venteicher
6e5254e0d7 Remove stray uma_mtx lock/unlock in zone_drain_wait()
Callers of zone_drain_wait(M_WAITOK) do not need to hold (and were not)
the uma_mtx, but we would attempt to unlock and relock the mutex if we
had to sleep because the zone was already draining. The M_NOWAIT callers
may hold the uma_mtx, but we do not sleep in that case.

Reviewed by:	jhb
MFC after:	3 days
2014-10-05 03:18:30 +00:00
Hiroki Sato
7eb756fab1 Use printb() for boolean flags in ro_opts and actor_state for LACP. 2014-10-05 02:37:01 +00:00
Hiroki Sato
6d47816791 - Move L2 addr configuration for the primary port to a taskqueue. This fixes
LOR of softc rmlock in iflladdr_event handlers.

- Call if_delmulti_ifma() after LACP_UNLOCK().  This fixes another LOR.

- Fix a panic in lacp_transit_expire().

- Fix a panic in lagg_input() upon shutting down a port.
2014-10-05 02:34:21 +00:00
Mateusz Guzik
25108069ec Get rid of crshared. 2014-10-05 02:16:53 +00:00
Gavin Atkinson
b328e7bf72 Include urndis(4) in list of devices for which we generate hardware notes.
MFC after:	3 days
2014-10-04 23:56:25 +00:00
Konstantin Belousov
4142462eeb Slightly reword comment. Move code, which is described by the
comment, after it.

Discussed with:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-10-04 18:51:55 +00:00
Jean-Sébastien Pédron
0d06446812 vt(4): Don't recalculate buffer size if we don't know screen size
When the screen size is unknown, it's set to 0x0. We can't use that as
the buffer size, otherwise, functions such as vtbuf_fill() will fail.

This fixes a panic on RaspberryPi, where there's no vt(4) backend
configured early in boot.

PR:		193981
Tested by:	danilo@
MFC after:	3 days
2014-10-04 18:40:40 +00:00
Konstantin Belousov
b76278407d Add kernel option KSTACK_USAGE_PROF to sample the stack depth on
interrupts and report the largest value seen as sysctl
debug.max_kstack_used.  Useful to estimate how close the kernel stack
size is to overflow.

In collaboration with:	Larry Baird <lab@gta.com>
Sponsored by:	The FreeBSD Foundation (kib)
MFC after:	1 week
2014-10-04 18:38:14 +00:00
Konstantin Belousov
539c9eef12 Fixes for i/o during coredumping:
- Do not dump into system files.
- Do not acquire write reference to the mount point where img.core is
  written, in the coredump().  The vn_rdwr() calls from ELF imgact
  request the write ref from vn_rdwr().  Recursive acqusition of the
  write ref deadlocks with the unmount.
- Instead, take the range lock for the whole core file.  This prevents
  parallel dumping from two processes executing the same image,
  converting the useless interleaved dump into sequential dumping,
  with second core overwriting the first.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-10-04 18:35:00 +00:00
Konstantin Belousov
e3d6feceb1 Add IO_RANGELOCKED flag for vn_rdwr(9), which specifies that vnode is
not locked, but range is.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-10-04 18:28:27 +00:00
Pedro F. Giffuni
79ec4cf466 Minor doc format fix.
Submitted by:	Yonghyeon PYUN
2014-10-04 18:00:15 +00:00
Ian Lepore
41e8f7efbe Make kevent(2) periodic timer events more reliably periodic. The event
callout is now scheduled using the C_ABSOLUTE flag, and the absolute time
of each event is calculated as the time the previous event was scheduled
for plus the interval.  This ensures that latency in processing a given
event doesn't perturb the arrival time of any subsequent events.

Reviewed by:	jhb
2014-10-04 15:59:15 +00:00
Xin LI
4bb264ae15 Don't make nested definition for range_seg_cache.
Reported by:	ian
MFC after:	1 week
X-MFC-With:	r272506
2014-10-04 15:42:52 +00:00
Andrew Turner
e0d0c7b8f3 Silence a warning about Tag_Virtualization_use being unknown. We don't
handle merging this tag correctly, however it's unused.
2014-10-04 14:30:16 +00:00
Bjoern A. Zeeb
92720216a9 Put and #ifdef _KERNEL around the #include for opt_capsicum.h to
hopefully allow the build to finish after r272505.
2014-10-04 14:17:30 +00:00
Andrew Turner
657be2acf7 Add movw and movt relocations to the list of relocations against function
names that must nnot be adjusted. This fixes a bug where code such as:
movw r2, :lower16:symbol
movt r2, :upper16:symbol

It is common for clang to generate such code when targeting armv7.
2014-10-04 13:14:37 +00:00
Alexander V. Chernikov
e3cadfdb32 Bump max rule size to 512 opcodes. 2014-10-04 12:46:26 +00:00
Edward Tomasz Napierala
d19c297e5f Make autofs use shared vnode locks.
Reviewed by:	kib
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-04 09:37:40 +00:00
Xin LI
4750c382a9 MFV r272499:
Illumos issue:
    5174 add sdt probe for blocked read in dbuf_read()

MFC after:	2 weeks
2014-10-04 08:55:08 +00:00
Xin LI
eb0b70068c Add a new sysctl, vfs.zfs.vol.unmap_enabled, which allows the system
administrator to toggle whether ZFS should ignore UNMAP requests.

Illumos issue:
    5149 zvols need a way to ignore DKIOCFREE

MFC after:	2 weeks
2014-10-04 08:51:57 +00:00
Xin LI
2d36d67c72 Diff reduction with upstream. The code change is not really applicable
to FreeBSD.

Illumos issue:
    5148 zvol's DKIOCFREE holds zfsdev_state_lock too long

MFC after:	1 month
2014-10-04 08:41:23 +00:00
Adrian Chadd
1f6aea4c49 Add in decode for the AR9300 RX descriptor. 2014-10-04 08:32:15 +00:00
Xin LI
523b4c7fdf MFV r272496:
Add tunable for number of metaslabs per vdev
(vfs.zfs.vdev.metaslabs_per_vdev).  The default remains
at 200.

Illumos issue:
    5161 add tunable for number of metaslabs per vdev

MFC after:	2 weeks
2014-10-04 08:29:48 +00:00
Xin LI
a8d7512709 MFV r272495:
In arc_kmem_reap_now(), reap range_seg_cache too to reclaim memory in
response of memory pressure.

Illumos issue:
    5163 arc should reap range_seg_cache

MFC after:	1 week
2014-10-04 08:14:10 +00:00
Mateusz Guzik
ee3fd7bbb1 Plug capability races.
fp and appropriate capability lookups were not atomic, which could result in
improper capabilities being checked.

This could result either in protection bypass or in a spurious ENOTCAPABLE.

Make fp + capability check atomic with the help of sequence counters.

Reviewed by:	kib
MFC after:	3 weeks
2014-10-04 08:08:56 +00:00
Xin LI
8c20e2ff11 MFV r272494:
Make space_map_truncate() always do space_map_reallocate().  Without
this, setting space_map_max_blksz would cause panic for existing pool,
as dmu_objset_set_blocksize would fail if the object have multiple blocks.

Illumos issues:
   5164 space_map_max_blksz causes panic, does not work
   5165 zdb fails assertion when run on pool with recently-enabled
	spacemap_histogram feature

MFC after:	2 weeks
2014-10-04 08:05:39 +00:00
Mateusz Guzik
6cd8796a84 Add sequence counters with memory barriers.
Current implementation is somewhat simplistic and hackish,
will be improved later after possible memory barrier overhaul.

Reviewed by:	kib
MFC after:	3 weeks
2014-10-04 08:03:52 +00:00
Xin LI
7c2f66bb3b MFV r272493:
Show individual disk capacity when doing zpool list -v.

Illumos issue:
    5147 zpool list -v should show individual disk capacity

MFC after:	1 week
2014-10-04 07:56:50 +00:00
Xin LI
39eeb9830d 5177 remove dead code from dsl_scan.c
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@5f37736ac8
2014-10-04 07:50:06 +00:00
Xin LI
227ddfdd8f 5150 zfs clone of a defer_destroy snapshot causes strangeness
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Max Grossman <max.grossman@delphix.com>
Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@42fcb65ea4
2014-10-04 07:49:06 +00:00
Xin LI
ae1ba196d7 5174 add sdt probe for blocked read in dbuf_read()
Reviewed by: Basil Crow <basil.crow@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Reviewed by: Boris Protopopov <bprotopopov@hotmail.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Adam H. Leventhal <ahl@delphix.com>

illumos/illumos-gate@f6164ad638
2014-10-04 07:38:59 +00:00
Xin LI
1cf573be37 5149 zvols need a way to ignore DKIOCFREE
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matthew Ahrens <matthew.ahrens@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@893c83ba3e
2014-10-04 07:37:17 +00:00
Xin LI
f9fa0a788c 5148 zvol's DKIOCFREE holds zfsdev_state_lock too long
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@574e2414ac
2014-10-04 07:35:50 +00:00
Xin LI
5fce0b0809 5161 add tunable for number of metaslabs per vdev
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author:	Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@bf3e216c7e
2014-10-04 07:34:50 +00:00
Xin LI
3c5da9147d 5163 arc should reap range_seg_cache
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author:	George Wilson <george.wilson@delphix.com>

illumos/illumos@83803b51e1
2014-10-04 07:32:19 +00:00
Xin LI
a665ce3ac2 5164 space_map_max_blksz causes panic, does not work
5165 zdb fails assertion when run on pool with recently-enabled spacemap_histogram feature
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author:	Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@b1be2892dd
2014-10-04 07:26:42 +00:00
Xin LI
8b8b61b2cc 5147 zpool list -v should show individual disk capacity
Reviewed by: Adam Leventhal <adam.leventhal@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Matthew Ahrens <matthew.ahrens@delphix.com>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author:	George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@7a09f97bc0
2014-10-04 07:24:35 +00:00
Yoshihiro Takahashi
9407825cc6 Merge pc98's machdep.c into i386/i386/machdep.c. 2014-10-04 06:01:30 +00:00
Yoshihiro Takahashi
986eedef26 Reduce diffs against i386. 2014-10-04 05:03:39 +00:00
Yoshihiro Takahashi
a5eb7f4fba - MFi386: Add compile-with option for tau32-ddk.c.
- Whitespace change.
- Remove duplicate line.
2014-10-04 05:01:57 +00:00
Mark Johnston
ec04549052 Remove an incorrect and useless debug print.
X-MFC-With:	r272488
2014-10-04 02:34:30 +00:00
Mark Johnston
41da933c87 Hook up support for userland CTF support in DTrace. This required some
modifications to libproc to support fetching the CTF info for a given file.

With this change, dtrace(1) is able to resolve type info for function and
USDT probe arguments, and function return values. In particular, the args[n]
syntax should now work for referencing arguments of userland probes,
provided that the requisite CTF info is available.

The uctf tests pass if the test programs are compiled with CTF info. The
current infrastructure around the DTrace test suite doesn't support this
yet.

Differential Revision:	https://reviews.freebsd.org/D891
MFC after:		1 month
Relnotes:		yes
Sponsored by:		EMC / Isilon Storage Division
2014-10-03 23:20:37 +00:00
Andrey V. Elsukov
f24c6fe478 Add GUID of FreeBSD slice to GPT scheme.
MFC after:	1 week
2014-10-03 21:46:07 +00:00