815a6456 behlendorf1 Aug. 29, 2019, 8:11 p.m.
Eliminate unnecessary code duplication. We can use a for-loop instead
of a while-loop. There is no need to echo $DISKSARRAY in a subshell or
return 0. Declare all variables with typeset.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes #9224
cgit
302310d9 dim Aug. 29, 2019, 6:53 p.m.
FreeBSD: use the new doubly underscored names for unw_add_dynamic_fde
and unw_remove_dynamic_fde.

NOTE: this should be upstreamed...
cgit ViewVC
6a1e1c2c jhb Aug. 29, 2019, 6:23 p.m.
The bhyve virtual local APIC uses an instance-global flag to indicate
when an error LVT is being delivered to prevent infinite recursion.
Use a function argument instead to reduce the amount of instance-global
state.

This was inspired by reviewing the bhyve save/restore work, which
saves a copy of the instance-global state for each vlapic.

Smart OS bug:	https://smartos.org/bugview/OS-7777
Submitted by:	Patrick Mooney
Reviewed by:	markj, rgrimes
Obtained from:	SmartOS / Joyent
Differential Revision:	https://reviews.freebsd.org/D20365
cgit ViewVC
f66ad580 behlendorf1 Aug. 29, 2019, 6:03 p.m.
BSD getopt() and getopt_long() want options before arguments.
Reorder arguments to zfs/zpool in tests to put all the options first.

Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes #9228
cgit
e5ab16b7 zeising Aug. 29, 2019, 5:25 p.m.
Approved by:	imp
Differential Revision:	https://reviews.freebsd.org/D21467
cgit ViewVC
eef0f4d8 behlendorf1 Aug. 29, 2019, 5:20 p.m.
With the other metaslab changes loaded onto a system, we can 
significantly reduce the memory usage of each loaded metaslab and 
unload them on demand if there is memory pressure. However, none 
of those changes actually result in us keeping more metaslabs loaded. 
If we don't keep more metaslabs loaded, we will still have to wait 
for demand-loading to finish when no loaded metaslab can satisfy our 
allocation, which can cause ZIL performance issues. In addition,
performance is traditionally measured by IOs per unit time, while 
unloading is currently done on a txg-count basis. Txgs can take a 
widely varying range of times, from tenths of a second to several 
seconds. This can result in confusing, hard to predict behavior.

This change simply adds a time-based component to metaslab unloading. 
A metaslab will remain loaded for one minute and 8 txgs (by default) 
after it was last used, unless it is evicted due to memory pressure.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
External-issue: DLPX-65016
External-issue: DLPX-65047
Closes #9197
cgit
ab0e8650 zeising Aug. 29, 2019, 5:17 p.m.
When the pwm.9 manual was removed, a symlink between pwmbus.9 and pwm.9 was
created, but there's an entry in ObsoleteFiles.inc to remove pwn.9, meaning
that on every installation pwm.9 is created, and make delete-old deletes it.

Remove the entry from ObsoleteFiles.inc, the symlink is clearly intentional
and shouldn't be removed.

Reviewed by:	imp, ian
Approved by:	imp (implicit, review OK)
Differential Revision:	https://reviews.freebsd.org/D21198
cgit ViewVC
6a216c0b mav Aug. 29, 2019, 5:02 p.m.
XPT_DEV_ADVINFO call should be protected by the lock of the specific
device it is addressed to, not the lock of SES device.  In some weird
case, probably with hardware violating standards, it sometimes caused
NULL dereference due to race.

To protect from it further, add lock assertion to *_dev_advinfo().

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
cgit ViewVC
f4330e61 mav Aug. 29, 2019, 1:46 p.m.
Submitted by:	Rajesh Kumar <rajesh1.kumar@amd.com>
Reviewed by:	bcr
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D21462
cgit ViewVC
2051169a yuripv Aug. 29, 2019, 12:49 p.m.
This fixes a "timed sleep before timers are working" panic seen
while attaching jedec_dimm(4) instances too early in the boot.

Submitted by:	ian
Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D21452
cgit ViewVC
3485f457 emaste Aug. 29, 2019, 12:05 p.m.
Reported by:	Dr Silvio Cesare of InfoSect
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
cgit ViewVC
0093b755 avg Aug. 29, 2019, 8:26 a.m.
Remove trailing whitespace and fix mixed indentation.

MFC after:	3 weeks
cgit ViewVC
c9f2918e avg Aug. 29, 2019, 8:19 a.m.
It was used only by the old cdcheckmedia().

MFC after:	3 weeks
cgit ViewVC
dd78f432 avg Aug. 29, 2019, 7:51 a.m.
This makes the media check process asynchronous, so we no longer block
in cdstrategy() to check for media.

PR:		219857
Obtained from:	ken
MFC after:	3 weeks
cgit ViewVC
6470c8d3 kib Aug. 29, 2019, 7:50 a.m.
Current implementation of vnode_create_vobject() and
vnode_destroy_vobject() is written so that it prepared to handle the
vm object destruction for live vnode.  Practically, no filesystems use
this, except for some remnants that were present in UFS till today.
One of the consequences of that model is that each filesystem must
call vnode_destroy_vobject() in VOP_RECLAIM() or earlier, as result
all of them get rid of the v_object in reclaim.

Move the call to vnode_destroy_vobject() to vgonel() before
VOP_RECLAIM().  This makes v_object stable: either the object is NULL,
or it is valid vm object till the vnode reclamation.  Remove code from
vnode_create_vobject() to handle races with the parallel destruction.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D21412
cgit ViewVC