]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agoFix the TCR_TG0 values
Andrew Turner [Thu, 10 Mar 2022 10:54:39 +0000 (10:54 +0000)]
Fix the TCR_TG0 values

They are in a different order to the TCR_TG1 values but appear to have
been copied incorrectly.

While here use TCR_TG0_4K in locore.S to make it explicit the userspace
page size is 4K.

Sponsored by: The FreeBSD Foundation

2 years agoFix the spelling of EFI_PAGE_SIZE
Andrew Turner [Wed, 9 Mar 2022 12:59:01 +0000 (12:59 +0000)]
Fix the spelling of EFI_PAGE_SIZE

We assume EFI_PAGE_SIZE is the same as PAGE_SIZE, however this may not
be the case. Use the former when working with a list of pages from the
UEFI firmware so the correct size is used.

This will be needed on arm64 where PAGE_SIZE could be 16k or 64k in the
future. The other architectures have been updated to be consistent.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34510

2 years agoAdd more arm64 PAC identification fields
Andrew Turner [Tue, 8 Mar 2022 12:46:47 +0000 (12:46 +0000)]
Add more arm64 PAC identification fields

Sponsored by: The FreeBSD Foundation

2 years agovfs: [2/2] fix stalls in vnode reclaim by only counting attempts
Mateusz Guzik [Mon, 7 Mar 2022 10:38:17 +0000 (11:38 +0100)]
vfs: [2/2] fix stalls in vnode reclaim by only counting attempts

... and ignoring if they succeded, which matches historical behavior.

Reported by: pho

2 years agovfs: [1/2] fix stalls in vnode reclaim by not requeieing from vnlru
Mateusz Guzik [Mon, 7 Mar 2022 10:33:59 +0000 (11:33 +0100)]
vfs: [1/2] fix stalls in vnode reclaim by not requeieing from vnlru

Reported by: pho

2 years agoscript -T skip timstamps for same second
Simon J. Gerraty [Thu, 10 Mar 2022 06:19:53 +0000 (22:19 -0800)]
script -T skip timstamps for same second

The result is much more readable if we only output the time-stamp
when it is at least 1s since last one.

2 years agonfsd: Do not exempt NFSv3 Fsinfo from the TLS check
Rick Macklem [Thu, 10 Mar 2022 00:52:42 +0000 (16:52 -0800)]
nfsd: Do not exempt NFSv3 Fsinfo from the TLS check

The Fsinfo RPC is exempt from the check for
Kerberized NFS being required, as recommended
by RFC2623.  However, there is no reason to
exempt Fsinfo from the requirement to use TLS.

This patch fixes the code so that the exemption
only applies to Kerberized NFS and not
NFS-over-TLS.

This only affects NFS-over-TLS for an NFSv3
mount when it is required, but the client does
not do so.

MFC after: 1 month

2 years agodumpon: use underlying device if encrypted swap is in use
Ed Maste [Mon, 7 Mar 2022 19:17:01 +0000 (14:17 -0500)]
dumpon: use underlying device if encrypted swap is in use

/etc/rc.d/dumpon runs before /etc/rc.d/swap.  When encrypted swap is in
use the .eli or .bde device will not exist at the time dumpon runs.

Even if this is addressed it does not make sense to dump core to
encrypted swap, as the encryption key will not be available after
reboot rendering the dump useless.  Thus, for the case that dumpdev=AUTO
and encrypted swap is in use, strip the extension and use the underlying
device.

Emit a warning if we are using the underlying device and the user has not
configured dump encryption, so that the user knows that the will not be
encrypted.

PR: 238301
Reported by: Ivan Rozhuk
Reviewed by: jilles
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34474

2 years agobhyve: Remove VM_MAXCPU from the userspace API/ABI.
John Baldwin [Wed, 9 Mar 2022 23:39:28 +0000 (15:39 -0800)]
bhyve: Remove VM_MAXCPU from the userspace API/ABI.

Reviewed by: grehan
Differential Revision: https://reviews.freebsd.org/D34494

2 years agobhyve: Use vm_get_topology to query kernel's maximum vCPU count.
John Baldwin [Wed, 9 Mar 2022 23:39:23 +0000 (15:39 -0800)]
bhyve: Use vm_get_topology to query kernel's maximum vCPU count.

Reviewed by: grehan
Differential Revision: https://reviews.freebsd.org/D34493

2 years agobhyve: Don't force an upper bound on vCPUs when parsing pinning.
John Baldwin [Wed, 9 Mar 2022 23:39:16 +0000 (15:39 -0800)]
bhyve: Don't force an upper bound on vCPUs when parsing pinning.

Even today it is possible to specify pinning for a vCPU higher than
the configured number of CPUs but lower than VM_MAXCPU without raising
an error.

Reviewed by: grehan
Differential Revision: https://reviews.freebsd.org/D34492

2 years agobhyve: Allocate dynamic arrays to hold per-VCPU state.
John Baldwin [Wed, 9 Mar 2022 23:39:08 +0000 (15:39 -0800)]
bhyve: Allocate dynamic arrays to hold per-VCPU state.

This avoids hardcoding VM_MAXCPU in userspace.

Reviewed by: grehan
Differential Revision: https://reviews.freebsd.org/D34491

2 years agobhyve: Make the MADT dynamically sized.
John Baldwin [Wed, 9 Mar 2022 23:38:58 +0000 (15:38 -0800)]
bhyve: Make the MADT dynamically sized.

Use basl_ncpu instead of VM_MAXCPU in MADT_SIZE.  Since several of the
offsets are no longer compile time constants, unroll the loop
generating ACPI tables.

Reviewed by: grehan
Differential Revision: https://reviews.freebsd.org/D34490

2 years agobhyve: Allocate mmio_hint array based on number of guest CPUs.
John Baldwin [Wed, 9 Mar 2022 23:38:49 +0000 (15:38 -0800)]
bhyve: Allocate mmio_hint array based on number of guest CPUs.

This avoids an instance of hardcoding VM_MAXCPU in userspace.

Reviewed by: grehan
Differential Revision: https://reviews.freebsd.org/D34489

2 years agoscript add -T fmt to print time-stamps
Simon J. Gerraty [Wed, 9 Mar 2022 21:33:03 +0000 (13:33 -0800)]
script add -T fmt to print time-stamps

script -r is useful for recording time-stamps of when output
happened.  With -T, rather than playback the script in real-time
we simply print the time-stamps to show when the output happened.

This is very useful for example, for analyzing boot time activity.

If the fmt provided contains no % characters the default
%n@ %s [%Y-%m-%d %T]
is used, which lends itself to analysis by tools as well as humans.

Sponsored by: Juniper Networks, Inc.

Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D34511

2 years agoBuild compiler-rt against libunwind, not libcxxrt
Dimitry Andric [Wed, 9 Mar 2022 21:23:35 +0000 (22:23 +0100)]
Build compiler-rt against libunwind, not libcxxrt

Parts of compiler-rt are also built for libgcc_eh and libgcc_s, and
these were already pointing to the libunwind unwind.h. For the sake of
consistency, also build compiler-rt itself against the libunwind
unwind.h, not the libcxxrt one.

MFC after: 3 days

2 years agoMerge libcxxrt master fd484be8d1e94a1fcf6bc5c67e5c07b65ada19b6
Dimitry Andric [Wed, 9 Mar 2022 19:45:01 +0000 (20:45 +0100)]
Merge libcxxrt master fd484be8d1e94a1fcf6bc5c67e5c07b65ada19b6

Interesting fixes:
47661d0 Match libc++abi/libsupc++ when demangling array types
e44a05c Fix unitialized variable in __cxa_demangle_gnu3 after #6 (#8)
5088b05 Remove some code duplication.
fd484be Atomics cleanup (#11)

MFC after: 2 weeks

2 years agoImport libcxxrt master fd484be8d1e94a1fcf6bc5c67e5c07b65ada19b6
Dimitry Andric [Wed, 9 Mar 2022 19:36:12 +0000 (20:36 +0100)]
Import libcxxrt master fd484be8d1e94a1fcf6bc5c67e5c07b65ada19b6

Interesting fixes:
47661d0 Match libc++abi/libsupc++ when demangling array types
e44a05c Fix unitialized variable in __cxa_demangle_gnu3 after #6 (#8)
5088b05 Remove some code duplication.
fd484be Atomics cleanup (#11)

2 years agozfs: Fix typo in module Makefile
Ryan Moeller [Wed, 9 Mar 2022 18:19:42 +0000 (18:19 +0000)]
zfs: Fix typo in module Makefile

Fixes: c03c5b1c8091
Sponsored by: iXsystems, Inc.

2 years agocontrib/bc: include assert.h when building with C11 or newer
Stefan Eßer [Wed, 9 Mar 2022 17:57:30 +0000 (18:57 +0100)]
contrib/bc: include assert.h when building with C11 or newer

This chunk should have been committed with the MFV commit
23210c9f42af94dc but was missing for an unknown reasn.

MFC after: 3 days

2 years agoRemove compat hacks from libcxxrt's _Unwind_Exception
Dimitry Andric [Tue, 8 Mar 2022 21:53:16 +0000 (22:53 +0100)]
Remove compat hacks from libcxxrt's _Unwind_Exception

This reverts 9097e3cbcac4, which was in itself a revert of upstream
libcxxrt commits 88bdf6b290da ("Specify double-word alignment for ARM
unwind") and b96169641f79 ("Updated Itanium unwind"), and a
reapplication of our commit 3c4fd2463bb2 ("libcxxrt: add padding in
__cxa_allocate_* to fix alignment").

The editors/libreoffice port will be patched to be able to cope with the
standards-compliant alignment of _Unwind_Exception and consequently,
that of __cxa_exception. The layouts and sizes of these structures
should then be completely the same for libcxxrt, libunwind and
libc++abi.

PR: 262008
Reviewed by: emaste, jhb, theraven
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D34488

2 years agodiff: set cflag when passed to diff
Tom Jones [Tue, 8 Mar 2022 16:58:25 +0000 (16:58 +0000)]
diff: set cflag when passed to diff

In b5541f456d641d23e0c46874daff0b62552bf3cb when flags were converted to
be boolean, the setting of cflag as an integer was removed, but no
boolean set was added.

This effects the output format of dates, but the context type was set to
D_CONTEXT so other functionality worked.

Reviewed by: bapt
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D34481

2 years agodtrace tests: Fix expected outout for tst.system.d
Li-Wen Hsu [Wed, 9 Mar 2022 03:39:12 +0000 (11:39 +0800)]
dtrace tests: Fix expected outout for tst.system.d

This is follow up of d500a85e640d1cd270747c12e17c511b53864436

PR: 262415
Sponsored by: The FreeBSD Foundation

2 years agoUpdate smartqpi driver to vendor's latest submission
Warner Losh [Wed, 9 Mar 2022 00:01:04 +0000 (17:01 -0700)]
Update smartqpi driver to vendor's latest submission

Newly added features & bug fixes

o Fixed an issue smartpqi debug log messages are flooding kernel logs.
o Fixed an issue where devices are shown as RAID 0 in display info.
o Feature: Changed 32 bit dma address to 64 bit address
o Added new controlller ids.

Submitted by: Microsemi
Reviewed by: Scott Benesh (Microsemi), imp
Differential Revision: https://reviews.freebsd.org/D34469
MFC After: 3 days

Sponsored by: Netflix

2 years agocxgbe tom: Compile fix for disabled KTR trace.
John Baldwin [Tue, 8 Mar 2022 22:07:51 +0000 (14:07 -0800)]
cxgbe tom: Compile fix for disabled KTR trace.

Sponsored by: Chelsio Communications

2 years agocxgbe tom: Use VM_PAGE_TO_PHYS().
John Baldwin [Tue, 8 Mar 2022 18:10:59 +0000 (10:10 -0800)]
cxgbe tom: Use VM_PAGE_TO_PHYS().

Sponsored by: Chelsio Communications

2 years agocxgbe tom: Use be64toh instead of htobe64 to convert to host order.
John Baldwin [Tue, 8 Mar 2022 18:26:45 +0000 (10:26 -0800)]
cxgbe tom: Use be64toh instead of htobe64 to convert to host order.

This is a no-op but more accurately conveys intent.

Sponsored by: Chelsio Communications

2 years agocxgbe tom: Use vm_paddr_t for physical addresses in page pod routines.
John Baldwin [Tue, 8 Mar 2022 18:25:41 +0000 (10:25 -0800)]
cxgbe tom: Use vm_paddr_t for physical addresses in page pod routines.

Sponsored by: Chelsio Communications

2 years agossh: update sshd_config(5) for RSA/SHA-1 signature removal
Ed Maste [Tue, 8 Mar 2022 21:56:04 +0000 (16:56 -0500)]
ssh: update sshd_config(5) for RSA/SHA-1 signature removal

OpenSSH 8.8p1 removed RSA/SHA-1 signatures by default, but failed to
update sshd_config(5).  It was updated upstream after the release in
b711bc01a7ec and da4035523406.

Fixes: 8c22023ca5e1 ("ssh: disable RSA/SHA-1 signatures")
Sponsored by: The FreeBSD Foundation

2 years agogpart: Avoid geom_gettree() call in "bootcode -b".
Alexander Motin [Tue, 8 Mar 2022 18:44:22 +0000 (13:44 -0500)]
gpart: Avoid geom_gettree() call in "bootcode -b".

geom_gettree() may be pretty expensive on large systems, and it is
not needed if only -b flag specified, that is processed by kernel.

MFC after: 1 month

2 years agousb(4): Don't skip calling uhub_explore_sub() even on HUB port errors.
Hans Petter Selasky [Tue, 8 Mar 2022 18:57:38 +0000 (19:57 +0100)]
usb(4): Don't skip calling uhub_explore_sub() even on HUB port errors.

This should fix an issue where the "udev->re_enumerate_wait" field never gets
processed and reset. In this case usbconfig will wait forever and never return.

MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agozfs: merge openzfs/zfs@a86e08941 (master) into main
Martin Matuska [Tue, 8 Mar 2022 17:52:10 +0000 (18:52 +0100)]
zfs: merge openzfs/zfs@a86e08941 (master) into main

Notable upstream pull request merges:
  #9078:  log xattr=sa create/remove/update to ZIL
  #11919: Cross-platform xattr user namespace compatibility
  #13014: Report dnodes with faulty bonuslen
  #13016: FreeBSD: Fix zvol_cdev_open locking
  #13019: spl: Don't check FreeBSD rwlocks for double initialization
  #13027: Fix clearing set-uid and set-gid bits on a file when
          replying a write
  #13031: Add enumerated vdev names to 'zpool iostat -v' and
          'zpool list -v'
  #13074: Enable encrypted raw sending to pools with greater ashift
  #13076: Receive checks should allow unencrypted child datasets
  #13098: Avoid dirtying the final TXGs when exporting a pool
  #13172: Fix ENOSPC when unlinking multiple files from full pool

Obtained from: OpenZFS
OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3

2 years agolibzfs_core: lzc_send_wraper: maximise pipe buffer for existing pipes
наб [Mon, 21 Feb 2022 18:51:48 +0000 (19:51 +0100)]
libzfs_core: lzc_send_wraper: maximise pipe buffer for existing pipes

This reduces scheduler overhead by letting the reader consume bigger
chunks (64k => 128k at full throttle)

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13133

2 years agoZTS: /dev/null: accept no substitutes
Rich Ercolani [Fri, 17 Dec 2021 04:19:22 +0000 (23:19 -0500)]
ZTS: /dev/null: accept no substitutes

Instead of writing to "devnull" and rming it later, just
> /dev/null to not have to cleanup later.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Co-authored-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13133

2 years agoRevert "ZTS: Avoid piping send directly to /dev/null"
наб [Mon, 21 Feb 2022 01:43:49 +0000 (02:43 +0100)]
Revert "ZTS: Avoid piping send directly to /dev/null"

This reverts commit 1a79f7e86021c5de33d3518dd9a0f14f924ee345.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13133

2 years agoRevert "Added error for writing to /dev/ on Linux"
наб [Sun, 20 Feb 2022 13:41:10 +0000 (14:41 +0100)]
Revert "Added error for writing to /dev/ on Linux"

This reverts commit 860051f1d1ef7ee995188b852d8da36bce85b1dc.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13133

2 years agolibzfs, libzfs_core: send: always write to pipe
наб [Mon, 21 Feb 2022 01:31:32 +0000 (02:31 +0100)]
libzfs, libzfs_core: send: always write to pipe

By introducing lzc_send_wrapper() and routing all ZFS_IOC_SEND*
users through it, we fix a Linux 5.10-introduced bug (see comment)

This is all /transparent/ to the users API, ABI, and usage-wise,
and disabled on FreeBSD and if the output is already a pipe,
and transparently nestable (i.e. zfs_send_one() is wrapped,
but so is lzc_send_redacted() it calls to ‒ this wouldn't be strictly
necessary if ZFS_IOC_SEND_PROGRESS wasn't strictly denominational w.r.t.
the descriptor the send is happening on)

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Co-authored-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11445
Closes #13133

2 years agolibzfs_core: simplify max_pipe_buffer(), return new max
наб [Sun, 20 Feb 2022 19:17:22 +0000 (20:17 +0100)]
libzfs_core: simplify max_pipe_buffer(), return new max

We do still check and only optionally set because all F_SETPIPE_SZ
directives reallocate the pipe buffer

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13133

2 years agolibzfs: migrate single-use libzfs_set_pipe_max() to libzfs_core
наб [Sun, 20 Feb 2022 14:04:49 +0000 (15:04 +0100)]
libzfs: migrate single-use libzfs_set_pipe_max() to libzfs_core

Notably, this also means that the pipe is expanded before each
dataset is received, so updates to /p/s/f/pipe-max-size are reflected
for each new dataset

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13133

2 years agoCleaning up a couple of ZTS tests setup scripts
Brian Atkinson [Mon, 7 Mar 2022 23:22:01 +0000 (16:22 -0700)]
Cleaning up a couple of ZTS tests setup scripts

With the zfs_destroy ZTS test case the setup script needed to call
default_setup_noexit so compression could be turned off. Also, added
log_must to setting compression off in the reservation setup script for
turning off compression.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Brian Atkinson <batkinson@lanl.gov>
Closes #13173

2 years agoAdded noexit variant for Raidz setup in ZTS tests
Brian Atkinson [Fri, 4 Mar 2022 01:18:07 +0000 (18:18 -0700)]
Added noexit variant for Raidz setup in ZTS tests

The regular default_raidz_setup function in the ZFS test suite called
log_pass after creating the zpool. However, with compression now being
on by default 56fa4aa, there is no way to turn compression off in the
setup.ksh scripts when creating a raidz VDEV. The addition of the
function default_raidz_setup_noexit allows for a raidz VDEV to be
created, additional zfs property settings to be applied and for the
setup.ksh script itself to call log_pass.

With the addition of default_raidz_setup_noexit some stray log_pass
calls were removed from any setup.ksh scripts that call
default_raidz_setup.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Brian Atkinson <batkinson@lanl.gov>
Closes #13173

2 years agoFix ENOSPC when unlinking multiple files from full pool
Brian Behlendorf [Tue, 8 Mar 2022 17:16:35 +0000 (09:16 -0800)]
Fix ENOSPC when unlinking multiple files from full pool

When unlinking multiple files from a pool at 100% capacity, it was
possible for ENOSPC to be returned after the first unlink.  e.g.

    rm -f /mnt/fs/test1.0.0 /mnt/fs/test1.1.0 /mnt/fs/test1.2.0
    rm: cannot remove '/mnt/fs/test1.1.0': No space left on device
    rm: cannot remove '/mnt/fs/test1.2.0': No space left on device

After waiting for the pending deferred frees from the first unlink to
be processed the remaining files can then be unlinked.  This is caused
by the quota limit in dsl_dir_tempreserve_impl() being temporarily
decreased to the allocatable pool capacity less any deferred free
space.

This is resolved using the existing mechanism of returning ERESTART
when over quota as long as we know enough space will shortly be
available after processing the pending deferred frees.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Ryan Moeller <freqlabs@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13172

2 years agogeom: Allow "load" command for already loaded modules.
Alexander Motin [Tue, 8 Mar 2022 17:04:42 +0000 (12:04 -0500)]
geom: Allow "load" command for already loaded modules.

I see more user-friendly to do nothing if the module is already
loaded, rather than returning quite confusing error message.

As side effect it allows to avoid std_list_available() call, using
quite expensive on large systems geom_gettree().

MFC after: 1 month

2 years agogpioths(4): Correct the sysctl names in manual page
Juraj Lutter [Sun, 6 Mar 2022 21:33:29 +0000 (22:33 +0100)]
gpioths(4): Correct the sysctl names in manual page

Temperature is exposed via 'temperature' leaf, humidity via 'humidity'
leaf. Align the manual page with the actual variable names.

Approved by: manu
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34460

2 years agopfctl: remove unused variable
Kristof Provost [Tue, 8 Mar 2022 11:22:50 +0000 (12:22 +0100)]
pfctl: remove unused variable

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agolibpfct: factor out pfctl_get_rules_info()
Kristof Provost [Fri, 4 Mar 2022 16:12:01 +0000 (17:12 +0100)]
libpfct: factor out pfctl_get_rules_info()

Introduce pfctl_get_rules_info(), similar to pfctl_get_eth_rules_info()
to retrieve rules information (ticket and total number of rules).

Use the new function in pfctl.

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D34443

2 years agolibpfctl: support flushing rules/nat/eth
Kristof Provost [Fri, 4 Mar 2022 14:50:43 +0000 (15:50 +0100)]
libpfctl: support flushing rules/nat/eth

Move the code to flush regular rules, nat rules and Ethernet rules into
libpfctl for easier re-use.

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D34442

2 years agobcm5974(4): set mode again on resume
Greg V [Tue, 8 Mar 2022 12:51:07 +0000 (15:51 +0300)]
bcm5974(4): set mode again on resume

This is necessary to not break SPI devices on suspend-resume.

Reviewed by:    wulf
MFC with:       5aa839c9e2c373275091b8bf529c1311d0b84d76
Differential revision:  https://reviews.freebsd.org/D34434

2 years agobcm5974(4): fix endian conversion signedness bug
Greg V [Tue, 8 Mar 2022 12:51:06 +0000 (15:51 +0300)]
bcm5974(4): fix endian conversion signedness bug

This fixes wrong coordinates resulting in weird behavior.

Reviewed by: wulf
MFC with: 5aa839c9e2c373275091b8bf529c1311d0b84d76
Differential revision: https://reviews.freebsd.org/D34433

2 years agomlx5/mlx4: Bump driver version to 3.7.1
Hans Petter Selasky [Tue, 8 Mar 2022 11:16:00 +0000 (12:16 +0100)]
mlx5/mlx4: Bump driver version to 3.7.1

MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agoMake the arm64 get_pcpu a function again
Andrew Turner [Tue, 8 Mar 2022 11:38:51 +0000 (11:38 +0000)]
Make the arm64 get_pcpu a function again

We assume the pointer returned from get_pcpu will be consistent even
if the thread is moved to a new CPU. Fix this by partially reverting
63c858a04d565 to make get_pcpu a function again.

Sponsored by: The FreeBSD Foundation

2 years agoPrint the instruction for the unknown exception
Andrew Turner [Tue, 8 Mar 2022 11:02:02 +0000 (11:02 +0000)]
Print the instruction for the unknown exception

The arm64 unknown exception will be raised when we execute an
instruction that id invalid or disabled. To help debug these print
the instruction that failed.

Sponsored by: The FreeBSD Foundation

2 years agopfctl: support recursive printing of nat rules
Kristof Provost [Sat, 5 Mar 2022 16:55:48 +0000 (17:55 +0100)]
pfctl: support recursive printing of nat rules

PR: 252617
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34455

2 years agostress2: Fix typo in exclude names
Peter Holm [Tue, 8 Mar 2022 10:29:17 +0000 (11:29 +0100)]
stress2: Fix typo in exclude names

2 years agostress2: Exclude a few test.
Peter Holm [Tue, 8 Mar 2022 10:20:51 +0000 (11:20 +0100)]
stress2: Exclude a few test.

2 years agoSkip sys.geom.class.multipath.failloop.failloop if dtrace fails to run
Li-Wen Hsu [Tue, 8 Mar 2022 10:12:40 +0000 (18:12 +0800)]
Skip sys.geom.class.multipath.failloop.failloop if dtrace fails to run

This test case depends on dtrace and sometimes gets affected if dtrace
has issues.  Make it report skipped instead of failure when dtrace fails
to run.

Sponsored by: The FreeBSD Foundation

2 years agou3g(4): Add new USB IDs.
Hans Petter Selasky [Tue, 8 Mar 2022 10:02:52 +0000 (11:02 +0100)]
u3g(4): Add new USB IDs.

Submitted by: Matthew Luckie <mjl@luckie.org.nz>
MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agoperiodic: remove obsolete news.expire
Nils Johannsen [Tue, 8 Mar 2022 04:29:26 +0000 (19:29 -0900)]
periodic: remove obsolete news.expire

With the initial import of 386BSD 0.1 in 1993, the daily execution of
/etc/news.expire was introduced (see commit 1bf9d5d9518e).

In 1997, this was brought into periodic resulting in daily/330.news
(see commit 28dce04d1975). But as far as I see, /etc/news.expire has
never existed.

PR:         256238
MFC after:  1 week
Differential Revision: https://reviews.freebsd.org/D30631

2 years agoExpose additional file level attributes
Umer Saleem [Tue, 8 Mar 2022 01:52:03 +0000 (06:52 +0500)]
Expose additional file level attributes

ZFS allows to update and retrieve additional file level attributes for
FreeBSD. This commit allows additional file level attributes to be
updated and retrieved for Linux. These include the flags stored in the
upper half of z_pflags only.

Two new IOCTLs have been added for this purpose. ZFS_IOC_GETDOSFLAGS
can be used to retrieve the attributes, while ZFS_IOC_SETDOSFLAGS can
be used to update the attributes.

Attributes that are allowed to be updated include ZFS_IMMUTABLE,
ZFS_APPENDONLY, ZFS_NOUNLINK, ZFS_ARCHIVE, ZFS_NODUMP, ZFS_SYSTEM,
ZFS_HIDDEN, ZFS_READONLY, ZFS_REPARSE, ZFS_OFFLINE and ZFS_SPARSE.
Flags can be or'd together while calling ZFS_IOC_SETDOSFLAGS.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #13118

2 years agoHandle aarch64 defines seperate from arm
Windel Bouwman [Tue, 8 Mar 2022 01:49:34 +0000 (02:49 +0100)]
Handle aarch64 defines seperate from arm

aarch64 is a different architecture than arm. Some
compilers might choke when both __arm__ and __aarch64__
are defined.

This change separates the checks for arm and for
aarch64 in the isa_defs.h header files.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Windel Bouwman <windel@windel.nl>
Closes #10335
Closes #13151

2 years agocontrib/bc: update to version 5.2.3
Stefan Eßer [Mon, 7 Mar 2022 22:23:56 +0000 (23:23 +0100)]
contrib/bc: update to version 5.2.3

This version fixes a parse error when passing a file to bc using -f
if that file has a multiline comment or string in it.

Merge commit '3673adf1ee311d6f83176d3e43cf0efb314764e4'

MFC after: 3 days

2 years agovendor/bc: import version 5.2.3
Stefan Eßer [Mon, 7 Mar 2022 22:08:20 +0000 (23:08 +0100)]
vendor/bc: import version 5.2.3

This version fixes a parse error when passing a file to bc using -f
if that file has a multiline comment or string in it.

MFC after: 3 days

2 years agocxgbe(4): dump_devlog should never fail silently.
Navdeep Parhar [Mon, 7 Mar 2022 19:17:05 +0000 (11:17 -0800)]
cxgbe(4): dump_devlog should never fail silently.

Do the same thing as dump_cimla and log a warning on failure.

MFC after: 3 days
Sponsored by: Chelsio Communications

2 years agoffs_mount(): return early if namei() fails to lookup disk device
Robert Wing [Mon, 7 Mar 2022 19:18:03 +0000 (10:18 -0900)]
ffs_mount(): return early if namei() fails to lookup disk device

With soft updates enabled, an INVARIANTS panic is hit in ffs_unmount().

The problem occurs in ffs_mount() when upgrading a mount from ro->rw.
During a mount update, the soft update code gets set up but doesn't get
cleaned up if namei() fails when looking up the disk device.

Avoid this scenario by looking up the disk device first and bail early
if the namei() lookup fails.

PR:             256511
MFC After:      2 weeks
Reviewed by: mckusick, kib
Differential Revision: https://reviews.freebsd.org/D30870

2 years agoGEOM: Make G_F_CTLDUMP also dump result.
Alexander Motin [Mon, 7 Mar 2022 19:40:28 +0000 (14:40 -0500)]
GEOM: Make G_F_CTLDUMP also dump result.

MFC after: 1 month

2 years agoRevert "sdhci: extend bus_dma_tag boundary to 64-bit space"
Marcin Wojtas [Mon, 7 Mar 2022 16:40:51 +0000 (17:40 +0100)]
Revert "sdhci: extend bus_dma_tag boundary to 64-bit space"

This reverts commit 7d8700bc291b4b3be1a592cae539f9e682592d9d.

Reason for revert: the patch is incomplete. 64-bit operation
is supported fully in SDHCI v4.0, v3.0 does it only for ADMA mode.
This differentiation is missing and should be taken into consideration
in case the reverted code is re-introduced.

Reported by: mmel

2 years agoctf: Avoid passing a caddr_t to roundup2()
Mark Johnston [Mon, 7 Mar 2022 16:18:40 +0000 (11:18 -0500)]
ctf: Avoid passing a caddr_t to roundup2()

For some reason I can't reproduce this locally, but Jenkins complains.

Reported by: Jenkins
Fixes: bdf290cd3e1a ("ctf: Add v3 support to CTF tools, ctf{convert,dump,merge}")

2 years agoGEOM: Introduce gctl_add_param() API.
Alexander Motin [Mon, 7 Mar 2022 16:06:11 +0000 (11:06 -0500)]
GEOM: Introduce gctl_add_param() API.

Make gctl_add_param() API public, allowing more precise control over
parameter flags.  Previously it was impossible to properly declare
write-only ASCII parameters, used for result reporting, they were
declared as read-write binary instead, that was not nice.

MFC after: 1 month

2 years agoGEOM: Skip copyin() for GCTL_PARAM_WR parameters.
Alexander Motin [Mon, 7 Mar 2022 15:57:56 +0000 (10:57 -0500)]
GEOM: Skip copyin() for GCTL_PARAM_WR parameters.

Kernel does not read those parameters, so copyin is pointless.

While there, replace some KASSERT()s with CTASSERT()s.

MFC after: 1 month

2 years agokcov: use __func__ in KASSERT instead of old function name
Ed Maste [Mon, 7 Mar 2022 14:48:38 +0000 (09:48 -0500)]
kcov: use __func__ in KASSERT instead of old function name

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

2 years agormlock: Temporarily revert commit c84bb8cd771c
Mark Johnston [Mon, 7 Mar 2022 15:35:59 +0000 (10:35 -0500)]
rmlock: Temporarily revert commit c84bb8cd771c

It appears to have introduced a regression on arm64, possibly due to the
fact that the pcpu pointer is reloaded outside of the critical section
in _rm_rlock().  Until this is resolved one way or another, let's
revert.

Reported by: Ronald Klop <ronald-lists@klop.ws>
Sponsored by: The FreeBSD Foundation

2 years agoctf: Fix a -Wunused-but-set-variable warning
Mark Johnston [Mon, 7 Mar 2022 15:34:11 +0000 (10:34 -0500)]
ctf: Fix a -Wunused-but-set-variable warning

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

2 years agogmultipath tests: Re-enable the failloop test in CI
Mark Johnston [Mon, 7 Mar 2022 13:54:57 +0000 (08:54 -0500)]
gmultipath tests: Re-enable the failloop test in CI

Sponsored by: The FreeBSD Foundation

2 years agoctf: Add v3 support to CTF tools, ctf{convert,dump,merge}
Mark Johnston [Mon, 7 Mar 2022 13:54:18 +0000 (08:54 -0500)]
ctf: Add v3 support to CTF tools, ctf{convert,dump,merge}

ctfdump handles v2 and v3.  ctfconvert now emits only CTFv3, whereas
ctfmerge can merge v2 and v3 containers into v3 containers.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34364

2 years agolibctf: Handle CTFv3 containers
Mark Johnston [Mon, 7 Mar 2022 13:53:27 +0000 (08:53 -0500)]
libctf: Handle CTFv3 containers

In general, the patch adds indirection to minimize the amount of code
that needs to know about differences between v2 and v3.  Specifically,
some new ctf_get_ctt_* functions are added, and new LCTF_* macros are
added to use the underlying container's version to do the right thing.

CTF containers can have parent/child relationships, wherein a type ID in
one container refers to a type in the parent.  It is permitted for the
parent and child to have different versions.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34363

2 years agolinker: Permit CTFv3 containers
Mark Johnston [Mon, 7 Mar 2022 13:53:05 +0000 (08:53 -0500)]
linker: Permit CTFv3 containers

Reviewed by: Domagoj Stolfa
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34362

2 years agofbt: Add support for CTFv3 containers
Mark Johnston [Mon, 7 Mar 2022 13:45:53 +0000 (08:45 -0500)]
fbt: Add support for CTFv3 containers

The general aim in this and subsequent patches is to minimize the
amount of code that directly references CTF types such as ctf_type_t,
ctf_array_t, etc.  To that end, introduce some routines similar to the
existing fbt_get_ctt_size() (which exists to deal with differences
between v1 and v2) and change ctf_lookup_by_id() to return a void
pointer.

Support for v2 containers is preserved.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34361

2 years agoctf: Add definitions for CTFv3
Mark Johnston [Mon, 7 Mar 2022 13:44:02 +0000 (08:44 -0500)]
ctf: Add definitions for CTFv3

These are based on definitions added to binutils' libctf.  Specifically:
- Type IDs are now encoded in 32 bits rather than 16, changing the
  layout of ctf_type_t, ctf_array_t, ctf_member_t and ctf_lmember_t.
- Type info is encoded in 32 bits rather than 16.  The type "kind" is
  extended from 5 bits to 6, and the type "vlen" is extended from 10
  bits to 25.

The main upside is that we remove the current limit, imposed by CTFv2,
of 2^{15} distinct types in the main kernel executable.  Other limits,
such as that on the number of elements in an enum, imposed by the vlen
limit, are also raised.

This change adds v2 and v3 flavours of macros and type definitions which
differ between the two versions.  Compatibility is preserved for now by
having generic names refer to the v2 definitions, so, e.g., ctf_type_t
is still a v2 type.

No functional change intended.

Reviewed by: Domagoj Stolfa
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34360

2 years agolinker: Simplify CTF container handling
Mark Johnston [Mon, 7 Mar 2022 13:43:42 +0000 (08:43 -0500)]
linker: Simplify CTF container handling

Use sys/ctf.h to provide various definitions required to parse the CTF
header.  No functional change intended.

Reviewed by: Domagoj Stolfa, emaste
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34359

2 years agoctf: Import ctf.h from OpenBSD
Mark Johnston [Mon, 7 Mar 2022 13:42:57 +0000 (08:42 -0500)]
ctf: Import ctf.h from OpenBSD

Use it instead of the existing ctf.h from OpenSolaris.  This makes it
easier to use CTF in the core kernel, and to extend the CTF format to
support wider type IDs.

The imported ctf.h is modified to depend only on _types.h, and also to
provide macros which use the "parent" bit of a type ID to refer to types
in a parent CTF container.

No functional change intended.

Reviewed by: Domagoj Stolfa, emaste
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34358

2 years agopowerpc: FreeBSD kernel compatibility cleanup
Alfredo Dal'Ava Junior [Mon, 7 Mar 2022 17:30:26 +0000 (14:30 -0300)]
powerpc: FreeBSD kernel compatibility cleanup

Adjust FreeBSD kernel backward compatibility list

Reviewed by: jhibbits, pkubaj
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D33421

2 years agoRework the arm64 sigtramp code to be a trampoline
Andrew Turner [Wed, 29 Dec 2021 17:40:42 +0000 (17:40 +0000)]
Rework the arm64 sigtramp code to be a trampoline

To help with switching to a vdso sigtramp switch to passing through the
sigcode function when entering a signal. This ensures the return address
is within the function.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33690

2 years agobsddialog: new utility for TUI dialogs and widgets
Alfonso S. Siciliano [Sun, 6 Mar 2022 21:44:17 +0000 (22:44 +0100)]
bsddialog: new utility for TUI dialogs and widgets

Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D34101

2 years agotests: Fix the test plan for closefrom_test
Mark Johnston [Sun, 6 Mar 2022 17:56:33 +0000 (12:56 -0500)]
tests: Fix the test plan for closefrom_test

Fixes: f3f3e3c44d3b ("fd: add close_range(..., CLOSE_RANGE_CLOEXEC)")
Reported by: Jenkins

2 years agonetmap: add a tunable for the maximum number of VALE switches
Vincenzo Maffione [Sun, 6 Mar 2022 17:28:44 +0000 (17:28 +0000)]
netmap: add a tunable for the maximum number of VALE switches

The new dev.netmap.max_bridges sysctl tunable can be set in
loader.conf(5) to change the default maximum number of VALE
switches that can be created. Current defaults is 8.

MFC after: 2 weeks

2 years agonetmap: fix refcount bug in netmap allocator
Vincenzo Maffione [Sun, 6 Mar 2022 16:39:16 +0000 (16:39 +0000)]
netmap: fix refcount bug in netmap allocator

Symptom: when a single extmem memory region is provided to netmap
multiple times, for multiple interfaces, the memory region is
never released by netmap once all the existing file descriptors
are closed.

Fix the relevant condition in netmap_mem_drop(): release the memory
when the last user of netmap_adapter is gone, rather then when
the last user of netmap_mem_d is gone.

MFC after: 2 weeks

2 years agolibc __sfvwrite(): roll back FILE buffer pointer on fflush error
Konstantin Belousov [Sun, 6 Mar 2022 08:59:39 +0000 (10:59 +0200)]
libc  __sfvwrite(): roll back FILE buffer pointer on fflush error

__sfvwrite() advances the pointer before calling fflush.  If fflush()
fails, it is not enough to roll back inside it, because we cannot know
how much was advanced by the caller.

Reported by: Peter <pmc@citylink.dinoex.sub.org>
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Fixes: 86a16ada1ea608408cec370171d9f59353e97c77

2 years agobuf_alloc(): Stop using LK_NOWAIT, use LK_NOWITNESS
Konstantin Belousov [Wed, 16 Feb 2022 15:30:17 +0000 (17:30 +0200)]
buf_alloc(): Stop using LK_NOWAIT, use LK_NOWITNESS

Despite the buffer taken from cache or free list, it still can be
locked, due to 'lockless lookup' in getblkx() potentially operating on
the freed buffers.  The lock is transient, but prevents the use of
LK_NOWAIT there for the goal of neutralizing WITNESS.

Just use LK_NOWITNESS.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agossh: regen sk_config.h after 73104d583850
Ed Maste [Sun, 6 Mar 2022 00:59:51 +0000 (19:59 -0500)]
ssh: regen sk_config.h after 73104d583850

2 years agossh: generate SK config file using private cbor and fido2 libs
Ed Maste [Tue, 1 Mar 2022 21:39:16 +0000 (16:39 -0500)]
ssh: generate SK config file using private cbor and fido2 libs

Specify -lprivatecbor and -lprivatefido2 in OpenSSH's configure.ac, and
pass -I paths to libcbor and libfido2's contrib src location.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34440

2 years agoDelete a blank that messed up punctuation.
Jens Schweikhardt [Sat, 5 Mar 2022 21:52:52 +0000 (22:52 +0100)]
Delete a blank that messed up punctuation.

2 years ago/etc/hosts: Wording changes to better match RFC 1918
Pedro F. Giffuni [Mon, 28 Feb 2022 04:07:34 +0000 (23:07 -0500)]
/etc/hosts: Wording changes to better match RFC 1918

Summary: No functional change.

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D34391

2 years agoahci/siis/mvs: Fix panics after 3394d4239b.
Alexander Motin [Sat, 5 Mar 2022 01:49:05 +0000 (20:49 -0500)]
ahci/siis/mvs: Fix panics after 3394d4239b.

Full CCB header overwrites made frees go into wrong zones, causing
kernel panics.  Instead of copying full header use xpt_setup_ccb(),
since the only field I see used from all the header is target_id.

PR: 262263

2 years agolibbsddialog: Add _XOPEN_SOURCE_EXTENDED for widechar form
Alfonso S. Siciliano [Sat, 5 Mar 2022 01:20:37 +0000 (02:20 +0100)]
libbsddialog: Add _XOPEN_SOURCE_EXTENDED for widechar form

Add _XOPEN_SOURCE_EXTENDED to use curses' get_wch() and to avoid a
building error after next "bsddialog 0.2" import.

Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D34419

2 years agox86: Defer early TSC timecounter calibration to SI_SUB_CPU
Mark Johnston [Sat, 5 Mar 2022 00:34:43 +0000 (19:34 -0500)]
x86: Defer early TSC timecounter calibration to SI_SUB_CPU

If we can't determine the TSC frequency using CPU registers, we need to
give a chance for Hyper-V drivers to register a timecounter (during
SI_SUB_HYPERVISOR) since an emulated 8254 might not be available.
Thus, split probe_tsc_freq() into early and late stages, and wait until
the latter to attempt calibration using a reference clock.

Fixes: 84369dd52369 ("x86: Probe the TSC frequency earlier")
Reported and tested by: khng, Shawn Webb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34444

2 years agoamd64: Call clock_init() after finishidentcpu()
Mark Johnston [Sat, 5 Mar 2022 00:32:39 +0000 (19:32 -0500)]
amd64: Call clock_init() after finishidentcpu()

As in commit c3d830cf7c71, we should finalize CPU identification before
probing the TSC frequency.

Fixes: 84369dd52369 ("x86: Probe the TSC frequency earlier")
Reported by: khng

2 years agoUse _Noreturn (C11; GNU89) properly
Alejandro Colomar [Sat, 5 Mar 2022 00:25:22 +0000 (01:25 +0100)]
Use _Noreturn (C11; GNU89) properly

A function that returns with no value is a different thing from a
function that doesn't return at all.  Those are two orthogonal
concepts, commonly confused.

pthread_create(3) expects a pointer to a start routine that has a
very precise prototype:

    void *(*start_routine)(void *);

However, other thread functions, such as kernel ones, expect:

    void (*start_routine)(void *);

Providing a different one is incorrect, and has only been working
because the ABIs happen to produce a compatible function.

We should use '_Noreturn void', since it's the natural type, and
then provide a '_Noreturn void *' wrapper for pthread functions.

For consistency, replace most cases of __NORETURN or
__attribute__((noreturn)) by _Noreturn.  _Noreturn is understood
by -std=gnu89, so it should be safe to use everywhere.

Ref: https://github.com/openzfs/zfs/pull/13110#discussion_r808450136
Ref: https://software.codidact.com/posts/285972
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Closes #13120

2 years agoice(4): Fix build error when ALTQ is enabled
Eric Joyner [Fri, 4 Mar 2022 22:11:14 +0000 (14:11 -0800)]
ice(4): Fix build error when ALTQ is enabled

The previous commit (56429daea2) that updated the driver included a
bug where a variable was undefined when ALTQ was enabled; this fixes
that issue to declare the missing variable. This wasn't caught before
because we don't use ALTQ, and so it fell on the Jenkins CI's LINT
builds to catch it.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reported by: Jenkins CI
MFC after: 3 days
MFC with: 56429daea2
Sponsored by: Intel Corporation

2 years agozpool: main: list: don't pay for printf
наб [Sun, 20 Feb 2022 03:06:02 +0000 (04:06 +0100)]
zpool: main: list: don't pay for printf

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13125

2 years agozpool: main: list: -v: update dash spacing for special vdevs
наб [Sun, 20 Feb 2022 03:32:07 +0000 (04:32 +0100)]
zpool: main: list: -v: update dash spacing for special vdevs

Before:
nabijaczleweli@tarta:~/store/code/zfs$ /sbin/zpool list -v file
NAME                                                    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
file                                                    118G   150K   118G        -         -     0%     0%  1.00x    ONLINE  -
  /mnt/filling/store/nabijaczleweli/code/zfs/file      39.5G      0  39.5G        -         -     0%  0.00%      -    ONLINE
dedup                                                      -      -      -        -         -      -      -      -  -
  /mnt/filling/store/nabijaczleweli/code/zfs/adedup    39.5G      0  39.5G        -         -     0%  0.00%      -    ONLINE
special                                                    -      -      -        -         -      -      -      -  -
  /mnt/filling/store/nabijaczleweli/code/zfs/aspecial  39.5G   150K  39.5G        -         -     0%  0.00%      -    ONLINE
logs                                                       -      -      -        -         -      -      -      -  -
  /mnt/filling/store/nabijaczleweli/code/zfs/alog      39.5G      0  39.5G        -         -     0%  0.00%      -    ONLINE
cache                                                      -      -      -        -         -      -      -      -  -
  /mnt/filling/store/nabijaczleweli/code/zfs/acache    40.0G  1.50K  40.0G        -         -     0%  0.00%      -    ONLINE
spare                                                      -      -      -        -         -      -      -      -  -
  /mnt/filling/store/nabijaczleweli/code/zfs/aspare        -      -      -        -         -      -      -      -     AVAIL

After:
nabijaczleweli@tarta:~/store/code/zfs$ cmd/zpool/zpool list -v file
NAME                                                    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
file                                                    118G   150K   118G        -         -     0%     0%  1.00x    ONLINE  -
  /mnt/filling/store/nabijaczleweli/code/zfs/file      39.5G      0  39.5G        -         -     0%  0.00%      -    ONLINE
dedup                                                      -      -      -        -         -      -      -      -         -
  /mnt/filling/store/nabijaczleweli/code/zfs/adedup    39.5G      0  39.5G        -         -     0%  0.00%      -    ONLINE
special                                                    -      -      -        -         -      -      -      -         -
  /mnt/filling/store/nabijaczleweli/code/zfs/aspecial  39.5G   150K  39.5G        -         -     0%  0.00%      -    ONLINE
logs                                                       -      -      -        -         -      -      -      -         -
  /mnt/filling/store/nabijaczleweli/code/zfs/alog      39.5G      0  39.5G        -         -     0%  0.00%      -    ONLINE
cache                                                      -      -      -        -         -      -      -      -         -
  /mnt/filling/store/nabijaczleweli/code/zfs/acache    40.0G  1.50K  40.0G        -         -     0%  0.00%      -    ONLINE
spare                                                      -      -      -        -         -      -      -      -         -
  /mnt/filling/store/nabijaczleweli/code/zfs/aspare        -      -      -        -         -      -      -      -     AVAIL

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13123
Closes #13125