With gcc we are seeing the following -Werror warning:
In file included from /workspace/src/sys/contrib/openzfs/include/os/freebsd/spl/sys/sunddi.h:28,
from /workspace/src/sys/contrib/openzfs/include/sys/zfs_context.h:69:
In function 'zfs_uio_init',
inlined from 'zio_do_crypt_data' at /workspace/src/sys/contrib/openzfs/module/os/freebsd/zfs/zio_crypt.c:1690:2:
/workspace/src/sys/contrib/openzfs/include/os/freebsd/spl/sys/uio.h:102:45: error: 'puio_s.uio_offset' is used uninitialized [-Werror=uninitialized]
102 | zfs_uio_soffset(uio) = uio_s->uio_offset;
| ~~~~~^~~~~~~~~~~~
/workspace/src/sys/contrib/openzfs/module/os/freebsd/zfs/zio_crypt.c: In function 'zio_do_crypt_data':
/workspace/src/sys/contrib/openzfs/module/os/freebsd/zfs/zio_crypt.c:1683:20: note: 'puio_s' declared here
1683 | struct uio puio_s, cuio_s;
| ^~~~~~
In function 'zfs_uio_init',
inlined from 'zio_do_crypt_data' at /workspace/src/sys/contrib/openzfs/module/os/freebsd/zfs/zio_crypt.c:1691:2:
/workspace/src/sys/contrib/openzfs/include/os/freebsd/spl/sys/uio.h:102:45: error: 'cuio_s.uio_offset' is used uninitialized [-Werror=uninitialized]
102 | zfs_uio_soffset(uio) = uio_s->uio_offset;
| ~~~~~^~~~~~~~~~~~
/workspace/src/sys/contrib/openzfs/module/os/freebsd/zfs/zio_crypt.c: In function 'zio_do_crypt_data':
/workspace/src/sys/contrib/openzfs/module/os/freebsd/zfs/zio_crypt.c:1683:28: note: 'cuio_s' declared here
1683 | struct uio puio_s, cuio_s;
| ^~~~~~
Indeed, `zfs_uio_init()` does:
static __inline void
zfs_uio_init(zfs_uio_t *uio, struct uio *uio_s)
{
memset(uio, 0, sizeof (zfs_uio_t));
if (uio_s != NULL) {
GET_UIO_STRUCT(uio) = uio_s;
zfs_uio_soffset(uio) = uio_s->uio_offset;
}
}
while the code in `zio_crypt.c` has:
/*
* Primary encryption / decryption entrypoint for zio data.
*/
int
zio_do_crypt_data(boolean_t encrypt, zio_crypt_key_t *key,
dmu_object_type_t ot, boolean_t byteswap, uint8_t *salt, uint8_t *iv,
uint8_t *mac, uint_t datalen, uint8_t *plainbuf, uint8_t *cipherbuf,
boolean_t *no_crypt)
{
int ret;
boolean_t locked = B_FALSE;
uint64_t crypt = key->zk_crypt;
uint_t keydata_len = zio_crypt_table[crypt].ci_keylen;
uint_t enc_len, auth_len;
zfs_uio_t puio, cuio;
struct uio puio_s, cuio_s;
uint8_t enc_keydata[MASTER_KEY_MAX_LEN];
crypto_key_t tmp_ckey, *ckey = NULL;
freebsd_crypt_session_t *tmpl = NULL;
uint8_t *authbuf = NULL;
zfs_uio_init(&puio, &puio_s);
zfs_uio_init(&cuio, &cuio_s);
memset(GET_UIO_STRUCT(&puio), 0, sizeof (struct uio));
memset(GET_UIO_STRUCT(&cuio), 0, sizeof (struct uio));
So between the declaration of `puio_s` and `cuio_s`, there is no
initialization of these variables before `zfs_uio_init()` gets called.
Similar to the Linux variant of zio_crypt.c, I think it would be better
to memset the structs `puio_s` and `cuis_s` _before_ calling
`zfs_uio_init()`.
Reviewed by: tsoome
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D47281
Notable upstream pull request merges:
#16598b4e4cbeb2 Always validate checksums for Direct I/O reads
#16603cefef28e9 vdev_id: multi-lun disks & slot num zero pad
#16613ab777f436 Return boolean_t in inline functions of
lib/libspl/include/sys/uio.h
#16616efeb60b86 FreeBSD: ignore some includes when not building kernel
#16617ca0141f32 zpool/zfs: restore -V & --version options
#166327bf525530 zpool/zfs: allow --json wherever -j is allowed
#166357e4be9275 zdb: fix printf format in dump_zap()
#1664048dfe3974 Fallback to strerror() when strerror_l() isn't available
#1665038a04f0a7 freebsd: Use compiler.h from FreeBSD's base's linuxkpi
#16664fba6a9069 zfs_debug: Restore log size limit for userspace
#16665fba6a9069 Fix compile-time warnings caused by duplicate struct
typedefs
#16667b2f6de7b5 zdb: show bp in uberblock dump
Obtained from: OpenZFS
OpenZFS commit: b2f6de7b58
Add a "zzz_fw_ports_fwget.sh" script to each LinuxKPI based wireless
driver which in essential are all the same and in detail all different.
The scripts have been referenced in fwget(8) sources since d33f5a0afa
but were never committed.
The scripts do the full job compared to `single-line-scripts` I tried to
use before to ease maintainance life. Some use hacks like calling cpp
and extracting bits from the output to piece them together over multiple
files. It will be left as an exercise for the future to see if what was
done (a longer while ago) for iwlwifi(4) would be a good idea for some
other drivers too, to have a FreeBSD-specific sysctl to export some of
the accumulated data in an easily processable way.
The scripts are written in the "perl spirit" -- "to get the job done" --
and not to be nice or neat or efficient. For that we do not need them
often enough or in any critical path. People are welcome to improve
them if they feel like.
I've used them for two version updates now and even if ports enforce
some other (manual) editing to keep support for multiple branches for
now they worked extremly well.
For the most the scripts extract 2 parts: PCI IDs and firmware name;
then they add "flavor"s to both and put the information together.
That output is then separated into:
- fwget(8) lines of PCI ID to port/package
wifi-firmware-${name}-kmod-${flavor} mappings and
- distfiles per flavor for the ports.
- For iwlwififw(4) we also generate the tables for the man page
(and the wiki) and hopefully the .Sh HARDWARE section for iwlwifi.4
soon too.
Depending on driver various other checks are done, e.g.,
- does the PCI ID have one or more firmware files/flavors associated,
- does the referenced firmware exist in the linux-firmware.git repo,
- are there duplicates,
- find the latest version of the firmware API.
Sponsored by: The FreeBSD Foundation
Suggested by: imp (to have automation in D44918)
MFC after: 3 days
Update the sysctl export (also adding a mapping function) to also
print (1) for all lines the "flavor" (device_family) name and (2)
also print lines where we only have the trans cfg and not iwl cfg
as with the flavor we can match PCI IDs to firmware package and so
we can have an increased number of matches.
A side effect is that we can also have fwget(8) PCI ID matches for
firmware (flavors) not yet (publicly) existing. That will allow
us to add them at a later point while a previous release already
supports the chipsets and knows how to get the firmware for them.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
The FreeBSD linux/compiler.h in OpenZFS was copied from a very old
version of FreeBSD's linuxkpi's linux/compiler.h. There's no need for
this duplication. Use FreeBSD's linuxkpi version instead, and provide
zfs_fallthrough to augment it (it's all that's needed). Use #pragma once
to avoid naming issues for guard variables. Since this is a complete
rewrite, use my copyright here (the original code in FreeBSD still
credits everybody).
Remove extra copies of macros that were defined elsewhere, but are now
properly defined in LinuxKPI so are redundant.
This is currently pull request #16650 upstream. Committing now to get
wider testing (make universe works, but historically doesn't catch all
errors).
Sponsored by: Netflix
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D47131
cherry pick 1eeff52124a45d5cd887ba5687bbad0116e4d211 from acpica:
SPCR: Update the SPCR table to version 4
The Microsoft Serial Port Console Redirection (SPCR) specification
revision 1.09 comprises additional fields [1]. The newly added fields
are:
- RISC-V SBI
- Precise Baud Rate
- NamespaceStringLength
- NamespaceStringOffset
- NamespaceString
Additionaly, this code will support up to SPCR revision 1.10, as it
includes only minor wording changes.
[1] https://learn.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table
Signed-off-by: Sia Jee Heng <jeeheng.sia@starfivetech.com>
On FreeBSDs we locally set bsddriver.name in struct pci_driver to have
the same name for all chipsets. This helps with, e.g., device
enumeration. For two chipsets the manual entry was missing.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Notable upstream pull request merges:
#9416 -multiple zio_compress: introduce max size threshold
#10018a10e552b9 Adding Direct IO Support
#15147e419a63bf xattr dataset prop: change defaults to sa
#154547e957fde7 send/recv: open up additional stream feature flags
#158100d77e738e Defer resilver only when progress is above a threshold
#159213cf2bfa57 Allocate zap_attribute_t from kmem instead of stack
#16483 -multiple dmu_objset: replace dnode_hash impl with cityhash4
#164858be2f4c3d zio_resume: log when unsuspending the pool
#1649188433e640 sys/types32.h: Remove struct timeval32 from libspl header
#16496f245541e2 zfs_file: implement zfs_file_deallocate for FreeBSD 14
#16511308f7c2f1 Fix an uninitialized data access
#1652929c9e6c32 Fix handling of DNS names with '-' in them for sharenfs
#16531ddf5f34f0 Avoid fault diagnosis if multiple vdevs have errors
#165396f50f8e16 zfs_log: add flex array fields to log record structs
#16546d40d40913 Evicting too many bytes from MFU metadata
#165513014dcb76 Reduce and handle EAGAIN errors on AIO label reads
#1655480645d658 FreeBSD: restore zfs_znode_update_vfs()
#16565832f66b21 FreeBSD: Sync taskq_cancel_id() returns with Linux
#1656748d1be254 Properly release key in spa_keystore_dsl_key_hold_dd()
#16569141368a4b Restrict raidz faulted vdev count
#16583c84a37ae9 lua: add flex array field to TString type
#1658486737c592 Avoid computing strlen() inside loops
#16587d34d4f97a snapdir: add 'disabled' value to make .zfs inaccessible
#16593224393a32 feature: large_microzap
#16597412105977 Temporarily disable Direct IO by default
#166054ebe674d9 ARC: Cache arc_c value during arc_evict()
Backported pull request merges:
#16613ab777f436 Return boolean_t in inline functions of
lib/libspl/include/sys/uio.h
#16616efeb60b86 FreeBSD: ignore some includes when not building kernel
#16635 ---TBD--- zdb: fix printf format in dump_zap()
Obtained from: OpenZFS
OpenZFS commit: b109925820
OpenZFS tag: 2.3.0-rc1
These are all local diffs that have no functional change.
Reviewed by: mav, emaste
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D46530
The change of its description from integer to boolean didn't actually
change it to a boolean, but only made it impossible to set as either
a boolean or an integer.
Rather than make it work as a boolean parameter should, just revert
to the old (working) integer parameter, and change the documentation
to match.
PR: 274263
Reported by: andrew.hotlab at hotmail
Ignoring page_pools with the few needed adjustments and ignoring 7622
mt7615 seems to build as well. Add it so once we can connect it to
the build people can start testing and debugging.
(The actual work was done on a newer version of the mt76 drivers but
it seems the to-build-changes equally apply here already).
Requested by: Radu-Cristian Fotescu (freebsd-wireless, 2024-07-31)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
sys/types32.h: Remove struct timeval32 from libspl's header (#16491)
macOS Sequoia's sys/sockio.h, as included by various bootstrap tools
whilst building FreeBSD, has started to include net/if.h, which then
includes sys/_types/_timeval32.h and provide a conflicting definition
for struct timeval32. Since this type is entirely unused within OpenZFS,
simply delete the type rather than adding in some kind of OS detection.
This fixes building FreeBSD on macOS Sequoia (Beta).
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
MFC after: 1 week
Notable upstream pull request merges:
#15892 -multiple Fast Dedup: Introduce the FDT on-disk format and feature flag
#15893 -multiple Fast Dedup: “flat” DDT entry format
#15895 -multiple Fast Dedup: FDT-log feature
#162396be8bf555 zpool: Provide GUID to zpool-reguid(8) with -g
#16277 -multiple Fast Dedup: prune unique entries
#163165807de90a Fix null ptr deref when renaming a zvol with snaps and snapdev=visible
#1634377a797a38 Enable L2 cache of all (MRU+MFU) metadata but MFU data only
#1644683f359245 FreeBSD: fix build without kernel option MAC
#16449963e6c9f3 Fix incorrect error report on vdev attach/replace
#16505b10992582 spa_prop_get: require caller to supply output nvlist
Obtained from: OpenZFS
OpenZFS commit: b109925820
All callers to spa_prop_get() and spa_prop_get_nvlist() supplied their
own preallocated nvlist (except ztest), so we can remove the option to
have them allocate one if none is supplied.
This sidesteps a bug in spa_prop_get(), where the error var wasn't
initialised, which could lead to the provided nvlist being freed at the
end.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
(cherry picked from commit 366d6fecf6bb3c59668b0f3b89f2a610595f3d2f)
During unpacking, we ensure that we do not read beyond the
declared size. However, unpack uses a function that copies
null-terminated strings. Prior to this commit, if the last string
was not null-terminated, it could result in copying data into a
buffer smaller than the allocated size.
Security: FreeBSD-24:09.libnv
Security: CVE-2024-45288
Security: CAP-03
Reported by: Synacktiv
Sponsored by: The Alpha-Omega Project
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46138
Ensure that the calculation of size of array doesn't
overflow.
Security: FreeBSD-24:09.libnv
Security: CVE-2024-45287
Security: CAP-02
Reported by: Synacktiv
Reported by: Taylor R Campbell (NetBSD)
Sponsored by: The Alpha-Omega Project
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46131
When it's a I/O failure, we can still send admin commands. Separate out
the admin failures and flag them as such so that we can still send admin
commands on half-failed drives.
Fixes: 9229b3105d (nvme: Fail passthrough commands right away in failed state)
Sponsored by: Netflix
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes#16431
(cherry picked from commit 244ea5c488)
Notable upstream pull request merges:
#158175536c0dee Sync AUX label during pool import
#15889c7ada64bb ddt: dedup table quota enforcement
#1589062e7d3c89 ddt: add support for prefetching tables into the ARC
#15894e26b3771e spa_preferred_class: pass the entire zio
#15894d54d0fff3 dnode: allow storage class to be overridden by object type
#1619755427add3 Several improvements to ARC shrinking
#16217 -multiple JSON output for various zfs and zpool subcommands
#1624824e6585e7 libzfs.h: Set ZFS_MAXPROPLEN and ZPOOL_MAXPROPLEN
to ZAP_MAXVALUELEN
#162649dfc5c4a0 Fix long_free_dirty accounting for small files
#16268ed0db1cc8 Make txg_wait_synced conditional in zfsvfs_teardown,
for FreeBSD
#16288d60debbf5 Fix sa_add_projid to lookup and update SA_ZPL_DXATTR
#16308ec580bc52 zfs: add bounds checking to zil_parse
#16310c21dc56ea Fix zdb_dump_block for little endian
#163157ddc1f737 zil: add stats for commit failure/fallback
#16326b0bf14cdb abd: lift ABD zero scan from zio_compress_data()
to abd_cmp_zero()
#16337c8184d714 Block cloning conditionally destroy ARC buffer
#16338dbe07928b Add support for multiple lines to the sharenfs property
for FreeBSD
#163741a3e32e6a Cleanup DB_DNODE() macros usage
#16374ed87d456e Skip dnode handles use when not needed
#16346fb6d8cf22 Add some missing vdev properties
#16364670147be5 zvol: ensure device minors are properly cleaned up
#16382dea8fabf7 FreeBSD: Fix RLIMIT_FSIZE handling for block cloning
#16387aef452f10 Improve zfs_blkptr_verify()
#16395cbcb52243 Fix the names of some FreeBSD sysctls in
include/tunables.cfg
#164015b9f3b766 Soften pruning threshold on not evictable metadata
#16404cdd53fea1 FreeBSD: Add missing memory reclamation accounting
#164041fdcb653b Once more refactor arc_summary output
#164191f5bf91a8 Fix memory corruption during parallel zpool import
with -o cachefile
#16426cf6e8b218 zstream: remove duplicate highbit64 definition
Obtained from: OpenZFS
OpenZFS commit: 9c56b8ec78
This fixes a number of clang 19 warnings:
sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c:709:25: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_FREQ_BAND') [-Werror,-Wenum-compare]
709 | freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h:148:11: note: expanded from macro 'FBIN2FREQ'
148 | (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
| ~~~ ^ ~~~~~~~~~~~~~~~~~~
sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c:745:25: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_FREQ_BAND') [-Werror,-Wenum-compare]
745 | freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h:148:11: note: expanded from macro 'FBIN2FREQ'
148 | (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
| ~~~ ^ ~~~~~~~~~~~~~~~~~~
sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c:781:25: error: comparison of different enumeration types ('HAL_BOOL' and 'HAL_FREQ_BAND') [-Werror,-Wenum-compare]
781 | freq_array[i] = FBIN2FREQ(p_freq_bin[i], is_2ghz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h:148:11: note: expanded from macro 'FBIN2FREQ'
148 | (((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
| ~~~ ^ ~~~~~~~~~~~~~~~~~~
The `FBIN2FREQ()` and `FREQ2FBIN()` macros in `ar9300eep.h` are invoked
in most places around the `ath_hal` code with a (effectively) boolean
second argument, corresponding to "is this 2GHz?". But in the code that
is warned about, the value `HAL_FREQ_BAND_2GHZ` is of a different
non-boolean type, `HAL_FREQ_BAND`.
Update the `FBIN2FREQ()` and `FREQ2FBIN()` macros to interpret the
second argument as boolean value, and rename the macro parameter names
to better describe their meaning.
Reviewed by: adrian, bz
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D46201
Notable upstream pull request merges:
#16209 --multi-- icp: rip out everything we don't use
#1623020c8bdd85 FreeBSD: Update use of UMA-related symbols in
arc_available_memory
#16242121a2d335 FreeBSD: unregister mountroot eventhandler on unload
#162585de3ac223 vdev_open: clear async fault flag after reopen
#16270436731276 zvol: Fix suspend lock leaks
#16273c87cb22ba head_errlog: fix use-after-free
#16284f72e081fb FreeBSD: Use a statement expression to implement
SET_ERROR()
#16300a10faf5ce FreeBSD: Use the new freeuio() helper to free dynamically
allocated UIOs
#16302a7fc4c85e zstd: don't call zstd_mempool_reap if there are no buffers
#16334dc91e7452 zdb: dump ZAP_FLAG_UINT64_KEY ZAPs properly
Obtained from: OpenZFS
OpenZFS commit: 1147a27978
This way we can avoid making assumptions about the SDT probe
implementation. No functional change intended.
This was submitted upstream as https://github.com/openzfs/zfs/pull/16284
MFC after: 1 week
Upstream added the libspl_gettid implementation for macOS and when
merging back to FreeBSD this resulted in two copies of the same code.
Delete this second copy, restoring the file to be the same as upstream.
Fixes: aca928a50a ("zfs: merge openzfs/zfs@e2357561b")
Notable upstream pull request merges:
#1594041ae864b6 Replace P2ALIGN with P2ALIGN_TYPED and delete P2ALIGN
#161285137c132a zpool import output is not formated properly
#16138efbef9e6c FreeBSD: Add zfs_link_create() error handling
#1614604bae5ec9 Disable high priority ZIO threads on FreeBSD and Linux
#16151cc3869153 zfs_ioc_send: use a dedicated taskq thread for send
#16151adda768e3 spa: remove spa_taskq_dispatch_sync()
#16151515c4dd21 spa: flatten spa_taskq_dispatch_ent()
#161510a543db37 spa_taskq_dispatch_ent: simplify arguments
#16153975a13259 Add support for parallel pool exports
#1615389acef992 Simplified the scope of the namespace lock
#16159136c05321 ZAP: Fix leaf references on zap_expand_leaf() errors
#16162af5dbed31 Fix scn_queue races on very old pools
#161653400127a7 Fix ZIL clone records for legacy holes
#16167414acbd37 Unbreak FreeBSD cross-build on MacOS broken in 051460b8b#16172eced2e2f1 libzfs: Fix mounting datasets under thread limit pressure
#16178b64afa41d Better control the thread pool size when mounting datasets
#16181fa99d9cd9 zfs_dbgmsg_print: make FreeBSD and Linux consistent
#16191e675852bc dbuf: separate refcount calls for dbuf and dbuf_user
#16198a043b60f1 Correct level handling in zstream recompress
#1620434906f8bb zap: reuse zap_leaf_t on dbuf reuse after shrink
#16206d0aa9dbcc Use memset to zero stack allocations containing unions
#162078865dfbca Fix assertion in Persistent L2ARC
#1620808648cf0d Allow block cloning to be interrupted by a signal
#16210e2357561b FreeBSD: Add const qualifier to members of struct
opensolaris_utsname
#16214800d59d57 Some improvements to metaslabs eviction
#1621602c5aa9b0 Destroy ARC buffer in case of fill error
#1622501c8efdd5 Simplify issig()
Obtained from: OpenZFS
OpenZFS commit: e2357561b9
da76d34 repurposed the use of UMA_MD_SMALL_ALLOC in a way that breaks
arc_available_memory on -CURRENT. This change ensures that
arc_available_memory uses the new symbol while maintaining compatibility
with older FreeBSD releases. This change was submitted to upstream
as well.
Approved by: markj (mentor)
Fixes: da76d34
Code for pools before version 11 uses dmu_objset_find_dp() to scan
for children datasets/clones. It calls enqueue_clones_cb() and
enqueue_cb() callbacks in parallel from multiple taskq threads.
It ends up bad for scan_ds_queue_insert(), corrupting scn_queue
AVL-tree. Fix it by introducing a mutex to protect those two
scan_ds_queue_insert() calls. All other calls are done from the
sync thread and so serialized.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #16162
PR: 278414
On 32-bit platforms long long is generally 64-bits. Sufficiently modern
versions of gcc (13 in my testing) complains when casting a pointer to
an integer of a different width so cast to uintptr_t first to avoid the
warning.
Fix i386 gcc builds while we wait for this to be merged to OpenZFS.
Sponsored by: DARPA, AFRL
Pull Request: https://github.com/openzfs/zfs/pull/16203
Notable upstream pull request merges:
#15839c3f2f1aa2 vdev probe to slow disk can stall mmp write checker
#158885044c4e3f Fast Dedup: ZAP Shrinking
#15996db499e68f Overflowing refreservation is bad
#1611867d13998b Make more taskq parameters writable
#1612821bc066ec Fix updating the zvol_htable when renaming a zvol
#16130645b83307 Improve write issue taskqs utilization
#161318fd3a5d02 Slightly improve dnode hash
#16134a6edc0adb zio: try to execute TYPE_NULL ZIOs on the current task
#16141b28461b7c Fix arcstats for FreeBSD after zfetch support
Obtained from: OpenZFS
OpenZFS commit: 8f1b7a6fa6