When initially packaging libzfsbootenv1linux a .install file was
commited in addtion to the .install.in (which contains the proper path
with the multiarch component). This wasn't noticed during building
because the .install got clobbered while building
Adapt our patch introduced with ZFS 2.1 (for the then added MFU/MRU
stats), to also deal with the now introduced values not being present
(because an old kernel-module does not offer them).
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com> Reviewed-by: Max Carrara <m.carrara@proxmox.com> Tested-by: Max Carrara <m.carrara@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Use the current ZFS 2.2.4 staging tree [0] with commit deb7a8423 ("Fix
corruption caused by mmap flushing problems") on top.
Additionally, include an open, but ack'd, pull request [1] that avoids
a potential general protection fault due to touching a vbio after it
was handed off to the kernel.
Stoiko Ivanov [Wed, 6 Mar 2024 13:24:36 +0000 (14:24 +0100)]
fix #5288: cherry-pick fix for udev-partition links > 16
If a zvol has more than 15 partitions, the minor device number
exhausts the slot count reserved for partitions next to the zvol
itself. As a result, the minor number cannot be used to determine the
partition number for the higher partition, and doing so results in
wrong named symlinks being generated by udev.
Since the partition number is encoded in the block device name anyway,
let's just extract it from there instead.
For upstream issue and PR discussion see:
https://github.com/openzfs/zfs/pull/15970
https://github.com/openzfs/zfs/issues/15904
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Stoiko Ivanov [Wed, 6 Mar 2024 13:24:35 +0000 (14:24 +0100)]
update zfs submodule to 2.2.3 and refresh patches
mostly support for newer kernel-versions, and fixes for the BRT bugs
discovered with 2.2.0 (BRT remains disabled by default).
The update contains a fix for CVE-2020-24370 in lua (which is present
in ZFS for channel-programs, which we do not use) - see:
https://github.com/openzfs/zfs/pull/15847 for more details.
One patch from Stefan Lendl was backported and is now in the ZFS 2.2
branch.
Stefan Lendl [Mon, 29 Jan 2024 11:16:15 +0000 (12:16 +0100)]
Fix #5101: exports with sharenfs remain after zfs mount -a
When running `zfs mount -a`, prevent the exported datasets (with sharenfs)
to be truncated (unexported).
Adds tests to verify shares persist after mount -a
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)