]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoMFC r348584: MFV r348583: 9847 leaking dd_clones (DMU_OT_DSL_CLONES) objects
Alexander Motin [Tue, 11 Jun 2019 14:30:09 +0000 (14:30 +0000)]
MFC r348584: MFV r348583: 9847 leaking dd_clones (DMU_OT_DSL_CLONES) objects

illumos/illumos-gate@17fb938fd6cdce3ff1bb47dafda0774f742249a3

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author:     Matthew Ahrens <mahrens@delphix.com>

4 years agoMFC r348581: MFV r348580:
Alexander Motin [Tue, 11 Jun 2019 14:29:21 +0000 (14:29 +0000)]
MFC r348581: MFV r348580:
9559 zfs diff handles files on delete queue in fromsnap poorly

illumos/illumos-gate@20633e304b57bc98f70fdb194081b7023adf527b

Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author:     Paul Dagnelie <pcd@delphix.com>

4 years agoMFC r348579: MFV r348578: 9962 zil_commit should omit cache thrash
Alexander Motin [Tue, 11 Jun 2019 14:28:16 +0000 (14:28 +0000)]
MFC r348579: MFV r348578: 9962 zil_commit should omit cache thrash

illumos/illumos-gate@cab3a55e158118937e07d059c46f1bc14d1f254d

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Joshua M. Clulow <josh@sysmgr.org>
Author:     Prakash Surya <prakash.surya@delphix.com>

4 years agoMFC r348577: MFV r348576: 9963 Seperate tunable for disabling ZIL vdev flush
Alexander Motin [Tue, 11 Jun 2019 14:27:35 +0000 (14:27 +0000)]
MFC r348577: MFV r348576: 9963 Seperate tunable for disabling ZIL vdev flush

illumos/illumos-gate@f8fdf6812567ce1a3b76a6bee2ee3f04bd3fcaca

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author:     Prakash Surya <prakash.surya@delphix.com>

4 years agoMFC r348574: MFV r348573: 9993 zil writes can get delayed in zio pipeline
Alexander Motin [Tue, 11 Jun 2019 14:26:55 +0000 (14:26 +0000)]
MFC r348574: MFV r348573: 9993 zil writes can get delayed in zio pipeline

illumos/illumos-gate@2258ad0b755b24a55c6173b1e6bb6188389f72dd

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author:     George Wilson <george.wilson@delphix.com>

4 years agoMFC r348570: MFV r348568: 9466 add JSON output support to channel programs
Alexander Motin [Tue, 11 Jun 2019 14:26:14 +0000 (14:26 +0000)]
MFC r348570: MFV r348568: 9466 add JSON output support to channel programs

illumos/illumos-gate@5267591016146502784860802129b16dab6f135c

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed by: Sara Hartse <sara.hartse@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author:     Alek Pinchuk <apinchuk@datto.com>

4 years agoMFC r348567: MFV r348555:
Alexander Motin [Tue, 11 Jun 2019 14:25:03 +0000 (14:25 +0000)]
MFC r348567: MFV r348555:
9690 metaslab of vdev with no space maps was flushed during removal

illumos/illumos-gate@4e75ba682600b2bf19d158577d528c3db65050e8

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author:     Serapheim Dimitropoulos <serapheim@delphix.com>

4 years agoMFC r348566: MFC r348554: 9688 aggsum_fini leaks memory
Alexander Motin [Tue, 11 Jun 2019 14:24:15 +0000 (14:24 +0000)]
MFC r348566: MFC r348554: 9688 aggsum_fini leaks memory

illumos/illumos-gate@29bf2d68bef208274f5a54a14cc80c4a8cb76f53

Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author:     Paul Dagnelie <pcd@delphix.com>

4 years agoMFC r348565: MFV r348553:
Alexander Motin [Tue, 11 Jun 2019 14:23:33 +0000 (14:23 +0000)]
MFC r348565: MFV r348553:
9681 ztest failure in spa_history_log_internal due to spa_rename()

illumos/illumos-gate@6aee0ad76969eb0027131b3a338f2d94ae86f728

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author:     Matthew Ahrens <mahrens@delphix.com>

4 years agoMFC r348564: MFV r348552:
Alexander Motin [Tue, 11 Jun 2019 14:22:40 +0000 (14:22 +0000)]
MFC r348564: MFV r348552:
9682 page fault in dsl_async_clone_destroy() while opening pool

illumos/illumos-gate@ade2c82828f0dca1f46919aa1bd936ea1a5a0047

Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Sara Hartse <sara.hartse@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author:     Serapheim Dimitropoulos <serapheim@delphix.com>

4 years agoMFC r348563: MFV r348551: 9862 fix typo in comment in vdev_impl.h
Alexander Motin [Tue, 11 Jun 2019 14:21:15 +0000 (14:21 +0000)]
MFC r348563: MFV r348551: 9862 fix typo in comment in vdev_impl.h

illumos/illumos-gate@84927f52bd837f6e4882a19e43fd026f1828d910

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Robert Mustacchi <rm@joyent.com>
Author:     Allan Jude <allanjude@freebsd.org>

4 years agoMFC r348562: MFV r348550: 1700 Add SCSI UNMAP support
Alexander Motin [Tue, 11 Jun 2019 14:20:33 +0000 (14:20 +0000)]
MFC r348562: MFV r348550: 1700 Add SCSI UNMAP support

illumos/illumos-gate@047c81d31d0f571d6652e97143cd15281de61e84

Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Dan McDonald <danmcd@joyent.com>
Author:     Saso Kiselkov <saso.kiselkov@nexenta.com>

This is irrelevant to FreeBSD, just a diff reduction.

4 years agoMFC r348561: MFV r348548:
Alexander Motin [Tue, 11 Jun 2019 14:19:47 +0000 (14:19 +0000)]
MFC r348561: MFV r348548:
9617 too-frequent TXG sync causes excessive write inflation

illumos/illumos-gate@7928f4baf4ab3230557eb6289be68aa7a3003f38

Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author:     Matthew Ahrens <mahrens@delphix.com>

4 years agoMFC r348559: MFV r348537: 8601 memory leak in get_special_prop()
Alexander Motin [Tue, 11 Jun 2019 14:18:54 +0000 (14:18 +0000)]
MFC r348559: MFV r348537: 8601 memory leak in get_special_prop()

illumos/illumos-gate@e19b450bec203d8be04447ea476d7a86b36d63a1

Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed by: Sara Hartse <sara.hartse@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author:     John Gallagher <john.gallagher@delphix.com>

4 years agoMFC r348558: MFV r348535:
Alexander Motin [Tue, 11 Jun 2019 14:18:04 +0000 (14:18 +0000)]
MFC r348558: MFV r348535:
9677 panic from zio_write_gang_block() when creating dump device on fragmented rpool

illumos/illumos-gate@7341a7de4f0489193e0cfe11049a7bcf1596a4db

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author:     Brad Lewis <brad.lewis@delphix.com>

4 years agoMFC r348557: MFV r348534:
Alexander Motin [Tue, 11 Jun 2019 14:17:05 +0000 (14:17 +0000)]
MFC r348557: MFV r348534:
9616 Bogus error when attempting to set property on read-only pool

illumos/illumos-gate@f62db44dbcda5dd786bb821f1e6fd3ca2e6d4391

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Andrew Stormont <astormont@racktopsystems.com>

4 years agoMFC r345728 (by pjd):
Alexander Motin [Tue, 11 Jun 2019 13:49:48 +0000 (13:49 +0000)]
MFC r345728 (by pjd):
If the autoexpand pool property is turned on and vdev is healthy try to
expand the pool automatically when we detect underlying GEOM provider
size change.

4 years agoMFC r344320 (by pjd): Simplify the code.
Alexander Motin [Tue, 11 Jun 2019 13:46:05 +0000 (13:46 +0000)]
MFC r344320 (by pjd): Simplify the code.

4 years agoMFC r344318 (by pjd): Change assertion to log the incorrect io_type we've got.
Alexander Motin [Tue, 11 Jun 2019 13:44:19 +0000 (13:44 +0000)]
MFC r344318 (by pjd): Change assertion to log the incorrect io_type we've got.

4 years agoMFC r344317 (by pjd): Grabage-collect no longer used variable.
Alexander Motin [Tue, 11 Jun 2019 13:40:27 +0000 (13:40 +0000)]
MFC r344317 (by pjd): Grabage-collect no longer used variable.

4 years agoMFC r344316 (by pjd):
Alexander Motin [Tue, 11 Jun 2019 13:36:15 +0000 (13:36 +0000)]
MFC r344316 (by pjd):
The way ZFS searches for its vdevs is the following: first it looks for
a vdev that has the same name as the one stored in metadata and that has
all VDEV labels in place. If it cannot find a GEOM provider with the given
name and all VDEV labels it will scan all GEOM providers for the best match
(the most VDEV labels available), but here the name is ignored.

In case the ZFS pool is created, eg. using GPT partition label:

        # zpool create tank /dev/gpt/tank

everything works, and on every import ZFS will pick /dev/gpt/tank and
not /dev/da0p4.

The problem occurs when da0p4 is extended and ZFS is unable to find all
VDEV labels in /dev/gpt/tank anymore (the VDEV labels stored at the end
of the partition are now somewhere else). In this case it will scan all
GEOM providers and will pick the first one with the best match, ie. da0p4.

Fix this problem by checking the VDEV/provider name even if we get the same
match. If the name is the same as the one we have in pool's metadata, prefer
this GEOM provider.

4 years agoMFC r344314 (by pjd):
Alexander Motin [Tue, 11 Jun 2019 13:28:41 +0000 (13:28 +0000)]
MFC r344314 (by pjd):
In the vdev_geom_open_by_path() function we assume that vdev path starts
with "/dev/". Make sure this is the case.

4 years agoMFC r348816:
Konstantin Belousov [Tue, 11 Jun 2019 10:41:39 +0000 (10:41 +0000)]
MFC r348816:
Style MAP_ENTRY_ and MAP_ definitions.

For this MFC, I am also adding MAP_ENTRY_VN_EXEC MAP_ENTRY and MAP_VN_EXEC,
since this route seems to cause less future conflicts.

4 years agoMFC r348815:
Konstantin Belousov [Tue, 11 Jun 2019 10:04:04 +0000 (10:04 +0000)]
MFC r348815:
Correct definition for PGEX_SGX.

4 years agoMFC r348797:
Hans Petter Selasky [Tue, 11 Jun 2019 08:52:48 +0000 (08:52 +0000)]
MFC r348797:
Fix for reading the configuration descriptor in libusb. Catch invalid
configuration descriptor reads early on to avoid issues with devices
that don't check for a valid USB configuration read request.

Submitted by: takahiro.kurosawa@gmail.com
PR: 238412

4 years agoMFC r348667:
Cy Schubert [Tue, 11 Jun 2019 03:07:23 +0000 (03:07 +0000)]
MFC r348667:

While working on a PR, more are discovered.
Remove more #ifdefs missed in r343701.

4 years agoMFC r348666:
Cy Schubert [Tue, 11 Jun 2019 03:06:36 +0000 (03:06 +0000)]
MFC r348666:

Clean up #ifdefs from old unsupported releases of FreeBSD.

4 years agoMFC r348332: Fix array out of bound panic introduced in r306219.
Alexander Motin [Tue, 11 Jun 2019 01:09:54 +0000 (01:09 +0000)]
MFC r348332: Fix array out of bound panic introduced in r306219.

As I see, different NICs in different configurations may have different
numbers of TX and RX queues.  The code was assuming 1:1 mapping between
event queues (interrupts) and TX/RX queues.  Since number of interrupts
is set to maximum of TX and RX queues, when those two are different, the
system is doomed.

I have no documentation or deep knowledge about this hardware, so this
change is based on general observations and code reading.  If some of my
guesses are wrong, please do better.  I just confirmed HP NC550SFP NICs
are working now.

4 years agoMFC r348541:
Konstantin Belousov [Mon, 10 Jun 2019 17:44:50 +0000 (17:44 +0000)]
MFC r348541:
efirt efi_enter(): Release acquired locks and restore FPU ownership if
efi_arch_enter() returned an error.

4 years agoMFC r348539:
Konstantin Belousov [Mon, 10 Jun 2019 17:43:33 +0000 (17:43 +0000)]
MFC r348539:
amd64 ef_rt_arch_call: Preserve %rflags around call into EFI RT service.

4 years agoMFC r348533:
Konstantin Belousov [Mon, 10 Jun 2019 17:40:31 +0000 (17:40 +0000)]
MFC r348533:
Remove dead store.

4 years agoMFC r348536:
Konstantin Belousov [Mon, 10 Jun 2019 17:38:47 +0000 (17:38 +0000)]
MFC r348536:
Remove dead check.

4 years agoMFC r348544:
Konstantin Belousov [Mon, 10 Jun 2019 17:36:14 +0000 (17:36 +0000)]
MFC r348544:
hwpmc_intel: List all Silvermont ids.

4 years agoMFC r348569: [zfsboot] Fix boot env back compat (#190)
Kyle Evans [Mon, 10 Jun 2019 15:46:19 +0000 (15:46 +0000)]
MFC r348569: [zfsboot] Fix boot env back compat (#190)

* Fix boot env back compat

zfsboot must try zfsloader before loader in order to remain compatible
with boot environments created prior to zfs functionality being rolled
into loader proper.

* Improve comments in zfsboot

Explain the significance of the load path order, and put the comment
about looping through the paths in the appropriate scope.

4 years agoMFC r348782:
Mark Johnston [Mon, 10 Jun 2019 15:44:09 +0000 (15:44 +0000)]
MFC r348782:
vmrun: Add a missing close-paren to the usage message.

4 years agoMFC r348510: bectl(8): Don't accept jid=0 from jail_getid
Kyle Evans [Mon, 10 Jun 2019 14:35:04 +0000 (14:35 +0000)]
MFC r348510: bectl(8): Don't accept jid=0 from jail_getid

This will trivially exist, but we don't want it - none of our jailed BEs
will have jid=0.

4 years agoMFC r348631:
Hans Petter Selasky [Mon, 10 Jun 2019 13:36:53 +0000 (13:36 +0000)]
MFC r348631:
In usb(4) fix a lost completion event issue towards libusb(3). It may happen
if a USB transfer is cancelled that we need to fake a completion event.
Implement missing support in ugen_fs_copy_out() to handle this.

This fixes issues with webcamd(8) and firefox.

Sponsored by: Mellanox Technologies

4 years agoMFC r348604:
Hans Petter Selasky [Mon, 10 Jun 2019 13:16:49 +0000 (13:16 +0000)]
MFC r348604:
In xhci(4) there is no stream ID in the completion TRB.
Instead iterate all the stream IDs in stream mode to find
the matching USB transfer.

Sponsored by: Mellanox Technologies

4 years agoMFC r348601:
Slava Shwartsman [Mon, 10 Jun 2019 09:03:08 +0000 (09:03 +0000)]
MFC r348601:
Fix prio vs. nonprio tagged traffic in RDMACM

In current RDMACM implementation RDMACM server will not find a GID
index when the request was prio-tagged and the sever is non
prio-tagged and vise-versa.
According to 802.1Q-2014, VLAN tagged packets with VLAN id 0 should
be considered as untagged. Treat RDMACM request the same.

Reviewed by:    hselasky, kib
Sponsored by:   Mellanox Technologies

4 years agoMFC r348575:
Cy Schubert [Mon, 10 Jun 2019 05:09:34 +0000 (05:09 +0000)]
MFC r348575:

Properly define the fourth argument to ipf_check, the main entry point
into ipfilter. A proper definition simplifies dtrace scripts a little.

4 years agoMFC r348603:
Hans Petter Selasky [Sun, 9 Jun 2019 08:19:45 +0000 (08:19 +0000)]
MFC r348603:
Make sure the DMA tags get freed in mlx5en(4).

Sponsored by: Mellanox Technologies

4 years agoMFC r347439:
Mark Johnston [Sun, 9 Jun 2019 03:31:07 +0000 (03:31 +0000)]
MFC r347439:
Atomically update the global gMsgId in libnetgraph.

PR: 234442

4 years agoMFC r348502:
Mark Johnston [Sun, 9 Jun 2019 03:29:26 +0000 (03:29 +0000)]
MFC r348502:
Add a vm_page_wired() predicate.

4 years agoMFC r348718:
Cy Schubert [Sun, 9 Jun 2019 01:26:56 +0000 (01:26 +0000)]
MFC r348718:

Whitespace adjustment.

4 years agoMFC r348496: Document max_chains bump to 16384 at r330049.
Alexander Motin [Sat, 8 Jun 2019 02:30:16 +0000 (02:30 +0000)]
MFC r348496: Document max_chains bump to 16384 at r330049.

4 years agoMFC of 348259
Kirk McKusick [Fri, 7 Jun 2019 22:24:57 +0000 (22:24 +0000)]
MFC of 348259

Proper draining of GEOM nop forced shutdown.

4 years agoMFC r348500:
Dimitry Andric [Fri, 7 Jun 2019 18:01:29 +0000 (18:01 +0000)]
MFC r348500:

Partially revert r271349, which disabled the msun cexp test #4 on i386.

Ensure the expected result is stored first in a volatile variable with
the desired type.  This makes all the tests succeed.

Slightly changed from the original pull request, but functionally the
same.

Obtained from: https://github.com/freebsd/freebsd/pull/401
Submitted by: Moritz Buhl <gh@moritzbuhl.de>
PR: 191676

4 years agoMFC r348457:
Mark Johnston [Fri, 7 Jun 2019 17:05:58 +0000 (17:05 +0000)]
MFC r348457:
Remove a redundant vm_page_remove() call.

4 years agoMFC r348476, r348630 (by alc):
Konstantin Belousov [Fri, 7 Jun 2019 10:09:43 +0000 (10:09 +0000)]
MFC r348476, r348630 (by alc):
Simplify flow of pmap_demote_pde_locked() and add more comprehensive
debugging checks.

4 years agoMFC r348235:
Andrey V. Elsukov [Fri, 7 Jun 2019 08:21:01 +0000 (08:21 +0000)]
MFC r348235:
  Add `missing` and `or-flush` options to "ipfw table <NAME> create"
  command to simplify firewall reloading.

  The `missing` option suppresses EEXIST error code, but does check that
  existing table has the same parameters as new one. The `or-flush` option
  implies `missing` option and additionally does flush for table if it
  is already exist.

  Submitted by: lev
  Differential Revision: https://reviews.freebsd.org/D18339

MFC r348301
  Remove unused token that was added in r348235.

4 years agoMFC 348542: Add 'device cxgbe' explicitly in the synopsis.
John Baldwin [Thu, 6 Jun 2019 20:03:23 +0000 (20:03 +0000)]
MFC 348542: Add 'device cxgbe' explicitly in the synopsis.

ccr depends on symbols exported by the cxgbe driver as well as having
a runtime dependency.  While the runtime depenency was noted in the
manpage already, the compile-time dependency wasn't as clear.

PR: 238265

4 years agoMFC 346931,346933: Note that ccr(4) now supports AES-CCM.
John Baldwin [Thu, 6 Jun 2019 19:48:27 +0000 (19:48 +0000)]
MFC 346931,346933: Note that ccr(4) now supports AES-CCM.

346931:
Note that ccr(4) now supports AES-CCM.

346933:
Rewrap some long lines.

Whitespace only change.

4 years agoMFC 348543: Warn about deprecated features on all major OS versions.
John Baldwin [Thu, 6 Jun 2019 19:40:12 +0000 (19:40 +0000)]
MFC 348543: Warn about deprecated features on all major OS versions.

4 years agoMFC r348153-r348155: gpioled: add a new hint for initial state
Andriy Gapon [Thu, 6 Jun 2019 11:42:26 +0000 (11:42 +0000)]
MFC r348153-r348155: gpioled: add a new hint for initial state

hint.gpioled.%d.state determines the initial state of the LED when the
driver takes control over it:
  0 - the LED is off
  1 - the LED is on
 -1 - the LED is kept as it was

While here, add a module version declaration.

4 years agoMFC r345411: intpm: change translation of HBA error status to smbus(4) errors
Andriy Gapon [Thu, 6 Jun 2019 11:38:53 +0000 (11:38 +0000)]
MFC r345411: intpm: change translation of HBA error status to smbus(4) errors

PIIX4_SMBHSTSTAT_ERR can be set for several reasons that, unfortunately,
cannot be distinguished, but the most typical case is a missing or hung
slave (SMB_ENOACK).

PIIX4_SMBHSTSTAT_FAIL means failed or killed / aborted transaction, so
it's previous mapping to SMB_ENOACK was not ideal.

After this change an smb(4) access to a missing slave results in ENXIO
rather than EIO.  To me, that seems to be more appropriate.

4 years agoMFC r344361: zpool.8: sort zpool status flags in the same order as in illumos manual
Andriy Gapon [Thu, 6 Jun 2019 11:36:58 +0000 (11:36 +0000)]
MFC r344361: zpool.8: sort zpool status flags in the same order as in illumos manual

4 years agoMFC r344360: zpool.8: document -D flag for zpool status
Andriy Gapon [Thu, 6 Jun 2019 11:35:23 +0000 (11:35 +0000)]
MFC r344360: zpool.8: document -D flag for zpool status

4 years agoMFC r344359: fix userland illumos taskq code to pass relative timeout to cv_timedwait
Andriy Gapon [Thu, 6 Jun 2019 11:32:39 +0000 (11:32 +0000)]
MFC r344359: fix userland illumos taskq code to pass relative timeout to cv_timedwait

Unlike illumos, FreeBSD cv_timedwait requires a relative timeout.  That
applies both to the kernel illumos compatibility code and to the
userland "fake kernel" code.

Sponsored by: Panzura

4 years agoMFC r348439:
Glen Barber [Thu, 6 Jun 2019 03:31:55 +0000 (03:31 +0000)]
MFC r348439:
 Increase the size of the Vagrant default image size, as the 3GB
 size is too small to bootstrap the firstboot_pkgs list.

 While here, add the growfs(8) startup script to /etc/rc.conf,
 as Vagrant images can be resized by modifying the Vagrantfile.

Sponsored by: The FreeBSD Foundation

4 years agoMFC r348545:
Mark Johnston [Thu, 6 Jun 2019 03:04:33 +0000 (03:04 +0000)]
MFC r348545:
Typo.

4 years agoMFC r348431:
Mark Johnston [Thu, 6 Jun 2019 03:03:54 +0000 (03:03 +0000)]
MFC r348431:
elfcopy: Optimize for insertions at the end of the section list.

PR: 234949

4 years agoMFC r348430:
Mark Johnston [Thu, 6 Jun 2019 03:02:43 +0000 (03:02 +0000)]
MFC r348430:
elfcopy: Remove an unneeded memset.

4 years agoMFC r348443:
Mark Johnston [Thu, 6 Jun 2019 03:01:52 +0000 (03:01 +0000)]
MFC r348443:
readelf: Make -t imply -S, for compatibility with GNU binutils.

4 years agoMFC r348547:
Mark Johnston [Thu, 6 Jun 2019 03:01:05 +0000 (03:01 +0000)]
MFC r348547:
rpc.yppasswdd: Fix dirname(3) usage after r305952.

PR: 234972

4 years agoMFC r348444:
Mark Johnston [Thu, 6 Jun 2019 02:58:11 +0000 (02:58 +0000)]
MFC r348444:
libelftc: Add MLINKS.

4 years agoMFC r348417: Fix busy status leak in case of incorrect passthrough args.
Alexander Motin [Thu, 6 Jun 2019 01:16:04 +0000 (01:16 +0000)]
MFC r348417: Fix busy status leak in case of incorrect passthrough args.

4 years agoMFC r348065:
Allan Jude [Wed, 5 Jun 2019 20:31:09 +0000 (20:31 +0000)]
MFC r348065:

Correct the way remaining battery life is calculated

Previously, if a system had multiple batteries, the remaining life
percentage was calculated as the average of each battery's percent
remaining. This results in rather incorrect values when you consider the
case of the Thinkpad X270 that has a small 3 cell internally battery, and
a hot-swappable 9 cell battery that is used first. Battery 0 is at 100%,
but battery 1 is at 10%, you do not infact have 55% of your capacity
remaining.

The new method calculates the percentage based on remaining capacity
out of total capacity, giving a much more accurate reading.

PR: 229818
Submitted by: Keegan Drake H.P. <kd-dev@pm.me>
Sponsored by: Klara Systems
Event: Waterloo Hackathon 2019

4 years agoMFC r348068, r348071
Allan Jude [Wed, 5 Jun 2019 20:27:26 +0000 (20:27 +0000)]
MFC r348068, r348071

r348068:
ZFS: Make deadman tunables no longer read-only

This allows the user to enable, disable, and adjust the I/O deadman at
runtime. This can be especially useful when a pool is backed by remote
storage (such as iscsi, ggated, etc).

PR: 221906
Submitted by: Fabian Keil <fk@fabiankeil.de>
Obtained from: ElectroBSD
Sponsored by: Klara Systems
Event: Waterloo Hackathon 2019

r348071:
Fix typo in r348068

Sponsored by: Klara Systems

4 years agoMFC r347953:
Allan Jude [Wed, 5 Jun 2019 19:46:35 +0000 (19:46 +0000)]
MFC r347953:

MFV/ZoL: `zfs userspace` ignored all unresolved UIDs after the first

zfsonlinux/zfs@88cfff182432e4d1c24c877f33b47ee6cf109eee

zfs_main: fix `zfs userspace` squashing unresolved entries

The `zfs userspace` squashes all entries with unresolved numeric
values into a single output entry due to the comparsion always
made by the string name which is empty in case of unresolved IDs.

Fix this by falling to a numerical comparison when either one
of string values is not found. This then compares any numerical
values after all with a name resolved.

Signed-off-by: Pavel Boldin <boldin.pavel@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reported by: clusteradm
Obtained from: ZFS-on-Linux

4 years agoMFC r345676:
Leandro Lupori [Wed, 5 Jun 2019 14:23:10 +0000 (14:23 +0000)]
MFC r345676:

powerpc64: Use medium code model in asm files for TOC references

Summary:
With a sufficiently large TOC, it's possible to index out of range, as
the immediate load instructions only permit 16-bit indices, allowing up
to 64kB range (signed) from the base pointer.  Allow +/- 2GB range, with
the medium code model TOC accesses in asm.

Patch originally by Brandon Bergren.  The issue appears to impact ELFv2
more than ELFv1.

Reviewed by:    luporl
Differential Revision: https://reviews.freebsd.org/D19708

4 years agoMFC r343744:
Leandro Lupori [Wed, 5 Jun 2019 14:19:54 +0000 (14:19 +0000)]
MFC r343744:

powerpc64: Add a trap stack area

Currently, the trap code switches to the the temporary stack in the dbtrap
section. It works in most cases, but in the beginning of the execution, the
temp stack is being used, as starting in the powerpc_init() code.

In this current scenario, the stack is being overwritten, which causes the
return of breakpoint() to take abnormal execution.

This current patchset create a small stack to use by the dbtrap: codepath
avoiding the corruption of the temporary stack.

PR:             224872
Submitted by:   breno.leitao_gmail.com
Reviewed by:    jhibbits
Differential Revision:  https://reviews.freebsd.org/D14484

4 years agoMFC r348028:
Leandro Lupori [Wed, 5 Jun 2019 12:53:36 +0000 (12:53 +0000)]
MFC r348028:

stand/powerpc: Only build loader.kboot for powerpc64

kboot is only made for powerpc64 systems, not 32-bit systems.

This unbreaks the build for powerpcspe.

Reported by:    ngie

4 years agoMFC r348112:
Leandro Lupori [Wed, 5 Jun 2019 12:43:45 +0000 (12:43 +0000)]
MFC r348112:
Fix PPC64 kernel build with clang8 + lld8

This patch fixes the following lld link errors:

- unsupported dynamic relocations on read-only sections
- out-of-range TOC references

Submitted by: git_bdragon.rtk0.net
Reviewed by: jhibbits, luporl
Differential Revision: https://reviews.freebsd.org/D19352

4 years agoMFC r348025:
Leandro Lupori [Wed, 5 Jun 2019 12:38:58 +0000 (12:38 +0000)]
MFC r348025:
Unbreak the build when `ELF_VERBOSE` is defined after r348005

This change properly terminates the formatting string quote modification done
in r348005, which is triggered when `ELF_VERBOSE` is defined.

Reported by:  ci (amd64, gcc)

4 years agoMFC r348005:
Leandro Lupori [Wed, 5 Jun 2019 12:34:28 +0000 (12:34 +0000)]
MFC r348005:
[PowerPC64] stand: fix build using clang 8 as compiler

This change fixes "stand" build issues when using clang 8
as compiler.

Submitted by: alfredo.junior_eldorado.org.br
Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D20026

4 years agoMFC r348117: Allocate buffers smaller then ABD chunk size as linear.
Alexander Motin [Wed, 5 Jun 2019 00:51:51 +0000 (00:51 +0000)]
MFC r348117: Allocate buffers smaller then ABD chunk size as linear.

This allows to reduce memory waste by letting UMA to put multiple small
buffers into one memory page slab.  The page sharing means that UMA
may not be able to free memory page when some of buffers are freed, but
alternatively memory used by that buffer would just be wasted from the
beginning.

This change follows alike change in ZoL, but unlike Linux (according to
my understanding of it from comments) FreeBSD never shares slabs bigger
then one memory page, so this should be even less invasive then there.

4 years agoMFC r346570, r348440
Navdeep Parhar [Tue, 4 Jun 2019 21:06:34 +0000 (21:06 +0000)]
MFC r346570, r348440

r346570:
cxgbe/t4_tom: Add a "TCB history" feature that samples hardware state
for a tid and maintains a running history of some interesting events.

Service TCP_INFO queries from the history when the tid is being tracked
there.

r348440:
cxgbe/t4_tom: Do not attempt to look up entries in the TCB history if
it hasn't been initialized.

This fixes a bug in r346570 that could cause a panic when servicing
TCP_INFO for offloaded connections.

Sponsored by: Chelsio Communications

4 years agoMFC r348491:
Navdeep Parhar [Tue, 4 Jun 2019 20:37:00 +0000 (20:37 +0000)]
MFC r348491:

cxgbe/t4_tom: adjust the hardware receive window to match changes to the
receive sockbuf's high water mark.

Calculate rx credits on the spot instead of tracking sbused/sb_cc and
rx_credits in the toepcb.  The previous method worked when the high
water mark changed due to SB_AUTOSIZE but not when it was adjusted
directly (for example, by the soreserve in nfsrvd_addsock).

This fixes a connection hang while running iozone over an NFS mounted
share where nfsd's TCP sockets are being handled by t4_tom.

Sponsored by: Chelsio Communications

4 years agoMFC r348059: vt efifb: add suspend/resume calls
Ed Maste [Tue, 4 Jun 2019 18:11:12 +0000 (18:11 +0000)]
MFC r348059: vt efifb: add suspend/resume calls

Using the latest NVIDIA driver, upon resuming from suspend with X
running the display remained blank.  Additionally OpenGL applications
that were running triggered a number of error messages from the NVIDIA
driver.

This occurred because the vt efifb back-end did not signal the X server
to release the display before suspending (or to re-acquire it after
resuming).  The NVIDIA driver includes code for smoothly shutting down
and re-initializing the GPU, which was not getting called.

Since the NVIDIA driver doesn't currently support framebuffer devices
and vt is forced to fall back to the efifb back-end, add vd_suspend and
vd_resume members to connect the suspend/resume path.  This ensures the
X server is properly able to re-initialize the display.

PR: 237050
Submitted by: Erik Kurzinger <ekurzinger@nvidia.com>

4 years agoMFC r348364:
Ruslan Bukin [Tue, 4 Jun 2019 17:42:47 +0000 (17:42 +0000)]
MFC r348364:

Don't copy the data from bounce buffer back to the mbuf if channel does
not use bounce buffering.

Sponsored by: DARPA, AFRL

4 years agoMFC r347514:
Ruslan Bukin [Tue, 4 Jun 2019 17:39:46 +0000 (17:39 +0000)]
MFC r347514:

Add support for HiFive Unleashed -- the board with a multi-core RISC-V SoC
from SiFive, Inc.

The first core on this SoC (hart 0) is a 64-bit microcontroller.

o Pick a hart to run boot process using hart lottery.
  This allows to exclude hart 0 from running the boot process.
  (BBL releases hart 0 after the main harts, so it never wins the lottery).
o Renumber CPUs early on boot.
  Exclude non-MMU cores. Store the original hart ID in struct pcpu. This
  allows to find out the correct destination for IPIs and remote sfence
  calls.

Thanks to SiFive, Inc for the board provided.

Sponsored by: DARPA, AFRL

4 years agoMFC r340028 (by jhb):
Mark Johnston [Tue, 4 Jun 2019 17:37:50 +0000 (17:37 +0000)]
MFC r340028 (by jhb):
SBI calls expect a pointer to a u_long rather than a pointer.

4 years agoMFC r340027 (by jhb):
Mark Johnston [Tue, 4 Jun 2019 17:37:20 +0000 (17:37 +0000)]
MFC r340027 (by jhb):
Don't allow debuggers to modify SSTATUS, only to read it.

4 years agoMFC r344108:
Mark Johnston [Tue, 4 Jun 2019 17:31:59 +0000 (17:31 +0000)]
MFC r344108:
Implement per-CPU pmap activation tracking for RISC-V.

4 years agoMFC r344107:
Mark Johnston [Tue, 4 Jun 2019 17:31:29 +0000 (17:31 +0000)]
MFC r344107:
Implement pmap_clear_modify() for RISC-V.

4 years agoMFC r344106:
Mark Johnston [Tue, 4 Jun 2019 17:31:05 +0000 (17:31 +0000)]
MFC r344106:
Implement transparent 2MB superpage promotion for RISC-V.

4 years agoMFC r342733:
Mark Johnston [Tue, 4 Jun 2019 17:30:22 +0000 (17:30 +0000)]
MFC r342733:
Set PTE_U on PTEs created by pmap_enter_quick().

4 years agoMFC r340159 (by jhb):
Mark Johnston [Tue, 4 Jun 2019 17:29:47 +0000 (17:29 +0000)]
MFC r340159 (by jhb):
Rework setting PTE_D for kernel mappings.

4 years agoMFC r340030 (by jhb):
Mark Johnston [Tue, 4 Jun 2019 17:29:20 +0000 (17:29 +0000)]
MFC r340030 (by jhb):
Restrict setting PTE execute permissions on RISC-V.

4 years agoMFC r340029 (by jhb):
Mark Johnston [Tue, 4 Jun 2019 17:28:49 +0000 (17:28 +0000)]
MFC r340029 (by jhb):
Set PTE_A and PTE_D for user mappings in pmap_enter().

4 years agoMFC r342765:
Mark Johnston [Tue, 4 Jun 2019 17:25:45 +0000 (17:25 +0000)]
MFC r342765:
Fix dirty bit handling in pmap_remove_write().

4 years agoMFC r342764:
Mark Johnston [Tue, 4 Jun 2019 17:25:22 +0000 (17:25 +0000)]
MFC r342764:
Clear PGA_WRITEABLE in pmap_remove_pages().

4 years agoMFC r342736:
Mark Johnston [Tue, 4 Jun 2019 17:24:52 +0000 (17:24 +0000)]
MFC r342736:
Fix a use-after-free in the riscv pmap_release() implementation.

4 years agoMFC r342735:
Mark Johnston [Tue, 4 Jun 2019 17:24:26 +0000 (17:24 +0000)]
MFC r342735:
Synchronize access to the allpmaps list.

4 years agoMFC r342734:
Mark Johnston [Tue, 4 Jun 2019 17:23:58 +0000 (17:23 +0000)]
MFC r342734:
Fix some issues with the riscv pmap_protect() implementation.

4 years agoMFC r343529:
Mark Johnston [Tue, 4 Jun 2019 17:23:24 +0000 (17:23 +0000)]
MFC r343529:
Remove a redundant test.

4 years agoMFC r342732:
Mark Johnston [Tue, 4 Jun 2019 17:20:34 +0000 (17:20 +0000)]
MFC r342732:
Use regular stores to update PTEs in the riscv pmap layer.

4 years agoMFC r342766:
Mark Johnston [Tue, 4 Jun 2019 17:19:16 +0000 (17:19 +0000)]
MFC r342766:
Don't enable interrupts in init_secondary().

4 years agoMFC r347427:
Ruslan Bukin [Tue, 4 Jun 2019 15:42:30 +0000 (15:42 +0000)]
MFC r347427:

RISC-V ISA does not specify how to manage physical memory attributes (PMA).
So do nothing in pmap_page_set_memattr() and don't panic.

Sponsored by: DARPA, AFRL

4 years agoMFC r347351:
Ruslan Bukin [Tue, 4 Jun 2019 15:40:30 +0000 (15:40 +0000)]
MFC r347351:

Connect Xilinx AXI drivers and Cadence Ethernet MAC to the RISC-V build.

Sponsored by: DARPA, AFRL