Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use freeuio() to free allocated uio #2

Open
wants to merge 12 commits into
base: freebsd
Choose a base branch
from
Open

Use freeuio() to free allocated uio #2

wants to merge 12 commits into from

Conversation

brooksdavis
Copy link
Member

Actually belongs at the bottom of cheri-purecap, but making a pull request against freebsd for review purposes.

mattmacy and others added 12 commits March 14, 2024 19:01
This avoids a barrage of locking every minute.
This can cause issues like 'No url found for submodule path' in
downstream or derived projects making use of submodules.

Reviewed by:	imp
This is not associated with a specific upstream commit but apparently
a local diff applied as part of:

commit e92ffd9b626833ebdbf2742c8ffddc6cd94b963e
Merge: 3c3df3660072 17b2ae0
Author: Martin Matuska <[email protected]>
Date:   Sat Jan 22 23:05:15 2022 +0100

    zfs: merge openzfs/zfs@17b2ae0b2 (master) into main

    Notable upstream pull request merges:
      openzfs#12766 Fix error propagation from lzc_send_redacted
      openzfs#12805 Updated the lz4 decompressor
      openzfs#12851 FreeBSD: Provide correct file generation number
      openzfs#12857 Verify dRAID empty sectors
      openzfs#12874 FreeBSD: Update argument types for VOP_READDIR
      openzfs#12896 Reduce number of arc_prune threads
      openzfs#12934 FreeBSD: Fix zvol_*_open() locking
      openzfs#12947 lz4: Cherrypick fix for CVE-2021-3520
      openzfs#12961 FreeBSD: Fix leaked strings in libspl mnttab
      openzfs#12964 Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
      openzfs#12981 Introduce a flag to skip comparing the local mac when raw sending
      openzfs#12985 Avoid memory allocations in the ARC eviction thread

    Obtained from:  OpenZFS
    OpenZFS commit: 17b2ae0
This is not associated with a specific upstream commit but apparently
a local diff applied as part of:

commit e3aa18ad71782a73d3dd9dd3d526bbd2b607ca16
Merge: 645886d028c8 b9d9845
Author: Martin Matuska <[email protected]>
Date:   Fri Jun 3 17:58:39 2022 +0200

    zfs: merge openzfs/zfs@b9d98453f

    Notable upstream pull request merges:
      openzfs#12321 Fix inflated quiesce time caused by lwb_tx during zil_commit()
      openzfs#13244 zstd early abort
      openzfs#13360 Verify BPs as part of spa_load_verify_cb()
      openzfs#13452 More speculative prefetcher improvements
      openzfs#13466 Expose zpool guids through kstats
      openzfs#13476 Refactor Log Size Limit
      openzfs#13484 FreeBSD: libspl: Add locking around statfs globals
      openzfs#13498 Cancel in-progress rebuilds when we finish removal
      openzfs#13499 zed: Take no action on scrub/resilver checksum errors
      openzfs#13513 Remove wrong assertion in log spacemap

    Obtained from:  OpenZFS
    OpenZFS commit: b9d9845
It is not implemented and causes panics on boot.

This is a temporary measure until someone(tm) sorts it out.

Reported by:	many
Sponsored by:	Rubicon Communications, LLC ("Netgate")
This is part one of a fix for booting with ZFS on arm64 using
accelerated checksum implementations.  Checksum benchmarking will
attempt to use the FPU, so we currently panic quickly on boot.  BLAKE3
is still broken, as it clobbers x18 and we promptly discover that fact
as soon as we attempt to fetch curthread in kfpu_end().

Note that _STANDALONE is special-cased here, but ideally we wouldn't be
building the code that uses kfpu_begin()/kfpu_end() at all in the loader
environment.

Discussed with:	imp (a bit)
Differential Revision:	https://reviews.freebsd.org/D39448
Add one ifdef to upstrem code and get rid of compiling the horrible
checked-in aarch64 assembler for the boot loader that the loader will
never use. I'll attempt to upstream this and adjust as needed.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D39897
…_range()

Reviewed by:	markj, Olivier Certner <[email protected]>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42603
Bump __FreeBSD_version for ZFS use.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D43356
Add a stub version when the kernel doesn't define it
@@ -45,6 +45,15 @@
#include <sys/vnode.h>
#include <sys/zfs_znode.h>

/* XXX: should be an __FreeBSD_version check once API is upstream. */
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The freeuio() interface is upstream already, and this bug is fixed in FreeBSD's copy of ZFS, but not in OpenZFS. I'll get that fixed (using a __FreeBSD_version check).

Copy link

@markjdb markjdb Jun 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I misread, this is not fixed in FreeBSD (but that's harmless for now).

@brooksdavis
Copy link
Member Author

openzfs#16300 is a better version, I'll cherry-pick it once it lands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants