]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoImprove "reserved keywords" hack:
Alexander V. Chernikov [Mon, 6 Oct 2014 11:00:47 +0000 (11:00 +0000)]
Improve "reserved keywords" hack:

we can't easily predict (in current parsing model)
if the keyword is ipfw(8) reserved keyword or port name.
Checking proto database via getprotobyname() consumes a lot of
CPU and leads to tens of seconds for parsing large ruleset.
Use list of reserved keywords and check them as pre-requisite
before doing getprotobyname().

Obtained from: Yandex LLC

9 years agoUse r271207 optimization only for MSI-enabled HBAs.
Alexander Motin [Mon, 6 Oct 2014 10:58:54 +0000 (10:58 +0000)]
Use r271207 optimization only for MSI-enabled HBAs.

It was found that VirtualBox' AHCI does not allow nterrupt to be cleared
before the interrupt status register is read, causing interrupt storm.

AHCI specification allows to skip this register use when multi-vector MSI
is enabled and so interrupting port is known.  For single-vector MSI that
is not stated explicitly, but if the port is only one, it is obviously
known too.

9 years agoDisable generating vfp and NEON instructions in the arm kernel.
Andrew Turner [Mon, 6 Oct 2014 09:52:28 +0000 (09:52 +0000)]
Disable generating vfp and NEON instructions in the arm kernel.

9 years agoUse documented compat string for msm uart.
Ganbold Tsagaankhuu [Mon, 6 Oct 2014 09:00:53 +0000 (09:00 +0000)]
Use documented compat string for msm uart.
Whilst here use tab instead of spaces.

Approved by:    stas (mentor)

9 years agoMFV r272591:
Xin LI [Mon, 6 Oct 2014 07:29:17 +0000 (07:29 +0000)]
MFV r272591:

Use loaned ARC buffer for zfs receive to avoid copy.

Illumos issue:
    5162 zfs recv should use loaned arc buffer to avoid copy

MFC after: 2 weeks

9 years agodevfs: tidy up after 272596
Mateusz Guzik [Mon, 6 Oct 2014 07:22:48 +0000 (07:22 +0000)]
devfs: tidy up after 272596

This moves a var to an if statement, no functional changes.

MFC after: 1 week

9 years agoMFV r272588:
Xin LI [Mon, 6 Oct 2014 07:09:47 +0000 (07:09 +0000)]
MFV r272588:

Handle old format deadlist.

Illumos issue:
    5178 zdb -vvvvv on old-format pool fails in dump_deadlist()

MFC after: 2 weeks

9 years agoMFV r272585:
Xin LI [Mon, 6 Oct 2014 07:03:17 +0000 (07:03 +0000)]
MFV r272585:

Split the godfather zio into CPU number's to reduce lock
contention.

Illumos issue:
    5176 lock contention on godfather zio

MFC after: 2 weeks

9 years agoFix length of Extended INQUIRY Data VPD page.
Alexander Motin [Mon, 6 Oct 2014 07:01:32 +0000 (07:01 +0000)]
Fix length of Extended INQUIRY Data VPD page.

MFC after: 3 days

9 years agodevfs: don't take proctree_lock unconditionally in devfs_close
Mateusz Guzik [Mon, 6 Oct 2014 06:20:35 +0000 (06:20 +0000)]
devfs: don't take proctree_lock unconditionally in devfs_close

MFC after: 1 week

9 years agoMinor code styling.
Hans Petter Selasky [Mon, 6 Oct 2014 06:19:54 +0000 (06:19 +0000)]
Minor code styling.

Suggested by: glebius @

9 years ago5162 zfs recv should use loaned arc buffer to avoid copy
Xin LI [Mon, 6 Oct 2014 06:04:10 +0000 (06:04 +0000)]
5162 zfs recv should use loaned arc buffer to avoid copy
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Bayard Bell <Bayard.Bell@nexenta.com>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@8a9047098ad8ce5afa38b6d012c8b509bb619f40

9 years ago5178 zdb -vvvvv on old-format pool fails in dump_deadlist()
Xin LI [Mon, 6 Oct 2014 06:00:50 +0000 (06:00 +0000)]
5178 zdb -vvvvv on old-format pool fails in dump_deadlist()
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@90c76c66a2e21307c5370ae1bd3c7145a60c874f

9 years ago5176 lock contention on godfather zio
Xin LI [Mon, 6 Oct 2014 05:54:39 +0000 (05:54 +0000)]
5176 lock contention on godfather zio
Reviewed by: Adam Leventhal <ahl@delphix.com>
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: Richard Elling <richard.elling@gmail.com>
Reviewed by: Bayard Bell <Bayard.Bell@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@6f834bc197c703a6568554c889157fb345bac079

9 years agoMFV r272501:
Xin LI [Mon, 6 Oct 2014 05:46:51 +0000 (05:46 +0000)]
MFV r272501:

Illumos issue:
    5177 remove dead code from dsl_scan.c

MFC after: 2 weeks

9 years agoMFV r272500:
Xin LI [Mon, 6 Oct 2014 05:42:20 +0000 (05:42 +0000)]
MFV r272500:

Don't inherit flags other than DS_FLAG_CI_DATASET and DS_FLAG_INCONSISTENT
when cloning.  This prevents DS_FLAG_DEFER_DESTROY being inherited from a
clone that is marked for deferred destroy, which causes snapshots of the
clone being destroyed when getting a hold or clone.

Illumos issue:
    5150 zfs clone of a defer_destroy snapshot causes strangeness

MFC after: 1 week

9 years agoConvert racct stubs to inline functions.
Mateusz Guzik [Mon, 6 Oct 2014 02:31:33 +0000 (02:31 +0000)]
Convert racct stubs to inline functions.

This saves some symbols and function calls for kernel without RACCT.

MFC after: 1 week

9 years agoBump .Dd missed in r271424
Bryan Drewery [Mon, 6 Oct 2014 00:25:10 +0000 (00:25 +0000)]
Bump .Dd missed in r271424

9 years ago- Add some tests for modifying groups
Brad Davis [Mon, 6 Oct 2014 00:16:23 +0000 (00:16 +0000)]
- Add some tests for modifying groups

Reviewed by: will

9 years agoFix dependency errors when linking libproc.
Mark Johnston [Sun, 5 Oct 2014 22:13:13 +0000 (22:13 +0000)]
Fix dependency errors when linking libproc.

Reported by: Oliver Hartmann
X-MFC-With: r272488

9 years agosh: Eliminate some gotos.
Jilles Tjoelker [Sun, 5 Oct 2014 21:51:36 +0000 (21:51 +0000)]
sh: Eliminate some gotos.

9 years agoseq_t needs to be visible to userspace
Mateusz Guzik [Sun, 5 Oct 2014 21:39:50 +0000 (21:39 +0000)]
seq_t needs to be visible to userspace

Pointy hat to: mjg
Reported by: bz
X-MFC: with r272567

9 years agoChange the UMA mutex into a rwlock
Bryan Venteicher [Sun, 5 Oct 2014 21:34:56 +0000 (21:34 +0000)]
Change the UMA mutex into a rwlock

Acquire the lock in read mode when just needed to ensure the stability
of the keg list. The UMA lock may be held for a long time (relatively
speaking) in uma_reclaim() on machines with lots of zones/kegs. If the
uma_timeout() would fire during that period, subsequent callouts on that
CPU may be significantly delayed.

Reviewed by: jhb

9 years agoVirtualize if_edsc(4).
Hiroki Sato [Sun, 5 Oct 2014 21:27:26 +0000 (21:27 +0000)]
Virtualize if_edsc(4).

9 years agoRemove unused MC_ALIGN macro as suggested by Robert.
Michael Tuexen [Sun, 5 Oct 2014 20:30:49 +0000 (20:30 +0000)]
Remove unused MC_ALIGN macro as suggested by Robert.

MFC after: 1 week

9 years agoVirtualize if_disc(4) cloner.
Hiroki Sato [Sun, 5 Oct 2014 19:46:52 +0000 (19:46 +0000)]
Virtualize if_disc(4) cloner.

9 years agoKeep struct filedescent comments within 80-char limit.
Mateusz Guzik [Sun, 5 Oct 2014 19:44:40 +0000 (19:44 +0000)]
Keep struct filedescent comments within 80-char limit.

9 years agoVirtualize if_bridge(4) cloner.
Hiroki Sato [Sun, 5 Oct 2014 19:43:37 +0000 (19:43 +0000)]
Virtualize if_bridge(4) cloner.

9 years agofiledesc: fix up breakage introduced in 272505
Mateusz Guzik [Sun, 5 Oct 2014 19:40:29 +0000 (19:40 +0000)]
filedesc: fix up breakage introduced in 272505

Include sequence counter supports incoditionally [1]. This fixes reprted build
problems with e.g. nvidia driver due to missing opt_capsicum.h.

Replace fishy looking sizeof with offsetof. Make fde_seq the last member in
order to simplify calculations.

Suggested by: kib [1]
X-MFC: with 272505

9 years agoOn error, sbuf_bcat() returns -1. Some callers returned this -1 to
Konstantin Belousov [Sun, 5 Oct 2014 17:35:59 +0000 (17:35 +0000)]
On error, sbuf_bcat() returns -1.  Some callers returned this -1 to
the upper layers, which interpret it as errno value, which happens to
be ERESTART.  The result was spurious restarts of the sysctls in loop,
e.g. kern.proc.proc, instead of returning ENOMEM to caller.

Convert -1 from sbuf_bcat() to ENOMEM, when returning to the callers
expecting errno.

In collaboration with: pho
Sponsored by: The FreeBSD Foundation (kib)
MFC after: 1 week

9 years agoFix format string warnings.
Andrey V. Elsukov [Sun, 5 Oct 2014 11:16:16 +0000 (11:16 +0000)]
Fix format string warnings.

9 years agoMerge the big-endian ARM targets together, and the little-endian ARM
Andrew Turner [Sun, 5 Oct 2014 11:06:22 +0000 (11:06 +0000)]
Merge the big-endian ARM targets together, and the little-endian ARM
targets. With this we assume any ARM target containing eb is big-endian,
otherwise it is little-endian.

9 years ago1) For %Z format, understand "UTC" name too.
Andrey A. Chernov [Sun, 5 Oct 2014 07:29:50 +0000 (07:29 +0000)]
1) For %Z format, understand "UTC" name too.
2) Return NULL if timegm() fails, because it means we can convert
what we have in GMT to local time needed.

9 years ago- Refactor defining variables.
Yoshihiro Takahashi [Sun, 5 Oct 2014 07:27:05 +0000 (07:27 +0000)]
- Refactor defining variables.
- Merge common modules both i386 and amd64 into one if-endif.
- Sort.
- There are no functional changes.

9 years agoAvoid unnecessary ppeers_lock acquisition in exit1.
Mateusz Guzik [Sun, 5 Oct 2014 07:21:41 +0000 (07:21 +0000)]
Avoid unnecessary ppeers_lock acquisition in exit1.

MFC after: 1 week

9 years agoEliminate use of M_EXT in IP6_EXTHDR_CHECK() by trimming a redundant
Robert Watson [Sun, 5 Oct 2014 06:28:53 +0000 (06:28 +0000)]
Eliminate use of M_EXT in IP6_EXTHDR_CHECK() by trimming a redundant
'if'/'else' case: it matches the simple 'else' case that follows.

This reduces awareness of external-storage mechanics outside of the
mbuf allocator.

Reviewed by: bz
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D900

9 years agoFix typo.
Andrey V. Elsukov [Sun, 5 Oct 2014 06:06:48 +0000 (06:06 +0000)]
Fix typo.

9 years agoRework bootparttest to use more code from sys/boot.
Andrey V. Elsukov [Sun, 5 Oct 2014 06:04:47 +0000 (06:04 +0000)]
Rework bootparttest to use more code from sys/boot.
Use disk_open() call to emulate loader behavior.

9 years agoAdd a bit more debug messages.
Andrey V. Elsukov [Sun, 5 Oct 2014 06:00:22 +0000 (06:00 +0000)]
Add a bit more debug messages.

9 years agoipfilter bug #537 NAT rules with sticky have incorrect hostmap IP address.
Cy Schubert [Sun, 5 Oct 2014 03:58:30 +0000 (03:58 +0000)]
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)

9 years agoipfilter bug #534 destination list hashing not endian neutral
Cy Schubert [Sun, 5 Oct 2014 03:52:09 +0000 (03:52 +0000)]
ipfilter bug #534 destination list hashing not endian neutral

Obtained from: ipfilter CVS repo (r1.26), NetBSD CVS repo (r1.8)

9 years agoipfilter bug #538 ipf_p_dns_del should return void
Cy Schubert [Sun, 5 Oct 2014 03:48:09 +0000 (03:48 +0000)]
ipfilter bug #538 ipf_p_dns_del should return void

Obtained from: ipfilter cvs repo (r1.8)

9 years agoipfilter bug #554 Determining why a ipf rule matches is hard -- replace
Cy Schubert [Sun, 5 Oct 2014 03:45:19 +0000 (03:45 +0000)]
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)

9 years agoipfiler bug #550 filter rule list corrupted with inserted rules
Cy Schubert [Sun, 5 Oct 2014 03:41:47 +0000 (03:41 +0000)]
ipfiler bug #550 filter rule list corrupted with inserted rules

Obtained from: ipfilter CVS repo (r1.128); NetBSD CVS repo (r1.15)

9 years agoRemove stray uma_mtx lock/unlock in zone_drain_wait()
Bryan Venteicher [Sun, 5 Oct 2014 03:18:30 +0000 (03:18 +0000)]
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

9 years agoUse printb() for boolean flags in ro_opts and actor_state for LACP.
Hiroki Sato [Sun, 5 Oct 2014 02:37:01 +0000 (02:37 +0000)]
Use printb() for boolean flags in ro_opts and actor_state for LACP.

9 years ago- Move L2 addr configuration for the primary port to a taskqueue. This fixes
Hiroki Sato [Sun, 5 Oct 2014 02:34:21 +0000 (02:34 +0000)]
- 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.

9 years agoGet rid of crshared.
Mateusz Guzik [Sun, 5 Oct 2014 02:16:53 +0000 (02:16 +0000)]
Get rid of crshared.

9 years agoInclude urndis(4) in list of devices for which we generate hardware notes.
Gavin Atkinson [Sat, 4 Oct 2014 23:56:25 +0000 (23:56 +0000)]
Include urndis(4) in list of devices for which we generate hardware notes.

MFC after: 3 days

9 years agoSlightly reword comment. Move code, which is described by the
Konstantin Belousov [Sat, 4 Oct 2014 18:51:55 +0000 (18:51 +0000)]
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

9 years agovt(4): Don't recalculate buffer size if we don't know screen size
Jean-Sébastien Pédron [Sat, 4 Oct 2014 18:40:40 +0000 (18:40 +0000)]
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

9 years agoAdd kernel option KSTACK_USAGE_PROF to sample the stack depth on
Konstantin Belousov [Sat, 4 Oct 2014 18:38:14 +0000 (18:38 +0000)]
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

9 years agoFixes for i/o during coredumping:
Konstantin Belousov [Sat, 4 Oct 2014 18:35:00 +0000 (18:35 +0000)]
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

9 years agoAdd IO_RANGELOCKED flag for vn_rdwr(9), which specifies that vnode is
Konstantin Belousov [Sat, 4 Oct 2014 18:28:27 +0000 (18:28 +0000)]
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

9 years agoMinor doc format fix.
Pedro F. Giffuni [Sat, 4 Oct 2014 18:00:15 +0000 (18:00 +0000)]
Minor doc format fix.

Submitted by: Yonghyeon PYUN

9 years agoMake kevent(2) periodic timer events more reliably periodic. The event
Ian Lepore [Sat, 4 Oct 2014 15:59:15 +0000 (15:59 +0000)]
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

9 years agoDon't make nested definition for range_seg_cache.
Xin LI [Sat, 4 Oct 2014 15:42:52 +0000 (15:42 +0000)]
Don't make nested definition for range_seg_cache.

Reported by: ian
MFC after: 1 week
X-MFC-With: r272506

9 years agoSilence a warning about Tag_Virtualization_use being unknown. We don't
Andrew Turner [Sat, 4 Oct 2014 14:30:16 +0000 (14:30 +0000)]
Silence a warning about Tag_Virtualization_use being unknown. We don't
handle merging this tag correctly, however it's unused.

9 years agoPut and #ifdef _KERNEL around the #include for opt_capsicum.h to
Bjoern A. Zeeb [Sat, 4 Oct 2014 14:17:30 +0000 (14:17 +0000)]
Put and #ifdef _KERNEL around the #include for opt_capsicum.h to
hopefully allow the build to finish after r272505.

9 years agoAdd movw and movt relocations to the list of relocations against function
Andrew Turner [Sat, 4 Oct 2014 13:14:37 +0000 (13:14 +0000)]
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.

9 years agoBump max rule size to 512 opcodes.
Alexander V. Chernikov [Sat, 4 Oct 2014 12:46:26 +0000 (12:46 +0000)]
Bump max rule size to 512 opcodes.

9 years agoMake autofs use shared vnode locks.
Edward Tomasz Napierala [Sat, 4 Oct 2014 09:37:40 +0000 (09:37 +0000)]
Make autofs use shared vnode locks.

Reviewed by: kib
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoMFV r272499:
Xin LI [Sat, 4 Oct 2014 08:55:08 +0000 (08:55 +0000)]
MFV r272499:

Illumos issue:
    5174 add sdt probe for blocked read in dbuf_read()

MFC after: 2 weeks

9 years agoAdd a new sysctl, vfs.zfs.vol.unmap_enabled, which allows the system
Xin LI [Sat, 4 Oct 2014 08:51:57 +0000 (08:51 +0000)]
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

9 years agoDiff reduction with upstream. The code change is not really applicable
Xin LI [Sat, 4 Oct 2014 08:41:23 +0000 (08:41 +0000)]
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

9 years agoAdd in decode for the AR9300 RX descriptor.
Adrian Chadd [Sat, 4 Oct 2014 08:32:15 +0000 (08:32 +0000)]
Add in decode for the AR9300 RX descriptor.

9 years agoMFV r272496:
Xin LI [Sat, 4 Oct 2014 08:29:48 +0000 (08:29 +0000)]
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

9 years agoMFV r272495:
Xin LI [Sat, 4 Oct 2014 08:14:10 +0000 (08:14 +0000)]
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

9 years agoPlug capability races.
Mateusz Guzik [Sat, 4 Oct 2014 08:08:56 +0000 (08:08 +0000)]
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

9 years agoMFV r272494:
Xin LI [Sat, 4 Oct 2014 08:05:39 +0000 (08:05 +0000)]
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

9 years agoAdd sequence counters with memory barriers.
Mateusz Guzik [Sat, 4 Oct 2014 08:03:52 +0000 (08:03 +0000)]
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

9 years agoMFV r272493:
Xin LI [Sat, 4 Oct 2014 07:56:50 +0000 (07:56 +0000)]
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

9 years ago5177 remove dead code from dsl_scan.c
Xin LI [Sat, 4 Oct 2014 07:50:06 +0000 (07:50 +0000)]
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@5f37736ac8f99922368294d745d3fefa22b49d11

9 years ago5150 zfs clone of a defer_destroy snapshot causes strangeness
Xin LI [Sat, 4 Oct 2014 07:49:06 +0000 (07:49 +0000)]
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@42fcb65ea4f2c6f8cc5a3c6142a486cb49871fd2

9 years ago5174 add sdt probe for blocked read in dbuf_read()
Xin LI [Sat, 4 Oct 2014 07:38:59 +0000 (07:38 +0000)]
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@f6164ad638e7346c4ae4ba393760a897cf6eb744

9 years ago5149 zvols need a way to ignore DKIOCFREE
Xin LI [Sat, 4 Oct 2014 07:37:17 +0000 (07:37 +0000)]
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@893c83ba3e1c87a785b5274ce2ef02f45fba6087

9 years ago5148 zvol's DKIOCFREE holds zfsdev_state_lock too long
Xin LI [Sat, 4 Oct 2014 07:35:50 +0000 (07:35 +0000)]
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@574e2414ac6a50c9d6097c2e4a98eb9263f90c44

9 years ago5161 add tunable for number of metaslabs per vdev
Xin LI [Sat, 4 Oct 2014 07:34:50 +0000 (07:34 +0000)]
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@bf3e216c7efa56332b456f4cf19d208e21d63839

9 years ago5163 arc should reap range_seg_cache
Xin LI [Sat, 4 Oct 2014 07:32:19 +0000 (07:32 +0000)]
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@83803b51e1fa57fbf4e86ca5aa58eab6c5822dae

9 years ago5164 space_map_max_blksz causes panic, does not work
Xin LI [Sat, 4 Oct 2014 07:26:42 +0000 (07:26 +0000)]
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@b1be2892dd07cf9a97d47ad06334cdc879196aaf

9 years ago5147 zpool list -v should show individual disk capacity
Xin LI [Sat, 4 Oct 2014 07:24:35 +0000 (07:24 +0000)]
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@7a09f97bc0d52b763c580864e78a665b15be37f8

9 years agoMerge pc98's machdep.c into i386/i386/machdep.c.
Yoshihiro Takahashi [Sat, 4 Oct 2014 06:01:30 +0000 (06:01 +0000)]
Merge pc98's machdep.c into i386/i386/machdep.c.

9 years agoReduce diffs against i386.
Yoshihiro Takahashi [Sat, 4 Oct 2014 05:03:39 +0000 (05:03 +0000)]
Reduce diffs against i386.

9 years ago- MFi386: Add compile-with option for tau32-ddk.c.
Yoshihiro Takahashi [Sat, 4 Oct 2014 05:01:57 +0000 (05:01 +0000)]
- MFi386: Add compile-with option for tau32-ddk.c.
- Whitespace change.
- Remove duplicate line.

9 years agoRemove an incorrect and useless debug print.
Mark Johnston [Sat, 4 Oct 2014 02:34:30 +0000 (02:34 +0000)]
Remove an incorrect and useless debug print.

X-MFC-With: r272488

9 years agoHook up support for userland CTF support in DTrace. This required some
Mark Johnston [Fri, 3 Oct 2014 23:20:37 +0000 (23:20 +0000)]
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

9 years agoAdd GUID of FreeBSD slice to GPT scheme.
Andrey V. Elsukov [Fri, 3 Oct 2014 21:46:07 +0000 (21:46 +0000)]
Add GUID of FreeBSD slice to GPT scheme.

MFC after: 1 week

9 years agoUpdate baseline files for EBR, MBR and PC98 now that mkimg fills in
Marcel Moolenaar [Fri, 3 Oct 2014 20:54:35 +0000 (20:54 +0000)]
Update baseline files for EBR, MBR and PC98 now that mkimg fills in
the CHS fields appropriately when -T and -H are given on the command
line.

9 years agoAdd mkimg_chs() for those schemes that need the LBA broken down into
Marcel Moolenaar [Fri, 3 Oct 2014 20:48:11 +0000 (20:48 +0000)]
Add mkimg_chs() for those schemes that need the LBA broken down into
cylinder, head and track numbers. Return ~0U for these values when
mkimg wasn't given both -T and -H (i.e. no geometry) or the cylinder
would be larger than the provided maximum.

Use mkimgs_chs() for the EBR, MBR and PC98 schemes to fill in the
appropriate fields. Make sure to use a "rounded" size so that the
partition is always a multiple of the track size. We reserved the
room for it in the metadata callback so that's a valid thing to
do.

Bump the mkimg version number.
While doing that again: have mkimg.o depend on the Makefile so that
a version change triggers a rebuild as needed.

9 years agoAdd dependencies to various libraries to libzfs and libzpool.
Xin LI [Fri, 3 Oct 2014 20:36:09 +0000 (20:36 +0000)]
Add dependencies to various libraries to libzfs and libzpool.

Submitted by: sef

9 years agoRefactor ZFS ARC reclaim checks and limits
Steven Hartland [Fri, 3 Oct 2014 20:34:55 +0000 (20:34 +0000)]
Refactor ZFS ARC reclaim checks and limits

Remove previously added kmem methods in favour of defines which
allow diff minimisation between upstream code base.

Rebalance ARC free target to be vm_pageout_wakeup_thresh by default
which eliminates issue where ARC gets minimised instead of balancing
with VM pageout. The restores the target point prior to r270759.

Bring in missing upstream only changes which move unused code to
further eliminate code differences.

Add additional DTRACE probe to aid monitoring of ARC behaviour.

Enable upstream i386 code paths on platforms which don't define
UMA_MD_SMALL_ALLOC.

Fix mixture of byte an page values in arc_memory_throttle i386 code
path value assignment of available_memory.

PR: 187594
Review: D702
Reviewed by: avg
MFC after: 1 week
X-MFC-With: r270759 & r270861
Sponsored by: Multiplay

9 years agosh: Fix LINENO and prompt after $'\0 and newline.
Jilles Tjoelker [Fri, 3 Oct 2014 20:24:56 +0000 (20:24 +0000)]
sh: Fix LINENO and prompt after $'\0 and newline.

9 years agoAdd new fields in the FADT, required by IASL 20140926-64.
Peter Grehan [Fri, 3 Oct 2014 17:27:30 +0000 (17:27 +0000)]
Add new fields in the FADT, required by IASL 20140926-64.

The new IASL from the recent acpi-ca import will error out
if it doesn't see these new fields, which were previously
reserved.

Reported by: lme
Reviewed by: neel

9 years agoWhen we fail to get a USB reference we should just return, because
Hans Petter Selasky [Fri, 3 Oct 2014 16:09:46 +0000 (16:09 +0000)]
When we fail to get a USB reference we should just return, because
there are no more references held.

MFC after: 3 days

9 years agoFix XHCI driver for devices which have more than 15 physical root HUB
Hans Petter Selasky [Fri, 3 Oct 2014 15:58:04 +0000 (15:58 +0000)]
Fix XHCI driver for devices which have more than 15 physical root HUB
ports. The current bitmap array was too small to hold more than 16
bits and would at some point toggle the context size, which then would
trigger an enumeration fault and cause a fallback to the EHCI
companion controller, if any.

MFC after: 3 days

9 years agoAllow vld and vst instructions to use the canonical form from ARM ARM when
Andrew Turner [Fri, 3 Oct 2014 15:07:43 +0000 (15:07 +0000)]
Allow vld and vst instructions to use the canonical form from ARM ARM when
including an alignment. Previously binutils would only allow instructions
in the form "vld1.64 {d0, d1}, [r0, :128]" where the final comma should
not be there, instead the above instruction should be
"vld1.64 {d0, d1}, [r0:128]".

This change duplicates the alignment code from within the function to
handle this case.

9 years agoBump .Dd
Li-Wen Hsu [Fri, 3 Oct 2014 15:03:44 +0000 (15:03 +0000)]
Bump .Dd

Approved by: kevlo

9 years agoFix various issues with zvols
Steven Hartland [Fri, 3 Oct 2014 14:49:48 +0000 (14:49 +0000)]
Fix various issues with zvols

When performing snapshot renames we could deadlock due to the locking
in zvol_rename_minors. In order to avoid this use the same workaround
as zvol_open in zvol_rename_minors.

Add missing zvol_rename_minors to dsl_dataset_promote_sync.

Protect against invalid index into zv_name in zvol_remove_minors.

Replace zvol_remove_minor calls with zvol_remove_minors to ensure
any potential children are also renamed.

Don't fail zvol_create_minors if zvol_create_minor returns EEXIST.

Restore the valid pool check in zfs_ioc_destroy_snaps to ensure we
don't call zvol_remove_minors when zfs_unmount_snap fails.

PR: 193803
MFC after: 1 week
Sponsored by: Multiplay

9 years agoAdd all the dmb/dsb optional limitations, including the alternative values.
Andrew Turner [Fri, 3 Oct 2014 12:20:37 +0000 (12:20 +0000)]
Add all the dmb/dsb optional limitations, including the alternative values.
These are needed for some code llvm generates when targeting ARMv7.

9 years agoAllow the optional limitation on dmb instructions as is already the case
Andrew Turner [Fri, 3 Oct 2014 12:14:19 +0000 (12:14 +0000)]
Allow the optional limitation on dmb instructions as is already the case
with dsb instructions.