Stoiko Ivanov [Fri, 17 Nov 2023 14:03:02 +0000 (15:03 +0100)]
pick bug-fixes staged for 2.2.1
ZFS 2.2.1 is currently being prepared, but the 3 patches added here
seem quite relevant, as the might cause dataloss/panics on setups
which run `zpool upgrade`.
See upstreams discussion for 2.2.1:
https://github.com/openzfs/zfs/pull/15498/
and the most critical issue:
https://github.com/openzfs/zfs/pull/15529
finally:
https://github.com/openzfs/zfs/commit/459c99ff2339a4a514abcf2255f9b3e5324ef09e
should not hurt either
the change to the UBSAN patch (0013) is unrelate, cosmetic only and
happened by running export-patchqueue.
Stoiko Ivanov [Wed, 25 Oct 2023 09:13:11 +0000 (11:13 +0200)]
fix #5014 reenable blk-mq optimization
While I think the huge performance optimization was at some point not
really that huge in practice - the feature sounds like it would
benefit our use-case:
https://github.com/openzfs/zfs/pull/13148
currently the feature is disabled in 2.2.0 (see the second patch),
because of the issues addressed by the first patch
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Stoiko Ivanov [Mon, 9 Oct 2023 13:20:13 +0000 (15:20 +0200)]
d/rules: drop bash_completion mangling
This was integrated into upstreams autoconf in commit: e69ade32e116e72d03068c03799924c3f1a15c95
(contrib: bash_completion.d: make install destination vendor
dependent)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Sun, 15 Oct 2023 12:16:28 +0000 (14:16 +0200)]
d/copyright: adapt to file moves and deletions
Lots of targeted commands consisting of a single file as source got
moved a level up from their command-specific sub-directory to cmd/
directory directly.
A handful of build-artefacts like configure/m4 files generated by
auto-tools, was removed from being tracked by git.
Then some stuff was simple unused or broken and got deleted
(vdev_cache, zfs_spa).
Others where replaced (sha256 by general sha2 library, zstreamdump by
zstream).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Sun, 15 Oct 2023 11:25:07 +0000 (13:25 +0200)]
zfsutils-linux: install new trim units, zilstat tool, and new man pages
Cater to dh_missing complaints and ship new:
- zilstat tool
- zfs-lock and zfs-unlock manual pages in section 8
- vdevprops manual page in section 7
- systemd template unit files for trimming a specific pool, inclusive
timers to do so on a weekly and/or monthly basis. Keep those covered
by our default "no-stop-on-upgrade" rule for the dh_systemd helper.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 10 Oct 2023 12:55:48 +0000 (14:55 +0200)]
backport fix for AMX register breakage
vmexit's can cause the AMX registers to "misbehave" which can break
ZFS, even though ZFS doesn't use AMX at all.
This causes crashes and processes hanging forever in uninterruptible
sleep (the infamous D state) on Intel Xeon 4th gen HW, possible other
HW too, but we only got reports on Sapphire Rapids models.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Tested-by: Aaron Lauterer <a.lauterer@proxmox.com>
Stoiko Ivanov [Mon, 2 Jan 2023 14:25:49 +0000 (15:25 +0100)]
fix #4440: cherry-pick patch for mountpoint=legacy on /
As reported having set 'mountpoint=legacy' on the root dataset (for a
default install this would be 'rpool/ROOT/pve-1') for mounting through
e.g. /etc/fstab breaks booting in initramfs
The cherry-picked patch is already applied to zfs-2.1.8-staging
upstream so will be included in the next zfs point release.
reproduced the issue on a VM with ZFS on root by:
* booting into a PVE 7.3 iso (to have zfs and an inactive
rpool/ROOT/pve-1)
* `zpool import -ocachefile=none -N -f rpool
* `zfs set mountpoint=legacy rpool/ROOT/pve-1`
* `mount -t zfs rpool/ROOT/pve-1 /mnt
* `echo "rpool/ROOT/pve-1 / zfs defaults 0 0" >> /mnt/etc/fstab`
* `zpool export rpool`
* reboot - the boot breaks with zfs-initramfs 2.1.7-pve1 but works
with this patch applied
Stoiko Ivanov [Fri, 2 Dec 2022 16:32:52 +0000 (17:32 +0100)]
trim: clean up, fix
This does:
* fix get_transp() on non-bash
* re-indent of the code from #990745
* fix terminology: it's pool
* remove -e: I originally actually fixed -e,
but it turns out literally every bit that could fail
is already either || : or wasn't by accident (like in the #990745 code)
* simplify get_transp() and explain why we do it instead of matching nvme path
* use remove -L from the data we feed to lsblk, zpool w/o -L is measurably faster
* pipe the devices into while read to match rest of code
* use read -r in main loop
* match the userprop with case/esac instead of if tree
* shellcheck-clean the script
Stoiko Ivanov [Mon, 17 Oct 2022 18:09:51 +0000 (20:09 +0200)]
cherry-pick a few patches from zfs-2.1.7-staging
While checking the current state of 2.1.6 we noticed that there were
some changes in debian-upstream [0] resulting from a bug-report in
zfs-upstream [1].
Our packages should be unaffected (they do not ship the
init-scripts in the first place).
Since the issue was fixed by zfs-upstream already on the
zfs-2.1.7-staging branch we should include it as well as it might save
users, who somehow got debian-upstream's zfs-packages installed on PVE
some trouble.
The other 2 changes seem small and isolated enough so including them
as well.
However since some of our rust-packages seem to depend on
libcurl4-gnutls-dev (via librust-curl-sys-dev) we add a
option for the dependency - I would assume that both should work
equally well (the callers are in upstream/lib/libzfs/libzfs_crypto.c)
However since libzfs increased both the current as well as the age,
as there where only addition but no changes of previously existing
ABI, the soname of the library remained at libzfs4.so - following
https://www.debian.org/doc/debian-policy/ch-sharedlibs.html I left
the package name at libzfs4linux
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
[ Thomas: added a bit more context ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
suggesting the new -dbgsym packages without having a strict dependency
on a specific version of the library packages, like the old no longer
built zfs-dbg package had.
this commit can be reverted after the package has been uploaded once, or
kept for one release cycle if we might do the -dbgsym migration in
oldstable as well to avoid the oldstable zfs-dbg package version
overtaking the transitional one here.
zfs-zed is the only classical daemon, which benefits from a restart,
so restart only zfs-zed.
Noticed during the transition from ZFS 0.8.x to 2.0.0 zvol_wait, which
is called by zfs-volume-wait.service was changed to also output the
redacted_snap property of the datasets. This property does not exist
if the kernelmodule is still 0.8.x, causing an error to be printed to
the journal.