Skip to content

Commit f2785e4

Browse files
authored
Merge branch 'master' into 17998-Add_snapshots_changed_nsecs_dataset_property
2 parents ee9e40e + 648a9a2 commit f2785e4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1166
-1022
lines changed

.github/workflows/scripts/qemu-1-setup.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@ set -eu
1313
# handle on what the timeout value should be.
1414
(while [ 1 ] ; do sleep 30 && echo "[watchdog: $(ps -eo cmd --sort=-pcpu | head -n 2 | tail -n 1)}')]"; done) &
1515

16+
# The default 'azure.archive.ubuntu.com' mirrors can be really slow.
17+
# Prioritize the official Ubuntu mirrors.
18+
#
19+
# The normal apt-mirrors.txt will look like:
20+
#
21+
# http://azure.archive.ubuntu.com/ubuntu/ priority:1
22+
# https://archive.ubuntu.com/ubuntu/ priority:2
23+
# https://security.ubuntu.com/ubuntu/ priority:3
24+
#
25+
# Just delete the 'azure.archive.ubuntu.com' line.
26+
sudo sed -i '/azure.archive.ubuntu.com/d' /etc/apt/apt-mirrors.txt
27+
echo "Using mirrors:"
28+
cat /etc/apt/apt-mirrors.txt
29+
1630
# install needed packages
1731
export DEBIAN_FRONTEND="noninteractive"
1832
sudo apt-get -y update

.github/workflows/scripts/qemu-2-start.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,6 @@ case "$OS" in
9595
KSRC="$FREEBSD_REL/../amd64/$FreeBSD/src.txz"
9696
NIC="rtl8139"
9797
;;
98-
freebsd14-2r)
99-
FreeBSD="14.2-RELEASE"
100-
OSNAME="FreeBSD $FreeBSD"
101-
OSv="freebsd14.0"
102-
URLxz="$FREEBSD_REL/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI.raw.xz"
103-
KSRC="$FREEBSD_REL/../amd64/$FreeBSD/src.txz"
104-
;;
10598
freebsd14-3r)
10699
FreeBSD="14.3-RELEASE"
107100
OSNAME="FreeBSD $FreeBSD"

.github/workflows/scripts/qemu-test-repo-vm.sh

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
#
55
# USAGE:
66
#
7-
# ./qemu-test-repo-vm [URL]
7+
# ./qemu-test-repo-vm [--install] [URL]
8+
#
9+
# --lookup: When testing a repo, only lookup the latest package versions,
10+
# don't try to install them. Installing all of them takes over
11+
# an hour, so this is much quicker.
812
#
913
# URL: URL to use instead of http://download.zfsonlinux.org
1014
# If blank, use the default repo from zfs-release RPM.
@@ -15,6 +19,13 @@ source /etc/os-release
1519
OS="$ID"
1620
VERSION="$VERSION_ID"
1721

22+
23+
LOOKUP=""
24+
if [ -n "$1" ] && [ "$1" == "--lookup" ] ; then
25+
LOOKUP=1
26+
shift
27+
fi
28+
1829
ALTHOST=""
1930
if [ -n "$1" ] ; then
2031
ALTHOST="$1"
@@ -42,6 +53,15 @@ function test_install {
4253
sudo sed -i "s;baseurl=http://download.zfsonlinux.org;baseurl=$host;g" /etc/yum.repos.d/zfs.repo
4354
fi
4455

56+
baseurl=$(grep -A 5 "\[$repo\]" /etc/yum.repos.d/zfs.repo | awk -F'=' '/baseurl=/{print $2; exit}')
57+
58+
# Just do a version lookup - don't try to install any RPMs
59+
if [ "$LOOKUP" == "1" ] ; then
60+
package="$(dnf list $args zfs | tail -n 1 | awk '{print $2}')"
61+
echo "$repo ${package} $baseurl" >> $SUMMARY
62+
return
63+
fi
64+
4565
if ! sudo dnf -y install $args zfs zfs-test ; then
4666
echo "$repo ${package}...[FAILED] $baseurl" >> $SUMMARY
4767
return
@@ -54,7 +74,6 @@ function test_install {
5474
sudo zpool status
5575

5676
# Print out repo name, rpm installed (kmod or dkms), and repo URL
57-
baseurl=$(grep -A 5 "\[$repo\]" /etc/yum.repos.d/zfs.repo | awk -F'=' '/baseurl=/{print $2; exit}')
5877
package=$(sudo rpm -qa | grep zfs | grep -E 'kmod|dkms')
5978

6079
echo "$repo $package $baseurl" >> $SUMMARY
@@ -75,15 +94,15 @@ almalinux*)
7594
sudo rpm -qi zfs-release
7695
for i in zfs zfs-kmod zfs-testing zfs-testing-kmod zfs-latest \
7796
zfs-latest-kmod zfs-legacy zfs-legacy-kmod zfs-2.2 \
78-
zfs-2.2-kmod zfs-2.3 zfs-2.3-kmod ; do
97+
zfs-2.2-kmod zfs-2.3 zfs-2.3-kmod zfs-2.4 zfs-2.4-kmod; do
7998
test_install $i $ALTHOST
8099
done
81100
;;
82101
fedora*)
83102
url='https://raw.githubusercontent.com/openzfs/openzfs-docs/refs/heads/master/docs/Getting%20Started/Fedora/index.rst'
84103
name=$(curl -Ls $url | grep 'dnf install' | grep -Eo 'zfs-release-[0-9]+-[0-9]+')
85104
sudo dnf -y install -y https://zfsonlinux.org/fedora/$name$(rpm --eval "%{dist}").noarch.rpm
86-
for i in zfs zfs-latest zfs-legacy zfs-2.2 zfs-2.3 ; do
105+
for i in zfs zfs-latest zfs-legacy zfs-2.2 zfs-2.3 zfs-2.4 ; do
87106
test_install $i $ALTHOST
88107
done
89108
;;

.github/workflows/zfs-qemu-packages.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ on:
4242
required: false
4343
default: ""
4444
description: "(optional) repo URL (blank: use http://download.zfsonlinux.org)"
45+
lookup:
46+
type: boolean
47+
required: false
48+
default: false
49+
description: "(optional) do version lookup only on repo test"
50+
4551
concurrency:
4652
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
4753
cancel-in-progress: true
@@ -60,28 +66,29 @@ jobs:
6066
ref: ${{ github.event.pull_request.head.sha }}
6167

6268
- name: Setup QEMU
63-
timeout-minutes: 10
6469
run: .github/workflows/scripts/qemu-1-setup.sh
6570

6671
- name: Start build machine
67-
timeout-minutes: 10
6872
run: .github/workflows/scripts/qemu-2-start.sh ${{ matrix.os }}
6973

7074
- name: Install dependencies
71-
timeout-minutes: 20
7275
run: |
7376
.github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }}
7477
7578
- name: Build modules or Test repo
76-
timeout-minutes: 60
7779
run: |
7880
set -e
7981
if [ "${{ github.event.inputs.test_type }}" == "Test repo" ] ; then
8082
# Bring VM back up and copy over zfs source
8183
.github/workflows/scripts/qemu-prepare-for-build.sh
8284
8385
mkdir -p /tmp/repo
84-
ssh zfs@vm0 '$HOME/zfs/.github/workflows/scripts/qemu-test-repo-vm.sh' ${{ github.event.inputs.repo_url }}
86+
EXTRA=""
87+
if [ "${{ github.event.inputs.lookup }}" == 'true' ] ; then
88+
EXTRA="--lookup"
89+
fi
90+
91+
ssh zfs@vm0 '$HOME/zfs/.github/workflows/scripts/qemu-test-repo-vm.sh' $EXTRA ${{ github.event.inputs.repo_url }}
8592
else
8693
EXTRA=""
8794
if [ -n "${{ github.event.inputs.patch_level }}" ] ; then
@@ -94,7 +101,6 @@ jobs:
94101
95102
- name: Prepare artifacts
96103
if: always()
97-
timeout-minutes: 10
98104
run: |
99105
rsync -a zfs@vm0:/tmp/repo /tmp || true
100106
.github/workflows/scripts/replace-dupes-with-symlinks.sh /tmp/repo

.github/workflows/zfs-qemu.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
os_selection='["almalinux8", "almalinux9", "almalinux10", "centos-stream9", "centos-stream10", "debian11", "debian12", "debian13", "fedora41", "fedora42", "fedora43", "ubuntu22", "ubuntu24"]'
4747
;;
4848
freebsd)
49-
os_selection='["freebsd13-5r", "freebsd14-2r", "freebsd14-3r", "freebsd13-5s", "freebsd14-3s", "freebsd15-0s", "freebsd16-0c"]'
49+
os_selection='["freebsd13-5r", "freebsd14-3r", "freebsd13-5s", "freebsd14-3s", "freebsd15-0s", "freebsd16-0c"]'
5050
;;
5151
*)
5252
# default list
@@ -76,7 +76,7 @@ jobs:
7676
# debian: debian12, debian13, ubuntu22, ubuntu24
7777
# misc: archlinux, tumbleweed
7878
# FreeBSD variants of november 2025:
79-
# FreeBSD Release: freebsd13-5r, freebsd14-2r, freebsd14-3r
79+
# FreeBSD Release: freebsd13-5r, freebsd14-3r, freebsd15-0r
8080
# FreeBSD Stable: freebsd13-5s, freebsd14-3s, freebsd15-0s
8181
# FreeBSD Current: freebsd16-0c
8282
os: ${{ fromJson(needs.test-config.outputs.test_os) }}
@@ -87,7 +87,7 @@ jobs:
8787
ref: ${{ github.event.pull_request.head.sha }}
8888

8989
- name: Setup QEMU
90-
timeout-minutes: 20
90+
timeout-minutes: 60
9191
run: |
9292
# Add a timestamp to each line to debug timeouts
9393
while IFS=$'\n' read -r line; do
@@ -99,7 +99,7 @@ jobs:
9999
run: .github/workflows/scripts/qemu-2-start.sh ${{ matrix.os }}
100100

101101
- name: Install dependencies
102-
timeout-minutes: 20
102+
timeout-minutes: 60
103103
run: .github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }} ${{ github.event.inputs.fedora_kernel_ver }}
104104

105105
- name: Build modules

cmd/zdb/zdb.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -739,13 +739,14 @@ usage(void)
739739
"[-U <cache>]\n\t\t<poolname> [<vdev> [<metaslab> ...]]\n"
740740
"\t%s -O [-K <key>] <dataset> <path>\n"
741741
"\t%s -r [-K <key>] <dataset> <path> <destination>\n"
742+
"\t%s -r [-K <key>] -O <dataset> <object-id> <destination>\n"
742743
"\t%s -R [-A] [-e [-V] [-p <path> ...]] [-U <cache>]\n"
743744
"\t\t<poolname> <vdev>:<offset>:<size>[:<flags>]\n"
744745
"\t%s -E [-A] word0:word1:...:word15\n"
745746
"\t%s -S [-AP] [-e [-V] [-p <path> ...]] [-U <cache>] "
746747
"<poolname>\n\n",
747748
cmdname, cmdname, cmdname, cmdname, cmdname, cmdname, cmdname,
748-
cmdname, cmdname, cmdname, cmdname, cmdname);
749+
cmdname, cmdname, cmdname, cmdname, cmdname, cmdname);
749750

750751
(void) fprintf(stderr, " Dataset name must include at least one "
751752
"separator character '/' or '@'\n");
@@ -9956,7 +9957,7 @@ main(int argc, char **argv)
99569957
* which imports the pool to the namespace if it's
99579958
* not in the cachefile.
99589959
*/
9959-
if (dump_opt['O']) {
9960+
if (dump_opt['O'] && !dump_opt['r']) {
99609961
if (argc != 2)
99619962
usage();
99629963
dump_opt['v'] = verbose + 3;
@@ -9969,7 +9970,11 @@ main(int argc, char **argv)
99699970
if (argc != 3)
99709971
usage();
99719972
dump_opt['v'] = verbose;
9972-
error = dump_path(argv[0], argv[1], &object);
9973+
if (dump_opt['O']) {
9974+
object = strtoull(argv[1], NULL, 0);
9975+
} else {
9976+
error = dump_path(argv[0], argv[1], &object);
9977+
}
99739978
if (error != 0)
99749979
fatal("internal error: %s", strerror(error));
99759980
}

cmd/zfs/zfs_main.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7339,15 +7339,14 @@ append_options(char *mntopts, char *newopts)
73397339
static enum sa_protocol
73407340
sa_protocol_decode(const char *protocol)
73417341
{
7342-
for (enum sa_protocol i = 0; i < ARRAY_SIZE(sa_protocol_names); ++i)
7343-
if (strcmp(protocol, sa_protocol_names[i]) == 0)
7342+
for (enum sa_protocol i = 0; i < SA_PROTOCOL_COUNT; ++i)
7343+
if (strcmp(protocol, zfs_share_protocol_name(i)) == 0)
73447344
return (i);
73457345

73467346
(void) fputs(gettext("share type must be one of: "), stderr);
7347-
for (enum sa_protocol i = 0;
7348-
i < ARRAY_SIZE(sa_protocol_names); ++i)
7347+
for (enum sa_protocol i = 0; i < SA_PROTOCOL_COUNT; ++i)
73497348
(void) fprintf(stderr, "%s%s",
7350-
i != 0 ? ", " : "", sa_protocol_names[i]);
7349+
i != 0 ? ", " : "", zfs_share_protocol_name(i));
73517350
(void) fputc('\n', stderr);
73527351
usage(B_FALSE);
73537352
}

0 commit comments

Comments
 (0)