aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/module
Commit message (Collapse)AuthorAgeFilesLines
* zfs: merge openzfs/zfs@4a1195ca5 (master) into mainMartin Matuska3 days26-47/+237
| | | | | | | | | | | | | | | Notable upstream pull request merges: #11312 Temporarily use root credentials to mount snapshots in .zfs #12246 arc: Drop an incorrect assert #12443 Fixed data integrity issue when underlying disk returns error to zfs #12522 Compressed receive with different ashift can result in incorrect PSIZE on disk #12535 Verify embedded blkptr's in arc_read() #12541 Allow sending corrupt snapshots even if metadata is corrupted Obtained from: OpenZFS OpenZFS commit: 4a1195ca5041cbff2a6b025a31937fef84876c52
* zfs: merge openzfs/zfs@3b89d9518 (master) into mainMartin Matuska2021-08-319-16/+117
| | | | | | | | | | | | | Notable upstream pull request merges: #12022 Fix endianness issues with zstd #12319 Extend zpool-iostat to account for ZIO_PRIORITY_REBUILD #12458 Add hole punching support on FreeBSD version 1400032 #12473 Initialize parity blocks before RAID-Z reconstruction benchmarking #12511 Make 'zpool labelclear -f' work on offlined disks #12514 FreeBSD: Don't remove SA xattr if not SA znode Obtained from: OpenZFS OpenZFS commit: 3b89d9518df2c7fd747e349873a3d4d498beb20e
* zfs: merge openzfs/zfs@8ae86e2ed (master) into mainMartin Matuska2021-08-1711-163/+286
| | | | | | | | | | | | | Notable upstream pull request merges: #12422 Fix/improve dbuf hits accounting #12406 Increase default volblocksize from 8KB to 16KB #12398 Remove b_pabd/b_rabd allocation from arc_hdr_alloc() #12397 Run arc_evict thread at higher priority #12297 Avoid vq_lock drop in vdev_queue_aggregate() #12161 Restore FreeBSD sysctl processing for arc.min and arc.max Obtained from: OpenZFS OpenZFS commit: 8ae86e2edc736483c1530fd689525aa2460eaec8
* zfs: merge openzfs/zfs@f3678d70f (master) into mainMartin Matuska2021-08-0832-162/+216
| | | | | | | | | | | | | Notable upstream pull request merges: #12339 Read past end of argv array in zpool_do_import() #12365 Fixes in persistent L2ARC #12383 Fixes for KMSAN reports #12425 Avoid small buffer copying on write #12428 Fix unfortunate NULL in spa_update_dspace #12446 Allow disabling of unmapped I/O on FreeBSD Obtained from: OpenZFS OpenZFS commit: f3678d70ff8f98d67caf377ec0326c9a6c7bcf29
* zfs: merge openzfs/zfs@14b43fbd9 (master) into mainMartin Matuska2021-07-2322-253/+486
| | | | | | | | | | | | | | | | | Notable upstream pull request merges: #12271 Tinker with slop space accounting with dedup #12279 Fix ARC ghost states eviction accounting #12284 Add Module Parameter Regarding Log Size Limit #12300 Introduce dsl_dir_diduse_transfer_space() #12314 Optimize allocation throttling #12348 Minor ARC optimizations #12350 Detect HAVE_LARGE_STACKS at compile time #12356 Use SET_ERROR for more errors in FreeBSD vnops #12375 FreeBSD: Ignore make_dev_s() errors #12378 FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+ Obtained from: OpenZFS OpenZFS commit: 14b43fbd9c13d802409ed886bb6b66fd528fb209
* zfs: add missed dependency of zfs module on zlibKonstantin Belousov2021-07-171-0/+1
| | | | | | | Reviewed by: mm Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31207
* zfs: merge openzfs/zfs@07a4c76e9 (master) into mainMartin Matuska2021-07-126-99/+185
| | | | | | | | | Notable upstream pull request merges: #12299 file reference counts can get corrupted #12320 FreeBSD: Use unmapped I/O for scattered/gang ABD buffers Obtained from: OpenZFS OpenZFS commit: 07a4c76e9016fad22f1ce2613ab5abc4b2652114
* zfs: merge openzfs/zfs@bdd11cbb9 (master) into mainMartin Matuska2021-07-0711-150/+117
| | | | | | | | | | | | | | | Notable upstream pull request merges: #12274 Optimize txg_kick() process #12281 Move gethrtime() calls out of vdev queue lock #12287 Remove refcount from spa_config_*( #12289 Compact dbuf/buf hashes and lock arrays #12290 Remove avl_size field from struct avl_tree #12294 Upstream: dmu_zfetch_stream_fini leaks refcount #12295 Fix abd leak, kmem_free correct size of abd_t #12328 FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE Obtained from: OpenZFS OpenZFS commit: bdd11cbb90a2afa54fd00935ac0d34b4ddf2515c
* zfs: merge openzfs/zfs@4694131a0 (master) into mainMartin Matuska2021-06-306-8/+42
| | | | | | | | | Notable upstream pull request merges: #12253 module/zfs: simplify ddt_stat_add() loop #12288 Avoid 64bit division in multilist index functions Obtained from: OpenZFS OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064
* zfs: merge openzfs/zfs@5e2c8338b (master) into mainMartin Matuska2021-06-2638-265/+388
| | | | | | | | | | | | | | Notable upstream pull request merges: #12183 Optimize small random numbers generation #12227 Revert Consolidate arc_buf allocation checks #12266 Fix flag copying in resume case #12273 zfs_metaslab_mem_limit should be 25 instead of 75 #12276 Update cache file when setting compatibility property #12280 Help compiller optimize out abd_verify() #12282 FreeBSD: fix compilation of FreeBSD world after 29274c9f6 Obtained from: OpenZFS OpenZFS commit: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee
* zfs: merge openzfs/zfs@c4c162c1e (master) into mainMartin Matuska2021-06-208-203/+691
| | | | | | | | | | Notable upstream pull request merges: #12054 Avoid deadlock when removing L2ARC devices under I/O #12172 Use wmsum for arc, abd, dbuf and zfetch statistics #12221 vdev_draid_min_asize() ignores reserved space Obtained from: OpenZFS OpenZFS commit: c4c162c1e8ff9ce8833014711875d18df520096c
* zfs: merge openzfs/zfs@afa7b3484 (master) into mainMartin Matuska2021-06-1313-323/+99
| | | | | | | | | | | | | Notable upstream pull request merges: #12149: Multiple man-pages: Move to appropriate section #12158: Re-embed multilist_t storage #12191: Convert non-libzpool libraries to -fvisibility=hidden #12196: Unify manpage makefiles, move pages to better sexions, ... #12210: libzutil: import filtering optimisation #12212: Remove pool io kstats Obtained from: OpenZFS OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba
* zfs: merge openzfs/zfs@75b4cbf62 (master) into mainMartin Matuska2021-06-0887-1429/+1559
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable upstream pull request merges: #11710 Allow zfs to send replication streams with missing snapshots #11751 Avoid taking global lock to destroy zfsdev state #11786 Ratelimit deadman zevents as with delay zevents #11803 ZFS traverse_visitbp optimization to limit prefetch #11813 Allow pool names that look like Solaris disk names #11822 Atomically check and set dropped zevent count #11822 Don't scale zfs_zevent_len_max by CPU count #11833 Refactor zfsdev state init/destroy to share common code #11837 zfs get -p only outputs 3 columns if "clones" property is empty #11843 libzutil: zfs_isnumber(): return false if input empty #11849 Use dsl_scan_setup_check() to setup a scrub #11861 Improvements to the 'compatibility' property #11862 cmd/zfs receive: allow dry-run (-n) to check property args #11864 receive: don't fail inheriting (-x) properties on wrong dataset type #11877 Combine zio caches if possible #11881 FreeBSD: use vnlru_free_vfsops if available #11883 FreeBSD: add support for lockless symlink lookup #11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr #11896 Fix crash in zio_done error reporting #11905 zfs-send(8): Restore sorting of flags #11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir #11930 vdev_mirror: don't scrub/resilver devices that can't be read #11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines #11955 zfs get: don't lookup mount options when using "-s local" #11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl #11959 vdev_id: variable not getting expanded under map_slot() #11966 Scale worker threads and taskqs with number of CPUs #11994 Clean up use of zfs_log_create in zfs_dir #11997 FreeBSD: Don't force xattr mount option #11997 FreeBSD: Implement xattr=sa #11997 FreeBSD: Use SET_ERROR to trace xattr name errors #11998 Simplify/fix dnode_move() for dn_zfetch #12003 FreeBSD: Initialize/destroy zp->z_lock #12010 Fix dRAID self-healing short columns #12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots" #12040 Reinstate the old zpool read label logic as a fallback #12046 Improve scrub maxinflight_bytes math #12049 FreeBSD: avoid memory allocation in arc_prune_async #12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI #12061 Fix dRAID sequential resilver silent damage handling #12072 Let zfs diff be more permissive #12077 FreeBSD: Retry OCF ENOMEM errors. #12088 Propagate vdev state due to invalid label corruption #12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat #12097 FreeBSD: Update dataset_kstats for zvols in dev mode #12104 FreeBSD boot code reminder after zpool upgrade #12114 Introduce write-mostly sums Obtained from: OpenZFS OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3
* zfs: merge openzfs/zfs@3522f57b6 (master) to mainMartin Matuska2021-06-082-0/+2
| | | | | | | | | This changes branch tracking of sys/contrib/openzfs to a new direct-import branch vendor/openzfs/master. No functional changes. OpenZFS tag: 2.1.0-rc1
* VFS_QUOTACTL(9): allow implementation to indicate busy state changesJason A. Harmening2021-05-301-0/+15
| | | | | | | | | | | | | | | Instead of requiring all implementations of vfs_quotactl to unbusy the mount for Q_QUOTAON and Q_QUOTAOFF, add an "mp_busy" in/out param to VFS_QUOTACTL(9). The implementation may then indicate to the caller whether it needed to unbusy the mount. Also, add stbool.h to libprocstat modules which #define _KERNEL before including sys/mount.h. Otherwise they'll pull in sys/types.h before defining _KERNEL and therefore won't have the bool definition they need for mp_busy. Reviewed By: kib, markj Differential Revision: https://reviews.freebsd.org/D30556
* Revert commits 6d3e78ad6c11 and 54256e7954d7Jason A. Harmening2021-05-301-15/+0
| | | | | | | Parts of libprocstat like to pretend they're kernel components for the sake of including mount.h, and including sys/types.h in the _KERNEL case doesn't fix the build for some reason. Revert both the VFS_QUOTACTL() change and the follow-up "fix" for now.
* VFS_QUOTACTL(9): allow implementation to indicate busy state changesJason A. Harmening2021-05-291-0/+15
| | | | | | | | | | Instead of requiring all implementations of vfs_quotactl to unbusy the mount for Q_QUOTAON and Q_QUOTAOFF, add an "mp_busy" in/out param to VFS_QUOTACTL(9). The implementation may then indicate to the caller whether it needed to unbusy the mount. Reviewed By: kib, markj Differential Revision: https://reviews.freebsd.org/D30218
* zfs: restore copyright disclaimer change from 4b84b4ccaMartin Matuska2021-04-261-1/+0
| | | | | | The change will be pull-requested to upstream. X-MFC-with: 4b84b4cca472e482bc22d5e5c7928be5a1393c84
* zfs: fix non-functional mismerges from vendor/openzfsMartin Matuska2021-04-262-3/+1
| | | | | | | | - fix copyright in module/os/freebsd/spl/spl_acl.c - fix mismerge in non-processed module/os/linux/zfs/zfs_uio.c MFC after: 3 days Obtained from: OpenZFS
* zfs: use vn_seqc_read_notmodify for racing .. lookupsMateusz Guzik2021-04-221-1/+1
| | | | | | Catching an in-flight unlocked vnode is fine here. Reported by; pho
* zfs: damage control racing .. lookups in face of mkdir/rmdirMateusz Guzik2021-04-211-0/+21
| | | | | Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D29769
* zfs: merge openzfs/zfs@3522f57b6 (master)Martin Matuska2021-04-147-16/+16
| | | | | | | | | | | | | | | | Notable upstream pull request merges: #11742 When specifying raidz vdev name, parity count should match #11744 Use a helper function to clarify gang block size #11771 Support running FreeBSD buildworld on Arm-based macOS hosts This is the last update that will be MFCed into stable/13. From now on, the tracking of OpenZFS branches will be different: - main continues tracking openzfs/zfs/master - stable/13 is going to track openzfs/zfs/zfs-2.1-release Obtained from: OpenZFS MFC after: 1 week
* zfs: avoid memory allocation in arc_prune_asyncMateusz Guzik2021-04-111-6/+10
|
* zfs: make vnlru_free_vfsops use conditional on versionMateusz Guzik2021-04-111-0/+10
| | | | Diff reduction against upstream.
* zfs: change format string in zio_fini to get rid of the castMateusz Guzik2021-04-101-2/+2
|
* zfs: merge OpenZFS master-891568c99Martin Matuska2021-03-2130-734/+433
| | | | | | | | | | | | | | Notable upstream pull request merges: #11652 Split dmu_zfetch() speculation and execution parts #11682 Fix zfs_get_data access to files with wrong generation #11735 Clean up RAIDZ/DRAID ereport code #11737 Initialize metaslab range trees in metaslab_init #11739 FreeBSD: make seqc asserts conditional on replay #11763 Allow setting bootfs property on pools with indirect vdevs #11767 FreeBSD: Fix memory leaks in kstats Obtained from: OpenZFS MFC after: 2 weeks
* vfs: fix vnlru marker handling for filtered/unfiltered casesMateusz Guzik2021-03-181-2/+12
| | | | | | | | | | | | | | | | | | | | | | | The global list has a marker with an invariant that free vnodes are placed somewhere past that. A caller which performs filtering (like ZFS) can move said marker all the way to the end, across free vnodes which don't match. Then a caller which does not perform filtering will fail to find them. This makes vn_alloc_hard sleep for 1 second instead of reclaiming, resulting in significant stalls. Fix the problem by requiring an explicit marker by callers which do filtering. As a temporary measure extend vnlru_free to restart if it fails to reclaim anything. Big thanks go to the reporter for testing several iterations of the patch. Reported by: Yamagi <lists yamagi.org> Tested by: Yamagi <lists yamagi.org> Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D29324
* zfs: merge OpenZFS master-9305ff2edMartin Matuska2021-03-1412-55/+141
| | | | | | | | | | | | | | | | Notable upstream pull request merges: #11153 Scalable teardown lock for FreeBSD #11651 Don't bomb out when using keylocation=file:// #11667 zvol: call zil_replaying() during replay #11683 abd_get_offset_struct() may allocate new abd #11693 Intentionally allow ZFS_READONLY in zfs_write #11716 zpool import cachefile improvements #11720 FreeBSD: Clean up zfsdev_close to match Linux #11730 FreeBSD: bring back possibility to rewind the checkpoint from bootloader Obtained from: OpenZFS MFC after: 2 weeks
* zfs: bring back possibility to rewind the checkpoint fromMariusz Zaborski2021-03-131-1/+16
| | | | | | | | | | | | | | | | | | | | Add parsing of the rewind options. When I was upstreaming the change [1], I omitted the part where we detect that the pool should be rewind. When the FreeBSD repo has synced with the OpenZFS, this part of the code was removed. [1] FreeBSD repo: 277f38abffc6a8160b5044128b5b2c620fbb970c [2] OpenZFS repo: f2c027bd6a003ec5793f8716e6189c389c60f47a Originally reviewed by: tsoome, allanjude Originally reviewed by: kevans (ok from high-level overview) Signed-off-by: Mariusz Zaborski <oshogbo@vexillium.org> PR: 254152 Reported by: Zhenlei Huang <zlei.huang at gmail.com> Obtained from: https://github.com/openzfs/zfs/pull/11730
* zfs: make seqc asserts conditional on replayMateusz Guzik2021-03-132-8/+6
| | | | Avoids tripping on asserts when doing pool recovery.
* zfs: merge OpenZFS master-bedbc13daMartin Matuska2021-03-039-23/+51
| | | | | | | | | | | Notable upstream commits: 8e43fa12c Fix vdev_rebuild_thread deadlock 03ef8f09e Add missing checks for unsupported features 2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs MFC after: 1 week Obtained from: OpenZFS
* zfs: add missing seqc write begin/end around zfs_acl_chown_setattrMateusz Guzik2021-02-271-0/+2
| | | | | | | It happens to trip over an assert but does not matter for correctness at this time. However, do it for future proofing. Reported by: avg
* zfs: add missing checks for unsupported featuresMartin Matuska2021-02-261-0/+2
| | | | | | | | | | | | | | | | | After the merge of OpenZFS master-9312e0fd1 it has become possible to import ZFS pools witn an active org.illumos:edonr feature on FreeBSD, leading to a panic. In addition, "zpool status" reported all pools without edonr as upgradable and "zpool upgrade -v" lists edonr in the list of upgradable features. This is an accepted but not yet included bugfix by upstream. Obtained from: https://github.com/openzfs/zfs/pull/11653 Differential Revision: https://reviews.freebsd.org/D28935 Reported by: garga (on freebsd-current@) Reviewed by: freqlabs X-MFC-with: ba27dd8be821792e15bdabfac69fd6cab0cf9dd3
* zfs: merge OpenZFS master-9312e0fd1Martin Matuska2021-02-2218-36/+199
| | | | | | | | | | | Notable upstream changes: 778869fa1 Fix reporting of mount progress e7adccf7f Disable use of hardware crypto offload drivers on FreeBSD 03e02e5b5 Fix checksum errors not being counted on repeated repair 64e0fe14f Restore FreeBSD resource usage accounting 11f2e9a49 Fix panic if scrubbing after removing a slog device MFC after: 2 weeks
* zfs: merge OpenZFS master-bf156c966Martin Matuska2021-02-185-24/+46
| | | | | | | | | | | | | | | | | | Notable upstream changes: bf156c966 Remove unused abd_alloc_scatter_offset_chunkcnt 658fb8020 Add "compatibility" property for zpool feature sets This update introduces a new pool property called "compatibility" that can be used to enable a limited set of pool features on pool creation and "stick" to it, so the "zpool upgrade" does not accidentally enable features that are not desired. The value of this property may then be changed later. See zpool-features(5) for more information about the "compatibility" pool property. Obtained from: OpenZFS MFC after: 2 weeks
* zfs: merge OpenZFS master-436ab35a5Martin Matuska2021-02-1659-878/+1276
| | | | | | | | | | | - speed up writing to ZFS pools without ZIL devices (aa755b3) - speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a) ... MFC after: 2 weeks Reviewed by: mjg (partial) Tested by: pho Differential Revision: https://reviews.freebsd.org/D28677
* zfs: Avoid updating the L2ARC device header unnecessarilyMartin Matuska2021-02-151-1/+3
| | | | | | | | | | | | | From openzfs-master 0ae184a6b commit message: If we do not write any buffers to the cache device and the evict hand has not advanced do not update the cache device header. Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58 Patch Author: George Amanakis <gamanakis@gmail.com> MFC after: 3 days Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28682
* zfs: fix RAIDZ2/3 not healing parity with 2+ bad disksMartin Matuska2021-02-151-10/+0
| | | | | | | | | | | | | | | | | | | | | | From openzfs-master 62d4287f2 commit message: When scrubbing, (non-sequential) resilvering, or correcting a checksum error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by overwriting it. For example, if P disks are silently corrupted (P being the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub` should detect and heal all the bad state on these disks, including parity. This way if there is a subsequent failure we are fully protected. With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity sector, and also damage (silent or known) to a data sector. In this case the parity should be healed but it is not. Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com> MFC after: 3 days Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28681
* Set file mode during zfs_writeAntonio Russo2021-02-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply https://github.com/openzfs/zfs/pull/11576 Direct commit from upstream openzfs. Full commit message below: Set file mode during zfs_write 3d40b65 refactored zfs_vnops.c, which shared much code verbatim between Linux and BSD. After a successful write, the suid/sgid bits are reset, and the mode to be written is stored in newmode. On Linux, this was propagated to both the in-memory inode and znode, which is then updated with sa_update. 3d40b65 accidentally removed the initialization of newmode, which happened to occur on the same line as the inode update (which has been moved out of the function). The uninitialized newmode can be saved to disk, leading to a crash on stat() of that file, in addition to a merely incorrect file mode. Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Antonio Russo <aerusso@aerusso.net> Closes #11474 Closes #11576 Obtained from: openzfs/zfs@f8ce8aed0 MFC after: 0 days Sponsored by: iXsystems, Inc.
* zfs: remove incomplete ifdefs for lockless symlink supportMateusz Guzik2021-02-011-8/+0
| | | | This wil be handled differently upstream and merged later.
* zfs: use atomic_load_consume_ptr for z_cached_symlinkMateusz Guzik2021-01-251-4/+1
|
* atomic: make atomic_store_ptr type-awareMateusz Guzik2021-01-251-1/+1
|
* zfs: fix panics with invariant kernels from zfs_replay_setattrMateusz Guzik2021-01-251-0/+5
|
* zfs: add support for lockless symlink lookupMateusz Guzik2021-01-232-3/+85
| | | | | | Reviewed by: kib (previous version) Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D27488
* [skip ci] Delete an accidentally-committed commentAlan Somers2021-01-121-1/+0
| | | | MFC-With: 19cca0b9613d7c3058e41baf0204245119732235
* aio: fix the tests when ZFS is not availableAlan Somers2021-01-101-0/+1
| | | | | | | | Don't try to cleanup the zpool if we couldn't create a zpool in the first place. Submitted by: tmunro MFC-with: 022ca2fc7fe08d51f33a1d23a9be49e6d132914e
* OpenZFS: Fix issues caused by reversed commits + rebaseMatt Macy2021-01-084-1/+0
|
* OpenZFS merge main-gf11b09Matt Macy2021-01-0896-4922/+8901
| | | | | | | | - add dRAID support - fix duplicate close handling - fix memory leak in prefetch - fix problem with SIMD benchmarking on FreeBSD boot ...
* vfs: denote vnode being a mount point with VIRF_MOUNTPOINTMateusz Guzik2021-01-031-2/+2
| | | | | Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D27794
* Merge commit d8a09b3a0 from openzfs git (by Ryan Libby):Ryan Libby2020-12-271-4/+6
| | | | | | | | | | | | | | | | | | lua: avoid gcc -Wreturn-local-addr bug Avoid a bug with gcc's -Wreturn-local-addr warning with some obfuscation. In buggy versions of gcc, if a return value is an expression that involves the address of a local variable, and even if that address is legally converted to a non-pointer type, a warning may be emitted and the value of the address may be replaced with zero. Howerver, buggy versions don't emit the warning or replace the value when simply returning a local variable of non-pointer type. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90737 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Libby <rlibby@FreeBSD.org> Closes #11337