Commit Graph

287894 Commits

Author SHA1 Message Date
Gleb Smirnoff cfb1e92912 sockets: don't malloc/free sockaddr memory on accept(2)
Let the accept functions provide stack memory for protocols to fill it in.
Generic code should provide sockaddr_storage, specialized code may provide
smaller structure.

While rewriting accept(2) make 'addrlen' a true in/out parameter, reporting
required length in case if provided length was insufficient.  Our manual
page accept(2) and POSIX don't explicitly require that, but one can read
the text as they do.  Linux also does that. Update tests accordingly.

Reviewed by:		rscheff, tuexen, zlei, dchagin
Differential Revision:	https://reviews.freebsd.org/D42635
2023-11-30 08:30:55 -08:00
Richard Scheffenegger 34c45bc6a3 tcp: enable LRD by default
Lost Retransmission Detection was added as a
feature in May 2021, but disabled by default.

Enabling the feature by default to reduce the
flow completion time by avoiding RTOs when
retransmissions get lost too.

Reviewed By:           tuexen, #transport, zlei
MFC after:             10 weeks
Sponsored by:          NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D42845
2023-11-30 05:38:16 +01:00
Andrew Turner 839999e7ef vm: Add kva_alloc_aligned
Add a function like kva_alloc that allows us to specify the alignment
of the virtual address space returned.

Reviewed by:	alc, kib, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42788
2023-11-30 10:50:03 +00:00
Andrew Turner 8daee410d2 vm: Use vmem_xalloc in kva_alloc
The kernel_arena used in kva_alloc has the qcache disabled. vmem_alloc
will first try to use the qcache before falling back to vmem_xalloc.

Rather than trying to use the qcache in vmem_alloc just call
vmem_xalloc directly.

Reviewed by:	alc, kib, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42831
2023-11-30 10:50:03 +00:00
Jamie Gritton 51e7276365 Unbreak build from ed31b3f4a1 (misapplied diff).
Differential Revision:	<https://reviews.freebsd.org/D28150
2023-11-29 17:27:37 -08:00
Jamie Gritton ed31b3f4a1 jail: Don't allow jail_set(2) to resurrect dying jails.
Currently, a prison in "dying" state (removed but still holding
resources) can be brought back to alive state via "jail -d", or
the JAIL_DYING flag to jail_set(2).  This seemed like a good idea
at the time.

Its main use was to improve support for specifying the jid when
creating a jail, which also seemed like a good idea at the time.
But resurrecting a jail that was partway through thr process of
shutting down is trouble waiting to happen.

This patch deprecates that flag, leaving it as a no-op for creating
jails (but still useful for looking at dying jails).  It sill allows
creating a new jail with the same jid as a dying one, but will renumber
the old one in that case.  That's imperfect, but allows for current
behavior.

Reviewed by:	bz
Differential Revision:	https://reviews.freebsd.org/D28150
2023-11-29 16:12:13 -08:00
Stephen J. Kiernan 376330aca1 smbus: add compat32 support for SMB ioctls
Some of the SMB ioctl request structures contain pointers and need to
handle requests from 32-bit applications on 64-bit kernels.

Obtained from:	Juniper Networks, Inc.
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D42837
2023-11-29 18:15:09 -05:00
Martin Matuska 525fe93dc7 zfs: merge openzfs/zfs@a03ebd9be
Notable upstream pull request merges:
 #15517 2a27fd411 ZIL: Assert record sizes in different places
 #15557 b94ce4e17 module/icp/asm-arm/sha2: fix compiling on armv5/6
 #15557 4340f69be module/icp/asm-arm/sha2: auto detect __ARM_ARCH
 #15603 a03ebd9be ZIL: Call brt_pending_add() replaying TX_CLONE_RANGE
 #15606 1c38cdfe9 zdb: fix printf() length for uint64_t devid

Obtained from:	OpenZFS
OpenZFS commit:	a03ebd9bee
2023-11-29 23:08:25 +01:00
Dag-Erling Smørgrav b70e57be2c tail: Clean up error messages.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D42842
2023-11-29 22:49:44 +01:00
Dag-Erling Smørgrav 621f45532c tail: Fix heap overflow in -F case.
The number of events we track can vary over time, but we only allocate
enough space for the exact number of events we are tracking when we
first begin, resulting in a trivially reproducable heap overflow.  Fix
this by allocating enough space for the greatest possible number of
events (two per file) and clean up the code a bit.

Also add a test case which triggers the aforementioned heap overflow,
although we don't currently have a way to detect it.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude, markj
Differential Revision:	https://reviews.freebsd.org/D42839
2023-11-29 22:49:38 +01:00
Bjoern A. Zeeb b647615ede iwlwififw: add firmware for the Bz/B200 chipset
The iwlwifi driver already supports the chipset as "Bz TBD"
(also in 14.0).  Add the firmware for it.  Successfully tested
for 0x8086/0x272b/0x8086/0x00f4 on arm64 thanks to donated
hardware [1].

    Firmware was obtained from linux-firmware at
    9552083a783e5e48b90de674d4e3bf23bb855ab0 .

Sponsored by:	The FreeBSD Foundation
Sponsored by:	Martin Hoehne / minipci.biz (B200 card) [1]
MFC after:	3 days
2023-11-29 21:42:36 +00:00
Jean-Sébastien Pédron b292c995cf
linuxkpi: Include <linux/rbtree.h> from <linux/hrtimer.h> and <linux/mm_types.h>
[Why]
Some files in DRM rely on this indirect include to use `struct rb_*`.

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D42835
2023-11-29 19:54:48 +01:00
Jean-Sébastien Pédron 40c20fc29c
vt(4): Call post-switch callback after replacing the backend
[Why]
For instance, it gives a chance to the new backend to refresh the
screen. This is needed by the vt_drmfb backend and `drm_fb_helper`.

This change was lost when I posted changes to reviews.freebsd.org and it
broken the amdgpu driver... Thanks to manu@ for reporting the problem
and wulf@ to find out the missing change!

Tested by:	manu
Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D42834
2023-11-29 19:54:14 +01:00
Alexander Motin a03ebd9bee
ZIL: Call brt_pending_add() replaying TX_CLONE_RANGE
zil_claim_clone_range() takes references on cloned blocks before ZIL
replay.  Later zil_free_clone_range() drops them after replay or on
dataset destroy.  The total balance is neutral.  It means on actual
replay we must take additional references, which would stay in BRT.

Without this blocks could be freed prematurely when either original
file or its clone are destroyed.  I've observed BRT being emptied
and the feature being deactivated after ZIL replay completion, which
should not have happened.  With the patch I see expected stats.

Reviewed-by: Kay Pedersen <mail@mkwg.de>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #15603
2023-11-29 10:51:34 -08:00
John Baldwin f54a3890b1 x86: Support multiple PCI MCFG regions
In particular, this enables support for PCI config access for domains
(segments) other than 0.

Reported by:	cperciva
Tested by:	cperciva (m7i.metal-48xl AWS instance)
Reviewed by:	imp
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D42828
2023-11-29 10:32:39 -08:00
John Baldwin 9893a4fd31 x86: Refactor pcie_cfgregopen
Split out some bits of pcie_cfgregopen that only need to be executed
once into helper functions in preparation for supporting multiple MCFG
entries.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42829
2023-11-29 10:32:16 -08:00
John Baldwin 1587a9db92 pci_cfgreg: Add a PCI domain argument to the low-level register API
This commit changes the API of pci_cfgreg(read|write) to add a domain
argument (referred to as a segment in ACPI parlance) (note that this
is not the same as a NUMA domain, but something PCI-specific).  This
does not yet enable access to domains other than 0, but updates the
API to support domains.

Places that use hard-coded bus/slot/function addresses have been
updated to hardcode a domain of 0.  A few places that have the PCI
domain (segment) available such as the acpi_pcib_acpi.c Host-PCI
bridge driver pass the PCI domain.

The hpt27xx(4) and hptnr(4) drivers fail to attach to a device not on
domain 0 since they provide APIs to their binary blobs that only
permit bus/slot/function addressing.

The x86 non-ACPI PCI bus drivers all hardcode a domain of 0 as they do
not support multiple domains.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42827
2023-11-29 10:31:47 -08:00
John Baldwin 71ac18a84d agp_amd64: Use <machine/pci_cfgreg.h> rather than bare prototypes
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42826
2023-11-29 10:31:16 -08:00
Wraithh 8adf2e3066
Fix zoneid when USER_NS is disabled
getzoneid() should return GLOBAL_ZONEID instead of 0 when USER_NS is disabled.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ilkka Sovanto <github@ilkka.kapsi.fi>
Closes #15560
2023-11-29 09:55:17 -08:00
VaibhavB 7d68900af3
ZTS: get_persistent_disk_name can return truncated names
Instead of using only the 3rd element return the entire string after 
the split to handle device names with dashes.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Vaibhav Bhanawat <vaibhav.bhanawat@delphix.com>
Closes #15567
2023-11-29 09:34:29 -08:00
Martin Matuška 1c38cdfe98
zdb: fix printf() length for uint64_t devid
Bug introduced in 213d682967.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Warner Losh <imp@FreeBSD.org>
Signed-off-by: Martin Matuska <mm@FreeBSD.org>
Closes #15606
2023-11-29 09:18:30 -08:00
Igor Ostapenko 0626d30e41 pf: fix mem leaks upon vnet destroy
Add missing cleanup actions:
- remove user defined anchor rulesets
- remove user defined ether anchor rulesets
- remove tables linked to user defined anchors
- deal with wildcard anchor peculiarities to get them removed correctly

PR:		274310
Reviewed by:	kp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42747
2023-11-29 17:59:28 +01:00
Mark Johnston 5c0dac0b7a ossl: Keep mutable AES-GCM state on the stack
ossl(4)'s AES-GCM implementation keeps mutable state in the session
structure, together with the key schedule.  This was done for
convenience, as both are initialized together.  However, some OCF
consumers, particularly ZFS, assume that requests may be dispatched to
the same session in parallel.  Without serialization, this results in
incorrect output.

Fix the problem by explicitly copying per-session state onto the stack
at the beginning of each operation.

PR:		275306
Reviewed by:	jhb
Fixes:		9a3444d91c ("ossl: Add a VAES-based AES-GCM implementation for amd64")
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42783
2023-11-29 12:55:51 -05:00
Warner Losh db0a4f2d7a openzfs: unbreak 32-bit builds.
32-bit builds are broken. fix that by using PRIu64 instead of a
bare '%lu.'

Feel free to revert when upstream has this fixed. I'm agnostic as to the
proper fix, but don't have the time to fight upstreaming this on top of
everything else.
2023-11-29 08:26:29 -07:00
Alan Somers d565784a7e zfsd: fault disks that generate too many I/O delay events
If ZFS reports that a disk had at least 8 I/O operations over 60s that
were each delayed by at least 30s (implying a queue depth > 4 or I/O
aggregation, obviously), fault that disk.  Disks that respond this
slowly can degrade the entire system's performance.

MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	delphij
Differential Revision: https://reviews.freebsd.org/D42825
2023-11-29 07:51:11 -07:00
Warner Losh 272a406042 mpi3mr: Minor tweak to task queue pausing
Use a while loop with cancel / drain to make sure that all tasks have
completed before proceeding to reset.

Suggested by:		jhb
Sponsored by:		Netflix
2023-11-28 18:52:28 -07:00
Warner Losh 1ec7c672bc mpi3mr: Assume dma_hiaddr is BUS_SPACE_MAXADDR
No sense having a variable for this. So use BUS_SPACE_MAXADDR and remove
dma_hiaddr from softc.

Suggested by:		jhb
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D42808
2023-11-28 18:52:28 -07:00
Warner Losh 2361a0056f mpi3mr: Replace can't happen DataLength == 0 with an assert
Replace the test for DataLength == 0 with an assert. It can't happen,
but an assert doesn't hurt. Emacs removed some trailing white space too.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D42807
2023-11-28 18:52:28 -07:00
Alexander Motin 489eee0d41 mpi3mr: Use template for main busdma tag.
Use the simpler template code for the parent busdma tag for all I/O to
this card.

Reviewed by:		mav, jhb, imp
Differential Revision:	https://reviews.freebsd.org/D42607
2023-11-28 18:52:23 -07:00
Alexander Motin 39a3e6a812 mpi3mr: Make these bus_dmamap_load calls synchronous
These calls "should" all be synchrounous. There's no bouncing that's
needed for them (at least in the typical case that we have a sane card
that has more bits of dma addresses decoded than we have memory), so
there's no errors possible. Ensure these calls are really synchronous
with BUS_DMA_NOWAIT flags (which should never fail now that the
bus_dmamem_alloc() has succeeded).

Reviewed by:		mav, jhb, imp
Differential Revision:	https://reviews.freebsd.org/D42606
2023-11-28 18:52:16 -07:00
Alexander Motin 4e6d128bd8 mpi3mr: Fix MAXPHYS usage
This usage is obsolete. Replace with maximum bus space size. maxphys
will sort itself out at higher levels.

Reviewed by:		mav, jhb, imp
Differential Revision:	https://reviews.freebsd.org/D42605
2023-11-28 18:52:08 -07:00
Warner Losh 28a274342e mpi3mr: Add firmware version
Publish the firmware version on the card like we do for mps/mpr.

Sponsored by:		Netflix
Reviewed by:		mav
Differential Revision:	https://reviews.freebsd.org/D42588
2023-11-28 18:50:10 -07:00
Warner Losh ee7c431c49 mpi3mr: Trivial trailing white space reduction
Sponsored by:		Netflix
2023-11-28 18:49:56 -07:00
Warner Losh 91d961356d mpi3mr: Honor the dma mask from IOCFacts
The number of signficant bits that are decoded are returned in the flags
field of the IOCFacts structure from the device.  Rather than assume the
worst with a pessimal 32-bit maximum, look at this value and pass it
along to all the dma map creation requests.

A lof of those creations are repetitive and could just inherit from the
base tag if we moved to the templated interface.  This is called out as
desireable future work not done at this time.

In addition, due to a chicken and an egg problem, we have to allocate
some of the maps with a 32-bit loaddr.  These are the ones we need to
read iocfacts.  And they are fine to be so restricted: they are little
used after startup, and when they are used, bouncing is fine.

Sponsored by:		Netflix
Reviewed by:		mav
Differential Revision:	https://reviews.freebsd.org/D42559
2023-11-28 18:49:49 -07:00
Warner Losh 3208a189c1 mpi3mr: Fix EINPROGRESS errors hanging the card
Move enqueueing of commands to bus_dmamap_load_ccb callback

Fix fundamental difference between FreeBSD and Linux. On Linux, your dma
load callback always happends before it returns, so drivers are written
to load the map, then submit to hardware. On FreeBSD, the callback may
be deferred and return EINPROGRESS. This means the callback is
responsible for queueing the request to the hardware is done after the
SGL list is created. Make a number of interrelated cahnages:

At the end of mpi3mr_prepare_sgls, add a call to mpi3mr_enqueue_request.

Split the hardware submission out from the end of mpi3mr_action_scsiio
and move it into a new routine mpi3mr_enqueue_request.

Move all error completion from the end of mpi3mr_action_scsiio to where
the error is detected. We cannot pass errors back from the
mpi3mr_enqueue_request to do this on a 'failed' mpi3mr in a centralized
place (since it has to be fire and forget).

Add comments about zero length SGLs never making it into
mpi3mr_prepare_sgls. Keep the code there for the moment, but we only set
cm->data to non-NULL when scsiio_req->DataLength is not zero. So the
datalength can't be zero and we can't send the zero SGLs.

Add commentts about other "impossible" tests in mpi3mr_prepare_sgls that
really should be simple asserts of some flavor.

Eliminate cm->error_code, since we can't pass data back from the
mpi3mr_prepare_sgl callback anymore.

In mpi3mr_map_request, call mpi3mr_enqueue_request for the no data case.
This seems to work even though we've not done the special zero length
handling that was in mpi3mr_prepare_sgls, giving further evidence to it
not actually being needed. This is needed for SCSI CDBs that have no
data to pass to the drive like TEST UNIT READY.

With this change, and the prior ones, we're now able to run with mpi3mr
on 128GB systems and very heavy disk load (so many buffers land > 4GB:
the driver instructs busdma to never use memory abouve 4GB, which may be
too conservative, but an issue for another time).

Sponsored by:		Netflix
Reviewed by:		sumit.saxena_broadcom.com, mav, jhb
Differential Revision:	https://reviews.freebsd.org/D42543
2023-11-28 18:49:39 -07:00
Warner Losh cf8c23230a mpi3mr: Cleaup setting of status in processing scsiio requests
More uniformly use mpi3mr_set_ccbstatus in mpi3mr_action_scsiio.  The
routine mostly used it, but also has setting of status by hand. In those
cases where we want to error out the request, use this routine.

As part of this, move setting CAM_SIM_QUEUED later in the function to
when we're sure it's been queued. Remove the places we clear it before
this.

Sponsored by:		Netflix
Reviewed by:		mav, jhb
Differential Revision:	https://reviews.freebsd.org/D42542
2023-11-28 18:49:30 -07:00
Warner Losh 1cfd01111e mpi3mr: Only set callout_owned when we create a timeout
Since we assume there's a timeout to cancel when this is true, only set
it true when we set the timeout. Otherwise we may try to cancel a timeout
when there's been an error in submission.

Sponsored by:		Netflix
Reviewed by:		mav
Differential Revision:	https://reviews.freebsd.org/D42541
2023-11-28 18:49:24 -07:00
Warner Losh e2b27df9eb mpi3mr: Minor style fix
Fold two lines to make this more readable.

Sponsored by:		Netflix
Reviewed by:		mav, jhb
Differential Revision:	https://reviews.freebsd.org/D42540
2023-11-28 18:49:16 -07:00
Warner Losh 7c4913093a mpi3mr: Reduce the scope of the reset_mutext
Reduce the scope of reset_mutext to protect the msleep in the watch dog
thread as well as the MPI3MR_FLAGS_SHUTDOWN bit. Use it to protect the
wakeup in mpi3mr_detach so this thread can exit sooner when we're trying
to do an orderly shutdown. Optimize the flow to check the sleep and
other conditions before going to sleep.

It's an open question if this should protect sc->unrecoverable, and if
we should wakeup the watchdog thread when we set it. We might also want
to move too booleans for the three flags that we have now in
mpi3mr_flags. There are a number of U8s that should really be bools and
we might want to also group them together to pack softc better.

Sponsored by:		Netflix
Reviewed by:		mav
Differential Revision:	https://reviews.freebsd.org/D42539
2023-11-28 18:49:08 -07:00
Warner Losh a2b046620c mpi3mr: Remove unused fields in struct mpi3mr_cmd
All of these fields are either unused, or just initialized. Remove
them. This saves about 1MB of memory for the cards that I have which can
do 8k transactions at once.

Sponsored by:		Netflix
Reviewed by:		mav, jhb
Differential Revision:	https://reviews.freebsd.org/D42538
2023-11-28 18:49:01 -07:00
Warner Losh b411372b7d mpi3mr: Don't hold fwevt_lock over call to taskqueue_drain
Holding fwevt_lock when we call taskqueue_drain can lead to deadlock
because it's draining a queue needs fwevt_lock to do work, so that other
thread will try to take out the lock and block, making the thread never
finish and taskqueue_drain never complete. There's a witness
warning/error for this which was exposed when the lock was converted to
a MTX_DEF lock from a MTX_SPIN prior to committing to the FreeBSD tree.

The lock appears to be to protect against additional items being added
to the event list while we're doing a reset. Since the taskqueue is
blocked, items can get added to the list, but won't be processed during
the reset, but there is still a (likely small) race between the
taskqueue_drain and the taskqueue_block calls where an interrupt could
fire on another CPU, resulting in a task being enqueued and started
before the block can take effect. The only way to fix that race is to
turn off interrupt processing during a reset. So we replace a deadlock
with a smaller race.

Sponsored by:		Netflix
Reviewed by:		sumit.saxena_broadcom.com, mav, jhb
Differential Revision:	https://reviews.freebsd.org/D42537
2023-11-28 18:48:48 -07:00
Konstantin Belousov 0964743013 sys/sys: Remove some more vestiges of the $FreeBSD$
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42824
2023-11-29 01:03:56 +02:00
Jose Luis Duran 1db64f8936
netlink: Add tests when adding an interface route
Add tests for adding a route using an interface only (without an IP
address).

Reviewed by:	rcm
Approved by:	kp (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41436
2023-11-28 16:53:00 -05:00
Alexander Motin 2a27fd4111
ZIL: Assert record sizes in different places
This should make sure we have log written without overflows.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #15517
2023-11-28 13:35:14 -08:00
Shengqi Chen b94ce4e17d module/icp/asm-arm/sha2: fix compiling on armv5/6
The `adr` insn in neon kernel generates an compiling
error on armv5/6 target. Fix that by using `ldr`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Closes #15557
2023-11-28 13:26:12 -08:00
Shengqi Chen 4340f69be1 module/icp/asm-arm/sha2: auto detect __ARM_ARCH
This patch uses __ARM_ARCH set by compiler (both
GCC and Clang have this) whenever possible instead
of hardcoding it to 7. This change allows code to
compile on earlier ARM architectures such as armv5te.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Closes #15557
2023-11-28 13:25:44 -08:00
R. Christian McDonald ca7edd0d2c
route: introduce add interface route test cases
As a followup to D41330 and D41436, this patch introduces two new tests
for sbin/route: interface_route_v[46].

These tests fail without D41330.

Reviewed by:	kp
Approved by:	kp (mentor)
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-11-28 16:16:25 -05:00
KUROSAWA Takahiro f818559774
netlink: fix adding an interface route
route add <host> -iface <netif>" for a netif without an IPv4/IPv6
address fails with EINVAL. Need to use a link-level ifaddr for gw if
an ifaddr for dst is not found as the rtsock-based implementation does.

PR:		275341
Reported by:	Sean Cody <sean@tinfoilhat.ca>
Reviewed by:	rcm
Tested by:	rcm
Approved by:	kp (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41330
2023-11-28 16:11:55 -05:00
Martin Matuska 2276e53940 zfs: merge openzfs/zfs@688514e47
Notable upstream pull request merges:
 #15532 c1a47de86 zdb: Fix zdb '-O|-r' options with -e/exported zpool
 #15535 cf3316633 ZVOL: Minor code cleanup
 #15541 803a9c12c brt: lift internal definitions into _impl header
 #15541 213d68296 zdb: show BRT statistics and dump its contents
 #15543 a49087510 ZIL: Refactor TX_WRITE encryption similar to
                  TX_CLONE_RANGE
 #15543 27d8c23c5 ZIL: Do not encrypt block pointers in lr_clone_range_t
 #15549 67894a597 unnecessary alloc/free in dsl_scan_visitbp()
 #15551 126efb588 FreeBSD: Fix the build on FreeBSD 12
 #15563 acb33ee1c FreeBSD: Fix ZFS so that snapshots under .zfs/snapshot are
                  NFS visible
 #15564 7bbd42ef4 Don't allow attach to a raidz child vdev
 #15566 688514e47 dmu_buf_will_clone: fix race in transition back to NOFILL
 #15571 30d581121 dnode_is_dirty: check dnode and its data for dirtiness

Obtained from:	OpenZFS
OpenZFS commit:	688514e470
2023-11-28 21:35:58 +01:00
Mike Karels cd201c0908 ifconfig: add -D option to print driver name for interface
Add -D option to add the drivername and unit number to ifconfig output
for normal display, including -a.  Use ifconfig_get_orig_name() from
libifconfig to fetch the name.  Note that this is the original name
for many drivers, but not for some exceptions like epair (which appends
'a' or 'b' to the unit number).  epair interface pairs both display
as "epair0", etc.  Make -v imply -D; might as well be fully verbose.

MFC after:	1 week
Reviewed by:	zlei, kp
Differential Revision:	https://reviews.freebsd.org/D42721
2023-11-28 13:47:37 -06:00