zfs: merge openzfs/zfs@f8e5af53e
Notable upstream pull request merges: #173584975430cfAdd vdev property to disable vdev scheduler #18031c77f17b75Add snapshots_changed_nsecs dataset property #18080dbb3f247ecmd/zfs: clone: accept `-u` to not mount newly created datasets #18089 -multiple Zstd: Update bundled library to version 1.5.7 #180912301755dfFix zfs_open() to skip zil_async_to_sync() for the snapshot #18093 -multiple L2ARC: Rework write throttling with DWPD rate limiting and parallel writes #180952dbd6af5eRename several printf attributes declarations to __printf__ #180968605bdfddFreeBSD: unbreak compilation on i386 #18105794f1587dWhen receiving a stream with the large block flag, activate feature #18115765929cb4DDT: Add locking for table ZAP destruction #1811809e4e01e9Fix history logging for `zpool create -t` #181192f1f25217icp: emit .note.GNU-stack section for all ELF targets #181313fffe4e70Fix --enable-invariants on FreeBSD #18133d2f5cb3a5Move range_tree, btree, highbit64 to common code #1813654b141fabFreeBSD: Remove references to DEBUG_VFS_LOCKS #18138cdf89f413Flush RRD only when TXGs contain data #18139a157ef62aMake sure we can still write data to txg #18140cd895f0e5remove thread unsafe debug code causing FreeBSD double free panic #181444f180e095Fix activating large_microzap on receive #1814635b2d3970Lock db_mtx around arc_release() in couple places #18154b36472052nvpair: chase FreeBSD xdrproc_t definition #1816021bbe7cb6Improve caching for dbuf prefetches #18177 -multiple Multihost Improvements #181792646bd558Allow rewrite skip cloned and snapshotted blocks #18180aa29455ddRestrict cloning with different properties #18184040ba7a7clibzfs: improve error message for zpool create with ENXIO #181881412bdc6czfs_vnops_os.c: Move a vput() to after zfs_setattr_dir() #18198cc184fe98Fix `send:raw` permission for send `-w -I` #18208ba970eb20Cleanup allocation class selection #182120f9564e85Simplify dnode_level_is_l2cacheable() #18214370570890Remove parent ZIO from dbuf_prefetch() #18218bfb276e55freebsd: Fix TIMESPEC_OVERFLOW for PowerPC #18222d06a1d9acFix available space accounting for special/dedup #18225d48967728ICP: AES-GCM VAES-AVX2: fix typos and document source files #18226c8a72a27eICP: AES-GCM assembly: remove unused Gmul functions #18230 -multiple Fix zdb --key crash for unencrypted datasets, and teach tests to understand this better #18233 -multiple icp: add SHA-512 implementation using Intel SHA512 extension #18245991fc56faIntroduce dedupused/dedupsaved pool properties #182516a717f31eImprove misleading error messages for ZPOOL_STATUS_CORRUPT_POOL #182547744f0496SIMD: libspl: test the correct CPUID bit for AVX512VL #182556495dafd5range_tree: use zfs_panic_recover() for partial-overlap remov #182563408332d7zhack: Fix importing large allocation profiles on small pools #18258f8457fbdcFix deadlock on dmu_tx_assign() from vdev_rebuild() #18263f8e5af53eFix redundant declaration of dsl_pool_t Obtained from: OpenZFS OpenZFS commit:f8e5af53e9
This commit is contained in:
+16
-20
@@ -2,7 +2,6 @@
|
||||
.PATH: ${ZFSTOP}/module/zcommon
|
||||
.PATH: ${ZFSTOP}/lib/libzfs
|
||||
.PATH: ${ZFSTOP}/lib/libzfs/os/freebsd
|
||||
.PATH: ${ZFSTOP}/lib/libshare
|
||||
.PATH: ${ZFSTOP}/include
|
||||
.PATH: ${ZFSTOP}/module/zstd
|
||||
.PATH: ${ZFSTOP}/module/zstd/lib
|
||||
@@ -29,31 +28,28 @@ LIBADD= \
|
||||
|
||||
INCS= libzfs.h
|
||||
USER_C = \
|
||||
libzfs_changelist.c \
|
||||
libzfs_config.c \
|
||||
libzfs_crypto.c \
|
||||
libzfs_dataset.c \
|
||||
libzfs_diff.c \
|
||||
libzfs_import.c \
|
||||
libzfs_iter.c \
|
||||
libzfs_mount.c \
|
||||
libzfs_pool.c \
|
||||
libzfs_sendrecv.c \
|
||||
libzfs_status.c \
|
||||
libzfs_util.c
|
||||
libzfs_changelist.c \
|
||||
libzfs_config.c \
|
||||
libzfs_crypto.c \
|
||||
libzfs_dataset.c \
|
||||
libzfs_diff.c \
|
||||
libzfs_import.c \
|
||||
libzfs_iter.c \
|
||||
libzfs_mount.c \
|
||||
libzfs_pool.c \
|
||||
libzfs_sendrecv.c \
|
||||
libzfs_share.c \
|
||||
libzfs_share_nfs.c \
|
||||
libzfs_status.c \
|
||||
libzfs_util.c \
|
||||
os/freebsd/libzfs_share_nfs.c \
|
||||
os/freebsd/libzfs_share_smb.c
|
||||
|
||||
# FreeBSD
|
||||
USER_C += \
|
||||
libzfs_compat.c \
|
||||
libzfs_zmount.c
|
||||
|
||||
# libshare
|
||||
USER_C += \
|
||||
libshare.c \
|
||||
nfs.c \
|
||||
os/freebsd/nfs.c \
|
||||
os/freebsd/smb.c
|
||||
|
||||
KERNEL_C = \
|
||||
cityhash.c \
|
||||
zfeature_common.c \
|
||||
|
||||
@@ -133,6 +133,7 @@ KERNEL_C = \
|
||||
space_map.c \
|
||||
space_reftree.c \
|
||||
txg.c \
|
||||
u8_textprep.c \
|
||||
trace.c \
|
||||
uberblock.c \
|
||||
unique.c \
|
||||
@@ -161,7 +162,6 @@ KERNEL_C = \
|
||||
vdev_removal.c \
|
||||
vdev_root.c \
|
||||
vdev_trim.c \
|
||||
xxhash.c \
|
||||
zap.c \
|
||||
zap_leaf.c \
|
||||
zap_micro.c \
|
||||
@@ -205,6 +205,7 @@ KERNEL_C = \
|
||||
zstd_lazy.c \
|
||||
zstd_ldm.c \
|
||||
zstd_opt.c \
|
||||
zstd_preSplit.c \
|
||||
zthr.c
|
||||
|
||||
ARCH_C =
|
||||
@@ -250,9 +251,7 @@ LUA_C = \
|
||||
lvm.c \
|
||||
lzio.c
|
||||
|
||||
UNICODE_C = u8_textprep.c
|
||||
|
||||
SRCS+= ${USER_C} ${KERNEL_C} ${LUA_C} ${UNICODE_C} ${ARCH_C}
|
||||
SRCS+= ${USER_C} ${KERNEL_C} ${LUA_C} ${ARCH_C}
|
||||
|
||||
|
||||
WARNS?= 2
|
||||
|
||||
@@ -12,10 +12,12 @@ ZFS_SRC+= zfs_zstd.c
|
||||
ZFS_SRC+= blake3.c blake3_generic.c blake3_impl.c
|
||||
ZSTD_SRC+= entropy_common.c error_private.c
|
||||
ZSTD_SRC+= fse_decompress.c hist.c
|
||||
ZSTD_SRC+= huf_decompress.c pool.c xxhash.c
|
||||
ZSTD_SRC+= huf_decompress.c pool.c
|
||||
ZSTD_SRC+= xxhash.c
|
||||
ZSTD_SRC+= zstd_common.c
|
||||
ZSTD_SRC+= zstd_ddict.c zstd_decompress.c zstd_decompress_block.c
|
||||
ZSTD_SRC+= zstd_double_fast.c zstd_fast.c zstd_lazy.c zstd_ldm.c
|
||||
ZSTD_SRC+= zstd_preSplit.c
|
||||
|
||||
SRCS+= ${ZFS_SRC} ${ZSTD_SRC} ${ZFS_SRC_AS}
|
||||
|
||||
@@ -45,6 +47,8 @@ CFLAGS.$i+= -include ${ZFSOSINC}/spl/sys/ccompile.h -Wformat -Wall -I${ZFSTOP}/i
|
||||
-DNEED_SOLARIS_BOOLEAN
|
||||
.endfor
|
||||
|
||||
CFLAGS.xxhash.c+= -I${ZFSTOP}/module/zstd/lib/common
|
||||
|
||||
CFLAGS_EARLY.blake3.c+= ${ZFS_EARLY} -DOMIT_SIMD
|
||||
CFLAGS_EARLY.blake3_generic.c+= ${ZFS_EARLY} -DOMIT_SIMD
|
||||
CFLAGS_EARLY.blake3_impl.c+= ${ZFS_EARLY} -DOMIT_SIMD
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* xxHash - Fast Hash algorithm
|
||||
* Copyright (c) Yann Collet, Facebook, Inc.
|
||||
*
|
||||
* You can contact the author at :
|
||||
* - xxHash homepage: http://www.xxhash.com
|
||||
* - xxHash source repository : https://github.com/Cyan4973/xxHash
|
||||
*
|
||||
* This source code is licensed under both the BSD-style license (found in the
|
||||
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
||||
* in the COPYING file in the root directory of this source tree).
|
||||
* You may select, at your option, one of the above-listed licenses.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* xxhash.c instantiates functions defined in xxhash.h
|
||||
*/
|
||||
|
||||
#define XXH_STATIC_LINKING_ONLY /* access advanced declarations */
|
||||
#define XXH_IMPLEMENTATION /* access definitions */
|
||||
|
||||
#include "xxhash.h"
|
||||
+1
-6
@@ -223,9 +223,6 @@ contrib/openzfs/module/os/freebsd/zfs/zfs_znode_os.c optional zfs compile-with
|
||||
contrib/openzfs/module/os/freebsd/zfs/zio_crypt.c optional zfs compile-with "${ZFS_C}"
|
||||
contrib/openzfs/module/os/freebsd/zfs/zvol_os.c optional zfs compile-with "${ZFS_C}"
|
||||
|
||||
#zfs unicode support
|
||||
contrib/openzfs/module/unicode/u8_textprep.c optional zfs compile-with "${ZFS_C}"
|
||||
|
||||
#zfs checksums / zcommon
|
||||
contrib/openzfs/module/zcommon/cityhash.c optional zfs compile-with "${ZFS_C}"
|
||||
contrib/openzfs/module/zcommon/zfeature_common.c optional zfs compile-with "${ZFS_C}"
|
||||
@@ -326,6 +323,7 @@ contrib/openzfs/module/zfs/spa_stats.c optional zfs compile-with "${ZFS_C}"
|
||||
contrib/openzfs/module/zfs/space_map.c optional zfs compile-with "${ZFS_C}"
|
||||
contrib/openzfs/module/zfs/space_reftree.c optional zfs compile-with "${ZFS_C}"
|
||||
contrib/openzfs/module/zfs/txg.c optional zfs compile-with "${ZFS_C}"
|
||||
contrib/openzfs/module/zfs/u8_textprep.c optional zfs compile-with "${ZFS_C}"
|
||||
contrib/openzfs/module/zfs/uberblock.c optional zfs compile-with "${ZFS_C}"
|
||||
contrib/openzfs/module/zfs/unique.c optional zfs compile-with "${ZFS_C}"
|
||||
contrib/openzfs/module/zfs/vdev.c optional zfs compile-with "${ZFS_C}"
|
||||
@@ -744,7 +742,6 @@ dev/acpi_support/acpi_ibm.c optional acpi_ibm acpi
|
||||
dev/acpi_support/acpi_panasonic.c optional acpi_panasonic acpi
|
||||
dev/acpi_support/acpi_sbl_wmi.c optional acpi_sbl_wmi acpi
|
||||
dev/acpi_support/acpi_sony.c optional acpi_sony acpi
|
||||
dev/acpi_support/acpi_system76.c optional acpi_system76 acpi
|
||||
dev/acpi_support/acpi_toshiba.c optional acpi_toshiba acpi
|
||||
dev/acpi_support/atk0110.c optional aibs acpi
|
||||
dev/acpica/Osd/OsdDebug.c optional acpi
|
||||
@@ -1853,7 +1850,6 @@ dev/iicbus/rtc/ds1307.c optional ds1307
|
||||
dev/iicbus/rtc/ds13rtc.c optional ds13rtc | ds133x | ds1374
|
||||
dev/iicbus/rtc/ds1672.c optional ds1672
|
||||
dev/iicbus/rtc/ds3231.c optional ds3231
|
||||
dev/iicbus/rtc/hym8563.c optional hym8563 iicbus fdt
|
||||
dev/iicbus/rtc/isl12xx.c optional isl12xx
|
||||
dev/iicbus/rtc/nxprtc.c optional nxprtc | pcf8563
|
||||
dev/iicbus/rtc/pcf85063.c optional pcf85063 iicbus fdt
|
||||
@@ -3579,7 +3575,6 @@ dev/xdma/xdma_mbuf.c optional xdma
|
||||
dev/xdma/xdma_queue.c optional xdma
|
||||
dev/xdma/xdma_sg.c optional xdma
|
||||
dev/xdma/xdma_sglist.c optional xdma
|
||||
dev/xen/acpi/xen-acpi.c optional xenhvm
|
||||
dev/xen/balloon/balloon.c optional xenhvm
|
||||
dev/xen/blkfront/blkfront.c optional xenhvm
|
||||
dev/xen/blkback/blkback.c optional xenhvm
|
||||
|
||||
+77
-33
@@ -6,13 +6,6 @@
|
||||
|
||||
set -eu
|
||||
|
||||
# We've been seeing this script take over 15min to run. This may or
|
||||
# may not be normal. Just to get a little more insight, print out
|
||||
# a message to stdout with the top running process, and do this every
|
||||
# 30 seconds. We can delete this watchdog later once we get a better
|
||||
# handle on what the timeout value should be.
|
||||
(while [ 1 ] ; do sleep 30 && echo "[watchdog: $(ps -eo cmd --sort=-pcpu | head -n 2 | tail -n 1)}')]"; done) &
|
||||
|
||||
# The default 'azure.archive.ubuntu.com' mirrors can be really slow.
|
||||
# Prioritize the official Ubuntu mirrors.
|
||||
#
|
||||
@@ -41,35 +34,89 @@ ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -q -N ""
|
||||
sudo systemctl stop docker.socket
|
||||
sudo systemctl stop multipathd.socket
|
||||
|
||||
# remove default swapfile and /mnt
|
||||
sudo swapoff -a
|
||||
sudo umount -l /mnt
|
||||
DISK="/dev/disk/cloud/azure_resource-part1"
|
||||
sudo sed -e "s|^$DISK.*||g" -i /etc/fstab
|
||||
sudo wipefs -aq $DISK
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
# Special case:
|
||||
#
|
||||
# For reasons unknown, the runner can boot-up with two different block device
|
||||
# configurations. On one config you get two 75GB block devices, and on the
|
||||
# other you get a single 150GB block device. Here's what both look like:
|
||||
#
|
||||
# --- Two 75GB block devices ---
|
||||
# NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
||||
# sda 8:0 0 150G 0 disk
|
||||
# ├─sda1 8:1 0 149G 0 part /
|
||||
# ├─sda14 8:14 0 4M 0 part
|
||||
# ├─sda15 8:15 0 106M 0 part /boot/efi
|
||||
# └─sda16 259:0 0 913M 0 part /boot
|
||||
#
|
||||
# lrwxrwxrwx 1 root root 9 Jan 29 18:07 azure_root -> ../../sda
|
||||
# lrwxrwxrwx 1 root root 10 Jan 29 18:07 azure_root-part1 -> ../../sda1
|
||||
# lrwxrwxrwx 1 root root 11 Jan 29 18:07 azure_root-part14 -> ../../sda14
|
||||
# lrwxrwxrwx 1 root root 11 Jan 29 18:07 azure_root-part15 -> ../../sda15
|
||||
# lrwxrwxrwx 1 root root 11 Jan 29 18:07 azure_root-part16 -> ../../sda16
|
||||
#
|
||||
# --- One 150GB block device ---
|
||||
# NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
||||
# sda 8:0 0 75G 0 disk
|
||||
# ├─sda1 8:1 0 74G 0 part /
|
||||
# ├─sda14 8:14 0 4M 0 part
|
||||
# ├─sda15 8:15 0 106M 0 part /boot/efi
|
||||
# └─sda16 259:0 0 913M 0 part /boot
|
||||
# sdb 8:16 0 75G 0 disk
|
||||
# └─sdb1 8:17 0 75G 0 part
|
||||
#
|
||||
# lrwxrwxrwx 1 root root 9 Jan 29 18:07 azure_resource -> ../../sdb
|
||||
# lrwxrwxrwx 1 root root 10 Jan 29 18:07 azure_resource-part1 -> ../../sdb1
|
||||
# lrwxrwxrwx 1 root root 9 Jan 29 18:07 azure_root -> ../../sda
|
||||
# lrwxrwxrwx 1 root root 10 Jan 29 18:07 azure_root-part1 -> ../../sda1
|
||||
# lrwxrwxrwx 1 root root 11 Jan 29 18:07 azure_root-part14 -> ../../sda14
|
||||
# lrwxrwxrwx 1 root root 11 Jan 29 18:07 azure_root-part15 -> ../../sda15
|
||||
#
|
||||
# If we have the azure_resource-part1 partition, umount it, partition it, and
|
||||
# use it as our ZFS disk and swap partition. If not, just create a file VDEV
|
||||
# and swap file and use that instead.
|
||||
|
||||
# remove default swapfile and /mnt
|
||||
if [ -e /dev/disk/cloud/azure_resource-part1 ] ; then
|
||||
sudo umount -l /mnt
|
||||
DISK="/dev/disk/cloud/azure_resource-part1"
|
||||
sudo sed -e "s|^$DISK.*||g" -i /etc/fstab
|
||||
sudo wipefs -aq $DISK
|
||||
sudo systemctl daemon-reload
|
||||
fi
|
||||
|
||||
sudo modprobe loop
|
||||
sudo modprobe zfs
|
||||
|
||||
# partition the disk as needed
|
||||
DISK="/dev/disk/cloud/azure_resource"
|
||||
sudo sgdisk --zap-all $DISK
|
||||
sudo sgdisk -p \
|
||||
-n 1:0:+16G -c 1:"swap" \
|
||||
-n 2:0:0 -c 2:"tests" \
|
||||
$DISK
|
||||
sync
|
||||
sleep 1
|
||||
if [ -e /dev/disk/cloud/azure_resource-part1 ] ; then
|
||||
echo "We have two 75GB block devices"
|
||||
# partition the disk as needed
|
||||
DISK="/dev/disk/cloud/azure_resource"
|
||||
sudo sgdisk --zap-all $DISK
|
||||
sudo sgdisk -p \
|
||||
-n 1:0:+16G -c 1:"swap" \
|
||||
-n 2:0:0 -c 2:"tests" \
|
||||
$DISK
|
||||
sync
|
||||
sleep 1
|
||||
|
||||
sudo fallocate -l 12G /test.ssd2
|
||||
DISKS="$DISK-part2 /test.ssd2"
|
||||
|
||||
SWAP=$DISK-part1
|
||||
else
|
||||
echo "We have a single 150GB block device"
|
||||
sudo fallocate -l 72G /test.ssd2
|
||||
SWAP=/swapfile.ssd
|
||||
sudo fallocate -l 16G $SWAP
|
||||
sudo chmod 600 $SWAP
|
||||
DISKS="/test.ssd2"
|
||||
fi
|
||||
|
||||
# swap with same size as RAM (16GiB)
|
||||
sudo mkswap $DISK-part1
|
||||
sudo swapon $DISK-part1
|
||||
|
||||
# JBOD 2xdisk for OpenZFS storage (test vm's)
|
||||
SSD1="$DISK-part2"
|
||||
sudo fallocate -l 12G /test.ssd2
|
||||
SSD2=$(sudo losetup -b 4096 -f /test.ssd2 --show)
|
||||
sudo mkswap $SWAP
|
||||
sudo swapon $SWAP
|
||||
|
||||
# adjust zfs module parameter and create pool
|
||||
exec 1>/dev/null
|
||||
@@ -78,7 +125,7 @@ ARC_MAX=$((1024*1024*512))
|
||||
echo $ARC_MIN | sudo tee /sys/module/zfs/parameters/zfs_arc_min
|
||||
echo $ARC_MAX | sudo tee /sys/module/zfs/parameters/zfs_arc_max
|
||||
echo 1 | sudo tee /sys/module/zfs/parameters/zvol_use_blk_mq
|
||||
sudo zpool create -f -o ashift=12 zpool $SSD1 $SSD2 -O relatime=off \
|
||||
sudo zpool create -f -o ashift=12 zpool $DISKS -O relatime=off \
|
||||
-O atime=off -O xattr=sa -O compression=lz4 -O sync=disabled \
|
||||
-O redundant_metadata=none -O mountpoint=/mnt/tests
|
||||
|
||||
@@ -86,6 +133,3 @@ sudo zpool create -f -o ashift=12 zpool $SSD1 $SSD2 -O relatime=off \
|
||||
for i in /sys/block/s*/queue/scheduler; do
|
||||
echo "none" | sudo tee $i
|
||||
done
|
||||
|
||||
# Kill off our watchdog
|
||||
kill $(jobs -p)
|
||||
|
||||
+41
-12
@@ -43,6 +43,12 @@ case "$OS" in
|
||||
OSv="almalinux9"
|
||||
URL="https://repo.almalinux.org/almalinux/10/cloud/x86_64/images/AlmaLinux-10-GenericCloud-latest.x86_64.qcow2"
|
||||
;;
|
||||
alpine3-23)
|
||||
OSNAME="Alpine Linux 3.23.2"
|
||||
# Alpine Linux v3.22 and v3.23 are unknown to osinfo as of 2025-12-26.
|
||||
OSv="alpinelinux3.21"
|
||||
URL="https://dl-cdn.alpinelinux.org/alpine/v3.23/releases/cloud/generic_alpine-3.23.2-x86_64-bios-cloudinit-r0.qcow2"
|
||||
;;
|
||||
archlinux)
|
||||
OSNAME="Archlinux"
|
||||
URL="https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2"
|
||||
@@ -72,11 +78,6 @@ case "$OS" in
|
||||
OPTS[0]="--boot"
|
||||
OPTS[1]="uefi=on"
|
||||
;;
|
||||
fedora41)
|
||||
OSNAME="Fedora 41"
|
||||
OSv="fedora-unknown"
|
||||
URL="https://download.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2"
|
||||
;;
|
||||
fedora42)
|
||||
OSNAME="Fedora 42"
|
||||
OSv="fedora-unknown"
|
||||
@@ -216,13 +217,21 @@ if [ ${OS:0:7} != "freebsd" ]; then
|
||||
hostname: $OS
|
||||
|
||||
users:
|
||||
- name: root
|
||||
shell: $BASH
|
||||
- name: zfs
|
||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||
shell: $BASH
|
||||
ssh_authorized_keys:
|
||||
- $PUBKEY
|
||||
- name: root
|
||||
shell: /bin/bash
|
||||
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||
- name: zfs
|
||||
shell: /bin/bash
|
||||
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||
ssh_authorized_keys:
|
||||
- $PUBKEY
|
||||
# Workaround for Alpine Linux.
|
||||
lock_passwd: false
|
||||
passwd: '*'
|
||||
|
||||
packages:
|
||||
- sudo
|
||||
- bash
|
||||
|
||||
growpart:
|
||||
mode: auto
|
||||
@@ -305,3 +314,23 @@ else
|
||||
scp ~/src.txz "root@vm0:/tmp/src.txz"
|
||||
ssh root@vm0 'tar -C / -zxf /tmp/src.txz'
|
||||
fi
|
||||
|
||||
#
|
||||
# Config for Alpine Linux similar to FreeBSD.
|
||||
#
|
||||
if [ ${OS:0:6} == "alpine" ]; then
|
||||
while pidof /usr/bin/qemu-system-x86_64 >/dev/null; do
|
||||
ssh 2>/dev/null zfs@vm0 "uname -a" && break
|
||||
done
|
||||
# Enable community and testing repositories.
|
||||
ssh zfs@vm0 "sudo rm -rf /etc/apk/repositories"
|
||||
ssh zfs@vm0 "sudo setup-apkrepos -c1"
|
||||
ssh zfs@vm0 "echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' | sudo tee -a /etc/apk/repositories"
|
||||
# Upgrade to edge or latest-stable.
|
||||
#ssh zfs@vm0 "sudo sed -i 's#/v[0-9]\+\.[0-9]\+/#/edge/#g' /etc/apk/repositories"
|
||||
#ssh zfs@vm0 "sudo sed -i 's#/v[0-9]\+\.[0-9]\+/#/latest-stable/#g' /etc/apk/repositories"
|
||||
# Update and upgrade after repository setup.
|
||||
ssh zfs@vm0 "sudo apk update"
|
||||
ssh zfs@vm0 "sudo apk add --upgrade apk-tools"
|
||||
ssh zfs@vm0 "sudo apk upgrade --available"
|
||||
fi
|
||||
|
||||
@@ -10,6 +10,32 @@
|
||||
|
||||
set -eu
|
||||
|
||||
function alpine() {
|
||||
echo "##[group]Install Development Tools"
|
||||
sudo apk add \
|
||||
acl alpine-sdk attr autoconf automake bash build-base clang21 coreutils \
|
||||
cpio cryptsetup curl curl-dev dhcpcd eudev eudev-dev eudev-libs findutils \
|
||||
fio gawk gdb gettext-dev git grep jq libaio libaio-dev libcurl \
|
||||
libtirpc-dev libtool libunwind libunwind-dev linux-headers linux-tools \
|
||||
linux-virt linux-virt-dev lsscsi m4 make nfs-utils openssl-dev parted \
|
||||
pax procps py3-cffi py3-distlib py3-packaging py3-setuptools python3 \
|
||||
python3-dev qemu-guest-agent rng-tools rsync samba samba-server sed \
|
||||
strace sysstat util-linux util-linux-dev wget words xfsprogs xxhash \
|
||||
zlib-dev pamtester@testing
|
||||
echo "##[endgroup]"
|
||||
|
||||
echo "##[group]Switch to eudev"
|
||||
sudo setup-devd udev
|
||||
echo "##[endgroup]"
|
||||
|
||||
echo "##[group]Install ksh93 from Source"
|
||||
git clone --depth 1 https://github.com/ksh93/ksh.git /tmp/ksh
|
||||
cd /tmp/ksh
|
||||
./bin/package make
|
||||
sudo ./bin/package install /
|
||||
echo "##[endgroup]"
|
||||
}
|
||||
|
||||
function archlinux() {
|
||||
echo "##[group]Running pacman -Syu"
|
||||
sudo btrfs filesystem resize max /
|
||||
@@ -27,6 +53,10 @@ function archlinux() {
|
||||
function debian() {
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
|
||||
echo "##[group]Wait for cloud-init to finish"
|
||||
cloud-init status --wait
|
||||
echo "##[endgroup]"
|
||||
|
||||
echo "##[group]Running apt-get update+upgrade"
|
||||
sudo sed -i '/[[:alpha:]]-backports/d' /etc/apt/sources.list
|
||||
sudo apt-get update -y
|
||||
@@ -90,6 +120,11 @@ function rhel() {
|
||||
kernel-devel python3-setuptools qemu-guest-agent rng-tools rpcgen \
|
||||
rpm-build rsync samba strace sysstat systemd watchdog wget xfsprogs-devel \
|
||||
xxhash zlib-devel
|
||||
|
||||
# These are needed for building Lustre. We only install these on EL VMs since
|
||||
# we don't plan to test build Lustre on other platforms.
|
||||
sudo dnf install -y libnl3-devel libyaml-devel libmount-devel
|
||||
|
||||
echo "##[endgroup]"
|
||||
}
|
||||
|
||||
@@ -140,6 +175,9 @@ case "$1" in
|
||||
sudo dnf install -y kernel-abi-stablelists
|
||||
echo "##[endgroup]"
|
||||
;;
|
||||
alpine*)
|
||||
alpine
|
||||
;;
|
||||
archlinux)
|
||||
archlinux
|
||||
;;
|
||||
@@ -188,6 +226,16 @@ test -z "${ONLY_DEPS:-}" || exit 0
|
||||
# Start services
|
||||
echo "##[group]Enable services"
|
||||
case "$1" in
|
||||
alpine*)
|
||||
sudo -E rc-update add qemu-guest-agent
|
||||
sudo -E rc-update add nfs
|
||||
sudo -E rc-update add samba
|
||||
sudo -E rc-update add dhcpcd
|
||||
# Remove services related to cloud-init.
|
||||
sudo -E rc-update del cloud-init default
|
||||
sudo -E rc-update del cloud-final default
|
||||
sudo -E rc-update del cloud-config default
|
||||
;;
|
||||
freebsd*)
|
||||
# add virtio things
|
||||
echo 'virtio_load="YES"' | sudo -E tee -a /boot/loader.conf
|
||||
@@ -243,7 +291,7 @@ case "$1" in
|
||||
esac
|
||||
|
||||
case "$1" in
|
||||
archlinux|freebsd*)
|
||||
alpine*|archlinux|freebsd*)
|
||||
true
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -58,13 +58,21 @@ for ((i=1; i<=VMs; i++)); do
|
||||
fqdn: vm$i
|
||||
|
||||
users:
|
||||
- name: root
|
||||
shell: $BASH
|
||||
- name: zfs
|
||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||
shell: $BASH
|
||||
ssh_authorized_keys:
|
||||
- $PUBKEY
|
||||
- name: root
|
||||
shell: /bin/bash
|
||||
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||
- name: zfs
|
||||
shell: /bin/bash
|
||||
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||
ssh_authorized_keys:
|
||||
- $PUBKEY
|
||||
# Workaround for Alpine Linux.
|
||||
lock_passwd: false
|
||||
passwd: '*'
|
||||
|
||||
packages:
|
||||
- sudo
|
||||
- bash
|
||||
|
||||
growpart:
|
||||
mode: auto
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
######################################################################
|
||||
# 6) Test if Lustre can still build against ZFS
|
||||
######################################################################
|
||||
set -e
|
||||
|
||||
# Build from the latest Lustre tag rather than the master branch. We do this
|
||||
# under the assumption that master is going to have a lot of churn thus will be
|
||||
# more prone to breaking the build than a point release. We don't want ZFS
|
||||
# PR's reporting bad test results simply because upstream Lustre accidentally
|
||||
# broke their build.
|
||||
#
|
||||
# Skip any RC tags, or any tags where the last version digit is 50 or more.
|
||||
# Versions with 50 or more are development versions of Lustre.
|
||||
repo=https://github.com/lustre/lustre-release.git
|
||||
tag="$(git ls-remote --refs --exit-code --sort=version:refname --tags $repo | \
|
||||
awk -F '_' '/-RC/{next}; /refs\/tags\/v/{if ($NF < 50){print}}' | \
|
||||
tail -n 1 | sed 's/.*\///')"
|
||||
|
||||
echo "Cloning Lustre tag $tag"
|
||||
git clone --depth 1 --branch "$tag" "$repo"
|
||||
|
||||
cd lustre-release
|
||||
|
||||
# Include Lustre patches to build against master/zfs-2.4.x. Once these
|
||||
# patches are merged we can remove these lines.
|
||||
patches=('https://review.whamcloud.com/changes/fs%2Flustre-release~62101/revisions/2/patch?download'
|
||||
'https://review.whamcloud.com/changes/fs%2Flustre-release~63267/revisions/9/patch?download')
|
||||
|
||||
for p in "${patches[@]}" ; do
|
||||
curl $p | base64 -d > patch
|
||||
patch -p1 < patch || true
|
||||
done
|
||||
|
||||
echo "Configure Lustre"
|
||||
./autogen.sh
|
||||
# EL 9 needs '--disable-gss-keyring'
|
||||
./configure --with-zfs --disable-gss-keyring
|
||||
echo "Building Lustre RPMs"
|
||||
make rpms
|
||||
ls *.rpm
|
||||
|
||||
# There's only a handful of Lustre RPMs we actually need to install
|
||||
lustrerpms="$(ls *.rpm | grep -E 'kmod-lustre-osd-zfs-[0-9]|kmod-lustre-[0-9]|lustre-osd-zfs-mount-[0-9]')"
|
||||
echo "Installing: $lustrerpms"
|
||||
sudo dnf -y install $lustrerpms
|
||||
sudo modprobe -v lustre
|
||||
|
||||
# Should see some Lustre lines in dmesg
|
||||
sudo dmesg | grep -Ei 'lnet|lustre'
|
||||
+122
-10
@@ -4,7 +4,10 @@
|
||||
# 6) load openzfs module and run the tests
|
||||
#
|
||||
# called on runner: qemu-6-tests.sh
|
||||
# called on qemu-vm: qemu-6-tests.sh $OS $2/$3
|
||||
# called on qemu-vm: qemu-6-tests.sh $OS $2 $3 [--lustre|--builtin] [quick|default]
|
||||
#
|
||||
# --lustre: Test build lustre in addition to the normal tests
|
||||
# --builtin: Test build ZFS as a kernel built-in in addition to the normal tests
|
||||
######################################################################
|
||||
|
||||
set -eu
|
||||
@@ -38,6 +41,54 @@ function prefix() {
|
||||
fi
|
||||
}
|
||||
|
||||
function do_lustre_build() {
|
||||
local rc=0
|
||||
$HOME/zfs/.github/workflows/scripts/qemu-6-lustre-tests-vm.sh &> /var/tmp/lustre.txt || rc=$?
|
||||
echo "$rc" > /var/tmp/lustre-exitcode.txt
|
||||
if [ "$rc" != "0" ] ; then
|
||||
echo "$rc" > /var/tmp/tests-exitcode.txt
|
||||
fi
|
||||
}
|
||||
export -f do_lustre_build
|
||||
|
||||
# Test build ZFS into the kernel directly
|
||||
function do_builtin_build() {
|
||||
local rc=0
|
||||
# Get currently full kernel version (like '6.18.8')
|
||||
fullver=$(uname -r | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+')
|
||||
|
||||
# Get just the major ('6')
|
||||
major=$(echo $fullver | grep -Eo '^[0-9]+')
|
||||
(
|
||||
set -e
|
||||
|
||||
wget https://cdn.kernel.org/pub/linux/kernel/v${major}.x/linux-$fullver.tar.xz
|
||||
tar -xf $HOME/linux-$fullver.tar.xz
|
||||
cd $HOME/linux-$fullver
|
||||
make tinyconfig
|
||||
./scripts/config --enable EFI_PARTITON
|
||||
./scripts/config --enable BLOCK
|
||||
# BTRFS_FS is easiest config option to enable CONFIG_ZLIB_INFLATE|DEFLATE
|
||||
./scripts/config --enable BTRFS_FS
|
||||
yes "" | make oldconfig
|
||||
make prepare
|
||||
|
||||
cd $HOME/zfs
|
||||
./configure --with-linux=$HOME/linux-$fullver --enable-linux-builtin --enable-debug
|
||||
./copy-builtin $HOME/linux-$fullver
|
||||
|
||||
cd $HOME/linux-$fullver
|
||||
./scripts/config --enable ZFS
|
||||
yes "" | make oldconfig
|
||||
make -j `nproc`
|
||||
) &> /var/tmp/builtin.txt || rc=$?
|
||||
echo "$rc" > /var/tmp/builtin-exitcode.txt
|
||||
if [ "$rc" != "0" ] ; then
|
||||
echo "$rc" > /var/tmp/tests-exitcode.txt
|
||||
fi
|
||||
}
|
||||
export -f do_builtin_build
|
||||
|
||||
# called directly on the runner
|
||||
if [ -z ${1:-} ]; then
|
||||
cd "/var/tmp"
|
||||
@@ -49,8 +100,24 @@ if [ -z ${1:-} ]; then
|
||||
|
||||
for ((i=1; i<=VMs; i++)); do
|
||||
IP="192.168.122.1$i"
|
||||
|
||||
# We do an additional test build of Lustre against ZFS if we're vm2
|
||||
# on almalinux*. At the time of writing, the vm2 tests were
|
||||
# completing roughly 15min before the vm1 tests, so it makes sense
|
||||
# to have vm2 do the build.
|
||||
#
|
||||
# In addition, we do an additional test build of ZFS as a Linux
|
||||
# kernel built-in on Fedora. Again, we do it on vm2 to exploit vm2's
|
||||
# early finish time.
|
||||
extra=""
|
||||
if [[ "$OS" == almalinux* ]] && [[ "$i" == "2" ]] ; then
|
||||
extra="--lustre"
|
||||
elif [[ "$OS" == fedora* ]] && [[ "$i" == "2" ]] ; then
|
||||
extra="--builtin"
|
||||
fi
|
||||
|
||||
daemonize -c /var/tmp -p vm${i}.pid -o vm${i}log.txt -- \
|
||||
$SSH zfs@$IP $TESTS $OS $i $VMs $CI_TYPE
|
||||
$SSH zfs@$IP $TESTS $OS $i $VMs $extra $CI_TYPE
|
||||
# handly line by line and add info prefix
|
||||
stdbuf -oL tail -fq vm${i}log.txt \
|
||||
| while read -r line; do prefix "$i" "$line"; done &
|
||||
@@ -70,9 +137,35 @@ if [ -z ${1:-} ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# this part runs inside qemu vm
|
||||
|
||||
#############################################
|
||||
# Everything from here on runs inside qemu vm
|
||||
#############################################
|
||||
|
||||
# Process cmd line args
|
||||
OS="$1"
|
||||
shift
|
||||
NUM="$1"
|
||||
shift
|
||||
DEN="$1"
|
||||
shift
|
||||
|
||||
BUILD_LUSTRE=0
|
||||
BUILD_BUILTIN=0
|
||||
if [ "$1" == "--lustre" ] ; then
|
||||
BUILD_LUSTRE=1
|
||||
shift
|
||||
elif [ "$1" == "--builtin" ] ; then
|
||||
BUILD_BUILTIN=1
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ "$1" == "quick" ] ; then
|
||||
export RUNFILES="sanity.run"
|
||||
fi
|
||||
|
||||
export PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin"
|
||||
case "$1" in
|
||||
case "$OS" in
|
||||
freebsd*)
|
||||
TDIR="/usr/local/share/zfs"
|
||||
sudo kldstat -n zfs 2>/dev/null && sudo kldunload zfs
|
||||
@@ -95,23 +188,42 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable io_uring on el9/el10
|
||||
case "$1" in
|
||||
# Distribution-specific settings.
|
||||
case "$OS" in
|
||||
almalinux9|almalinux10|centos-stream*)
|
||||
# Enable io_uring on Enterprise Linux 9 and 10.
|
||||
sudo sysctl kernel.io_uring_disabled=0 > /dev/null
|
||||
;;
|
||||
alpine*)
|
||||
# Ensure `/etc/zfs/zpool.cache` exists.
|
||||
sudo mkdir -p /etc/zfs
|
||||
sudo touch /etc/zfs/zpool.cache
|
||||
sudo chmod 644 /etc/zfs/zpool.cache
|
||||
;;
|
||||
esac
|
||||
|
||||
# Lustre calls a number of exported ZFS module symbols. To make sure we don't
|
||||
# change the symbols and break Lustre, do a quick Lustre build of the latest
|
||||
# released Lustre against ZFS.
|
||||
#
|
||||
# Note that we do the Lustre test build in parallel with ZTS. ZTS isn't very
|
||||
# CPU intensive, so we can use idle CPU cycles "guilt free" for the build.
|
||||
# The Lustre build on its own takes ~15min.
|
||||
if [ "$BUILD_LUSTRE" == "1" ] ; then
|
||||
do_lustre_build &
|
||||
elif [ "$BUILD_BUILTIN" == "1" ] ; then
|
||||
# Try building ZFS directly into the Linux kernel (not as a module)
|
||||
do_builtin_build &
|
||||
fi
|
||||
|
||||
# run functional testings and save exitcode
|
||||
cd /var/tmp
|
||||
TAGS=$2/$3
|
||||
if [ "$4" == "quick" ]; then
|
||||
export RUNFILES="sanity.run"
|
||||
fi
|
||||
TAGS=$NUM/$DEN
|
||||
sudo dmesg -c > dmesg-prerun.txt
|
||||
mount > mount.txt
|
||||
df -h > df-prerun.txt
|
||||
$TDIR/zfs-tests.sh -vKO -s 3GB -T $TAGS
|
||||
|
||||
RV=$?
|
||||
df -h > df-postrun.txt
|
||||
echo $RV > tests-exitcode.txt
|
||||
|
||||
@@ -31,6 +31,12 @@ EOF
|
||||
rm -f tmp$$
|
||||
}
|
||||
|
||||
function showfile_tail() {
|
||||
echo "##[group]$2 (final lines)"
|
||||
tail -n 80 $1
|
||||
echo "##[endgroup]"
|
||||
}
|
||||
|
||||
# overview
|
||||
cat /tmp/summary.txt
|
||||
echo ""
|
||||
@@ -46,6 +52,32 @@ fi
|
||||
echo -e "\nFull logs for download:\n $1\n"
|
||||
|
||||
for ((i=1; i<=VMs; i++)); do
|
||||
|
||||
# Print Lustre build test results (the build is only done on vm2)
|
||||
if [ -f vm$i/lustre-exitcode.txt ] ; then
|
||||
rv=$(< vm$i/lustre-exitcode.txt)
|
||||
if [ $rv = 0 ]; then
|
||||
vm="[92mvm$i[0m"
|
||||
else
|
||||
vm="[1;91mvm$i[0m"
|
||||
touch /tmp/have_failed_tests
|
||||
fi
|
||||
file="vm$i/lustre.txt"
|
||||
test -s "$file" && showfile_tail "$file" "$vm: Lustre build"
|
||||
fi
|
||||
|
||||
if [ -f vm$i/builtin-exitcode.txt ] ; then
|
||||
rv=$(< vm$i/builtin-exitcode.txt)
|
||||
if [ $rv = 0 ]; then
|
||||
vm="[92mvm$i[0m"
|
||||
else
|
||||
vm="[1;91mvm$i[0m"
|
||||
touch /tmp/have_failed_tests
|
||||
fi
|
||||
file="vm$i/builtin.txt"
|
||||
test -s "$file" && showfile_tail "$file" "$vm: Linux built-in build"
|
||||
fi
|
||||
|
||||
rv=$(cat vm$i/tests-exitcode.txt)
|
||||
|
||||
if [ $rv = 0 ]; then
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
#
|
||||
# USAGE:
|
||||
#
|
||||
# ./qemu-test-repo-vm [URL]
|
||||
# ./qemu-test-repo-vm [--install] [URL]
|
||||
#
|
||||
# --lookup: When testing a repo, only lookup the latest package versions,
|
||||
# don't try to install them. Installing all of them takes over
|
||||
# an hour, so this is much quicker.
|
||||
#
|
||||
# URL: URL to use instead of http://download.zfsonlinux.org
|
||||
# If blank, use the default repo from zfs-release RPM.
|
||||
@@ -15,6 +19,13 @@ source /etc/os-release
|
||||
OS="$ID"
|
||||
VERSION="$VERSION_ID"
|
||||
|
||||
|
||||
LOOKUP=""
|
||||
if [ -n "$1" ] && [ "$1" == "--lookup" ] ; then
|
||||
LOOKUP=1
|
||||
shift
|
||||
fi
|
||||
|
||||
ALTHOST=""
|
||||
if [ -n "$1" ] ; then
|
||||
ALTHOST="$1"
|
||||
@@ -42,6 +53,15 @@ function test_install {
|
||||
sudo sed -i "s;baseurl=http://download.zfsonlinux.org;baseurl=$host;g" /etc/yum.repos.d/zfs.repo
|
||||
fi
|
||||
|
||||
baseurl=$(grep -A 5 "\[$repo\]" /etc/yum.repos.d/zfs.repo | awk -F'=' '/baseurl=/{print $2; exit}')
|
||||
|
||||
# Just do a version lookup - don't try to install any RPMs
|
||||
if [ "$LOOKUP" == "1" ] ; then
|
||||
package="$(dnf list $args zfs | tail -n 1 | awk '{print $2}')"
|
||||
echo "$repo ${package} $baseurl" >> $SUMMARY
|
||||
return
|
||||
fi
|
||||
|
||||
if ! sudo dnf -y install $args zfs zfs-test ; then
|
||||
echo "$repo ${package}...[FAILED] $baseurl" >> $SUMMARY
|
||||
return
|
||||
@@ -54,7 +74,6 @@ function test_install {
|
||||
sudo zpool status
|
||||
|
||||
# Print out repo name, rpm installed (kmod or dkms), and repo URL
|
||||
baseurl=$(grep -A 5 "\[$repo\]" /etc/yum.repos.d/zfs.repo | awk -F'=' '/baseurl=/{print $2; exit}')
|
||||
package=$(sudo rpm -qa | grep zfs | grep -E 'kmod|dkms')
|
||||
|
||||
echo "$repo $package $baseurl" >> $SUMMARY
|
||||
@@ -75,7 +94,7 @@ almalinux*)
|
||||
sudo rpm -qi zfs-release
|
||||
for i in zfs zfs-kmod zfs-testing zfs-testing-kmod zfs-latest \
|
||||
zfs-latest-kmod zfs-legacy zfs-legacy-kmod zfs-2.2 \
|
||||
zfs-2.2-kmod zfs-2.3 zfs-2.3-kmod ; do
|
||||
zfs-2.2-kmod zfs-2.3 zfs-2.3-kmod zfs-2.4 zfs-2.4-kmod; do
|
||||
test_install $i $ALTHOST
|
||||
done
|
||||
;;
|
||||
@@ -83,7 +102,7 @@ fedora*)
|
||||
url='https://raw.githubusercontent.com/openzfs/openzfs-docs/refs/heads/master/docs/Getting%20Started/Fedora/index.rst'
|
||||
name=$(curl -Ls $url | grep 'dnf install' | grep -Eo 'zfs-release-[0-9]+-[0-9]+')
|
||||
sudo dnf -y install -y https://zfsonlinux.org/fedora/$name$(rpm --eval "%{dist}").noarch.rpm
|
||||
for i in zfs zfs-latest zfs-legacy zfs-2.2 zfs-2.3 ; do
|
||||
for i in zfs zfs-latest zfs-legacy zfs-2.2 zfs-2.3 zfs-2.4 ; do
|
||||
test_install $i $ALTHOST
|
||||
done
|
||||
;;
|
||||
|
||||
+13
-2
@@ -42,6 +42,12 @@ on:
|
||||
required: false
|
||||
default: ""
|
||||
description: "(optional) repo URL (blank: use http://download.zfsonlinux.org)"
|
||||
lookup:
|
||||
type: boolean
|
||||
required: false
|
||||
default: false
|
||||
description: "(optional) do version lookup only on repo test"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
@@ -52,7 +58,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ['almalinux8', 'almalinux9', 'almalinux10', 'fedora41', 'fedora42', 'fedora43']
|
||||
os: ['almalinux8', 'almalinux9', 'almalinux10', 'fedora42', 'fedora43']
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -77,7 +83,12 @@ jobs:
|
||||
.github/workflows/scripts/qemu-prepare-for-build.sh
|
||||
|
||||
mkdir -p /tmp/repo
|
||||
ssh zfs@vm0 '$HOME/zfs/.github/workflows/scripts/qemu-test-repo-vm.sh' ${{ github.event.inputs.repo_url }}
|
||||
EXTRA=""
|
||||
if [ "${{ github.event.inputs.lookup }}" == 'true' ] ; then
|
||||
EXTRA="--lookup"
|
||||
fi
|
||||
|
||||
ssh zfs@vm0 '$HOME/zfs/.github/workflows/scripts/qemu-test-repo-vm.sh' $EXTRA ${{ github.event.inputs.repo_url }}
|
||||
else
|
||||
EXTRA=""
|
||||
if [ -n "${{ github.event.inputs.patch_level }}" ] ; then
|
||||
|
||||
+10
-6
@@ -10,6 +10,11 @@ on:
|
||||
required: false
|
||||
default: ""
|
||||
description: "(optional) Experimental kernel version to install on Fedora (like '6.14' or '6.13.3-0.rc3')"
|
||||
specific_os:
|
||||
type: string
|
||||
required: false
|
||||
default: ""
|
||||
description: "(optional) Only run on this specific OS (like 'fedora42' or 'alpine3-23')"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
@@ -43,7 +48,7 @@ jobs:
|
||||
os_selection='["almalinux8", "almalinux9", "almalinux10", "debian12", "fedora42", "freebsd15-0s", "ubuntu24"]'
|
||||
;;
|
||||
linux)
|
||||
os_selection='["almalinux8", "almalinux9", "almalinux10", "centos-stream9", "centos-stream10", "debian11", "debian12", "debian13", "fedora41", "fedora42", "fedora43", "ubuntu22", "ubuntu24"]'
|
||||
os_selection='["almalinux8", "almalinux9", "almalinux10", "centos-stream9", "centos-stream10", "debian11", "debian12", "debian13", "fedora42", "fedora43", "ubuntu22", "ubuntu24"]'
|
||||
;;
|
||||
freebsd)
|
||||
os_selection='["freebsd13-5r", "freebsd14-3r", "freebsd13-5s", "freebsd14-3s", "freebsd15-0s", "freebsd16-0c"]'
|
||||
@@ -58,6 +63,9 @@ jobs:
|
||||
# They specified a custom kernel version for Fedora.
|
||||
# Use only Fedora runners.
|
||||
os_json=$(echo ${os_selection} | jq -c '[.[] | select(startswith("fedora"))]')
|
||||
elif ${{ github.event.inputs.specific_os != '' }}; then
|
||||
# Use only the specified runner.
|
||||
os_json=$(jq -cn --arg os "${{ github.event.inputs.specific_os }}" '[ $os ]')
|
||||
else
|
||||
# Normal case
|
||||
os_json=$(echo ${os_selection} | jq -c)
|
||||
@@ -88,11 +96,7 @@ jobs:
|
||||
|
||||
- name: Setup QEMU
|
||||
timeout-minutes: 60
|
||||
run: |
|
||||
# Add a timestamp to each line to debug timeouts
|
||||
while IFS=$'\n' read -r line; do
|
||||
echo "$(date +'%H:%M:%S') $line"
|
||||
done < <(.github/workflows/scripts/qemu-1-setup.sh)
|
||||
run: .github/workflows/scripts/qemu-1-setup.sh
|
||||
|
||||
- name: Start build machine
|
||||
timeout-minutes: 10
|
||||
|
||||
@@ -53,6 +53,7 @@ Jason Harmening <jason.harmening@gmail.com>
|
||||
Jeremy Faulkner <gldisater@gmail.com>
|
||||
Jinshan Xiong <jinshan.xiong@gmail.com>
|
||||
John Poduska <jpoduska@datto.com>
|
||||
Joseph Holsten <joseph@josephholsten.com>
|
||||
Jo Zzsi <jozzsicsataban@gmail.com>
|
||||
Justin Scholz <git@justinscholz.de>
|
||||
Ka Ho Ng <khng300@gmail.com>
|
||||
@@ -72,10 +73,12 @@ Roberto Ricci <io@r-ricci.it>
|
||||
Roberto Ricci <ricci@disroot.org>
|
||||
Rob Norris <robn@despairlabs.com>
|
||||
Rob Norris <rob.norris@klarasystems.com>
|
||||
Rob Norris <rob.norris@truenas.com>
|
||||
Sam Lunt <samuel.j.lunt@gmail.com>
|
||||
Sanjeev Bagewadi <sanjeev.bagewadi@gmail.com>
|
||||
Sebastian Wuerl <s.wuerl@mailbox.org>
|
||||
SHENGYI HONG <aokblast@FreeBSD.org>
|
||||
Sivesh Kumar <siveshjami@gmail.com>
|
||||
Stoiko Ivanov <github@nomore.at>
|
||||
Tamas TEVESZ <ice@extreme.hu>
|
||||
WHR <msl0000023508@gmail.com>
|
||||
@@ -83,8 +86,12 @@ Yanping Gao <yanping.gao@xtaotech.com>
|
||||
Youzhong Yang <youzhong@gmail.com>
|
||||
|
||||
# Signed-off-by: overriding Author:
|
||||
Alexander Moch <mail@alexmoch.com> <amoch@ernw.de>
|
||||
Alexander Moch <mail@alexmoch.com> <github@alexanderjulian.de>
|
||||
Alexander Ziaee <ziaee@FreeBSD.org> <concussious@runbox.com>
|
||||
delan azabani <dazabani@igalia.com> <delan@azabani.com>
|
||||
Felix Schmidt <felixschmidt20@aol.com> <f.sch.prototype@gmail.com>
|
||||
George Shammas <george@shamm.as> <georgyo@gmail.com>
|
||||
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> <jean-sebastien.pedron@dumbbell.fr>
|
||||
Konstantin Belousov <kib@FreeBSD.org> <kib@kib.kiev.ua>
|
||||
Olivier Certner <olce@FreeBSD.org> <olce.freebsd@certner.fr>
|
||||
@@ -108,6 +115,7 @@ Ned Bass <bass6@llnl.gov> <bass6@zeno1.(none)>
|
||||
Tulsi Jain <tulsi.jain@delphix.com> <tulsi.jain@Tulsi-Jains-MacBook-Pro.local>
|
||||
|
||||
# Mappings from Github no-reply addresses
|
||||
Adi Gollamudi <adigollamudi@gmail.com> <68113680+Adi-Goll@users.noreply.github.com>
|
||||
ajs124 <git@ajs124.de> <ajs124@users.noreply.github.com>
|
||||
Alek Pinchuk <apinchuk@axcient.com> <alek-p@users.noreply.github.com>
|
||||
Aleksandr Liber <aleksandr.liber@perforce.com> <61714074+AleksandrLiber@users.noreply.github.com>
|
||||
@@ -125,6 +133,7 @@ bernie1995 <bernie.pikes@gmail.com> <42413912+bernie1995@users.noreply.github.co
|
||||
Bojan Novković <bnovkov@FreeBSD.org> <72801811+bnovkov@users.noreply.github.com>
|
||||
Boris Protopopov <boris.protopopov@actifio.com> <bprotopopov@users.noreply.github.com>
|
||||
Brad Forschinger <github@bnjf.id.au> <bnjf@users.noreply.github.com>
|
||||
Brad Spengler <94915855+bspengler-oss@users.noreply.github.com>>
|
||||
Brandon Thetford <brandon@dodecatec.com> <dodexahedron@users.noreply.github.com>
|
||||
buzzingwires <buzzingwires@outlook.com> <131118055+buzzingwires@users.noreply.github.com>
|
||||
Cedric Maunoury <cedric.maunoury@gmail.com> <38213715+cedricmaunoury@users.noreply.github.com>
|
||||
@@ -138,6 +147,7 @@ Daniel Kobras <d.kobras@science-computing.de> <sckobras@users.noreply.github.com
|
||||
Daniel Reichelt <hacking@nachtgeist.net> <nachtgeist@users.noreply.github.com>
|
||||
David Quigley <david.quigley@intel.com> <dpquigl@users.noreply.github.com>
|
||||
Dennis R. Friedrichsen <dennis.r.friedrichsen@gmail.com> <31087738+dennisfriedrichsen@users.noreply.github.com>
|
||||
Dennis Vestergaard Værum <github@varum.dk> <6872940+dvaerum@users.noreply.github.com>
|
||||
Dex Wood <slash2314@gmail.com> <slash2314@users.noreply.github.com>
|
||||
DHE <git@dehacked.net> <DeHackEd@users.noreply.github.com>
|
||||
Dmitri John Ledkov <dimitri.ledkov@canonical.com> <19779+xnox@users.noreply.github.com>
|
||||
|
||||
@@ -14,6 +14,7 @@ CONTRIBUTORS:
|
||||
Adam D. Moss <c@yotes.com>
|
||||
Adam Leventhal <ahl@delphix.com>
|
||||
Adam Stevko <adam.stevko@gmail.com>
|
||||
Adi Gollamudi <adigollamudi@gmail.com>
|
||||
adisbladis <adis@blad.is>
|
||||
Adrian Chadd <adrian@freebsd.org>
|
||||
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
|
||||
@@ -32,8 +33,10 @@ CONTRIBUTORS:
|
||||
Alek Pinchuk <alek@nexenta.com>
|
||||
Aleksandr Liber <aleksandr.liber@perforce.com>
|
||||
Aleksa Sarai <cyphar@cyphar.com>
|
||||
Alex <simplecodemaster@gmail.com>
|
||||
Alexander Eremin <a.eremin@nexenta.com>
|
||||
Alexander Lobakin <alobakin@pm.me>
|
||||
Alexander Moch <mail@alexmoch.com>
|
||||
Alexander Motin <mav@freebsd.org>
|
||||
Alexander Pyhalov <apyhalov@gmail.com>
|
||||
Alexander Richardson <Alexander.Richardson@cl.cam.ac.uk>
|
||||
@@ -46,6 +49,7 @@ CONTRIBUTORS:
|
||||
Alex McWhirter <alexmcwhirter@triadic.us>
|
||||
Alex Reece <alex@delphix.com>
|
||||
Alex Wilson <alex.wilson@joyent.com>
|
||||
Alexx Saver <lzsaver.eth@ethermail.io>
|
||||
Alex Zhuravlev <alexey.zhuravlev@intel.com>
|
||||
Allan Jude <allanjude@freebsd.org>
|
||||
Allen Holl <allen.m.holl@gmail.com>
|
||||
@@ -89,6 +93,7 @@ CONTRIBUTORS:
|
||||
Arun KV <arun.kv@datacore.com>
|
||||
Arvind Sankar <nivedita@alum.mit.edu>
|
||||
Attila Fülöp <attila@fueloep.org>
|
||||
Austin Wise <AustinWise@gmail.com>
|
||||
Avatat <kontakt@avatat.pl>
|
||||
Bart Coddens <bart.coddens@gmail.com>
|
||||
Basil Crow <basil.crow@delphix.com>
|
||||
@@ -110,6 +115,7 @@ CONTRIBUTORS:
|
||||
Boris Protopopov <boris.protopopov@nexenta.com>
|
||||
Brad Forschinger <github@bnjf.id.au>
|
||||
Brad Lewis <brad.lewis@delphix.com>
|
||||
Brad Spengler <bspengler-oss@users.noreply.github.com>
|
||||
Brandon Thetford <brandon@dodecatec.com>
|
||||
Brian Atkinson <bwa@g.clemson.edu>
|
||||
Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
@@ -196,7 +202,9 @@ CONTRIBUTORS:
|
||||
David Quigley <david.quigley@intel.com>
|
||||
Debabrata Banerjee <dbanerje@akamai.com>
|
||||
D. Ebdrup <debdrup@freebsd.org>
|
||||
delan azabani <dazabani@igalia.com>
|
||||
Dennis R. Friedrichsen <dennis.r.friedrichsen@gmail.com>
|
||||
Dennis Vestergaard Værum <github@varum.dk>
|
||||
Denys Rtveliashvili <denys@rtveliashvili.name>
|
||||
Derek Dai <daiderek@gmail.com>
|
||||
Derek Schrock <dereks@lifeofadishwasher.com>
|
||||
@@ -223,6 +231,7 @@ CONTRIBUTORS:
|
||||
Eric Desrochers <eric.desrochers@canonical.com>
|
||||
Eric Dillmann <eric@jave.fr>
|
||||
Eric Schrock <Eric.Schrock@delphix.com>
|
||||
Erik Larsson <catacombae@gmail.com>
|
||||
Ethan Coe-Renner <coerenner1@llnl.gov>
|
||||
Etienne Dechamps <etienne@edechamps.fr>
|
||||
Evan Allrich <eallrich@gmail.com>
|
||||
@@ -255,6 +264,7 @@ CONTRIBUTORS:
|
||||
George Diamantopoulos <georgediam@gmail.com>
|
||||
George Gaydarov <git@gg7.io>
|
||||
George Melikov <mail@gmelikov.ru>
|
||||
George Shammas <george@shamm.as>
|
||||
George Wilson <gwilson@delphix.com>
|
||||
Georgy Yakovlev <ya@sysdump.net>
|
||||
Gerardwx <gerardw@alum.mit.edu>
|
||||
@@ -343,6 +353,7 @@ CONTRIBUTORS:
|
||||
Joe Stein <joe.stein@delphix.com>
|
||||
John-Mark Gurney <jmg@funkthat.com>
|
||||
John Albietz <inthecloud247@gmail.com>
|
||||
John Cabaj <john.cabaj@canonical.com>
|
||||
John Eismeier <john.eismeier@gmail.com>
|
||||
John Gallagher <john.gallagher@delphix.com>
|
||||
John Layman <jlayman@sagecloud.com>
|
||||
@@ -358,6 +369,7 @@ CONTRIBUTORS:
|
||||
Jorgen Lundman <lundman@lundman.net>
|
||||
Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
|
||||
Jose Luis Duran <jlduran@gmail.com>
|
||||
Joseph Holsten <joseph@josephholsten.com>
|
||||
Josh Soref <jsoref@users.noreply.github.com>
|
||||
Joshua M. Clulow <josh@sysmgr.org>
|
||||
José Luis Salvador Rufo <salvador.joseluis@gmail.com>
|
||||
@@ -622,6 +634,7 @@ CONTRIBUTORS:
|
||||
Simon Guest <simon.guest@tesujimath.org>
|
||||
Simon Howard <fraggle@soulsphere.org>
|
||||
Simon Klinkert <simon.klinkert@gmail.com>
|
||||
Sivesh Kumar <siveshjami@gmail.com>
|
||||
Sowrabha Gopal <sowrabha.gopal@delphix.com>
|
||||
Spencer Kinny <spencerkinny1995@gmail.com>
|
||||
Srikanth N S <srikanth.nagasubbaraoseetharaman@hpe.com>
|
||||
@@ -704,6 +717,7 @@ CONTRIBUTORS:
|
||||
Windel Bouwman <windel@windel.nl>
|
||||
Wojciech Małota-Wójcik <outofforest@users.noreply.github.com>
|
||||
Wolfgang Bumiller <w.bumiller@proxmox.com>
|
||||
Wolfgang Hoschek <wolfgang.hoschek@mac.com>
|
||||
XDTG <click1799@163.com>
|
||||
Xin Li <delphij@FreeBSD.org>
|
||||
Xinliang Liu <xinliang.liu@linaro.org>
|
||||
|
||||
@@ -6,5 +6,5 @@ Release: 1
|
||||
Release-Tags: relext
|
||||
License: CDDL
|
||||
Author: OpenZFS
|
||||
Linux-Maximum: 6.18
|
||||
Linux-Maximum: 6.19
|
||||
Linux-Minimum: 4.18
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
CLEANFILES =
|
||||
dist_noinst_DATA =
|
||||
INSTALL_DATA_HOOKS =
|
||||
@@ -132,6 +133,7 @@ cstyle:
|
||||
! -name 'zfs_config.*' ! -name '*.mod.c' \
|
||||
! -name 'opt_global.h' ! -name '*_if*.h' \
|
||||
! -name 'zstd_compat_wrapper.h' \
|
||||
! -path './module/zstd/zstd-in.c' \
|
||||
! -path './module/zstd/lib/*' \
|
||||
! -path './include/sys/lua/*' \
|
||||
! -path './module/lua/l*.[ch]' \
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
|
||||
autoreconf -fiv "$(dirname "$0")" && rm -rf "$(dirname "$0")"/autom4te.cache
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
bin_SCRIPTS =
|
||||
bin_PROGRAMS =
|
||||
sbin_SCRIPTS =
|
||||
@@ -35,8 +36,8 @@ zhack_SOURCES = \
|
||||
zhack_LDADD = \
|
||||
libzpool.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
|
||||
libnvpair.la \
|
||||
librange_tree.la
|
||||
|
||||
ztest_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
|
||||
ztest_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
raidz_test_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
|
||||
raidz_test_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
zdb_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
|
||||
zdb_CFLAGS = $(AM_CFLAGS) $(LIBCRYPTO_CFLAGS)
|
||||
|
||||
@@ -13,6 +14,8 @@ zdb_LDADD = \
|
||||
libzdb.la \
|
||||
libzpool.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
libnvpair.la \
|
||||
libbtree.la \
|
||||
librange_tree.la
|
||||
|
||||
zdb_LDADD += $(LIBCRYPTO_LIBS)
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
* Copyright (c) 2021 Toomas Soome <tsoome@me.com>
|
||||
* Copyright (c) 2023, 2024, Klara Inc.
|
||||
* Copyright (c) 2023, Rob Norris <robn@despairlabs.com>
|
||||
* Copyright (c) 2026, TrueNAS.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -3390,14 +3391,14 @@ zdb_derive_key(dsl_dir_t *dd, uint8_t *key_out)
|
||||
static char encroot[ZFS_MAX_DATASET_NAME_LEN];
|
||||
static boolean_t key_loaded = B_FALSE;
|
||||
|
||||
static void
|
||||
static int
|
||||
zdb_load_key(objset_t *os)
|
||||
{
|
||||
dsl_pool_t *dp;
|
||||
dsl_dir_t *dd, *rdd;
|
||||
uint8_t key[WRAPPING_KEY_LEN];
|
||||
uint64_t rddobj;
|
||||
int err;
|
||||
int err = 0;
|
||||
|
||||
dp = spa_get_dsl(os->os_spa);
|
||||
dd = os->os_dsl_dataset->ds_dir;
|
||||
@@ -3410,10 +3411,14 @@ zdb_load_key(objset_t *os)
|
||||
dsl_dir_rele(rdd, FTAG);
|
||||
|
||||
if (!zdb_derive_key(dd, key))
|
||||
fatal("couldn't derive encryption key");
|
||||
|
||||
err = EINVAL;
|
||||
dsl_pool_config_exit(dp, FTAG);
|
||||
|
||||
if (err != 0) {
|
||||
fprintf(stderr, "couldn't derive encryption key\n");
|
||||
return (err);
|
||||
}
|
||||
|
||||
ASSERT3U(dsl_dataset_get_keystatus(dd), ==, ZFS_KEYSTATUS_UNAVAILABLE);
|
||||
|
||||
dsl_crypto_params_t *dcp;
|
||||
@@ -3429,16 +3434,20 @@ zdb_load_key(objset_t *os)
|
||||
dsl_crypto_params_free(dcp, (err != 0));
|
||||
fnvlist_free(crypto_args);
|
||||
|
||||
if (err != 0)
|
||||
fatal(
|
||||
"couldn't load encryption key for %s: %s",
|
||||
if (err != 0) {
|
||||
fprintf(stderr,
|
||||
"couldn't load encryption key for %s: %s\n",
|
||||
encroot, err == ZFS_ERR_CRYPTO_NOTSUP ?
|
||||
"crypto params not supported" : strerror(err));
|
||||
return (err);
|
||||
}
|
||||
|
||||
ASSERT3U(dsl_dataset_get_keystatus(dd), ==, ZFS_KEYSTATUS_AVAILABLE);
|
||||
|
||||
printf("Unlocked encryption root: %s\n", encroot);
|
||||
key_loaded = B_TRUE;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3481,15 +3490,30 @@ open_objset(const char *path, const void *tag, objset_t **osp)
|
||||
path, strerror(err));
|
||||
return (err);
|
||||
}
|
||||
dsl_dataset_long_hold(dmu_objset_ds(*osp), tag);
|
||||
dsl_pool_rele(dmu_objset_pool(*osp), tag);
|
||||
|
||||
/* succeeds or dies */
|
||||
zdb_load_key(*osp);
|
||||
/*
|
||||
* Only try to load the key and unlock the dataset if it is
|
||||
* actually encrypted; otherwise we'll just crash. Just
|
||||
* ignore the -K switch entirely otherwise; it's useful to be
|
||||
* able to provide even if it's not needed.
|
||||
*/
|
||||
if ((*osp)->os_encrypted) {
|
||||
dsl_dataset_long_hold(dmu_objset_ds(*osp), tag);
|
||||
dsl_pool_rele(dmu_objset_pool(*osp), tag);
|
||||
|
||||
/* release it all */
|
||||
dsl_dataset_long_rele(dmu_objset_ds(*osp), tag);
|
||||
dsl_dataset_rele(dmu_objset_ds(*osp), tag);
|
||||
err = zdb_load_key(*osp);
|
||||
|
||||
/* release it all */
|
||||
dsl_dataset_long_rele(dmu_objset_ds(*osp), tag);
|
||||
dsl_dataset_rele(dmu_objset_ds(*osp), tag);
|
||||
|
||||
if (err != 0) {
|
||||
*osp = NULL;
|
||||
return (err);
|
||||
}
|
||||
} else {
|
||||
dmu_objset_rele(*osp, tag);
|
||||
}
|
||||
}
|
||||
|
||||
int ds_hold_flags = key_loaded ? DS_HOLD_FLAG_DECRYPT : 0;
|
||||
@@ -3498,6 +3522,7 @@ open_objset(const char *path, const void *tag, objset_t **osp)
|
||||
if (err != 0) {
|
||||
(void) fprintf(stderr, "failed to hold dataset '%s': %s\n",
|
||||
path, strerror(err));
|
||||
*osp = NULL;
|
||||
return (err);
|
||||
}
|
||||
dsl_dataset_long_hold(dmu_objset_ds(*osp), tag);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
include $(srcdir)/%D%/zed.d/Makefile.am
|
||||
|
||||
zed_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
zedconfdir = $(sysconfdir)/zfs/zed.d
|
||||
dist_zedconf_DATA = \
|
||||
%D%/zed-functions.sh \
|
||||
|
||||
@@ -21,6 +21,7 @@ zed_check_cmd "${ZFS}" sort diff
|
||||
|
||||
# We lock the output file to avoid simultaneous writes.
|
||||
# If we run into trouble, log and drop the lock
|
||||
# shellcheck disable=SC2329
|
||||
abort_alter() {
|
||||
zed_log_msg "Error updating zfs-list.cache for ${ZEVENT_POOL}!"
|
||||
zed_unlock "${FSLIST}"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
sbin_PROGRAMS += zfs
|
||||
CPPCHECKTARGETS += zfs
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ get_usage(zfs_help_t idx)
|
||||
{
|
||||
switch (idx) {
|
||||
case HELP_CLONE:
|
||||
return (gettext("\tclone [-p] [-o property=value] ... "
|
||||
return (gettext("\tclone [-pu] [-o property=value] ... "
|
||||
"<snapshot> <filesystem|volume>\n"));
|
||||
case HELP_CREATE:
|
||||
return (gettext("\tcreate [-Pnpuv] [-o property=value] ... "
|
||||
@@ -439,8 +439,8 @@ get_usage(zfs_help_t idx)
|
||||
return (gettext("\tredact <snapshot> <bookmark> "
|
||||
"<redaction_snapshot> ...\n"));
|
||||
case HELP_REWRITE:
|
||||
return (gettext("\trewrite [-Prvx] [-o <offset>] [-l <length>] "
|
||||
"<directory|file ...>\n"));
|
||||
return (gettext("\trewrite [-CPSrvx] [-o <offset>] "
|
||||
"[-l <length>] <directory|file ...>\n"));
|
||||
case HELP_JAIL:
|
||||
return (gettext("\tjail <jailid|jailname> <filesystem>\n"));
|
||||
case HELP_UNJAIL:
|
||||
@@ -818,7 +818,7 @@ zfs_mount_and_share(libzfs_handle_t *hdl, const char *dataset, zfs_type_t type)
|
||||
}
|
||||
|
||||
/*
|
||||
* zfs clone [-p] [-o prop=value] ... <snap> <fs | vol>
|
||||
* zfs clone [-pu] [-o prop=value] ... <snap> <fs | vol>
|
||||
*
|
||||
* Given an existing dataset, create a writable copy whose initial contents
|
||||
* are the same as the source. The newly created dataset maintains a
|
||||
@@ -826,21 +826,24 @@ zfs_mount_and_share(libzfs_handle_t *hdl, const char *dataset, zfs_type_t type)
|
||||
* the clone exists.
|
||||
*
|
||||
* The '-p' flag creates all the non-existing ancestors of the target first.
|
||||
*
|
||||
* The '-u' flag prevents the newly created file system from being mounted.
|
||||
*/
|
||||
static int
|
||||
zfs_do_clone(int argc, char **argv)
|
||||
{
|
||||
zfs_handle_t *zhp = NULL;
|
||||
boolean_t parents = B_FALSE;
|
||||
boolean_t nomount = B_FALSE;
|
||||
nvlist_t *props;
|
||||
int ret = 0;
|
||||
int ret = 1;
|
||||
int c;
|
||||
|
||||
if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0)
|
||||
nomem();
|
||||
|
||||
/* check options */
|
||||
while ((c = getopt(argc, argv, "o:p")) != -1) {
|
||||
while ((c = getopt(argc, argv, "o:pu")) != -1) {
|
||||
switch (c) {
|
||||
case 'o':
|
||||
if (!parseprop(props, optarg)) {
|
||||
@@ -851,6 +854,9 @@ zfs_do_clone(int argc, char **argv)
|
||||
case 'p':
|
||||
parents = B_TRUE;
|
||||
break;
|
||||
case 'u':
|
||||
nomount = B_TRUE;
|
||||
break;
|
||||
case '?':
|
||||
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
||||
optopt);
|
||||
@@ -879,8 +885,7 @@ zfs_do_clone(int argc, char **argv)
|
||||
|
||||
/* open the source dataset */
|
||||
if ((zhp = zfs_open(g_zfs, argv[0], ZFS_TYPE_SNAPSHOT)) == NULL) {
|
||||
nvlist_free(props);
|
||||
return (1);
|
||||
goto error_open;
|
||||
}
|
||||
|
||||
if (parents && zfs_name_valid(argv[1], ZFS_TYPE_FILESYSTEM |
|
||||
@@ -892,37 +897,39 @@ zfs_do_clone(int argc, char **argv)
|
||||
*/
|
||||
if (zfs_dataset_exists(g_zfs, argv[1], ZFS_TYPE_FILESYSTEM |
|
||||
ZFS_TYPE_VOLUME)) {
|
||||
zfs_close(zhp);
|
||||
nvlist_free(props);
|
||||
return (0);
|
||||
ret = 0;
|
||||
goto error;
|
||||
}
|
||||
if (zfs_create_ancestors(g_zfs, argv[1]) != 0) {
|
||||
zfs_close(zhp);
|
||||
nvlist_free(props);
|
||||
return (1);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
/* pass to libzfs */
|
||||
ret = zfs_clone(zhp, argv[1], props);
|
||||
|
||||
/* create the mountpoint if necessary */
|
||||
if (ret == 0) {
|
||||
if (log_history) {
|
||||
(void) zpool_log_history(g_zfs, history_str);
|
||||
log_history = B_FALSE;
|
||||
}
|
||||
if (ret != 0)
|
||||
goto error;
|
||||
|
||||
/*
|
||||
* Dataset cloned successfully, mount/share failures are
|
||||
* non-fatal.
|
||||
*/
|
||||
(void) zfs_mount_and_share(g_zfs, argv[1], ZFS_TYPE_DATASET);
|
||||
/* create the mountpoint if necessary */
|
||||
if (log_history) {
|
||||
(void) zpool_log_history(g_zfs, history_str);
|
||||
log_history = B_FALSE;
|
||||
}
|
||||
|
||||
zfs_close(zhp);
|
||||
nvlist_free(props);
|
||||
if (nomount)
|
||||
goto error;
|
||||
|
||||
/*
|
||||
* Dataset cloned successfully, mount/share failures are
|
||||
* non-fatal.
|
||||
*/
|
||||
(void) zfs_mount_and_share(g_zfs, argv[1], ZFS_TYPE_DATASET);
|
||||
|
||||
error:
|
||||
zfs_close(zhp);
|
||||
error_open:
|
||||
nvlist_free(props);
|
||||
return (!!ret);
|
||||
|
||||
usage:
|
||||
@@ -1048,7 +1055,7 @@ default_volblocksize(zpool_handle_t *zhp, nvlist_t *props)
|
||||
}
|
||||
|
||||
/*
|
||||
* zfs create [-Pnpv] [-o prop=value] ... fs
|
||||
* zfs create [-Pnpuv] [-o prop=value] ... fs
|
||||
* zfs create [-Pnpsv] [-b blocksize] [-o prop=value] ... -V vol size
|
||||
*
|
||||
* Create a new dataset. This command can be used to create filesystems
|
||||
@@ -4046,7 +4053,7 @@ zfs_do_rename(int argc, char **argv)
|
||||
zfs_handle_t *zhp;
|
||||
renameflags_t flags = { 0 };
|
||||
int c;
|
||||
int ret = 0;
|
||||
int ret = 1;
|
||||
int types;
|
||||
boolean_t parents = B_FALSE;
|
||||
|
||||
@@ -4118,18 +4125,19 @@ zfs_do_rename(int argc, char **argv)
|
||||
types = ZFS_TYPE_DATASET;
|
||||
|
||||
if ((zhp = zfs_open(g_zfs, argv[0], types)) == NULL)
|
||||
return (1);
|
||||
goto error_open;
|
||||
|
||||
/* If we were asked and the name looks good, try to create ancestors. */
|
||||
if (parents && zfs_name_valid(argv[1], zfs_get_type(zhp)) &&
|
||||
zfs_create_ancestors(g_zfs, argv[1]) != 0) {
|
||||
zfs_close(zhp);
|
||||
return (1);
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = (zfs_rename(zhp, argv[1], flags) != 0);
|
||||
|
||||
error:
|
||||
zfs_close(zhp);
|
||||
error_open:
|
||||
return (ret);
|
||||
}
|
||||
|
||||
@@ -7339,15 +7347,14 @@ append_options(char *mntopts, char *newopts)
|
||||
static enum sa_protocol
|
||||
sa_protocol_decode(const char *protocol)
|
||||
{
|
||||
for (enum sa_protocol i = 0; i < ARRAY_SIZE(sa_protocol_names); ++i)
|
||||
if (strcmp(protocol, sa_protocol_names[i]) == 0)
|
||||
for (enum sa_protocol i = 0; i < SA_PROTOCOL_COUNT; ++i)
|
||||
if (strcmp(protocol, zfs_share_protocol_name(i)) == 0)
|
||||
return (i);
|
||||
|
||||
(void) fputs(gettext("share type must be one of: "), stderr);
|
||||
for (enum sa_protocol i = 0;
|
||||
i < ARRAY_SIZE(sa_protocol_names); ++i)
|
||||
for (enum sa_protocol i = 0; i < SA_PROTOCOL_COUNT; ++i)
|
||||
(void) fprintf(stderr, "%s%s",
|
||||
i != 0 ? ", " : "", sa_protocol_names[i]);
|
||||
i != 0 ? ", " : "", zfs_share_protocol_name(i));
|
||||
(void) fputc('\n', stderr);
|
||||
usage(B_FALSE);
|
||||
}
|
||||
@@ -9073,11 +9080,17 @@ zfs_do_rewrite(int argc, char **argv)
|
||||
zfs_rewrite_args_t args;
|
||||
memset(&args, 0, sizeof (args));
|
||||
|
||||
while ((c = getopt(argc, argv, "Pl:o:rvx")) != -1) {
|
||||
while ((c = getopt(argc, argv, "CPSl:o:rvx")) != -1) {
|
||||
switch (c) {
|
||||
case 'C':
|
||||
args.flags |= ZFS_REWRITE_SKIP_BRT;
|
||||
break;
|
||||
case 'P':
|
||||
args.flags |= ZFS_REWRITE_PHYSICAL;
|
||||
break;
|
||||
case 'S':
|
||||
args.flags |= ZFS_REWRITE_SKIP_SNAPSHOT;
|
||||
break;
|
||||
case 'l':
|
||||
args.len = strtoll(optarg, NULL, 0);
|
||||
break;
|
||||
@@ -9272,7 +9285,7 @@ zfs_do_help(int argc, char **argv)
|
||||
|
||||
execlp("man", "man", page, NULL);
|
||||
|
||||
fprintf(stderr, "couldn't run man program: %s", strerror(errno));
|
||||
fprintf(stderr, "couldn't run man program: %s\n", strerror(errno));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <sys/zio_compress.h>
|
||||
#include <sys/zfeature.h>
|
||||
#include <sys/dmu_tx.h>
|
||||
#include <sys/backtrace.h>
|
||||
#include <zfeature_common.h>
|
||||
#include <libzutil.h>
|
||||
#include <sys/metaslab_impl.h>
|
||||
@@ -60,6 +61,7 @@
|
||||
static importargs_t g_importargs;
|
||||
static char *g_pool;
|
||||
static boolean_t g_readonly;
|
||||
static boolean_t g_dump_dbgmsg;
|
||||
|
||||
typedef enum {
|
||||
ZHACK_REPAIR_OP_UNKNOWN = 0,
|
||||
@@ -71,12 +73,23 @@ static __attribute__((noreturn)) void
|
||||
usage(void)
|
||||
{
|
||||
(void) fprintf(stderr,
|
||||
"Usage: zhack [-o tunable] [-c cachefile] [-d dir] <subcommand> "
|
||||
"<args> ...\n"
|
||||
"where <subcommand> <args> is one of the following:\n"
|
||||
"Usage: zhack [-o tunable] [-c cachefile] [-d dir] [-G] "
|
||||
"<subcommand> <args> ...\n"
|
||||
" where <subcommand> <args> is one of the following:\n"
|
||||
"\n");
|
||||
|
||||
(void) fprintf(stderr,
|
||||
" global options:\n"
|
||||
" -c <cachefile> reads config from the given cachefile\n"
|
||||
" -d <dir> directory with vdevs for import\n"
|
||||
" -o var=value... set global variable to an unsigned "
|
||||
"32-bit integer\n"
|
||||
" -G dump zfs_dbgmsg buffer before exiting\n"
|
||||
"\n"
|
||||
" action idle <pool> [-f] [-t seconds]\n"
|
||||
" import the pool for a set time then export it\n"
|
||||
" -t <seconds> sets the time the pool is imported\n"
|
||||
"\n"
|
||||
" feature stat <pool>\n"
|
||||
" print information about enabled features\n"
|
||||
" feature enable [-r] [-d desc] <pool> <feature>\n"
|
||||
@@ -103,6 +116,39 @@ usage(void)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static void
|
||||
dump_debug_buffer(void)
|
||||
{
|
||||
ssize_t ret __attribute__((unused));
|
||||
|
||||
if (!g_dump_dbgmsg)
|
||||
return;
|
||||
|
||||
/*
|
||||
* We use write() instead of printf() so that this function
|
||||
* is safe to call from a signal handler.
|
||||
*/
|
||||
ret = write(STDERR_FILENO, "\n", 1);
|
||||
zfs_dbgmsg_print(STDERR_FILENO, "zhack");
|
||||
}
|
||||
|
||||
static void sig_handler(int signo)
|
||||
{
|
||||
struct sigaction action;
|
||||
|
||||
libspl_backtrace(STDERR_FILENO);
|
||||
dump_debug_buffer();
|
||||
|
||||
/*
|
||||
* Restore default action and re-raise signal so SIGSEGV and
|
||||
* SIGABRT can trigger a core dump.
|
||||
*/
|
||||
action.sa_handler = SIG_DFL;
|
||||
sigemptyset(&action.sa_mask);
|
||||
action.sa_flags = 0;
|
||||
(void) sigaction(signo, &action, NULL);
|
||||
raise(signo);
|
||||
}
|
||||
|
||||
static __attribute__((format(printf, 3, 4))) __attribute__((noreturn)) void
|
||||
fatal(spa_t *spa, const void *tag, const char *fmt, ...)
|
||||
@@ -120,6 +166,8 @@ fatal(spa_t *spa, const void *tag, const char *fmt, ...)
|
||||
va_end(ap);
|
||||
(void) fputc('\n', stderr);
|
||||
|
||||
dump_debug_buffer();
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -175,7 +223,7 @@ zhack_import(char *target, boolean_t readonly)
|
||||
|
||||
zfeature_checks_disable = B_TRUE;
|
||||
error = spa_import(target, config, props,
|
||||
(readonly ? ZFS_IMPORT_SKIP_MMP : ZFS_IMPORT_NORMAL));
|
||||
(readonly ? ZFS_IMPORT_SKIP_MMP : ZFS_IMPORT_NORMAL));
|
||||
fnvlist_free(config);
|
||||
zfeature_checks_disable = B_FALSE;
|
||||
if (error == EEXIST)
|
||||
@@ -506,6 +554,79 @@ zhack_do_feature(int argc, char **argv)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static void
|
||||
zhack_do_action_idle(int argc, char **argv)
|
||||
{
|
||||
spa_t *spa;
|
||||
char *target, *tmp;
|
||||
int idle_time = 0;
|
||||
int c;
|
||||
|
||||
optind = 1;
|
||||
while ((c = getopt(argc, argv, "+t:")) != -1) {
|
||||
switch (c) {
|
||||
case 't':
|
||||
idle_time = strtol(optarg, &tmp, 0);
|
||||
if (*tmp) {
|
||||
(void) fprintf(stderr, "error: time must "
|
||||
"be an integer in seconds: %s\n", tmp);
|
||||
usage();
|
||||
}
|
||||
if (idle_time < 0) {
|
||||
(void) fprintf(stderr, "error: time must "
|
||||
"not be negative: %d\n", idle_time);
|
||||
usage();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
if (argc < 1) {
|
||||
(void) fprintf(stderr, "error: missing pool name\n");
|
||||
usage();
|
||||
}
|
||||
target = argv[0];
|
||||
|
||||
zhack_spa_open(target, B_FALSE, FTAG, &spa);
|
||||
|
||||
fprintf(stdout, "Imported pool %s, idle for %d seconds\n",
|
||||
target, idle_time);
|
||||
sleep(idle_time);
|
||||
|
||||
spa_close(spa, FTAG);
|
||||
}
|
||||
|
||||
static int
|
||||
zhack_do_action(int argc, char **argv)
|
||||
{
|
||||
char *subcommand;
|
||||
|
||||
argc--;
|
||||
argv++;
|
||||
if (argc == 0) {
|
||||
(void) fprintf(stderr,
|
||||
"error: no import operation specified\n");
|
||||
usage();
|
||||
}
|
||||
|
||||
subcommand = argv[0];
|
||||
if (strcmp(subcommand, "idle") == 0) {
|
||||
zhack_do_action_idle(argc, argv);
|
||||
} else {
|
||||
(void) fprintf(stderr, "error: unknown subcommand: %s\n",
|
||||
subcommand);
|
||||
usage();
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
static boolean_t
|
||||
strstarts(const char *a, const char *b)
|
||||
{
|
||||
@@ -624,8 +745,11 @@ zhack_do_metaslab_leak(int argc, char **argv)
|
||||
&start, &size), ==, 2);
|
||||
|
||||
ASSERT(vd);
|
||||
metaslab_t *cur =
|
||||
vd->vdev_ms[start >> vd->vdev_ms_shift];
|
||||
size_t idx;
|
||||
idx = start >> vd->vdev_ms_shift;
|
||||
if (idx >= vd->vdev_ms_count)
|
||||
continue;
|
||||
metaslab_t *cur = vd->vdev_ms[idx];
|
||||
if (prev != cur) {
|
||||
if (prev) {
|
||||
dmu_tx_commit(tx);
|
||||
@@ -1183,17 +1307,35 @@ zhack_do_label(int argc, char **argv)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
struct sigaction action;
|
||||
char *path[MAX_NUM_PATHS];
|
||||
const char *subcommand;
|
||||
int rv = 0;
|
||||
int c;
|
||||
|
||||
/*
|
||||
* Set up signal handlers, so if we crash due to bad on-disk data we
|
||||
* can get more info. Unlike ztest, we don't bail out if we can't set
|
||||
* up signal handlers, because zhack is very useful without them.
|
||||
*/
|
||||
action.sa_handler = sig_handler;
|
||||
sigemptyset(&action.sa_mask);
|
||||
action.sa_flags = 0;
|
||||
if (sigaction(SIGSEGV, &action, NULL) < 0) {
|
||||
(void) fprintf(stderr, "zhack: cannot catch SIGSEGV: %s\n",
|
||||
strerror(errno));
|
||||
}
|
||||
if (sigaction(SIGABRT, &action, NULL) < 0) {
|
||||
(void) fprintf(stderr, "zhack: cannot catch SIGABRT: %s\n",
|
||||
strerror(errno));
|
||||
}
|
||||
|
||||
g_importargs.path = path;
|
||||
|
||||
dprintf_setup(&argc, argv);
|
||||
zfs_prop_init();
|
||||
|
||||
while ((c = getopt(argc, argv, "+c:d:o:")) != -1) {
|
||||
while ((c = getopt(argc, argv, "+c:d:Go:")) != -1) {
|
||||
switch (c) {
|
||||
case 'c':
|
||||
g_importargs.cachefile = optarg;
|
||||
@@ -1202,6 +1344,9 @@ main(int argc, char **argv)
|
||||
assert(g_importargs.paths < MAX_NUM_PATHS);
|
||||
g_importargs.path[g_importargs.paths++] = optarg;
|
||||
break;
|
||||
case 'G':
|
||||
g_dump_dbgmsg = B_TRUE;
|
||||
break;
|
||||
case 'o':
|
||||
if (handle_tunable_option(optarg, B_FALSE) != 0)
|
||||
exit(1);
|
||||
@@ -1223,7 +1368,9 @@ main(int argc, char **argv)
|
||||
|
||||
subcommand = argv[0];
|
||||
|
||||
if (strcmp(subcommand, "feature") == 0) {
|
||||
if (strcmp(subcommand, "action") == 0) {
|
||||
rv = zhack_do_action(argc, argv);
|
||||
} else if (strcmp(subcommand, "feature") == 0) {
|
||||
rv = zhack_do_feature(argc, argv);
|
||||
} else if (strcmp(subcommand, "label") == 0) {
|
||||
return (zhack_do_label(argc, argv));
|
||||
@@ -1240,6 +1387,9 @@ main(int argc, char **argv)
|
||||
"changes may not be committed to disk\n");
|
||||
}
|
||||
|
||||
if (g_dump_dbgmsg)
|
||||
dump_debug_buffer();
|
||||
|
||||
kernel_fini();
|
||||
|
||||
return (rv);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
sbin_PROGRAMS += zinject
|
||||
CPPCHECKTARGETS += zinject
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
zpool_CFLAGS = $(AM_CFLAGS)
|
||||
zpool_CFLAGS += $(LIBBLKID_CFLAGS) $(LIBUUID_CFLAGS)
|
||||
|
||||
|
||||
@@ -3456,7 +3456,7 @@ show_import(nvlist_t *config, boolean_t report_error)
|
||||
|
||||
case ZPOOL_STATUS_CORRUPT_POOL:
|
||||
(void) printf_color(ANSI_YELLOW, gettext("The pool metadata is "
|
||||
"corrupted.\n"));
|
||||
"incomplete or corrupted.\n"));
|
||||
break;
|
||||
|
||||
case ZPOOL_STATUS_VERSION_OLDER:
|
||||
@@ -3704,6 +3704,12 @@ show_import(nvlist_t *config, boolean_t report_error)
|
||||
(void) printf(gettext("Set a unique system hostid with "
|
||||
"the zgenhostid(8) command.\n"));
|
||||
break;
|
||||
case ZPOOL_STATUS_CORRUPT_POOL:
|
||||
(void) printf(gettext("The pool cannot be imported due "
|
||||
"to missing or damaged devices. Ensure\n"
|
||||
"\t%sall devices are present and not in use by "
|
||||
"another subsystem.\n"), indent);
|
||||
break;
|
||||
default:
|
||||
(void) printf(gettext("The pool cannot be imported due "
|
||||
"to damaged devices or data.\n"));
|
||||
@@ -3879,6 +3885,9 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts,
|
||||
hostid, ctime(×tamp));
|
||||
}
|
||||
|
||||
if (getenv("ZFS_LOAD_INFO_DEBUG"))
|
||||
dump_nvlist(nvinfo, 4);
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
@@ -10613,7 +10622,8 @@ print_status_reason(zpool_handle_t *zhp, status_cbdata_t *cbp,
|
||||
|
||||
case ZPOOL_STATUS_CORRUPT_POOL:
|
||||
(void) snprintf(status, ST_SIZE, gettext("The pool metadata is "
|
||||
"corrupted and the pool cannot be opened.\n"));
|
||||
"incomplete or corrupted and the pool cannot be "
|
||||
"opened.\n"));
|
||||
zpool_explain_recover(zpool_get_handle(zhp),
|
||||
zpool_get_name(zhp), reason, zpool_get_config(zhp, NULL),
|
||||
action, AC_SIZE);
|
||||
@@ -13779,7 +13789,7 @@ zpool_do_help(int argc, char **argv)
|
||||
|
||||
(void) execlp("man", "man", page, NULL);
|
||||
|
||||
fprintf(stderr, "couldn't run man program: %s", strerror(errno));
|
||||
fprintf(stderr, "couldn't run man program: %s\n", strerror(errno));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
||||
@@ -114,29 +114,3 @@ array64_max(uint64_t array[], unsigned int len)
|
||||
|
||||
return (max);
|
||||
}
|
||||
|
||||
/*
|
||||
* Find highest one bit set.
|
||||
* Returns bit number + 1 of highest bit that is set, otherwise returns 0.
|
||||
*/
|
||||
int
|
||||
highbit64(uint64_t i)
|
||||
{
|
||||
if (i == 0)
|
||||
return (0);
|
||||
|
||||
return (NBBY * sizeof (uint64_t) - __builtin_clzll(i));
|
||||
}
|
||||
|
||||
/*
|
||||
* Find lowest one bit set.
|
||||
* Returns bit number + 1 of lowest bit that is set, otherwise returns 0.
|
||||
*/
|
||||
int
|
||||
lowbit64(uint64_t i)
|
||||
{
|
||||
if (i == 0)
|
||||
return (0);
|
||||
|
||||
return (__builtin_ffsll(i));
|
||||
}
|
||||
|
||||
@@ -45,8 +45,6 @@ void *safe_realloc(void *, size_t);
|
||||
void zpool_no_memory(void);
|
||||
uint_t num_logs(nvlist_t *nv);
|
||||
uint64_t array64_max(uint64_t array[], unsigned int len);
|
||||
int highbit64(uint64_t i);
|
||||
int lowbit64(uint64_t i);
|
||||
|
||||
/*
|
||||
* Misc utility functions
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
zfsexec_PROGRAMS += zpool_influxdb
|
||||
CPPCHECKTARGETS += zpool_influxdb
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
zstream_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
|
||||
|
||||
sbin_PROGRAMS += zstream
|
||||
|
||||
@@ -7144,6 +7144,7 @@ static void
|
||||
ztest_get_zdb_bin(char *bin, int len)
|
||||
{
|
||||
char *zdb_path;
|
||||
char *resolved;
|
||||
/*
|
||||
* Try to use $ZDB and in-tree zdb path. If not successful, just
|
||||
* let popen to search through PATH.
|
||||
@@ -7157,7 +7158,11 @@ ztest_get_zdb_bin(char *bin, int len)
|
||||
return;
|
||||
}
|
||||
|
||||
VERIFY3P(realpath(getexecname(), bin), !=, NULL);
|
||||
resolved = realpath(getexecname(), NULL);
|
||||
VERIFY3P(resolved, !=, NULL);
|
||||
strlcpy(bin, resolved, len);
|
||||
free(resolved);
|
||||
|
||||
if (strstr(bin, ".libs/ztest")) {
|
||||
strstr(bin, ".libs/ztest")[0] = '\0'; /* In-tree */
|
||||
strcat(bin, "zdb");
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
#
|
||||
# cppcheck for userspace – nodist_*_SOURCES are kernel code and cppcheck goes crazy on them.
|
||||
#
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
#
|
||||
# Default build rules for all user space components, every Makefile.am
|
||||
# should include these rules and override or extend them as needed.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
# Global ShellCheck exclusions:
|
||||
#
|
||||
# ShellCheck can't follow non-constant source. Use a directive to specify location. [SC1090]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
subst_sed_cmd = \
|
||||
-e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
|
||||
-e 's|@bindir[@]|$(bindir)|g' \
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Set the target cpu architecture. This allows the
|
||||
dnl # following syntax to be used in a Makefile.am.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Enabled -fsanitize=address if supported by $CC.
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Check if cppcheck is available.
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Check if GNU parallel is available.
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # The majority of the python scripts are written to be compatible
|
||||
dnl # with Python 3.6. This option is intended to
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # ZFS_AC_PYTHON_MODULE(module_name, [action-if-true], [action-if-false])
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Set the flags used for sed in-place edits.
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Check if shellcheck and/or checkbashisms are available.
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Set the target system
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: FSFAP
|
||||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_compare_version.html
|
||||
# ===========================================================================
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: FSFAP
|
||||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
|
||||
# ===========================================================================
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later WITH Autoconf-exception-macro
|
||||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_python_devel.html
|
||||
# ===========================================================================
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: FSFAP
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_restore_flags.html
|
||||
# ===========================================================================
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: FSFAP
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_save_flags.html
|
||||
# ===========================================================================
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
PHONY += deb-kmod deb-dkms deb-utils deb deb-local native-deb-local \
|
||||
native-deb-utils native-deb-kmod native-deb
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
# find_system_lib.m4 - Macros to search for a system library. -*- Autoconf -*-
|
||||
|
||||
dnl requires pkg.m4 from pkg-config
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: FSFULLR
|
||||
# gettext.m4 serial 70 (gettext-0.20)
|
||||
dnl Copyright (C) 1995-2014, 2016, 2018 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: FSFULLR
|
||||
# host-cpu-c-abi.m4 serial 11
|
||||
dnl Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: FSFULLR
|
||||
# iconv.m4 serial 21
|
||||
dnl Copyright (C) 2000-2002, 2007-2014, 2016-2019 Free Software Foundation,
|
||||
dnl Inc.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Linux 5.0: access_ok() drops 'type' parameter:
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 3.1 API change,
|
||||
dnl # posix_acl_equiv_mode now wants an umode_t instead of a mode_t
|
||||
@@ -21,6 +22,35 @@ AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 7.0 API change
|
||||
dnl # posix_acl_to_xattr() now allocates and returns the value.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_POSIX_ACL_TO_XATTR_ALLOC], [
|
||||
ZFS_LINUX_TEST_SRC([posix_acl_to_xattr_alloc], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/posix_acl_xattr.h>
|
||||
], [
|
||||
struct user_namespace *ns = NULL;
|
||||
struct posix_acl *acl = NULL;
|
||||
size_t size = 0;
|
||||
gfp_t gfp = 0;
|
||||
void *xattr = NULL;
|
||||
xattr = posix_acl_to_xattr(ns, acl, &size, gfp);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_TO_XATTR_ALLOC], [
|
||||
AC_MSG_CHECKING([whether posix_acl_to_xattr() allocates its result]);
|
||||
ZFS_LINUX_TEST_RESULT([posix_acl_to_xattr_alloc], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_POSIX_ACL_TO_XATTR_ALLOC, 1,
|
||||
[posix_acl_to_xattr() allocates its result])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 3.1 API change,
|
||||
dnl # Check if inode_operations contains the function get_acl
|
||||
@@ -173,12 +203,14 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL], [
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [
|
||||
ZFS_AC_KERNEL_SRC_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
|
||||
ZFS_AC_KERNEL_SRC_POSIX_ACL_TO_XATTR_ALLOC
|
||||
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL
|
||||
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_ACL], [
|
||||
ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
|
||||
ZFS_AC_KERNEL_POSIX_ACL_TO_XATTR_ALLOC
|
||||
ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL
|
||||
ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL
|
||||
])
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 5.16 API change
|
||||
dnl # add_disk grew a must-check return code
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 6.10 kernel, check number of args of __assign_str() for trace:
|
||||
dnl
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 2.6.37 API change
|
||||
dnl # The dops->d_automount() dentry operation was added as a clean
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Linux 4.8 API,
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 5.12 API change removes BIO_MAX_PAGES in favor of bio_max_segs()
|
||||
dnl # which will handle the logic of setting the upper-bound to a
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 2.6.39 API change,
|
||||
dnl # blk_start_plug() and blk_finish_plug()
|
||||
@@ -225,6 +226,30 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_MAX_HW_SECTORS], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 7.0 API change
|
||||
dnl # blk_queue_rot() replaces blk_queue_nonrot() (inverted meaning)
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_ROT], [
|
||||
ZFS_LINUX_TEST_SRC([blk_queue_rot], [
|
||||
#include <linux/blkdev.h>
|
||||
], [
|
||||
struct request_queue *q __attribute__ ((unused)) = NULL;
|
||||
(void) blk_queue_rot(q);
|
||||
], [])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_ROT], [
|
||||
AC_MSG_CHECKING([whether blk_queue_rot() is available])
|
||||
ZFS_LINUX_TEST_RESULT([blk_queue_rot], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BLK_QUEUE_ROT, 1,
|
||||
[blk_queue_rot() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 2.6.34 API change
|
||||
dnl # blk_queue_max_segments() consolidates blk_queue_max_hw_segments()
|
||||
@@ -278,6 +303,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE], [
|
||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_SECURE_ERASE
|
||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_MAX_HW_SECTORS
|
||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_MAX_SEGMENTS
|
||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_ROT
|
||||
ZFS_AC_KERNEL_SRC_BLK_MQ_RQ_HCTX
|
||||
])
|
||||
|
||||
@@ -290,5 +316,6 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE], [
|
||||
ZFS_AC_KERNEL_BLK_QUEUE_SECURE_ERASE
|
||||
ZFS_AC_KERNEL_BLK_QUEUE_MAX_HW_SECTORS
|
||||
ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS
|
||||
ZFS_AC_KERNEL_BLK_QUEUE_ROT
|
||||
ZFS_AC_KERNEL_BLK_MQ_RQ_HCTX
|
||||
])
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 2.6.38 API change,
|
||||
dnl # Added blkdev_get_by_path()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 2.6.38 API change
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 2.6.33 API change
|
||||
dnl # Added eops->commit_metadata() callback to allow the underlying
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Certain kernel build options are not supported. These must be
|
||||
dnl # detected at configure time and cause a build failure. Otherwise
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # On certain architectures `__copy_from_user_inatomic`
|
||||
dnl # is a GPL exported variable and cannot be used by OpenZFS.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # cpu_has_feature() may referencing GPL-only cpu_feature_keys on powerpc
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Ensure the DECLARE_EVENT_CLASS macro is available to non-GPL modules.
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 2.6.28 API change
|
||||
dnl # Added d_obtain_alias() helper function.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 2.6.33 API change
|
||||
dnl # Discard granularity and alignment restrictions may now be set.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 6.18 API change
|
||||
dnl # - generic_drop_inode() renamed to inode_generic_drop()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 6.12 removed f_version from struct file
|
||||
dnl #
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 6.3 API change
|
||||
dnl # locking support functions (eg generic_setlease) were moved out of
|
||||
dnl # linux/fs.h to linux/filelock.h
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_FILELOCK_HEADER], [
|
||||
ZFS_LINUX_TEST_SRC([filelock_header], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/filelock.h>
|
||||
], [])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_FILELOCK_HEADER], [
|
||||
AC_MSG_CHECKING([for standalone filelock header])
|
||||
ZFS_LINUX_TEST_RESULT([filelock_header], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_FILELOCK_HEADER, 1, [linux/filelock.h exists])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_COPY_SPLICE_READ], [
|
||||
dnl #
|
||||
dnl # Kernel 6.5 - generic_file_splice_read was removed in favor
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Starting from Linux 5.13, flush_dcache_page() becomes an inline
|
||||
dnl # function and may indirectly referencing GPL-only symbols:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 2.6.28 API change,
|
||||
dnl # check if fmode_t typedef is defined
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 2.6.38 API change
|
||||
dnl # follow_down() renamed follow_down_one(). The original follow_down()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Handle differences in kernel FPU code.
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Linux 5.2 API change
|
||||
dnl #
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 2.6.38 API change
|
||||
dnl # The .get_sb callback has been replaced by a .mount callback
|
||||
dnl # in the file_system_type structure.
|
||||
dnl #
|
||||
dnl # 5.2 API change
|
||||
dnl # The new fs_context-based filesystem API is introduced, with the old
|
||||
dnl # one (via file_system_type.mount) preserved as a compatibility shim.
|
||||
dnl #
|
||||
dnl # 7.0 API change
|
||||
dnl # Compatibility shim removed, so all callers must go through the mount API.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_FS_CONTEXT], [
|
||||
ZFS_LINUX_TEST_SRC([fs_context], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fs_context.h>
|
||||
],[
|
||||
static struct fs_context fs __attribute__ ((unused)) = { 0 };
|
||||
static struct fs_context *fsp __attribute__ ((unused));
|
||||
fsp = vfs_dup_fs_context(&fs);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_FS_CONTEXT], [
|
||||
AC_MSG_CHECKING([whether fs_context exists])
|
||||
ZFS_LINUX_TEST_RESULT([fs_context], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_FS_CONTEXT, 1, [fs_context exists])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
@@ -1,30 +0,0 @@
|
||||
dnl #
|
||||
dnl # 2.6.38 API change
|
||||
dnl # The .get_sb callback has been replaced by a .mount callback
|
||||
dnl # in the file_system_type structure.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_FST_MOUNT], [
|
||||
ZFS_LINUX_TEST_SRC([file_system_type_mount], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
static struct dentry *
|
||||
mount(struct file_system_type *fs_type, int flags,
|
||||
const char *osname, void *data) {
|
||||
struct dentry *d = NULL;
|
||||
return (d);
|
||||
}
|
||||
|
||||
static struct file_system_type fst __attribute__ ((unused)) = {
|
||||
.mount = mount,
|
||||
};
|
||||
],[])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_FST_MOUNT], [
|
||||
AC_MSG_CHECKING([whether fst->mount() exists])
|
||||
ZFS_LINUX_TEST_RESULT([file_system_type_mount], [
|
||||
AC_MSG_RESULT(yes)
|
||||
],[
|
||||
ZFS_LINUX_TEST_ERROR([fst->mount()])
|
||||
])
|
||||
])
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 6.6 API change,
|
||||
dnl # fsync_bdev was removed in favor of sync_blockdev
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 5.3 API change
|
||||
dnl # The generic_fadvise() function is present since 4.19 kernel
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 5.12 API
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # Check for generic io accounting interface.
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 5.17 API change,
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 2.6.x API change
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 6.0 API change
|
||||
dnl # struct iattr has two unions for the uid and gid
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 5.12 API
|
||||
dnl #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
|
||||
dnl #
|
||||
dnl # 6.3 API change
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
|
||||
dnl #
|
||||
dnl # Linux 6.3 API
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
dnl # SPDX-License-Identifier: CDDL-1.0
|
||||
dnl #
|
||||
dnl # 3.6 API change
|
||||
dnl #
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user