198068 Commits

Author SHA1 Message Date
jkim
8459b965f7 MFC: r277594
Simplify retry loops.
2015-01-26 19:27:30 +00:00
jkim
2c7d513fe4 MFC: r277579
Revert r216942.  This commit was premature and caused too many complaints.
2015-01-26 19:25:35 +00:00
mav
0b8166b5c2 MFC r277385: Remove extra mtx_unlock().
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2015-01-26 16:30:17 +00:00
mav
58f009f0d3 MFC r277096: Skip extra bcopy() when scrubbing vdev without redundancy.
According to profiler, this bcopy() can use about 10% of CPU time.
2015-01-26 16:29:07 +00:00
smh
c46b18f753 MFC r276226:
Enhancements to zpool upgrade processing

Sponsored by:	Multiplay
2015-01-26 13:59:39 +00:00
trasz
641c621b17 MFC r274496:
Fix mdoc warning by removing empty lines.

Sponsored by:	The FreeBSD Foundation
2015-01-26 13:39:35 +00:00
trasz
74035d69dd MFC r272294 by gavin@:
Make clear in the ipheth(4) hardware notes that this driver is for the
tethering functionality only.  Add a "bugs" section to give a pointer
to usbconfig set_config if the device isn't automatically detected.
2015-01-26 13:37:18 +00:00
trasz
eb344fca06 MFC r272171 by pluknet@:
Add smsc(4) to the list of drivers use the miibus interface.
2015-01-26 13:35:45 +00:00
trasz
27f23edd2c MFC r272168 by gavin@:
Add MLINKS for if_ipheth(4) and if_smsc(4).
2015-01-26 13:34:21 +00:00
trasz
a53939aaa2 MFC r272165 by gavin@:
Add very basic outline man page for smsc(4).
2015-01-26 13:32:07 +00:00
trasz
e2a2c7028d MFC r272107 by gavin@:
Cross reference cdce(4), ipheth(4) and urndis(4) from each other.
2015-01-26 13:29:43 +00:00
trasz
17700a1d91 MFC r272106 by gavin@:
Add basic man page for ipheth(4).
2015-01-26 13:28:13 +00:00
trasz
13678d19f2 MFC r274791:
Add missing error checking for kernel_port_{add,remove}().  Both can fail
for reasons yet unknown; don't make it increment cumulated_error as a kind
of temporary workaround.

MFC r275399:

Fix null pointer dereference.

Sponsored by:	The FreeBSD Foundation
2015-01-26 13:21:30 +00:00
trasz
9aa94c3abb MFC r275746:
Fix markup.

Sponsored by:	The FreeBSD Foundation
2015-01-26 13:17:20 +00:00
ngie
15c31aa79c MFC r277358:
r277358 (by ngie):

  Integrate contrib/netbsd-tests/bin/expr into the build/kyua as bin/expr/tests

  Sponsored by: EMC / Isilon Storage Division
2015-01-26 11:49:06 +00:00
kib
b45c95ab3d MFC r277390:
Ignore devfs directory entries for devices being destroyed.
2015-01-26 11:37:16 +00:00
luigi
56e35bcee1 Merge 272659:
Add netmap support to libpcap. Tcpdump and other native pcap clients
can now run directly on netmap ports using netmap:foo or valeXX:YY
as device names.

Modifications to existing code are small and trivial,
the netmap-specific code is all in a new file.

Please be aware that in netmap mode the physical interface is
disconnected from the host stack, so libpcap will steal the traffic
not just make a copy.

For the full version of the code (including linux and autotools support) see
	https://code.google.com/p/netmap-libpcap/
2015-01-26 03:26:37 +00:00
ae
efbb33d3cf MFC r277295:
Fix condition and really sort ports. Also add comment describing
  the intent of this code.
2015-01-25 16:35:03 +00:00
mav
e6f27f6344 MFC r276983: When aggregating TRIM segments, move the new one to the end.
New segment at the list head may block all TRIM requests until txg of that
segment can be processed.  On my random I/O tests this change reduce peak
TRIM list length from 650 to 450 segments.  Hopefully it should reduce TRIM
burstiness when list processing is unblocked.
2015-01-25 14:31:44 +00:00
mav
35b0606440 MFC r276952: Add LBA as secondary sort key for synchronous I/O requests.
On FreeBSD gethrtime() implemented via getnanouptime(), that has 1ms (1/hz)
precision.  It makes primary sort key (timestamp) collision very possible.
In such situations sorting by secondary key of LBA is much more reasonable
then by totally meaningless zio pointer value.

With this change on multi-threaded synchronous ZVOL read I've measured 10%
throughput increase and average latency reduction.
2015-01-25 14:29:40 +00:00
mav
a833c07b8b MFC r276913: Use new optimized dmu_read_uio_dbuf() for ZVOLs in device mode.
This slightly reduces overhead by avoiding dnode_hold()/dnode_rele() calls.
2015-01-25 14:25:44 +00:00
kib
53cbeb6d49 MFC r277322:
Add procctl(2) PROC_TRACE_CTL command to enable or disable debugger
attachment to the process.
2015-01-25 13:15:12 +00:00
kib
9ddc339f8b MFC r277321:
Make SIGSTOP working for sleeps done while waiting for fifo readers or
writers in open(2), when the fifo is located on an NFS mount.
2015-01-25 13:09:53 +00:00
cperciva
65e2f94603 MFC r277318:
When disabling C3+ CPU states due to the CPU_QUIRK_NO_C3 quirk, don't
  accidentally enable non-existent states.

  This bug was triggered if ACPI advertises the presence of a C2 state
  which we fail to parse via acpi_PkgGas due to our lack of support for
  FFixedHW resources, and causes an immediate panic when an attempt is
  made to enter the (NULL) state.

  One affected platform is the EC2 c4.8xlarge VM instance type; there
  may be others.
2015-01-25 08:16:51 +00:00
ngie
c8660cb9db MFC r277527:
r277527 (by ngie):

  Make this compile with WARNS=6 and clang/gcc

  Sponsored by: EMC / Isilon Storage Division
2015-01-25 05:18:03 +00:00
ngie
be8fb1ecda MFC r277278:
r277278 (by ngie):

  Fix lib/libthr/tests/detach_test

  - Eliminate race with liberal use of sleep(3) [1]
  - Fix NetBSD-specific implementation way of testing result from pthread_cancel
    by testing with `td` instead of `NULL` [2]

  PR: 196738 [1]
  PR: 191906 [2]

  Sponsored by: EMC / Isilon Storage Division
2015-01-25 00:28:15 +00:00
pfg
ea5c22141a MFC r277301:
ext2: cosmetical issues

Minor sorting and note when the cases are expected to fall through.
2015-01-24 21:23:53 +00:00
kib
bac6ad8875 MFC r277488:
Do not allow pthread_sigmask() to block SIGCANCEL.
2015-01-24 08:35:49 +00:00
luigi
0f243342b5 use the same version as in HEAD
(among other things, the -v flag to make is long since unsupported)
2015-01-24 06:11:13 +00:00
smh
e2d4209626 MFC r276194:
Prevent zpool upgrade failing due to unavailable pools

Sponsored by:	Multiplay
2015-01-24 00:40:42 +00:00
delphij
f72184af7f MFC r276904:
Improve style and fix a possible use-after-free case introduced in r268384
by reinitializing the 'freestate' pointer after freeing the memory.

Obtained from:	HardenedBSD (71fab80c5dd3034b71a29a61064625018671bbeb)
PR:		194525
Submitted by:	Oliver Pinter <oliver.pinter@hardenedbsd.org>
2015-01-24 00:27:50 +00:00
delphij
ae11365e35 MFC r275923:
Add missing continue: we can't proceed further if the
kernel does not panic with zfs_panic_recover.

Illumos issue:
    5438 zfs_blkptr_verify should continue after zfs_panic_recover

Reported by:	Coverity
CID:		1232014
2015-01-23 22:46:07 +00:00
delphij
e878593535 Note OpenSSL MFC.
This is a direct commit to stable/10.
2015-01-23 19:19:34 +00:00
jkim
702b057a66 MFC: r277274
Update buildinf.h to make SSLeay_version(3) little bit more useful.
2015-01-23 19:17:04 +00:00
jkim
2a0385d554 MFC: r277270
Merge OpenSSL 1.0.1l.

Relnotes:	yes
2015-01-23 19:14:36 +00:00
delphij
877985d154 MFC r276891:
var/named/etc/namedb/working should be removed as part of namedb.
2015-01-23 18:56:31 +00:00
delphij
771ee7d0d8 MFC r276795:
Fix sos@'s name.
2015-01-23 18:55:24 +00:00
delphij
606dfe1075 MFC r276577: MFV r276568:
Update file to 5.22.
2015-01-23 18:48:59 +00:00
delphij
b62501e2c2 MFC r276495: Fix markup for minthreads and maxthreads.
PR:	196403
2015-01-23 18:45:22 +00:00
delphij
ff89014ed1 MFC r275918:
Sync with NetBSD, mainly address NetBSD bug #43355:

Fix valid_format() to be more careful about allowing only valid
printf formats.

Obtained from:        NetBSD
2015-01-23 18:42:05 +00:00
delphij
6cd815aece MFC r275552: MFV r260710 + 275532:
Add a new method, nvlist_print_json to allow libnvpair to emit JSON.
2015-01-23 18:40:47 +00:00
delphij
902f541eb5 MFC r275922: MFV r275914:
As of r270383, the dbuf_compare comparator compares the dbuf
attributes in the following order:

      db_level (indirect level)
      db_blkid (block number)
      db_state (current state)
      the address of the element

Because db_state is being considered before the element's state,
changing of db_state would affect balancedness of the AVL tree,
even when the address of element compares differently.  For
instance, in dbuf_create, db_state may be altered after the
node is inserted into the AVL tree and may break AVL tree
balancedness.

Instead of using db_state as a comparision critera (introduced
in r270383), consider it only when we are doing a lookup, that
is one of the two dbuf pointers contains DB_SEARCH.

Illumos issue:
    5422 preserve AVL invariants in dn_dbufs
2015-01-23 18:39:26 +00:00
delphij
429a0a7af7 MFC r275812: MFV r275784:
Plug a memory leak in libzfs.  In zfs_iter_bookmarks, an nvlist is allocated
before calling lzc_get_bookmarks, which allocates the nvlist again (and
overwrites the pointer to previously allocated list).

Illumos issue:
    5427 memory leak in libzfs when doing rollback
2015-01-23 18:36:21 +00:00
delphij
b84208b123 MFC r275811: MFV r275783:
Convert ARC flags to use enum.  Previously, public flags are defined in
arc.h and private flags are defined in arc.c which can lead to confusion
and programming errors.

Consistently use 'hdr' (when referencing arc_buf_hdr_t) instead of 'buf'
or 'ab' because arc_buf_t are often named 'buf' as well.

Illumos issue:
    5369 arc flags should be an enum
    5370 consistent arc_buf_hdr_t naming scheme
2015-01-23 18:33:50 +00:00
delphij
9ef0e2ecd5 MFC r275782: MFV r275551:
Remove "dbuf phys" db->db_data pointer aliases.

Use function accessors that cast db->db_data to the appropriate
"phys" type, removing the need for clients of the dmu buf user
API to keep properly typed pointer aliases to db->db_data in order
to conveniently access their data.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c:
        In zap_leaf() and zap_leaf_byteswap, now that the pointer alias
        field l_phys has been removed, use the db_data field in an on
        stack dmu_buf_t to point to the leaf's phys data.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c:
        Remove the db_user_data_ptr_ptr field from dbuf and all logic
        to maintain it.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c:
        Modify the DMU buf user API to remove the ability to specify
        a db_data aliasing pointer (db_user_data_ptr_ptr).

cddl/contrib/opensolaris/cmd/zdb/zdb.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_leaf.h:
        Create and use the new "phys data" accessor functions
        dsl_dir_phys(), dsl_dataset_phys(), zap_m_phys(),
        zap_f_phys(), and zap_leaf_phys().

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_leaf.h:
        Remove now unused "phys pointer" aliases to db->db_data
        from clients of the DMU buf user API.

Illumos issue:
    5314 Remove "dbuf phys" db->db_data pointer aliases in ZFS
2015-01-23 18:30:32 +00:00
delphij
cab26f42cc MFC r275781: MFV r275550:
In addition to r273158, make the code in spa_sync() that checks if the
current TXG is a no-op TXG less fragile.

Illumos issue:
    5347 idle pool may run itself out of space
2015-01-23 18:28:37 +00:00
delphij
49b7f05a49 MFC r275748: MFV r247174:
Expose arc_meta_limit, et al via kstats.

Note that as a result, vfs.zfs.arc_meta_used is removed.
The existing vfs.zfs.arc_meta_limit sysctl/tunable is retained
with a SYSCTL_PROC wrapper.

Illumos ZFS issues:
    3561 arc_meta_limit should be exposed via kstats

Relnotes:	yes
2015-01-23 18:23:19 +00:00
delphij
9a781ab65c MFC r275740: MFV r275548:
Verify that the block pointer is structurally valid, before attempting to
read it in.  It can only be invalid in the case of a ZFS bug, but this
change will help identify such bugs in a more transparent way, by
panic'ing with a relevant message, rather than indexing off the end of an
array or something.

Illumos issue:
    5349 verify that block pointer is plausible before reading
2015-01-23 18:16:36 +00:00
glebius
52282183c0 Merge r274709 by eri@: deal with IPv6 same way as we IPv4 and calculate
the checksum before entering pf_test6().

PR:		172648, 179392
2015-01-23 18:15:15 +00:00
delphij
049d5b632d MFC r275739: MFV r275547:
Port Illumos 'zfs allow' examples update.  While I'm there also fix
a typo.

Illumos issue:
    4181 zfs(1m): 'zfs allow' examples in the man page are outdated
2015-01-23 18:14:29 +00:00