mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
Compare commits
385 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e269af1b3c | |||
| 0bd8481aa7 | |||
| 299da6ace3 | |||
| 02e73c5f45 | |||
| 0f86fcc2a7 | |||
| a6e1cd1838 | |||
| 2bba6e3c54 | |||
| 1c7b70bcc0 | |||
| 1f5e1b919f | |||
| 384b53be8e | |||
| 84ad1d5366 | |||
| ba4e582a67 | |||
| 1ba5b2ef8c | |||
| fc60e0c6ea | |||
| 9e7af55e88 | |||
| 01e06ed89d | |||
| dbc70ec73a | |||
| 997831548a | |||
| 08192d12eb | |||
| c31b18b23c | |||
| dbeb509579 | |||
| 4982943d25 | |||
| 16266b47a1 | |||
| 63f70d3c61 | |||
| e580b543a8 | |||
| 3f9ee8089d | |||
| 845b7b7e66 | |||
| def131415c | |||
| 190c66a3bc | |||
| c07f9a2aa6 | |||
| 0dee309471 | |||
| d8458202ca | |||
| c1055d9ffb | |||
| 94f84d2a75 | |||
| f1694496aa | |||
| 2e646b5e5a | |||
| 022bf86370 | |||
| 05aeaca7de | |||
| 3894844b62 | |||
| 721530ffdb | |||
| 2b905a87f3 | |||
| a759b1e5fc | |||
| 3abb84df9b | |||
| 701dc172fb | |||
| d30056887e | |||
| 9076aecb4e | |||
| 0da3b420c3 | |||
| 701c3c1582 | |||
| 9601eeea1c | |||
| 56a82c6b6f | |||
| 3c5a1180b4 | |||
| e05f8c2d72 | |||
| 517d491a59 | |||
| e16c21d659 | |||
| 2326e2eb74 | |||
| 656b666bdb | |||
| 430cb85a96 | |||
| 5f486de312 | |||
| f51bf385d2 | |||
| 335c00f2ce | |||
| 706fbd4cd6 | |||
| e2fcc6ad9e | |||
| 0cbf4f7e9c | |||
| 9bf3282990 | |||
| b333618ffa | |||
| 2639abe1e8 | |||
| e2a58faf85 | |||
| cba8ffc2cf | |||
| c787133711 | |||
| e7ab71a4e7 | |||
| f648a854ff | |||
| 32a62ac233 | |||
| 1b200c1284 | |||
| 99ec9197c5 | |||
| fd1c7c75c1 | |||
| 4a78c5e71b | |||
| 0155b9d831 | |||
| 31952dc1c1 | |||
| 5bffb7ee9c | |||
| 7ed1dd44dd | |||
| a0f51c5820 | |||
| 783fa01cc6 | |||
| 5a615294ff | |||
| b5a21883bf | |||
| 0d53034f91 | |||
| 917ecc7b2c | |||
| 63ce63d46b | |||
| 903c3bbc99 | |||
| a40444197b | |||
| 9629606882 | |||
| 28f75aea2f | |||
| c9c1262b67 | |||
| 5d537c7660 | |||
| 7bdea98d4f | |||
| f32d5cf3c2 | |||
| ea8a9768e7 | |||
| 91b48a42e0 | |||
| a0abd7c5ff | |||
| f5a1abcafa | |||
| 49f449c865 | |||
| d29ed3630e | |||
| 41bacb42f9 | |||
| 4af7a697c2 | |||
| 8ae3b6b675 | |||
| 92eeeba665 | |||
| ef2aed16d7 | |||
| 6d2553ae5d | |||
| 81d780a0c4 | |||
| f71866c35f | |||
| 251c5fa39b | |||
| eb6e61bc9a | |||
| a9a6d78a9b | |||
| a184db86a5 | |||
| 5f73630e9c | |||
| 02daa09846 | |||
| e954f086e0 | |||
| 88c358cce1 | |||
| 937a01124a | |||
| 339b126bac | |||
| b2802da49e | |||
| e19f530dbe | |||
| e6b916d69b | |||
| 8bc4c13fac | |||
| 22131b9a6e | |||
| 3c370f09fa | |||
| b6223a572e | |||
| 928342104f | |||
| 3aa4629e1d | |||
| ccb59e31e4 | |||
| bfc7e03ec6 | |||
| 984a836986 | |||
| 6e57494626 | |||
| a054829579 | |||
| 80bd3e3459 | |||
| 5e42628c45 | |||
| 2c3e42b252 | |||
| 8a33624ec6 | |||
| 4f0a8eb7c1 | |||
| cf80a803d5 | |||
| f3a9746f21 | |||
| f6fce8e12a | |||
| a6198f34bd | |||
| e5e4957a54 | |||
| ca95fa3531 | |||
| 05d6f621a9 | |||
| deddfdd280 | |||
| b2bef90465 | |||
| f4e66db401 | |||
| 4197af4df1 | |||
| 9a0ebe3a87 | |||
| 5dac614e7b | |||
| d3887c4c61 | |||
| d83cd5307d | |||
| f237b8e2a4 | |||
| 727506c943 | |||
| 73b3e8acef | |||
| 82ab837a0e | |||
| b32b35cea8 | |||
| 308d04ac37 | |||
| 63fbbe8712 | |||
| a1ea40af86 | |||
| 18c8abc8aa | |||
| f53f3c3e6a | |||
| d29f257b03 | |||
| e63023738e | |||
| 18e355670d | |||
| acc8a31863 | |||
| e8f4592a19 | |||
| 4adc97ae15 | |||
| 2bd540d273 | |||
| 48482bb2f4 | |||
| 21c40e6d9e | |||
| b9658f9a67 | |||
| 948704cb37 | |||
| 9616275021 | |||
| 0987892160 | |||
| 54278533a4 | |||
| 94a571b3d9 | |||
| 2dc8529d9a | |||
| c25d5140b0 | |||
| bc0d89bfc1 | |||
| 25ec9a9034 | |||
| bb946ff232 | |||
| f2633144e9 | |||
| bdd1f72d9d | |||
| 51996dcaee | |||
| aa32ee6838 | |||
| 34537bd9c7 | |||
| 09f7432f83 | |||
| 8457bab268 | |||
| f52b725e64 | |||
| 903db66793 | |||
| e55e9468f7 | |||
| a44a15d318 | |||
| 54244d263a | |||
| ad739614cc | |||
| f407add033 | |||
| 92c384cbac | |||
| 040be2504a | |||
| 1b27b76f6f | |||
| af0a2bef40 | |||
| ce3ad59c27 | |||
| 46b0d5c486 | |||
| b69c7f3847 | |||
| 484f92b8fa | |||
| e2bded28ea | |||
| ca5652c420 | |||
| 53879c4ecc | |||
| 1cbb695dcc | |||
| 66db223778 | |||
| 36bac59fbc | |||
| e29e7a0502 | |||
| d6ec55963a | |||
| 66bb2a8389 | |||
| 00dd5ea9e6 | |||
| b4502ac342 | |||
| 55468ccc3e | |||
| b0cfb480ca | |||
| 8ca4319f60 | |||
| d66412884a | |||
| 3fb6647561 | |||
| 30ea442961 | |||
| 56608daa8d | |||
| baa5031456 | |||
| cd42e992b5 | |||
| c60df6a801 | |||
| d8fa32a79d | |||
| 88a5ee0706 | |||
| 0465fbecd7 | |||
| a99a37991e | |||
| 2ca1515374 | |||
| bce36e21ca | |||
| 86492e3c96 | |||
| 07f0465742 | |||
| 0f9457d1dd | |||
| 859f906a4b | |||
| 84a9861536 | |||
| 9d64d1bfad | |||
| ce22dc2589 | |||
| 8479a45abe | |||
| 8156099cf2 | |||
| 11ad6124c3 | |||
| 11de432c8b | |||
| 464747ffd3 | |||
| 92a8af0f8b | |||
| 4fa84563b8 | |||
| 6961d4fb57 | |||
| 3a36797ad6 | |||
| ac6500389b | |||
| 1f055436f3 | |||
| 0172ee525b | |||
| 33174af151 | |||
| 6f27c4cadd | |||
| dd5de55eba | |||
| b5835ed137 | |||
| ef08cb26da | |||
| 9ad205ecde | |||
| 14cce09a65 | |||
| 9835255f5d | |||
| 4d2f7f9839 | |||
| 25c4271d2f | |||
| c950c5d369 | |||
| 13ccbbb47a | |||
| ba3c7692cd | |||
| 27cc6df760 | |||
| d06c8de748 | |||
| 2a2e358475 | |||
| bc42d96d66 | |||
| 88686213c3 | |||
| 21f66db674 | |||
| 3ca305f873 | |||
| 96cad4ca4c | |||
| 5668411713 | |||
| 32cd2da551 | |||
| fa2480f5b3 | |||
| ad8c8c1e31 | |||
| f14a62ebbe | |||
| dfdac38afb | |||
| 08da054005 | |||
| bb401c02fc | |||
| da9da6aea6 | |||
| 97f1eb8052 | |||
| 7d8e2a7f73 | |||
| 3ea3649755 | |||
| 0342c4a6b2 | |||
| d7bf0e5259 | |||
| c24a039042 | |||
| f4e2aed42a | |||
| 54ef0fdf60 | |||
| 2eab4f7b39 | |||
| 4c0fbd8d6d | |||
| fa4b1a404e | |||
| 4c484d66b7 | |||
| 41f2a9c81f | |||
| 6724746596 | |||
| 938d1588eb | |||
| 0f1e8ba2f8 | |||
| b474dfad0d | |||
| 9edf6af4ae | |||
| 2566592045 | |||
| 3d4d61988a | |||
| 61f3638a34 | |||
| 706307445e | |||
| ea3f7c12a9 | |||
| 6f323353d2 | |||
| b3b37b84e8 | |||
| 4d17e200dd | |||
| 5972bb856c | |||
| ef3fea63eb | |||
| 71216b91d2 | |||
| 284489893b | |||
| 6581b17842 | |||
| 51d3c23150 | |||
| 16c223eec9 | |||
| 7aaf6ce9d8 | |||
| 3f817debb4 | |||
| 97889c037a | |||
| 86b39b41a0 | |||
| 531572b590 | |||
| 74101f7e2a | |||
| c1c26a77ff | |||
| db65272aef | |||
| da88fc4ac9 | |||
| 889152ce4a | |||
| 5d859a2e22 | |||
| e0cfa1592d | |||
| d088fb7d24 | |||
| 67995229a8 | |||
| 2ff09e8fed | |||
| 9f1d3db730 | |||
| 5dda8c0910 | |||
| d6da6cbd74 | |||
| 6732e223bf | |||
| baaac31655 | |||
| b0b0d07b13 | |||
| 8a56047135 | |||
| 9a7ef02f4d | |||
| 3bd7cd06b7 | |||
| b9c3040b10 | |||
| 5dbed50429 | |||
| 3fb0942cc5 | |||
| fa2cbd4007 | |||
| bb9542a2a0 | |||
| 72e4996a54 | |||
| 575872cc37 | |||
| f4ce02ae42 | |||
| 97d7228f42 | |||
| 026fe79646 | |||
| 602b5dca7b | |||
| d5fb6abd36 | |||
| 39993c3dfe | |||
| e3c1c9153f | |||
| 2ea370a4e3 | |||
| 3e91a9c525 | |||
| c94f730078 | |||
| 457e62d7ca | |||
| 19bf54b764 | |||
| fdd8c0aea1 | |||
| dced953b62 | |||
| f7c1db6366 | |||
| fa5de0c5cd | |||
| 793a2cff2a | |||
| fdd97e0093 | |||
| 3b8817db96 | |||
| 25ea8ce94b | |||
| 8b1a132de7 | |||
| 7ea8331009 | |||
| 3c5f354a8c | |||
| 5c0fe099ec | |||
| 5fc134ff2f | |||
| 7ad2616d37 | |||
| d0d9dccc61 | |||
| 28520cad25 | |||
| deb7a84231 | |||
| eebf00bee9 | |||
| d0b3be763f | |||
| cb599d27ed | |||
| af3a5bb40d | |||
| 51c2bd0def | |||
| 03ff875e09 | |||
| 13b5348848 | |||
| 4820185031 | |||
| 52a2af6fd1 | |||
| 220bb7341e | |||
| 58211157bf |
+7
-11
@@ -145,22 +145,18 @@ Once everything is in good shape and the details have been worked out you can re
|
|||||||
Any required reviews can then be finalized and the pull request merged.
|
Any required reviews can then be finalized and the pull request merged.
|
||||||
|
|
||||||
#### Tests and Benchmarks
|
#### Tests and Benchmarks
|
||||||
* Every pull request will by tested by the buildbot on multiple platforms by running the [zfs-tests.sh and zloop.sh](
|
* Every pull request is tested using a GitHub Actions workflow on multiple platforms by running the [zfs-tests.sh and zloop.sh](
|
||||||
https://openzfs.github.io/openzfs-docs/Developer%20Resources/Building%20ZFS.html#running-zloop-sh-and-zfs-tests-sh) test suites.
|
https://openzfs.github.io/openzfs-docs/Developer%20Resources/Building%20ZFS.html#running-zloop-sh-and-zfs-tests-sh) test suites.
|
||||||
|
`.github/workflows/scripts/generate-ci-type.py` is used to determine whether the pull request is nonbehavior, i.e., not introducing behavior changes of any code, configuration or tests. If so, the CI will run on fewer platforms and only essential sanity tests will run. You can always override this by adding `ZFS-CI-Type` line to your commit message:
|
||||||
|
* If your last commit (or `HEAD` in git terms) contains a line `ZFS-CI-Type: quick`, quick mode is forced regardless of what files are changed.
|
||||||
|
* Otherwise, if any commit in a PR contains a line `ZFS-CI-Type: full`, full mode is forced.
|
||||||
* To verify your changes conform to the [style guidelines](
|
* To verify your changes conform to the [style guidelines](
|
||||||
https://github.com/openzfs/zfs/blob/master/.github/CONTRIBUTING.md#style-guides
|
https://github.com/openzfs/zfs/blob/master/.github/CONTRIBUTING.md#style-guides
|
||||||
), please run `make checkstyle` and resolve any warnings.
|
), please run `make checkstyle` and resolve any warnings.
|
||||||
* Static code analysis of each pull request is performed by the buildbot; run `make lint` to check your changes.
|
* Code analysis is performed by [CodeQL](https://codeql.github.com/) for each pull request.
|
||||||
* Test cases should be provided when appropriate.
|
* Test cases should be provided when appropriate. This includes making sure new features have adequate code coverage.
|
||||||
This includes making sure new features have adequate code coverage.
|
|
||||||
* If your pull request improves performance, please include some benchmarks.
|
* If your pull request improves performance, please include some benchmarks.
|
||||||
* The pull request must pass all required [ZFS
|
* The pull request must pass all CI checks before being accepted.
|
||||||
Buildbot](http://build.zfsonlinux.org/) builders before
|
|
||||||
being accepted. If you are experiencing intermittent TEST
|
|
||||||
builder failures, you may be experiencing a [test suite
|
|
||||||
issue](https://github.com/openzfs/zfs/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Test+Suite%22).
|
|
||||||
There are also various [buildbot options](https://openzfs.github.io/openzfs-docs/Developer%20Resources/Buildbot%20Options.html)
|
|
||||||
to control how changes are tested.
|
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
All help is appreciated! If you're in a position to run the latest code
|
All help is appreciated! If you're in a position to run the latest code
|
||||||
|
|||||||
@@ -1,57 +0,0 @@
|
|||||||
acl
|
|
||||||
alien
|
|
||||||
attr
|
|
||||||
autoconf
|
|
||||||
bc
|
|
||||||
build-essential
|
|
||||||
curl
|
|
||||||
dbench
|
|
||||||
debhelper-compat
|
|
||||||
dh-python
|
|
||||||
dkms
|
|
||||||
fakeroot
|
|
||||||
fio
|
|
||||||
gdb
|
|
||||||
gdebi
|
|
||||||
git
|
|
||||||
ksh
|
|
||||||
lcov
|
|
||||||
libacl1-dev
|
|
||||||
libaio-dev
|
|
||||||
libattr1-dev
|
|
||||||
libblkid-dev
|
|
||||||
libcurl4-openssl-dev
|
|
||||||
libdevmapper-dev
|
|
||||||
libelf-dev
|
|
||||||
libffi-dev
|
|
||||||
libmount-dev
|
|
||||||
libpam0g-dev
|
|
||||||
libselinux1-dev
|
|
||||||
libssl-dev
|
|
||||||
libtool
|
|
||||||
libudev-dev
|
|
||||||
linux-headers-generic
|
|
||||||
lsscsi
|
|
||||||
mdadm
|
|
||||||
nfs-kernel-server
|
|
||||||
pamtester
|
|
||||||
parted
|
|
||||||
po-debconf
|
|
||||||
python3
|
|
||||||
python3-all-dev
|
|
||||||
python3-cffi
|
|
||||||
python3-dev
|
|
||||||
python3-packaging
|
|
||||||
python3-pip
|
|
||||||
python3-setuptools
|
|
||||||
python3-sphinx
|
|
||||||
rng-tools-debian
|
|
||||||
rsync
|
|
||||||
samba
|
|
||||||
sysstat
|
|
||||||
uuid-dev
|
|
||||||
watchdog
|
|
||||||
wget
|
|
||||||
xfslibs-dev
|
|
||||||
xz-utils
|
|
||||||
zlib1g-dev
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
cppcheck
|
|
||||||
devscripts
|
|
||||||
mandoc
|
|
||||||
pax-utils
|
|
||||||
shellcheck
|
|
||||||
@@ -4,6 +4,10 @@ on:
|
|||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
checkstyle:
|
checkstyle:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
@@ -13,15 +17,11 @@ jobs:
|
|||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
# https://github.com/orgs/community/discussions/47863
|
# for x in lxd core20 snapd; do sudo snap remove $x; done
|
||||||
sudo apt-mark hold grub-efi-amd64-signed
|
sudo apt-get purge -y snapd google-chrome-stable firefox
|
||||||
sudo apt-get update --fix-missing
|
ONLY_DEPS=1 .github/workflows/scripts/qemu-3-deps.sh ubuntu22
|
||||||
sudo apt-get upgrade
|
sudo apt-get install -y cppcheck devscripts mandoc pax-utils shellcheck
|
||||||
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt apt-get install -qq
|
sudo python -m pipx install --quiet flake8
|
||||||
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/checkstyle-dependencies.txt apt-get install -qq
|
|
||||||
sudo python3 -m pip install --quiet flake8
|
|
||||||
sudo apt-get clean
|
|
||||||
|
|
||||||
# confirm that the tools are installed
|
# confirm that the tools are installed
|
||||||
# the build system doesn't fail when they are not
|
# the build system doesn't fail when they are not
|
||||||
checkbashisms --version
|
checkbashisms --version
|
||||||
@@ -31,8 +31,13 @@ jobs:
|
|||||||
shellcheck --version
|
shellcheck --version
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
run: |
|
run: |
|
||||||
|
sed -i '/DEBUG_CFLAGS="-Werror"/s/^/#/' config/zfs-build.m4
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
|
- name: Configure
|
||||||
|
run: |
|
||||||
./configure
|
./configure
|
||||||
|
- name: Make
|
||||||
|
run: |
|
||||||
make -j$(nproc) --no-print-directory --silent
|
make -j$(nproc) --no-print-directory --silent
|
||||||
- name: Checkstyle
|
- name: Checkstyle
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -4,10 +4,14 @@ on:
|
|||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
permissions:
|
permissions:
|
||||||
actions: read
|
actions: read
|
||||||
contents: read
|
contents: read
|
||||||
@@ -27,15 +31,15 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v3
|
||||||
with:
|
with:
|
||||||
config-file: .github/codeql-${{ matrix.language }}.yml
|
config-file: .github/codeql-${{ matrix.language }}.yml
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v2
|
uses: github/codeql-action/autobuild@v3
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v3
|
||||||
with:
|
with:
|
||||||
category: "/language:${{matrix.language}}"
|
category: "/language:${{matrix.language}}"
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
Workflow for each operating system:
|
||||||
|
- install qemu on the github runner
|
||||||
|
- download current cloud image of operating system
|
||||||
|
- start and init that image via cloud-init
|
||||||
|
- install dependencies and poweroff system
|
||||||
|
- start system and build openzfs and then poweroff again
|
||||||
|
- clone build system and start 2 instances of it
|
||||||
|
- run functional testings and complete in around 3h
|
||||||
|
- when tests are done, do some logfile preparing
|
||||||
|
- show detailed results for each system
|
||||||
|
- in the end, generate the job summary
|
||||||
|
|
||||||
|
/TR 14.09.2024
|
||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
"""
|
||||||
|
Determine the CI type based on the change list and commit message.
|
||||||
|
|
||||||
|
Prints "quick" if (explicity required by user):
|
||||||
|
- the *last* commit message contains 'ZFS-CI-Type: quick'
|
||||||
|
or if (heuristics):
|
||||||
|
- the files changed are not in the list of specified directories, and
|
||||||
|
- all commit messages do not contain 'ZFS-CI-Type: full'
|
||||||
|
|
||||||
|
Otherwise prints "full".
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
import re
|
||||||
|
|
||||||
|
"""
|
||||||
|
Patterns of files that are not considered to trigger full CI.
|
||||||
|
Note: not using pathlib.Path.match() because it does not support '**'
|
||||||
|
"""
|
||||||
|
FULL_RUN_IGNORE_REGEX = list(map(re.compile, [
|
||||||
|
r'.*\.md',
|
||||||
|
r'.*\.gitignore'
|
||||||
|
]))
|
||||||
|
|
||||||
|
"""
|
||||||
|
Patterns of files that are considered to trigger full CI.
|
||||||
|
"""
|
||||||
|
FULL_RUN_REGEX = list(map(re.compile, [
|
||||||
|
r'cmd.*',
|
||||||
|
r'configs/.*',
|
||||||
|
r'META',
|
||||||
|
r'.*\.am',
|
||||||
|
r'.*\.m4',
|
||||||
|
r'autogen\.sh',
|
||||||
|
r'configure\.ac',
|
||||||
|
r'copy-builtin',
|
||||||
|
r'contrib',
|
||||||
|
r'etc',
|
||||||
|
r'include',
|
||||||
|
r'lib/.*',
|
||||||
|
r'module/.*',
|
||||||
|
r'scripts/.*',
|
||||||
|
r'tests/.*',
|
||||||
|
r'udev/.*'
|
||||||
|
]))
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
|
||||||
|
prog = sys.argv[0]
|
||||||
|
|
||||||
|
if len(sys.argv) != 3:
|
||||||
|
print(f'Usage: {prog} <head_ref> <base_ref>')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
head, base = sys.argv[1:3]
|
||||||
|
|
||||||
|
def output_type(type, reason):
|
||||||
|
print(f'{prog}: will run {type} CI: {reason}', file=sys.stderr)
|
||||||
|
print(type)
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
# check last (HEAD) commit message
|
||||||
|
last_commit_message_raw = subprocess.run([
|
||||||
|
'git', 'show', '-s', '--format=%B', 'HEAD'
|
||||||
|
], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
|
||||||
|
for line in last_commit_message_raw.stdout.decode().splitlines():
|
||||||
|
if line.strip().lower() == 'zfs-ci-type: quick':
|
||||||
|
output_type('quick', f'explicitly requested by HEAD commit {head}')
|
||||||
|
|
||||||
|
# check all commit messages
|
||||||
|
all_commit_message_raw = subprocess.run([
|
||||||
|
'git', 'show', '-s',
|
||||||
|
'--format=ZFS-CI-Commit: %H%n%B', f'{head}...{base}'
|
||||||
|
], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
all_commit_message = all_commit_message_raw.stdout.decode().splitlines()
|
||||||
|
|
||||||
|
commit_ref = head
|
||||||
|
for line in all_commit_message:
|
||||||
|
if line.startswith('ZFS-CI-Commit:'):
|
||||||
|
commit_ref = line.lstrip('ZFS-CI-Commit:').rstrip()
|
||||||
|
if line.strip().lower() == 'zfs-ci-type: full':
|
||||||
|
output_type('full', f'explicitly requested by commit {commit_ref}')
|
||||||
|
|
||||||
|
# check changed files
|
||||||
|
changed_files_raw = subprocess.run([
|
||||||
|
'git', 'diff', '--name-only', head, base
|
||||||
|
], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
changed_files = changed_files_raw.stdout.decode().splitlines()
|
||||||
|
|
||||||
|
for f in changed_files:
|
||||||
|
for r in FULL_RUN_IGNORE_REGEX:
|
||||||
|
if r.match(f):
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
for r in FULL_RUN_REGEX:
|
||||||
|
if r.match(f):
|
||||||
|
output_type(
|
||||||
|
'full',
|
||||||
|
f'changed file "{f}" matches pattern "{r.pattern}"'
|
||||||
|
)
|
||||||
|
|
||||||
|
# catch-all
|
||||||
|
output_type('quick', 'no changed file matches full CI patterns')
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# for runtime reasons we split functional testings into N parts
|
|
||||||
# - use a define to check for missing tarfiles
|
|
||||||
FUNCTIONAL_PARTS="4"
|
|
||||||
|
|
||||||
ZTS_REPORT="tests/test-runner/bin/zts-report.py"
|
|
||||||
chmod +x $ZTS_REPORT
|
|
||||||
|
|
||||||
function output() {
|
|
||||||
echo -e $* >> Summary.md
|
|
||||||
}
|
|
||||||
|
|
||||||
function error() {
|
|
||||||
output ":bangbang: $* :bangbang:\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
# this function generates the real summary
|
|
||||||
# - expects a logfile "log" in current directory
|
|
||||||
function generate() {
|
|
||||||
# we issued some error already
|
|
||||||
test ! -s log && return
|
|
||||||
|
|
||||||
# for overview and zts-report
|
|
||||||
cat log | grep '^Test' > list
|
|
||||||
|
|
||||||
# error details
|
|
||||||
awk '/\[FAIL\]|\[KILLED\]/{ show=1; print; next; }
|
|
||||||
/\[SKIP\]|\[PASS\]/{ show=0; } show' log > err
|
|
||||||
|
|
||||||
# summary of errors
|
|
||||||
if [ -s err ]; then
|
|
||||||
output "<pre>"
|
|
||||||
$ZTS_REPORT --no-maybes ./list >> Summary.md
|
|
||||||
output "</pre>"
|
|
||||||
|
|
||||||
# generate seperate error logfile
|
|
||||||
ERRLOGS=$((ERRLOGS+1))
|
|
||||||
errfile="err-$ERRLOGS.md"
|
|
||||||
echo -e "\n## $headline (debugging)\n" >> $errfile
|
|
||||||
echo "<details><summary>Error Listing - with dmesg and dbgmsg</summary><pre>" >> $errfile
|
|
||||||
dd if=err bs=999k count=1 >> $errfile
|
|
||||||
echo "</pre></details>" >> $errfile
|
|
||||||
else
|
|
||||||
output "All tests passed :thumbsup:"
|
|
||||||
fi
|
|
||||||
|
|
||||||
output "<details><summary>Full Listing</summary><pre>"
|
|
||||||
cat list >> Summary.md
|
|
||||||
output "</pre></details>"
|
|
||||||
|
|
||||||
# remove tmp files
|
|
||||||
rm -f err list log
|
|
||||||
}
|
|
||||||
|
|
||||||
# check tarfiles and untar
|
|
||||||
function check_tarfile() {
|
|
||||||
if [ -f "$1" ]; then
|
|
||||||
tar xf "$1" || error "Tarfile $1 returns some error"
|
|
||||||
else
|
|
||||||
error "Tarfile $1 not found"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# check logfile and concatenate test results
|
|
||||||
function check_logfile() {
|
|
||||||
if [ -f "$1" ]; then
|
|
||||||
cat "$1" >> log
|
|
||||||
else
|
|
||||||
error "Logfile $1 not found"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# sanity
|
|
||||||
function summarize_s() {
|
|
||||||
headline="$1"
|
|
||||||
output "\n## $headline\n"
|
|
||||||
rm -rf testfiles
|
|
||||||
check_tarfile "$2/sanity.tar"
|
|
||||||
check_logfile "testfiles/log"
|
|
||||||
generate
|
|
||||||
}
|
|
||||||
|
|
||||||
# functional
|
|
||||||
function summarize_f() {
|
|
||||||
headline="$1"
|
|
||||||
output "\n## $headline\n"
|
|
||||||
rm -rf testfiles
|
|
||||||
for i in $(seq 1 $FUNCTIONAL_PARTS); do
|
|
||||||
tarfile="$2-part$i/part$i.tar"
|
|
||||||
check_tarfile "$tarfile"
|
|
||||||
check_logfile "testfiles/log"
|
|
||||||
done
|
|
||||||
generate
|
|
||||||
}
|
|
||||||
|
|
||||||
# https://docs.github.com/en/enterprise-server@3.6/actions/using-workflows/workflow-commands-for-github-actions#step-isolation-and-limits
|
|
||||||
# Job summaries are isolated between steps and each step is restricted to a maximum size of 1MiB.
|
|
||||||
# [ ] can not show all error findings here
|
|
||||||
# [x] split files into smaller ones and create additional steps
|
|
||||||
|
|
||||||
ERRLOGS=0
|
|
||||||
if [ ! -f Summary/Summary.md ]; then
|
|
||||||
# first call, we do the default summary (~500k)
|
|
||||||
echo -n > Summary.md
|
|
||||||
summarize_s "Sanity Tests Ubuntu 20.04" Logs-20.04-sanity
|
|
||||||
summarize_s "Sanity Tests Ubuntu 22.04" Logs-22.04-sanity
|
|
||||||
summarize_f "Functional Tests Ubuntu 20.04" Logs-20.04-functional
|
|
||||||
summarize_f "Functional Tests Ubuntu 22.04" Logs-22.04-functional
|
|
||||||
|
|
||||||
cat Summary.md >> $GITHUB_STEP_SUMMARY
|
|
||||||
mkdir -p Summary
|
|
||||||
mv *.md Summary
|
|
||||||
else
|
|
||||||
# here we get, when errors where returned in first call
|
|
||||||
test -f Summary/err-$1.md && cat Summary/err-$1.md >> $GITHUB_STEP_SUMMARY
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
Executable
+109
@@ -0,0 +1,109 @@
|
|||||||
|
#!/bin/awk -f
|
||||||
|
#
|
||||||
|
# Merge multiple ZTS tests results summaries into a single summary. This is
|
||||||
|
# needed when you're running different parts of ZTS on different tests
|
||||||
|
# runners or VMs.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# ./merge_summary.awk summary1.txt [summary2.txt] [summary3.txt] ...
|
||||||
|
#
|
||||||
|
# or:
|
||||||
|
#
|
||||||
|
# cat summary*.txt | ./merge_summary.awk
|
||||||
|
#
|
||||||
|
BEGIN {
|
||||||
|
i=-1
|
||||||
|
pass=0
|
||||||
|
fail=0
|
||||||
|
skip=0
|
||||||
|
state=""
|
||||||
|
cl=0
|
||||||
|
el=0
|
||||||
|
upl=0
|
||||||
|
ul=0
|
||||||
|
|
||||||
|
# Total seconds of tests runtime
|
||||||
|
total=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Skip empty lines
|
||||||
|
/^\s*$/{next}
|
||||||
|
|
||||||
|
# Skip Configuration and Test lines
|
||||||
|
/^Test:/{state=""; next}
|
||||||
|
/Configuration/{state="";next}
|
||||||
|
|
||||||
|
# When we see "test-runner.py" stop saving config lines, and
|
||||||
|
# save test runner lines
|
||||||
|
/test-runner.py/{state="testrunner"; runner=runner$0"\n"; next}
|
||||||
|
|
||||||
|
# We need to differentiate the PASS counts from test result lines that start
|
||||||
|
# with PASS, like:
|
||||||
|
#
|
||||||
|
# PASS mv_files/setup
|
||||||
|
#
|
||||||
|
# Use state="pass_count" to differentiate
|
||||||
|
#
|
||||||
|
/Results Summary/{state="pass_count"; next}
|
||||||
|
/PASS/{ if (state=="pass_count") {pass += $2}}
|
||||||
|
/FAIL/{ if (state=="pass_count") {fail += $2}}
|
||||||
|
/SKIP/{ if (state=="pass_count") {skip += $2}}
|
||||||
|
/Running Time/{
|
||||||
|
state="";
|
||||||
|
running[i]=$3;
|
||||||
|
split($3, arr, ":")
|
||||||
|
total += arr[1] * 60 * 60;
|
||||||
|
total += arr[2] * 60;
|
||||||
|
total += arr[3]
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
/Tests with results other than PASS that are expected/{state="expected_lines"; next}
|
||||||
|
/Tests with result of PASS that are unexpected/{state="unexpected_pass_lines"; next}
|
||||||
|
/Tests with results other than PASS that are unexpected/{state="unexpected_lines"; next}
|
||||||
|
{
|
||||||
|
if (state == "expected_lines") {
|
||||||
|
expected_lines[el] = $0
|
||||||
|
el++
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state == "unexpected_pass_lines") {
|
||||||
|
unexpected_pass_lines[upl] = $0
|
||||||
|
upl++
|
||||||
|
}
|
||||||
|
if (state == "unexpected_lines") {
|
||||||
|
unexpected_lines[ul] = $0
|
||||||
|
ul++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Reproduce summary
|
||||||
|
END {
|
||||||
|
print runner;
|
||||||
|
print "\nResults Summary"
|
||||||
|
print "PASS\t"pass
|
||||||
|
print "FAIL\t"fail
|
||||||
|
print "SKIP\t"skip
|
||||||
|
print ""
|
||||||
|
print "Running Time:\t"strftime("%T", total, 1)
|
||||||
|
if (pass+fail+skip > 0) {
|
||||||
|
percent_passed=(pass/(pass+fail+skip) * 100)
|
||||||
|
}
|
||||||
|
printf "Percent passed:\t%3.2f%", percent_passed
|
||||||
|
|
||||||
|
print "\n\nTests with results other than PASS that are expected:"
|
||||||
|
asort(expected_lines, sorted)
|
||||||
|
for (j in sorted)
|
||||||
|
print sorted[j]
|
||||||
|
|
||||||
|
print "\n\nTests with result of PASS that are unexpected:"
|
||||||
|
asort(unexpected_pass_lines, sorted)
|
||||||
|
for (j in sorted)
|
||||||
|
print sorted[j]
|
||||||
|
|
||||||
|
print "\n\nTests with results other than PASS that are unexpected:"
|
||||||
|
asort(unexpected_lines, sorted)
|
||||||
|
for (j in sorted)
|
||||||
|
print sorted[j]
|
||||||
|
}
|
||||||
Executable
+93
@@ -0,0 +1,93 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# 1) setup qemu instance on action runner
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# install needed packages
|
||||||
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
|
sudo apt-get -y update
|
||||||
|
sudo apt-get install -y axel cloud-image-utils daemonize guestfs-tools \
|
||||||
|
ksmtuned virt-manager linux-modules-extra-$(uname -r) zfsutils-linux
|
||||||
|
|
||||||
|
# generate ssh keys
|
||||||
|
rm -f ~/.ssh/id_ed25519
|
||||||
|
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -q -N ""
|
||||||
|
|
||||||
|
# we expect RAM shortage
|
||||||
|
cat << EOF | sudo tee /etc/ksmtuned.conf > /dev/null
|
||||||
|
# /etc/ksmtuned.conf - Configuration file for ksmtuned
|
||||||
|
# https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/virtualization_tuning_and_optimization_guide/chap-ksm
|
||||||
|
KSM_MONITOR_INTERVAL=60
|
||||||
|
|
||||||
|
# Millisecond sleep between ksm scans for 16Gb server.
|
||||||
|
# Smaller servers sleep more, bigger sleep less.
|
||||||
|
KSM_SLEEP_MSEC=30
|
||||||
|
|
||||||
|
KSM_NPAGES_BOOST=0
|
||||||
|
KSM_NPAGES_DECAY=0
|
||||||
|
KSM_NPAGES_MIN=1000
|
||||||
|
KSM_NPAGES_MAX=25000
|
||||||
|
|
||||||
|
KSM_THRES_COEF=80
|
||||||
|
KSM_THRES_CONST=8192
|
||||||
|
|
||||||
|
LOGFILE=/var/log/ksmtuned.log
|
||||||
|
DEBUG=1
|
||||||
|
EOF
|
||||||
|
sudo systemctl restart ksm
|
||||||
|
sudo systemctl restart ksmtuned
|
||||||
|
|
||||||
|
# not needed
|
||||||
|
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
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# swap with same size as RAM
|
||||||
|
sudo mkswap $DISK-part1
|
||||||
|
sudo swapon $DISK-part1
|
||||||
|
|
||||||
|
# 60GB data disk
|
||||||
|
SSD1="$DISK-part2"
|
||||||
|
|
||||||
|
# 10GB data disk on ext4
|
||||||
|
sudo fallocate -l 10G /test.ssd1
|
||||||
|
SSD2=$(sudo losetup -b 4096 -f /test.ssd1 --show)
|
||||||
|
|
||||||
|
# adjust zfs module parameter and create pool
|
||||||
|
exec 1>/dev/null
|
||||||
|
ARC_MIN=$((1024*1024*256))
|
||||||
|
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 -O atime=off -O xattr=sa -O compression=lz4 \
|
||||||
|
-O mountpoint=/mnt/tests
|
||||||
|
|
||||||
|
# no need for some scheduler
|
||||||
|
for i in /sys/block/s*/queue/scheduler; do
|
||||||
|
echo "none" | sudo tee $i > /dev/null
|
||||||
|
done
|
||||||
Executable
+225
@@ -0,0 +1,225 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# 2) start qemu with some operating system, init via cloud-init
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# short name used in zfs-qemu.yml
|
||||||
|
OS="$1"
|
||||||
|
|
||||||
|
# OS variant (virt-install --os-variant list)
|
||||||
|
OSv=$OS
|
||||||
|
|
||||||
|
# compressed with .zst extension
|
||||||
|
REPO="https://github.com/mcmilk/openzfs-freebsd-images"
|
||||||
|
FREEBSD="$REPO/releases/download/v2024-10-05"
|
||||||
|
URLzs=""
|
||||||
|
|
||||||
|
# Ubuntu mirrors
|
||||||
|
#UBMIRROR="https://cloud-images.ubuntu.com"
|
||||||
|
#UBMIRROR="https://mirrors.cloud.tencent.com/ubuntu-cloud-images"
|
||||||
|
UBMIRROR="https://mirror.citrahost.com/ubuntu-cloud-images"
|
||||||
|
|
||||||
|
# default nic model for vm's
|
||||||
|
NIC="virtio"
|
||||||
|
|
||||||
|
case "$OS" in
|
||||||
|
almalinux8)
|
||||||
|
OSNAME="AlmaLinux 8"
|
||||||
|
URL="https://repo.almalinux.org/almalinux/8/cloud/x86_64/images/AlmaLinux-8-GenericCloud-latest.x86_64.qcow2"
|
||||||
|
;;
|
||||||
|
almalinux9)
|
||||||
|
OSNAME="AlmaLinux 9"
|
||||||
|
URL="https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-latest.x86_64.qcow2"
|
||||||
|
;;
|
||||||
|
archlinux)
|
||||||
|
OSNAME="Archlinux"
|
||||||
|
URL="https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2"
|
||||||
|
# dns sometimes fails with that url :/
|
||||||
|
echo "89.187.191.12 geo.mirror.pkgbuild.com" | sudo tee /etc/hosts > /dev/null
|
||||||
|
;;
|
||||||
|
centos-stream9)
|
||||||
|
OSNAME="CentOS Stream 9"
|
||||||
|
URL="https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-latest.x86_64.qcow2"
|
||||||
|
;;
|
||||||
|
debian11)
|
||||||
|
OSNAME="Debian 11"
|
||||||
|
URL="https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2"
|
||||||
|
;;
|
||||||
|
debian12)
|
||||||
|
OSNAME="Debian 12"
|
||||||
|
URL="https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2"
|
||||||
|
;;
|
||||||
|
fedora40)
|
||||||
|
OSNAME="Fedora 40"
|
||||||
|
OSv="fedora-unknown"
|
||||||
|
URL="https://download.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2"
|
||||||
|
;;
|
||||||
|
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"
|
||||||
|
;;
|
||||||
|
freebsd13-3r)
|
||||||
|
OSNAME="FreeBSD 13.3-RELEASE"
|
||||||
|
OSv="freebsd13.0"
|
||||||
|
URLzs="$FREEBSD/amd64-freebsd-13.3-RELEASE.qcow2.zst"
|
||||||
|
BASH="/usr/local/bin/bash"
|
||||||
|
NIC="rtl8139"
|
||||||
|
;;
|
||||||
|
freebsd13-4r)
|
||||||
|
OSNAME="FreeBSD 13.4-RELEASE"
|
||||||
|
OSv="freebsd13.0"
|
||||||
|
URLzs="$FREEBSD/amd64-freebsd-13.4-RELEASE.qcow2.zst"
|
||||||
|
BASH="/usr/local/bin/bash"
|
||||||
|
NIC="rtl8139"
|
||||||
|
;;
|
||||||
|
freebsd14-0r)
|
||||||
|
OSNAME="FreeBSD 14.0-RELEASE"
|
||||||
|
OSv="freebsd14.0"
|
||||||
|
URLzs="$FREEBSD/amd64-freebsd-14.0-RELEASE.qcow2.zst"
|
||||||
|
BASH="/usr/local/bin/bash"
|
||||||
|
;;
|
||||||
|
freebsd14-1r)
|
||||||
|
OSNAME="FreeBSD 14.1-RELEASE"
|
||||||
|
OSv="freebsd14.0"
|
||||||
|
URLzs="$FREEBSD/amd64-freebsd-14.1-RELEASE.qcow2.zst"
|
||||||
|
BASH="/usr/local/bin/bash"
|
||||||
|
;;
|
||||||
|
freebsd13-4s)
|
||||||
|
OSNAME="FreeBSD 13.4-STABLE"
|
||||||
|
OSv="freebsd13.0"
|
||||||
|
URLzs="$FREEBSD/amd64-freebsd-13.4-STABLE.qcow2.zst"
|
||||||
|
BASH="/usr/local/bin/bash"
|
||||||
|
;;
|
||||||
|
freebsd14-1s)
|
||||||
|
OSNAME="FreeBSD 14.1-STABLE"
|
||||||
|
OSv="freebsd14.0"
|
||||||
|
URLzs="$FREEBSD/amd64-freebsd-14.1-STABLE.qcow2.zst"
|
||||||
|
BASH="/usr/local/bin/bash"
|
||||||
|
;;
|
||||||
|
freebsd15-0c)
|
||||||
|
OSNAME="FreeBSD 15.0-CURRENT"
|
||||||
|
OSv="freebsd14.0"
|
||||||
|
URLzs="$FREEBSD/amd64-freebsd-15.0-CURRENT.qcow2.zst"
|
||||||
|
BASH="/usr/local/bin/bash"
|
||||||
|
;;
|
||||||
|
tumbleweed)
|
||||||
|
OSNAME="openSUSE Tumbleweed"
|
||||||
|
OSv="opensusetumbleweed"
|
||||||
|
MIRROR="http://opensuse-mirror-gce-us.susecloud.net"
|
||||||
|
URL="$MIRROR/tumbleweed/appliances/openSUSE-MicroOS.x86_64-OpenStack-Cloud.qcow2"
|
||||||
|
;;
|
||||||
|
ubuntu20)
|
||||||
|
OSNAME="Ubuntu 20.04"
|
||||||
|
OSv="ubuntu20.04"
|
||||||
|
URL="$UBMIRROR/focal/current/focal-server-cloudimg-amd64.img"
|
||||||
|
;;
|
||||||
|
ubuntu22)
|
||||||
|
OSNAME="Ubuntu 22.04"
|
||||||
|
OSv="ubuntu22.04"
|
||||||
|
URL="$UBMIRROR/jammy/current/jammy-server-cloudimg-amd64.img"
|
||||||
|
;;
|
||||||
|
ubuntu24)
|
||||||
|
OSNAME="Ubuntu 24.04"
|
||||||
|
OSv="ubuntu24.04"
|
||||||
|
URL="$UBMIRROR/noble/current/noble-server-cloudimg-amd64.img"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Wrong value for OS variable!"
|
||||||
|
exit 111
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# environment file
|
||||||
|
ENV="/var/tmp/env.txt"
|
||||||
|
echo "ENV=$ENV" >> $ENV
|
||||||
|
|
||||||
|
# result path
|
||||||
|
echo 'RESPATH="/var/tmp/test_results"' >> $ENV
|
||||||
|
|
||||||
|
# FreeBSD 13 has problems with: e1000+virtio
|
||||||
|
echo "NIC=$NIC" >> $ENV
|
||||||
|
|
||||||
|
# freebsd15 -> used in zfs-qemu.yml
|
||||||
|
echo "OS=$OS" >> $ENV
|
||||||
|
|
||||||
|
# freebsd14.0 -> used for virt-install
|
||||||
|
echo "OSv=\"$OSv\"" >> $ENV
|
||||||
|
|
||||||
|
# FreeBSD 15 (Current) -> used for summary
|
||||||
|
echo "OSNAME=\"$OSNAME\"" >> $ENV
|
||||||
|
|
||||||
|
sudo mkdir -p "/mnt/tests"
|
||||||
|
sudo chown -R $(whoami) /mnt/tests
|
||||||
|
|
||||||
|
# we are downloading via axel, curl and wget are mostly slower and
|
||||||
|
# require more return value checking
|
||||||
|
IMG="/mnt/tests/cloudimg.qcow2"
|
||||||
|
if [ ! -z "$URLzs" ]; then
|
||||||
|
echo "Loading image $URLzs ..."
|
||||||
|
time axel -q -o "$IMG.zst" "$URLzs"
|
||||||
|
zstd -q -d --rm "$IMG.zst"
|
||||||
|
else
|
||||||
|
echo "Loading image $URL ..."
|
||||||
|
time axel -q -o "$IMG" "$URL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
DISK="/dev/zvol/zpool/openzfs"
|
||||||
|
FORMAT="raw"
|
||||||
|
sudo zfs create -ps -b 64k -V 80g zpool/openzfs
|
||||||
|
while true; do test -b $DISK && break; sleep 1; done
|
||||||
|
echo "Importing VM image to zvol..."
|
||||||
|
sudo qemu-img dd -f qcow2 -O raw if=$IMG of=$DISK bs=4M
|
||||||
|
rm -f $IMG
|
||||||
|
|
||||||
|
PUBKEY=$(cat ~/.ssh/id_ed25519.pub)
|
||||||
|
cat <<EOF > /tmp/user-data
|
||||||
|
#cloud-config
|
||||||
|
|
||||||
|
fqdn: $OS
|
||||||
|
|
||||||
|
users:
|
||||||
|
- name: root
|
||||||
|
shell: $BASH
|
||||||
|
- name: zfs
|
||||||
|
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||||
|
shell: $BASH
|
||||||
|
ssh_authorized_keys:
|
||||||
|
- $PUBKEY
|
||||||
|
|
||||||
|
growpart:
|
||||||
|
mode: auto
|
||||||
|
devices: ['/']
|
||||||
|
ignore_growroot_disabled: false
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sudo virsh net-update default add ip-dhcp-host \
|
||||||
|
"<host mac='52:54:00:83:79:00' ip='192.168.122.10'/>" --live --config
|
||||||
|
|
||||||
|
sudo virt-install \
|
||||||
|
--os-variant $OSv \
|
||||||
|
--name "openzfs" \
|
||||||
|
--cpu host-passthrough \
|
||||||
|
--virt-type=kvm --hvm \
|
||||||
|
--vcpus=4,sockets=1 \
|
||||||
|
--memory $((1024*12)) \
|
||||||
|
--memballoon model=virtio \
|
||||||
|
--graphics none \
|
||||||
|
--network bridge=virbr0,model=$NIC,mac='52:54:00:83:79:00' \
|
||||||
|
--cloud-init user-data=/tmp/user-data \
|
||||||
|
--disk $DISK,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
||||||
|
--import --noautoconsole >/dev/null
|
||||||
|
|
||||||
|
# in case the directory isn't there already
|
||||||
|
mkdir -p $HOME/.ssh
|
||||||
|
|
||||||
|
cat <<EOF >> $HOME/.ssh/config
|
||||||
|
# no questions please
|
||||||
|
StrictHostKeyChecking no
|
||||||
|
|
||||||
|
# small timeout, used in while loops later
|
||||||
|
ConnectTimeout 1
|
||||||
|
EOF
|
||||||
Executable
+229
@@ -0,0 +1,229 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# 3) install dependencies for compiling and loading
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
function archlinux() {
|
||||||
|
echo "##[group]Running pacman -Syu"
|
||||||
|
sudo btrfs filesystem resize max /
|
||||||
|
sudo pacman -Syu --noconfirm
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Install Development Tools"
|
||||||
|
sudo pacman -Sy --noconfirm base-devel bc cpio cryptsetup dhclient dkms \
|
||||||
|
fakeroot fio gdb inetutils jq less linux linux-headers lsscsi nfs-utils \
|
||||||
|
parted pax perf python-packaging python-setuptools qemu-guest-agent ksh \
|
||||||
|
samba sysstat rng-tools rsync wget xxhash
|
||||||
|
echo "##[endgroup]"
|
||||||
|
}
|
||||||
|
|
||||||
|
function debian() {
|
||||||
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|
||||||
|
echo "##[group]Running apt-get update+upgrade"
|
||||||
|
sudo apt-get update -y
|
||||||
|
sudo apt-get upgrade -y
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Install Development Tools"
|
||||||
|
sudo apt-get install -y \
|
||||||
|
acl alien attr autoconf bc cpio cryptsetup curl dbench dh-python dkms \
|
||||||
|
fakeroot fio gdb gdebi git ksh lcov isc-dhcp-client jq libacl1-dev \
|
||||||
|
libaio-dev libattr1-dev libblkid-dev libcurl4-openssl-dev libdevmapper-dev \
|
||||||
|
libelf-dev libffi-dev libmount-dev libpam0g-dev libselinux-dev libssl-dev \
|
||||||
|
libtool libtool-bin libudev-dev libunwind-dev linux-headers-$(uname -r) \
|
||||||
|
lsscsi nfs-kernel-server pamtester parted python3 python3-all-dev \
|
||||||
|
python3-cffi python3-dev python3-distlib python3-packaging \
|
||||||
|
python3-setuptools python3-sphinx qemu-guest-agent rng-tools rpm2cpio \
|
||||||
|
rsync samba sysstat uuid-dev watchdog wget xfslibs-dev xxhash zlib1g-dev
|
||||||
|
echo "##[endgroup]"
|
||||||
|
}
|
||||||
|
|
||||||
|
function freebsd() {
|
||||||
|
export ASSUME_ALWAYS_YES="YES"
|
||||||
|
|
||||||
|
echo "##[group]Install Development Tools"
|
||||||
|
sudo pkg install -y autoconf automake autotools base64 checkbashisms fio \
|
||||||
|
gdb gettext gettext-runtime git gmake gsed jq ksh93 lcov libtool lscpu \
|
||||||
|
pkgconf python python3 pamtester pamtester qemu-guest-agent rsync xxhash
|
||||||
|
sudo pkg install -xy \
|
||||||
|
'^samba4[[:digit:]]+$' \
|
||||||
|
'^py3[[:digit:]]+-cffi$' \
|
||||||
|
'^py3[[:digit:]]+-sysctl$' \
|
||||||
|
'^py3[[:digit:]]+-packaging$'
|
||||||
|
echo "##[endgroup]"
|
||||||
|
}
|
||||||
|
|
||||||
|
# common packages for: almalinux, centos, redhat
|
||||||
|
function rhel() {
|
||||||
|
echo "##[group]Running dnf update"
|
||||||
|
echo "max_parallel_downloads=10" | sudo -E tee -a /etc/dnf/dnf.conf
|
||||||
|
sudo dnf clean all
|
||||||
|
sudo dnf update -y --setopt=fastestmirror=1 --refresh
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Install Development Tools"
|
||||||
|
|
||||||
|
# Alma wants "Development Tools", Fedora 41 wants "development-tools"
|
||||||
|
if ! sudo dnf group install -y "Development Tools" ; then
|
||||||
|
echo "Trying 'development-tools' instead of 'Development Tools'"
|
||||||
|
sudo dnf group install -y development-tools
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo dnf install -y \
|
||||||
|
acl attr bc bzip2 cryptsetup curl dbench dkms elfutils-libelf-devel fio \
|
||||||
|
gdb git jq kernel-rpm-macros ksh libacl-devel libaio-devel \
|
||||||
|
libargon2-devel libattr-devel libblkid-devel libcurl-devel libffi-devel \
|
||||||
|
ncompress libselinux-devel libtirpc-devel libtool libudev-devel \
|
||||||
|
libuuid-devel lsscsi mdadm nfs-utils openssl-devel pam-devel pamtester \
|
||||||
|
parted perf python3 python3-cffi python3-devel python3-packaging \
|
||||||
|
kernel-devel python3-setuptools qemu-guest-agent rng-tools rpcgen \
|
||||||
|
rpm-build rsync samba sysstat systemd watchdog wget xfsprogs-devel xxhash \
|
||||||
|
zlib-devel
|
||||||
|
echo "##[endgroup]"
|
||||||
|
}
|
||||||
|
|
||||||
|
function tumbleweed() {
|
||||||
|
echo "##[group]Running zypper is TODO!"
|
||||||
|
sleep 23456
|
||||||
|
echo "##[endgroup]"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
case "$1" in
|
||||||
|
almalinux8)
|
||||||
|
echo "##[group]Enable epel and powertools repositories"
|
||||||
|
sudo dnf config-manager -y --set-enabled powertools
|
||||||
|
sudo dnf install -y epel-release
|
||||||
|
echo "##[endgroup]"
|
||||||
|
rhel
|
||||||
|
echo "##[group]Install kernel-abi-whitelists"
|
||||||
|
sudo dnf install -y kernel-abi-whitelists
|
||||||
|
echo "##[endgroup]"
|
||||||
|
;;
|
||||||
|
almalinux9|centos-stream9)
|
||||||
|
echo "##[group]Enable epel and crb repositories"
|
||||||
|
sudo dnf config-manager -y --set-enabled crb
|
||||||
|
sudo dnf install -y epel-release
|
||||||
|
echo "##[endgroup]"
|
||||||
|
rhel
|
||||||
|
echo "##[group]Install kernel-abi-stablelists"
|
||||||
|
sudo dnf install -y kernel-abi-stablelists
|
||||||
|
echo "##[endgroup]"
|
||||||
|
;;
|
||||||
|
archlinux)
|
||||||
|
archlinux
|
||||||
|
;;
|
||||||
|
debian*)
|
||||||
|
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections
|
||||||
|
debian
|
||||||
|
echo "##[group]Install Debian specific"
|
||||||
|
sudo apt-get install -yq linux-perf dh-sequence-dkms
|
||||||
|
echo "##[endgroup]"
|
||||||
|
;;
|
||||||
|
fedora*)
|
||||||
|
rhel
|
||||||
|
;;
|
||||||
|
freebsd*)
|
||||||
|
freebsd
|
||||||
|
;;
|
||||||
|
tumbleweed)
|
||||||
|
tumbleweed
|
||||||
|
;;
|
||||||
|
ubuntu*)
|
||||||
|
debian
|
||||||
|
echo "##[group]Install Ubuntu specific"
|
||||||
|
sudo apt-get install -yq linux-tools-common libtirpc-dev \
|
||||||
|
linux-modules-extra-$(uname -r)
|
||||||
|
if [ "$1" != "ubuntu20" ]; then
|
||||||
|
sudo apt-get install -yq dh-sequence-dkms
|
||||||
|
fi
|
||||||
|
echo "##[endgroup]"
|
||||||
|
echo "##[group]Delete Ubuntu OpenZFS modules"
|
||||||
|
for i in $(find /lib/modules -name zfs -type d); do sudo rm -rvf $i; done
|
||||||
|
echo "##[endgroup]"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# This script is used for checkstyle + zloop deps also.
|
||||||
|
# Install only the needed packages and exit - when used this way.
|
||||||
|
test -z "${ONLY_DEPS:-}" || exit 0
|
||||||
|
|
||||||
|
# Start services
|
||||||
|
echo "##[group]Enable services"
|
||||||
|
case "$1" in
|
||||||
|
freebsd*)
|
||||||
|
# add virtio things
|
||||||
|
echo 'virtio_load="YES"' | sudo -E tee -a /boot/loader.conf
|
||||||
|
for i in balloon blk console random scsi; do
|
||||||
|
echo "virtio_${i}_load=\"YES\"" | sudo -E tee -a /boot/loader.conf
|
||||||
|
done
|
||||||
|
echo "fdescfs /dev/fd fdescfs rw 0 0" | sudo -E tee -a /etc/fstab
|
||||||
|
sudo -E mount /dev/fd
|
||||||
|
sudo -E touch /etc/zfs/exports
|
||||||
|
sudo -E sysrc mountd_flags="/etc/zfs/exports"
|
||||||
|
echo '[global]' | sudo -E tee /usr/local/etc/smb4.conf >/dev/null
|
||||||
|
sudo -E service nfsd enable
|
||||||
|
sudo -E service qemu-guest-agent enable
|
||||||
|
sudo -E service samba_server enable
|
||||||
|
;;
|
||||||
|
debian*|ubuntu*)
|
||||||
|
sudo -E systemctl enable nfs-kernel-server
|
||||||
|
sudo -E systemctl enable qemu-guest-agent
|
||||||
|
sudo -E systemctl enable smbd
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# All other linux distros
|
||||||
|
sudo -E systemctl enable nfs-server
|
||||||
|
sudo -E systemctl enable qemu-guest-agent
|
||||||
|
sudo -E systemctl enable smb
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
# Setup Kernel cmdline
|
||||||
|
CMDLINE="console=tty0 console=ttyS0,115200n8"
|
||||||
|
CMDLINE="$CMDLINE selinux=0"
|
||||||
|
CMDLINE="$CMDLINE random.trust_cpu=on"
|
||||||
|
CMDLINE="$CMDLINE no_timer_check"
|
||||||
|
case "$1" in
|
||||||
|
almalinux*|centos*|fedora*)
|
||||||
|
GRUB_CFG="/boot/grub2/grub.cfg"
|
||||||
|
GRUB_MKCONFIG="grub2-mkconfig"
|
||||||
|
CMDLINE="$CMDLINE biosdevname=0 net.ifnames=0"
|
||||||
|
echo 'GRUB_SERIAL_COMMAND="serial --speed=115200"' \
|
||||||
|
| sudo tee -a /etc/default/grub >/dev/null
|
||||||
|
;;
|
||||||
|
ubuntu24)
|
||||||
|
GRUB_CFG="/boot/grub/grub.cfg"
|
||||||
|
GRUB_MKCONFIG="grub-mkconfig"
|
||||||
|
echo 'GRUB_DISABLE_OS_PROBER="false"' \
|
||||||
|
| sudo tee -a /etc/default/grub >/dev/null
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
GRUB_CFG="/boot/grub/grub.cfg"
|
||||||
|
GRUB_MKCONFIG="grub-mkconfig"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
archlinux|freebsd*)
|
||||||
|
true
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "##[group]Edit kernel cmdline"
|
||||||
|
sudo sed -i -e '/^GRUB_CMDLINE_LINUX/d' /etc/default/grub || true
|
||||||
|
echo "GRUB_CMDLINE_LINUX=\"$CMDLINE\"" \
|
||||||
|
| sudo tee -a /etc/default/grub >/dev/null
|
||||||
|
sudo $GRUB_MKCONFIG -o $GRUB_CFG
|
||||||
|
echo "##[endgroup]"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# reset cloud-init configuration and poweroff
|
||||||
|
sudo cloud-init clean --logs
|
||||||
|
sleep 2 && sudo poweroff &
|
||||||
|
exit 0
|
||||||
Executable
+153
@@ -0,0 +1,153 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# 4) configure and build openzfs modules
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
function run() {
|
||||||
|
LOG="/var/tmp/build-stderr.txt"
|
||||||
|
echo "****************************************************"
|
||||||
|
echo "$(date) ($*)"
|
||||||
|
echo "****************************************************"
|
||||||
|
($@ || echo $? > /tmp/rv) 3>&1 1>&2 2>&3 | stdbuf -eL -oL tee -a $LOG
|
||||||
|
if [ -f /tmp/rv ]; then
|
||||||
|
RV=$(cat /tmp/rv)
|
||||||
|
echo "****************************************************"
|
||||||
|
echo "exit with value=$RV ($*)"
|
||||||
|
echo "****************************************************"
|
||||||
|
echo 1 > /var/tmp/build-exitcode.txt
|
||||||
|
exit $RV
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function freebsd() {
|
||||||
|
export MAKE="gmake"
|
||||||
|
echo "##[group]Autogen.sh"
|
||||||
|
run ./autogen.sh
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Configure"
|
||||||
|
run ./configure \
|
||||||
|
--prefix=/usr/local \
|
||||||
|
--with-libintl-prefix=/usr/local \
|
||||||
|
--enable-pyzfs \
|
||||||
|
--enable-debug \
|
||||||
|
--enable-debuginfo
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Build"
|
||||||
|
run gmake -j$(sysctl -n hw.ncpu)
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Install"
|
||||||
|
run sudo gmake install
|
||||||
|
echo "##[endgroup]"
|
||||||
|
}
|
||||||
|
|
||||||
|
function linux() {
|
||||||
|
echo "##[group]Autogen.sh"
|
||||||
|
run ./autogen.sh
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Configure"
|
||||||
|
run ./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--enable-pyzfs \
|
||||||
|
--enable-debug \
|
||||||
|
--enable-debuginfo
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Build"
|
||||||
|
run make -j$(nproc)
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Install"
|
||||||
|
run sudo make install
|
||||||
|
echo "##[endgroup]"
|
||||||
|
}
|
||||||
|
|
||||||
|
function rpm_build_and_install() {
|
||||||
|
EXTRA_CONFIG="${1:-}"
|
||||||
|
echo "##[group]Autogen.sh"
|
||||||
|
run ./autogen.sh
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Configure"
|
||||||
|
run ./configure --enable-debug --enable-debuginfo $EXTRA_CONFIG
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Build"
|
||||||
|
run make pkg-kmod pkg-utils
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Install"
|
||||||
|
run sudo dnf -y --nobest install $(ls *.rpm | grep -v src.rpm)
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function deb_build_and_install() {
|
||||||
|
echo "##[group]Autogen.sh"
|
||||||
|
run ./autogen.sh
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Configure"
|
||||||
|
run ./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--enable-pyzfs \
|
||||||
|
--enable-debug \
|
||||||
|
--enable-debuginfo
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Build"
|
||||||
|
run make native-deb-kmod native-deb-utils
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Install"
|
||||||
|
# Do kmod install. Note that when you build the native debs, the
|
||||||
|
# packages themselves are placed in parent directory '../' rather than
|
||||||
|
# in the source directory like the rpms are.
|
||||||
|
run sudo apt-get -y install $(find ../ | grep -E '\.deb$' \
|
||||||
|
| grep -Ev 'dkms|dracut')
|
||||||
|
echo "##[endgroup]"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Debug: show kernel cmdline
|
||||||
|
if [ -f /proc/cmdline ] ; then
|
||||||
|
cat /proc/cmdline || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# save some sysinfo
|
||||||
|
uname -a > /var/tmp/uname.txt
|
||||||
|
|
||||||
|
cd $HOME/zfs
|
||||||
|
export PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
|
||||||
|
|
||||||
|
# build
|
||||||
|
case "$1" in
|
||||||
|
freebsd*)
|
||||||
|
freebsd
|
||||||
|
;;
|
||||||
|
alma*|centos*)
|
||||||
|
rpm_build_and_install "--with-spec=redhat"
|
||||||
|
;;
|
||||||
|
fedora*)
|
||||||
|
rpm_build_and_install
|
||||||
|
;;
|
||||||
|
debian*|ubuntu*)
|
||||||
|
deb_build_and_install
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
linux
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# building the zfs module was ok
|
||||||
|
echo 0 > /var/tmp/build-exitcode.txt
|
||||||
|
|
||||||
|
# reset cloud-init configuration and poweroff
|
||||||
|
sudo cloud-init clean --logs
|
||||||
|
sync && sleep 2 && sudo poweroff &
|
||||||
|
exit 0
|
||||||
Executable
+126
@@ -0,0 +1,126 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# 5) start test machines and load openzfs module
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# read our defined variables
|
||||||
|
source /var/tmp/env.txt
|
||||||
|
|
||||||
|
# wait for poweroff to succeed
|
||||||
|
PID=$(pidof /usr/bin/qemu-system-x86_64)
|
||||||
|
tail --pid=$PID -f /dev/null
|
||||||
|
sudo virsh undefine openzfs
|
||||||
|
|
||||||
|
# default values per test vm:
|
||||||
|
VMs=2
|
||||||
|
CPU=2
|
||||||
|
|
||||||
|
# cpu pinning
|
||||||
|
CPUSET=("0,1" "2,3")
|
||||||
|
|
||||||
|
case "$OS" in
|
||||||
|
freebsd*)
|
||||||
|
# FreeBSD can't be optimized via ksmtuned
|
||||||
|
RAM=6
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Linux can be optimized via ksmtuned
|
||||||
|
RAM=8
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# this can be different for each distro
|
||||||
|
echo "VMs=$VMs" >> $ENV
|
||||||
|
|
||||||
|
# create snapshot we can clone later
|
||||||
|
sudo zfs snapshot zpool/openzfs@now
|
||||||
|
|
||||||
|
# setup the testing vm's
|
||||||
|
PUBKEY=$(cat ~/.ssh/id_ed25519.pub)
|
||||||
|
for i in $(seq 1 $VMs); do
|
||||||
|
|
||||||
|
echo "Creating disk for vm$i..."
|
||||||
|
DISK="/dev/zvol/zpool/vm$i"
|
||||||
|
FORMAT="raw"
|
||||||
|
sudo zfs clone zpool/openzfs@now zpool/vm$i
|
||||||
|
sudo zfs create -ps -b 64k -V 80g zpool/vm$i-2
|
||||||
|
|
||||||
|
cat <<EOF > /tmp/user-data
|
||||||
|
#cloud-config
|
||||||
|
|
||||||
|
fqdn: vm$i
|
||||||
|
|
||||||
|
users:
|
||||||
|
- name: root
|
||||||
|
shell: $BASH
|
||||||
|
- name: zfs
|
||||||
|
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||||
|
shell: $BASH
|
||||||
|
ssh_authorized_keys:
|
||||||
|
- $PUBKEY
|
||||||
|
|
||||||
|
growpart:
|
||||||
|
mode: auto
|
||||||
|
devices: ['/']
|
||||||
|
ignore_growroot_disabled: false
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sudo virsh net-update default add ip-dhcp-host \
|
||||||
|
"<host mac='52:54:00:83:79:0$i' ip='192.168.122.1$i'/>" --live --config
|
||||||
|
|
||||||
|
sudo virt-install \
|
||||||
|
--os-variant $OSv \
|
||||||
|
--name "vm$i" \
|
||||||
|
--cpu host-passthrough \
|
||||||
|
--virt-type=kvm --hvm \
|
||||||
|
--vcpus=$CPU,sockets=1 \
|
||||||
|
--cpuset=${CPUSET[$((i-1))]} \
|
||||||
|
--memory $((1024*RAM)) \
|
||||||
|
--memballoon model=virtio \
|
||||||
|
--graphics none \
|
||||||
|
--cloud-init user-data=/tmp/user-data \
|
||||||
|
--network bridge=virbr0,model=$NIC,mac="52:54:00:83:79:0$i" \
|
||||||
|
--disk $DISK,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
||||||
|
--disk $DISK-2,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
||||||
|
--import --noautoconsole >/dev/null
|
||||||
|
done
|
||||||
|
|
||||||
|
# check the memory state from time to time
|
||||||
|
cat <<EOF > cronjob.sh
|
||||||
|
# $OS
|
||||||
|
exec 1>>/var/tmp/stats.txt
|
||||||
|
exec 2>&1
|
||||||
|
echo "*******************************************************"
|
||||||
|
date
|
||||||
|
uptime
|
||||||
|
free -m
|
||||||
|
df -h /mnt/tests
|
||||||
|
zfs list
|
||||||
|
EOF
|
||||||
|
sudo chmod +x cronjob.sh
|
||||||
|
sudo mv -f cronjob.sh /root/cronjob.sh
|
||||||
|
echo '*/5 * * * * /root/cronjob.sh' > crontab.txt
|
||||||
|
sudo crontab crontab.txt
|
||||||
|
rm crontab.txt
|
||||||
|
|
||||||
|
# check if the machines are okay
|
||||||
|
echo "Waiting for vm's to come up... (${VMs}x CPU=$CPU RAM=$RAM)"
|
||||||
|
for i in $(seq 1 $VMs); do
|
||||||
|
while true; do
|
||||||
|
ssh 2>/dev/null zfs@192.168.122.1$i "uname -a" && break
|
||||||
|
done
|
||||||
|
done
|
||||||
|
echo "All $VMs VMs are up now."
|
||||||
|
|
||||||
|
# Save the VM's serial output (ttyS0) to /var/tmp/console.txt
|
||||||
|
# - ttyS0 on the VM corresponds to a local /dev/pty/N entry
|
||||||
|
# - use 'virsh ttyconsole' to lookup the /dev/pty/N entry
|
||||||
|
for i in $(seq 1 $VMs); do
|
||||||
|
mkdir -p $RESPATH/vm$i
|
||||||
|
read "pty" <<< $(sudo virsh ttyconsole vm$i)
|
||||||
|
sudo nohup bash -c "cat $pty > $RESPATH/vm$i/console.txt" &
|
||||||
|
done
|
||||||
|
echo "Console logging for ${VMs}x $OS started."
|
||||||
Executable
+105
@@ -0,0 +1,105 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# 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
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
function prefix() {
|
||||||
|
ID="$1"
|
||||||
|
LINE="$2"
|
||||||
|
CURRENT=$(date +%s)
|
||||||
|
TSSTART=$(cat /tmp/tsstart)
|
||||||
|
DIFF=$((CURRENT-TSSTART))
|
||||||
|
H=$((DIFF/3600))
|
||||||
|
DIFF=$((DIFF-(H*3600)))
|
||||||
|
M=$((DIFF/60))
|
||||||
|
S=$((DIFF-(M*60)))
|
||||||
|
|
||||||
|
CTR=$(cat /tmp/ctr)
|
||||||
|
echo $LINE| grep -q "^Test[: ]" && CTR=$((CTR+1)) && echo $CTR > /tmp/ctr
|
||||||
|
|
||||||
|
BASE="$HOME/work/zfs/zfs"
|
||||||
|
COLOR="$BASE/scripts/zfs-tests-color.sh"
|
||||||
|
CLINE=$(echo $LINE| grep "^Test[ :]" | sed -e 's|/usr/local|/usr|g' \
|
||||||
|
| sed -e 's| /usr/share/zfs/zfs-tests/tests/| |g' | $COLOR)
|
||||||
|
if [ -z "$CLINE" ]; then
|
||||||
|
printf "vm${ID}: %s\n" "$LINE"
|
||||||
|
else
|
||||||
|
# [vm2: 00:15:54 256] Test: functional/checksum/setup (run as root) [00:00] [PASS]
|
||||||
|
printf "[vm${ID}: %02d:%02d:%02d %4d] %s\n" \
|
||||||
|
"$H" "$M" "$S" "$CTR" "$CLINE"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# called directly on the runner
|
||||||
|
if [ -z ${1:-} ]; then
|
||||||
|
cd "/var/tmp"
|
||||||
|
source env.txt
|
||||||
|
SSH=$(which ssh)
|
||||||
|
TESTS='$HOME/zfs/.github/workflows/scripts/qemu-6-tests.sh'
|
||||||
|
echo 0 > /tmp/ctr
|
||||||
|
date "+%s" > /tmp/tsstart
|
||||||
|
|
||||||
|
for i in $(seq 1 $VMs); do
|
||||||
|
IP="192.168.122.1$i"
|
||||||
|
daemonize -c /var/tmp -p vm${i}.pid -o vm${i}log.txt -- \
|
||||||
|
$SSH zfs@$IP $TESTS $OS $i $VMs $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 &
|
||||||
|
echo $! > vm${i}log.pid
|
||||||
|
# don't mix up the initial --- Configuration --- part
|
||||||
|
sleep 0.13
|
||||||
|
done
|
||||||
|
|
||||||
|
# wait for all vm's to finish
|
||||||
|
for i in $(seq 1 $VMs); do
|
||||||
|
tail --pid=$(cat vm${i}.pid) -f /dev/null
|
||||||
|
pid=$(cat vm${i}log.pid)
|
||||||
|
rm -f vm${i}log.pid
|
||||||
|
kill $pid
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# this part runs inside qemu vm
|
||||||
|
export PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin"
|
||||||
|
case "$1" in
|
||||||
|
freebsd*)
|
||||||
|
sudo kldstat -n zfs 2>/dev/null && sudo kldunload zfs
|
||||||
|
sudo -E ./zfs/scripts/zfs.sh
|
||||||
|
TDIR="/usr/local/share/zfs"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# use xfs @ /var/tmp for all distros
|
||||||
|
sudo mv -f /var/tmp/*.txt /tmp
|
||||||
|
sudo mkfs.xfs -fq /dev/vdb
|
||||||
|
sudo mount -o noatime /dev/vdb /var/tmp
|
||||||
|
sudo chmod 1777 /var/tmp
|
||||||
|
sudo mv -f /tmp/*.txt /var/tmp
|
||||||
|
sudo -E modprobe zfs
|
||||||
|
TDIR="/usr/share/zfs"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# run functional testings and save exitcode
|
||||||
|
cd /var/tmp
|
||||||
|
TAGS=$2/$3
|
||||||
|
if [ "$4" == "quick" ]; then
|
||||||
|
export RUNFILES="sanity.run"
|
||||||
|
fi
|
||||||
|
sudo dmesg -c > dmesg-prerun.txt
|
||||||
|
mount > mount.txt
|
||||||
|
df -h > df-prerun.txt
|
||||||
|
$TDIR/zfs-tests.sh -vK -s 3GB -T $TAGS
|
||||||
|
RV=$?
|
||||||
|
df -h > df-postrun.txt
|
||||||
|
echo $RV > tests-exitcode.txt
|
||||||
|
sync
|
||||||
|
exit 0
|
||||||
Executable
+123
@@ -0,0 +1,123 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# 7) prepare output of the results
|
||||||
|
# - this script pre-creates all needed logfiles for later summary
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# read our defined variables
|
||||||
|
cd /var/tmp
|
||||||
|
source env.txt
|
||||||
|
|
||||||
|
mkdir -p $RESPATH
|
||||||
|
|
||||||
|
# check if building the module has failed
|
||||||
|
if [ -z ${VMs:-} ]; then
|
||||||
|
cd $RESPATH
|
||||||
|
echo ":exclamation: ZFS module didn't build successfully :exclamation:" \
|
||||||
|
| tee summary.txt | tee /tmp/summary.txt
|
||||||
|
cp /var/tmp/*.txt .
|
||||||
|
tar cf /tmp/qemu-$OS.tar -C $RESPATH -h . || true
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# build was okay
|
||||||
|
BASE="$HOME/work/zfs/zfs"
|
||||||
|
MERGE="$BASE/.github/workflows/scripts/merge_summary.awk"
|
||||||
|
|
||||||
|
# catch result files of testings (vm's should be there)
|
||||||
|
for i in $(seq 1 $VMs); do
|
||||||
|
rsync -arL zfs@192.168.122.1$i:$RESPATH/current $RESPATH/vm$i || true
|
||||||
|
scp zfs@192.168.122.1$i:"/var/tmp/*.txt" $RESPATH/vm$i || true
|
||||||
|
done
|
||||||
|
cp -f /var/tmp/*.txt $RESPATH || true
|
||||||
|
cd $RESPATH
|
||||||
|
|
||||||
|
# prepare result files for summary
|
||||||
|
for i in $(seq 1 $VMs); do
|
||||||
|
file="vm$i/build-stderr.txt"
|
||||||
|
test -s $file && mv -f $file build-stderr.txt
|
||||||
|
|
||||||
|
file="vm$i/build-exitcode.txt"
|
||||||
|
test -s $file && mv -f $file build-exitcode.txt
|
||||||
|
|
||||||
|
file="vm$i/uname.txt"
|
||||||
|
test -s $file && mv -f $file uname.txt
|
||||||
|
|
||||||
|
file="vm$i/tests-exitcode.txt"
|
||||||
|
if [ ! -s $file ]; then
|
||||||
|
# XXX - add some tests for kernel panic's here
|
||||||
|
# tail -n 80 vm$i/console.txt | grep XYZ
|
||||||
|
echo 1 > $file
|
||||||
|
fi
|
||||||
|
rv=$(cat vm$i/tests-exitcode.txt)
|
||||||
|
test $rv != 0 && touch /tmp/have_failed_tests
|
||||||
|
|
||||||
|
file="vm$i/current/log"
|
||||||
|
if [ -s $file ]; then
|
||||||
|
cat $file >> log
|
||||||
|
awk '/\[FAIL\]|\[KILLED\]/{ show=1; print; next; }; \
|
||||||
|
/\[SKIP\]|\[PASS\]/{ show=0; } show' \
|
||||||
|
$file > /tmp/vm${i}dbg.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
file="vm${i}log.txt"
|
||||||
|
fileC="/tmp/vm${i}log.txt"
|
||||||
|
if [ -s $file ]; then
|
||||||
|
cat $file >> summary
|
||||||
|
cat $file | $BASE/scripts/zfs-tests-color.sh > $fileC
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# create summary of tests
|
||||||
|
if [ -s summary ]; then
|
||||||
|
$MERGE summary | grep -v '^/' > summary.txt
|
||||||
|
$MERGE summary | $BASE/scripts/zfs-tests-color.sh > /tmp/summary.txt
|
||||||
|
rm -f summary
|
||||||
|
else
|
||||||
|
touch summary.txt /tmp/summary.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
# create file for debugging
|
||||||
|
if [ -s log ]; then
|
||||||
|
awk '/\[FAIL\]|\[KILLED\]/{ show=1; print; next; }; \
|
||||||
|
/\[SKIP\]|\[PASS\]/{ show=0; } show' \
|
||||||
|
log > summary-failure-logs.txt
|
||||||
|
rm -f log
|
||||||
|
else
|
||||||
|
touch summary-failure-logs.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
# create debug overview for failed tests
|
||||||
|
cat summary.txt \
|
||||||
|
| awk '/\(expected PASS\)/{ if ($1!="SKIP") print $2; next; } show' \
|
||||||
|
| while read t; do
|
||||||
|
cat summary-failure-logs.txt \
|
||||||
|
| awk '$0~/Test[: ]/{ show=0; } $0~v{ show=1; } show' v="$t" \
|
||||||
|
> /tmp/fail.txt
|
||||||
|
SIZE=$(stat --printf="%s" /tmp/fail.txt)
|
||||||
|
SIZE=$((SIZE/1024))
|
||||||
|
# Test Summary:
|
||||||
|
echo "##[group]$t ($SIZE KiB)" >> /tmp/failed.txt
|
||||||
|
cat /tmp/fail.txt | $BASE/scripts/zfs-tests-color.sh >> /tmp/failed.txt
|
||||||
|
echo "##[endgroup]" >> /tmp/failed.txt
|
||||||
|
# Job Summary:
|
||||||
|
echo -e "\n<details>\n<summary>$t ($SIZE KiB)</summary><pre>" >> failed.txt
|
||||||
|
cat /tmp/fail.txt >> failed.txt
|
||||||
|
echo "</pre></details>" >> failed.txt
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -e /tmp/have_failed_tests ]; then
|
||||||
|
echo ":warning: Some tests failed!" >> failed.txt
|
||||||
|
else
|
||||||
|
echo ":thumbsup: All tests passed." >> failed.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -s uname.txt ]; then
|
||||||
|
echo ":interrobang: Panic - where is my uname.txt?" > uname.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
# artifact ready now
|
||||||
|
tar cf /tmp/qemu-$OS.tar -C $RESPATH -h . || true
|
||||||
Executable
+71
@@ -0,0 +1,71 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# 8) show colored output of results
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# read our defined variables
|
||||||
|
source /var/tmp/env.txt
|
||||||
|
cd $RESPATH
|
||||||
|
|
||||||
|
# helper function for showing some content with headline
|
||||||
|
function showfile() {
|
||||||
|
content=$(dd if=$1 bs=1024 count=400k 2>/dev/null)
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
group1=""
|
||||||
|
group2=""
|
||||||
|
else
|
||||||
|
SIZE=$(stat --printf="%s" "$file")
|
||||||
|
SIZE=$((SIZE/1024))
|
||||||
|
group1="##[group]$2 ($SIZE KiB)"
|
||||||
|
group2="##[endgroup]"
|
||||||
|
fi
|
||||||
|
cat <<EOF > tmp$$
|
||||||
|
$group1
|
||||||
|
$content
|
||||||
|
$group2
|
||||||
|
EOF
|
||||||
|
cat tmp$$
|
||||||
|
rm -f tmp$$
|
||||||
|
}
|
||||||
|
|
||||||
|
# overview
|
||||||
|
cat /tmp/summary.txt
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
if [ -f /tmp/have_failed_tests -a -s /tmp/failed.txt ]; then
|
||||||
|
echo "Debuginfo of failed tests:"
|
||||||
|
cat /tmp/failed.txt
|
||||||
|
echo ""
|
||||||
|
cat /tmp/summary.txt | grep -v '^/'
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "\nFull logs for download:\n $1\n"
|
||||||
|
|
||||||
|
for i in $(seq 1 $VMs); do
|
||||||
|
rv=$(cat vm$i/tests-exitcode.txt)
|
||||||
|
|
||||||
|
if [ $rv = 0 ]; then
|
||||||
|
vm="[92mvm$i[0m"
|
||||||
|
else
|
||||||
|
vm="[1;91mvm$i[0m"
|
||||||
|
fi
|
||||||
|
|
||||||
|
file="vm$i/dmesg-prerun.txt"
|
||||||
|
test -s "$file" && showfile "$file" "$vm: dmesg kernel"
|
||||||
|
|
||||||
|
file="/tmp/vm${i}log.txt"
|
||||||
|
test -s "$file" && showfile "$file" "$vm: test results"
|
||||||
|
|
||||||
|
file="vm$i/console.txt"
|
||||||
|
test -s "$file" && showfile "$file" "$vm: serial console"
|
||||||
|
|
||||||
|
file="/tmp/vm${i}dbg.txt"
|
||||||
|
test -s "$file" && showfile "$file" "$vm: failure logfile"
|
||||||
|
done
|
||||||
|
|
||||||
|
test -f /tmp/have_failed_tests && exit 1
|
||||||
|
exit 0
|
||||||
+57
@@ -0,0 +1,57 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# 9) generate github summary page of all the testings
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
function output() {
|
||||||
|
echo -e $* >> "out-$logfile.md"
|
||||||
|
}
|
||||||
|
|
||||||
|
function outfile() {
|
||||||
|
cat "$1" >> "out-$logfile.md"
|
||||||
|
}
|
||||||
|
|
||||||
|
function outfile_plain() {
|
||||||
|
output "<pre>"
|
||||||
|
cat "$1" >> "out-$logfile.md"
|
||||||
|
output "</pre>"
|
||||||
|
}
|
||||||
|
|
||||||
|
function send2github() {
|
||||||
|
test -f "$1" || exit 0
|
||||||
|
dd if="$1" bs=1023k count=1 >> $GITHUB_STEP_SUMMARY
|
||||||
|
}
|
||||||
|
|
||||||
|
# https://docs.github.com/en/enterprise-server@3.6/actions/using-workflows/workflow-commands-for-github-actions#step-isolation-and-limits
|
||||||
|
# Job summaries are isolated between steps and each step is restricted to a maximum size of 1MiB.
|
||||||
|
# [ ] can not show all error findings here
|
||||||
|
# [x] split files into smaller ones and create additional steps
|
||||||
|
|
||||||
|
# first call, generate all summaries
|
||||||
|
if [ ! -f out-1.md ]; then
|
||||||
|
logfile="1"
|
||||||
|
for tarfile in Logs-functional-*/qemu-*.tar; do
|
||||||
|
rm -rf vm* *.txt
|
||||||
|
if [ ! -s "$tarfile" ]; then
|
||||||
|
output "\n## Functional Tests: unknown\n"
|
||||||
|
output ":exclamation: Tarfile $tarfile is empty :exclamation:"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
tar xf "$tarfile"
|
||||||
|
test -s env.txt || continue
|
||||||
|
source env.txt
|
||||||
|
# when uname.txt is there, the other files are also ok
|
||||||
|
test -s uname.txt || continue
|
||||||
|
output "\n## Functional Tests: $OSNAME\n"
|
||||||
|
outfile_plain uname.txt
|
||||||
|
outfile_plain summary.txt
|
||||||
|
outfile failed.txt
|
||||||
|
logfile=$((logfile+1))
|
||||||
|
done
|
||||||
|
send2github out-1.md
|
||||||
|
else
|
||||||
|
send2github out-$1.md
|
||||||
|
fi
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
function prerun() {
|
|
||||||
echo "::group::Install build dependencies"
|
|
||||||
# remove snap things, update+upgrade will be faster then
|
|
||||||
for x in lxd core20 snapd; do sudo snap remove $x; done
|
|
||||||
sudo apt-get purge snapd google-chrome-stable firefox
|
|
||||||
# https://github.com/orgs/community/discussions/47863
|
|
||||||
sudo apt-get remove grub-efi-amd64-bin grub-efi-amd64-signed shim-signed --allow-remove-essential
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt upgrade
|
|
||||||
sudo xargs --arg-file=.github/workflows/build-dependencies.txt apt-get install -qq
|
|
||||||
sudo apt-get clean
|
|
||||||
sudo dmesg -c > /var/tmp/dmesg-prerun
|
|
||||||
echo "::endgroup::"
|
|
||||||
}
|
|
||||||
|
|
||||||
function mod_build() {
|
|
||||||
echo "::group::Generate debian packages"
|
|
||||||
./autogen.sh
|
|
||||||
./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan
|
|
||||||
make --no-print-directory --silent native-deb-utils native-deb-kmod
|
|
||||||
mv ../*.deb .
|
|
||||||
rm ./openzfs-zfs-dracut*.deb ./openzfs-zfs-dkms*.deb
|
|
||||||
echo "$ImageOS-$ImageVersion" > tests/ImageOS.txt
|
|
||||||
echo "::endgroup::"
|
|
||||||
}
|
|
||||||
|
|
||||||
function mod_install() {
|
|
||||||
# install the pre-built module only on the same runner image
|
|
||||||
MOD=`cat tests/ImageOS.txt`
|
|
||||||
if [ "$MOD" != "$ImageOS-$ImageVersion" ]; then
|
|
||||||
rm -f *.deb
|
|
||||||
mod_build
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "::group::Install and load modules"
|
|
||||||
# don't use kernel-shipped zfs modules
|
|
||||||
sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf
|
|
||||||
sudo apt-get install --fix-missing ./*.deb
|
|
||||||
|
|
||||||
# Native Debian packages enable and start the services
|
|
||||||
# Stop zfs-zed daemon, as it may interfere with some ZTS test cases
|
|
||||||
sudo systemctl stop zfs-zed
|
|
||||||
sudo depmod -a
|
|
||||||
sudo modprobe zfs
|
|
||||||
sudo dmesg
|
|
||||||
sudo dmesg -c > /var/tmp/dmesg-module-load
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Report CPU information"
|
|
||||||
lscpu
|
|
||||||
cat /proc/spl/kstat/zfs/chksum_bench
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Optimize storage for ZFS testings"
|
|
||||||
# remove swap and umount fast storage
|
|
||||||
# 89GiB -> rootfs + bootfs with ~80MB/s -> don't care
|
|
||||||
# 64GiB -> /mnt with 420MB/s -> new testing ssd
|
|
||||||
sudo swapoff -a
|
|
||||||
|
|
||||||
# this one is fast and mounted @ /mnt
|
|
||||||
# -> we reformat with ext4 + move it to /var/tmp
|
|
||||||
DEV="/dev/disk/azure/resource-part1"
|
|
||||||
sudo umount /mnt
|
|
||||||
sudo mkfs.ext4 -O ^has_journal -F $DEV
|
|
||||||
sudo mount -o noatime,barrier=0 $DEV /var/tmp
|
|
||||||
sudo chmod 1777 /var/tmp
|
|
||||||
|
|
||||||
# disk usage afterwards
|
|
||||||
sudo df -h /
|
|
||||||
sudo df -h /var/tmp
|
|
||||||
sudo fstrim -a
|
|
||||||
echo "::endgroup::"
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
build)
|
|
||||||
prerun
|
|
||||||
mod_build
|
|
||||||
;;
|
|
||||||
tests)
|
|
||||||
prerun
|
|
||||||
mod_install
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
TDIR="/usr/share/zfs/zfs-tests/tests/functional"
|
|
||||||
echo -n "TODO="
|
|
||||||
case "$1" in
|
|
||||||
part1)
|
|
||||||
# ~1h 20m
|
|
||||||
echo "cli_root"
|
|
||||||
;;
|
|
||||||
part2)
|
|
||||||
# ~1h
|
|
||||||
ls $TDIR|grep '^[a-m]'|grep -v "cli_root"|xargs|tr -s ' ' ','
|
|
||||||
;;
|
|
||||||
part3)
|
|
||||||
# ~1h
|
|
||||||
ls $TDIR|grep '^[n-qs-z]'|xargs|tr -s ' ' ','
|
|
||||||
;;
|
|
||||||
part4)
|
|
||||||
# ~1h
|
|
||||||
ls $TDIR|grep '^r'|xargs|tr -s ' ' ','
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
name: zfs-linux-tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
os:
|
|
||||||
description: 'The ubuntu version: 20.02 or 22.04'
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
zloop:
|
|
||||||
runs-on: ubuntu-${{ inputs.os }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: modules-${{ inputs.os }}
|
|
||||||
- name: Install modules
|
|
||||||
run: |
|
|
||||||
tar xzf modules-${{ inputs.os }}.tgz
|
|
||||||
.github/workflows/scripts/setup-dependencies.sh tests
|
|
||||||
- name: Tests
|
|
||||||
timeout-minutes: 30
|
|
||||||
run: |
|
|
||||||
sudo mkdir -p /var/tmp/zloop
|
|
||||||
# run for 10 minutes or at most 2 iterations for a maximum runner
|
|
||||||
# time of 20 minutes.
|
|
||||||
sudo /usr/share/zfs/zloop.sh -t 600 -I 2 -l -m1 -- -T 120 -P 60
|
|
||||||
- name: Prepare artifacts
|
|
||||||
if: failure()
|
|
||||||
run: |
|
|
||||||
sudo chmod +r -R /var/tmp/zloop/
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: Zpool-logs-${{ inputs.os }}
|
|
||||||
path: |
|
|
||||||
/var/tmp/zloop/*/
|
|
||||||
!/var/tmp/zloop/*/vdev/
|
|
||||||
retention-days: 14
|
|
||||||
if-no-files-found: ignore
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: Zpool-files-${{ inputs.os }}
|
|
||||||
path: |
|
|
||||||
/var/tmp/zloop/*/vdev/
|
|
||||||
retention-days: 14
|
|
||||||
if-no-files-found: ignore
|
|
||||||
|
|
||||||
sanity:
|
|
||||||
runs-on: ubuntu-${{ inputs.os }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: modules-${{ inputs.os }}
|
|
||||||
- name: Install modules
|
|
||||||
run: |
|
|
||||||
tar xzf modules-${{ inputs.os }}.tgz
|
|
||||||
.github/workflows/scripts/setup-dependencies.sh tests
|
|
||||||
- name: Tests
|
|
||||||
timeout-minutes: 60
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -o pipefail
|
|
||||||
/usr/share/zfs/zfs-tests.sh -vKR -s 3G -r sanity | scripts/zfs-tests-color.sh
|
|
||||||
- name: Prepare artifacts
|
|
||||||
if: success() || failure()
|
|
||||||
run: |
|
|
||||||
RESPATH="/var/tmp/test_results"
|
|
||||||
mv -f $RESPATH/current $RESPATH/testfiles
|
|
||||||
tar cf $RESPATH/sanity.tar -h -C $RESPATH testfiles
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: success() || failure()
|
|
||||||
with:
|
|
||||||
name: Logs-${{ inputs.os }}-sanity
|
|
||||||
path: /var/tmp/test_results/sanity.tar
|
|
||||||
if-no-files-found: ignore
|
|
||||||
|
|
||||||
functional:
|
|
||||||
runs-on: ubuntu-${{ inputs.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
tests: [ part1, part2, part3, part4 ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: modules-${{ inputs.os }}
|
|
||||||
- name: Install modules
|
|
||||||
run: |
|
|
||||||
tar xzf modules-${{ inputs.os }}.tgz
|
|
||||||
.github/workflows/scripts/setup-dependencies.sh tests
|
|
||||||
- name: Setup tests
|
|
||||||
run: |
|
|
||||||
.github/workflows/scripts/setup-functional.sh ${{ matrix.tests }} >> $GITHUB_ENV
|
|
||||||
- name: Tests
|
|
||||||
timeout-minutes: 120
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -o pipefail
|
|
||||||
/usr/share/zfs/zfs-tests.sh -vKR -s 3G -T ${{ env.TODO }} | scripts/zfs-tests-color.sh
|
|
||||||
- name: Prepare artifacts
|
|
||||||
if: success() || failure()
|
|
||||||
run: |
|
|
||||||
RESPATH="/var/tmp/test_results"
|
|
||||||
mv -f $RESPATH/current $RESPATH/testfiles
|
|
||||||
tar cf $RESPATH/${{ matrix.tests }}.tar -h -C $RESPATH testfiles
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: success() || failure()
|
|
||||||
with:
|
|
||||||
name: Logs-${{ inputs.os }}-functional-${{ matrix.tests }}
|
|
||||||
path: /var/tmp/test_results/${{ matrix.tests }}.tar
|
|
||||||
if-no-files-found: ignore
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
name: zfs-linux
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [20.04, 22.04]
|
|
||||||
runs-on: ubuntu-${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
- name: Build modules
|
|
||||||
run: .github/workflows/scripts/setup-dependencies.sh build
|
|
||||||
- name: Prepare modules upload
|
|
||||||
run: tar czf modules-${{ matrix.os }}.tgz *.deb .github tests/test-runner tests/ImageOS.txt
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: modules-${{ matrix.os }}
|
|
||||||
path: modules-${{ matrix.os }}.tgz
|
|
||||||
retention-days: 14
|
|
||||||
|
|
||||||
testings:
|
|
||||||
name: Testing
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [20.04, 22.04]
|
|
||||||
needs: build
|
|
||||||
uses: ./.github/workflows/zfs-linux-tests.yml
|
|
||||||
with:
|
|
||||||
os: ${{ matrix.os }}
|
|
||||||
|
|
||||||
cleanup:
|
|
||||||
if: always()
|
|
||||||
name: Cleanup
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
needs: testings
|
|
||||||
steps:
|
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
- name: Generating summary
|
|
||||||
run: |
|
|
||||||
tar xzf modules-22.04/modules-22.04.tgz .github tests
|
|
||||||
.github/workflows/scripts/generate-summary.sh
|
|
||||||
# up to 4 steps, each can have 1 MiB output (for debugging log files)
|
|
||||||
- name: Summary for errors #1
|
|
||||||
run: .github/workflows/scripts/generate-summary.sh 1
|
|
||||||
- name: Summary for errors #2
|
|
||||||
run: .github/workflows/scripts/generate-summary.sh 2
|
|
||||||
- name: Summary for errors #3
|
|
||||||
run: .github/workflows/scripts/generate-summary.sh 3
|
|
||||||
- name: Summary for errors #4
|
|
||||||
run: .github/workflows/scripts/generate-summary.sh 4
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: Summary Files
|
|
||||||
path: Summary/
|
|
||||||
@@ -0,0 +1,177 @@
|
|||||||
|
name: zfs-qemu
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-config:
|
||||||
|
name: Setup
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
outputs:
|
||||||
|
test_os: ${{ steps.os.outputs.os }}
|
||||||
|
ci_type: ${{ steps.os.outputs.ci_type }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Generate OS config and CI type
|
||||||
|
id: os
|
||||||
|
run: |
|
||||||
|
FULL_OS='["almalinux8", "almalinux9", "centos-stream9", "debian11", "debian12", "fedora40", "fedora41", "freebsd13-4r", "freebsd14-0r", "freebsd14-1s", "ubuntu20", "ubuntu22", "ubuntu24"]'
|
||||||
|
QUICK_OS='["almalinux8", "almalinux9", "debian12", "fedora41", "freebsd13-3r", "freebsd14-1r", "ubuntu24"]'
|
||||||
|
# determine CI type when running on PR
|
||||||
|
ci_type="full"
|
||||||
|
if ${{ github.event_name == 'pull_request' }}; then
|
||||||
|
head=${{ github.event.pull_request.head.sha }}
|
||||||
|
base=${{ github.event.pull_request.base.sha }}
|
||||||
|
ci_type=$(python3 .github/workflows/scripts/generate-ci-type.py $head $base)
|
||||||
|
fi
|
||||||
|
if [ "$ci_type" == "quick" ]; then
|
||||||
|
os_selection="$QUICK_OS"
|
||||||
|
else
|
||||||
|
os_selection="$FULL_OS"
|
||||||
|
fi
|
||||||
|
os_json=$(echo ${os_selection} | jq -c)
|
||||||
|
echo "os=$os_json" >> $GITHUB_OUTPUT
|
||||||
|
echo "ci_type=$ci_type" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
qemu-vm:
|
||||||
|
name: qemu-x86
|
||||||
|
needs: [ test-config ]
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
# rhl: almalinux8, almalinux9, centos-stream9, fedora40, fedora41
|
||||||
|
# debian: debian11, debian12, ubuntu20, ubuntu22, ubuntu24
|
||||||
|
# misc: archlinux, tumbleweed
|
||||||
|
# FreeBSD Release: freebsd13-3r, freebsd13-4r, freebsd14-0r, freebsd14-1r
|
||||||
|
# FreeBSD Stable: freebsd13-4s, freebsd14-1s
|
||||||
|
# FreeBSD Current: freebsd15-0c
|
||||||
|
os: ${{ fromJson(needs.test-config.outputs.test_os) }}
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
|
- name: Setup QEMU
|
||||||
|
timeout-minutes: 10
|
||||||
|
run: .github/workflows/scripts/qemu-1-setup.sh
|
||||||
|
|
||||||
|
- name: Start build machine
|
||||||
|
timeout-minutes: 10
|
||||||
|
run: .github/workflows/scripts/qemu-2-start.sh ${{ matrix.os }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
timeout-minutes: 20
|
||||||
|
run: |
|
||||||
|
echo "Install dependencies in QEMU machine"
|
||||||
|
IP=192.168.122.10
|
||||||
|
while pidof /usr/bin/qemu-system-x86_64 >/dev/null; do
|
||||||
|
ssh 2>/dev/null zfs@$IP "uname -a" && break
|
||||||
|
done
|
||||||
|
scp .github/workflows/scripts/qemu-3-deps.sh zfs@$IP:qemu-3-deps.sh
|
||||||
|
PID=`pidof /usr/bin/qemu-system-x86_64`
|
||||||
|
ssh zfs@$IP '$HOME/qemu-3-deps.sh' ${{ matrix.os }}
|
||||||
|
# wait for poweroff to succeed
|
||||||
|
tail --pid=$PID -f /dev/null
|
||||||
|
sleep 5 # avoid this: "error: Domain is already active"
|
||||||
|
rm -f $HOME/.ssh/known_hosts
|
||||||
|
|
||||||
|
- name: Build modules
|
||||||
|
timeout-minutes: 30
|
||||||
|
run: |
|
||||||
|
echo "Build modules in QEMU machine"
|
||||||
|
sudo virsh start openzfs
|
||||||
|
IP=192.168.122.10
|
||||||
|
while pidof /usr/bin/qemu-system-x86_64 >/dev/null; do
|
||||||
|
ssh 2>/dev/null zfs@$IP "uname -a" && break
|
||||||
|
done
|
||||||
|
rsync -ar $HOME/work/zfs/zfs zfs@$IP:./
|
||||||
|
ssh zfs@$IP '$HOME/zfs/.github/workflows/scripts/qemu-4-build.sh' ${{ matrix.os }}
|
||||||
|
|
||||||
|
- name: Setup testing machines
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: .github/workflows/scripts/qemu-5-setup.sh
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
timeout-minutes: 270
|
||||||
|
run: .github/workflows/scripts/qemu-6-tests.sh
|
||||||
|
env:
|
||||||
|
CI_TYPE: ${{ needs.test-config.outputs.ci_type }}
|
||||||
|
|
||||||
|
- name: Prepare artifacts
|
||||||
|
if: always()
|
||||||
|
timeout-minutes: 10
|
||||||
|
run: .github/workflows/scripts/qemu-7-prepare.sh
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
id: artifact-upload
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: Logs-functional-${{ matrix.os }}
|
||||||
|
path: /tmp/qemu-${{ matrix.os }}.tar
|
||||||
|
if-no-files-found: ignore
|
||||||
|
|
||||||
|
- name: Test Summary
|
||||||
|
if: always()
|
||||||
|
run: .github/workflows/scripts/qemu-8-summary.sh '${{ steps.artifact-upload.outputs.artifact-url }}'
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
if: always()
|
||||||
|
name: Cleanup
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [ qemu-vm ]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
- name: Generating summary
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 2
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 3
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 4
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 5
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 6
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 7
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 8
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 9
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 10
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 11
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 12
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 13
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 14
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 15
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 16
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 17
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 18
|
||||||
|
- name: Generating summary...
|
||||||
|
run: .github/workflows/scripts/qemu-9-summary-page.sh 19
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Summary Files
|
||||||
|
path: out-*
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
name: zloop
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
zloop:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
env:
|
||||||
|
TEST_DIR: /var/tmp/zloop
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get purge -y snapd google-chrome-stable firefox
|
||||||
|
ONLY_DEPS=1 .github/workflows/scripts/qemu-3-deps.sh ubuntu24
|
||||||
|
- name: Autogen.sh
|
||||||
|
run: |
|
||||||
|
sed -i '/DEBUG_CFLAGS="-Werror"/s/^/#/' config/zfs-build.m4
|
||||||
|
./autogen.sh
|
||||||
|
- name: Configure
|
||||||
|
run: |
|
||||||
|
./configure --prefix=/usr --enable-debug --enable-debuginfo \
|
||||||
|
--enable-asan --enable-ubsan \
|
||||||
|
--enable-debug-kmem --enable-debug-kmem-tracking
|
||||||
|
- name: Make
|
||||||
|
run: |
|
||||||
|
make -j$(nproc)
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
sudo make install
|
||||||
|
sudo depmod
|
||||||
|
sudo modprobe zfs
|
||||||
|
- name: Tests
|
||||||
|
run: |
|
||||||
|
sudo mkdir -p $TEST_DIR
|
||||||
|
# run for 10 minutes or at most 6 iterations for a maximum runner
|
||||||
|
# time of 60 minutes.
|
||||||
|
sudo /usr/share/zfs/zloop.sh -t 600 -I 6 -l -m 1 -- -T 120 -P 60
|
||||||
|
- name: Prepare artifacts
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
sudo chmod +r -R $TEST_DIR/
|
||||||
|
- name: Ztest log
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
grep -B10 -A1000 'ASSERT' $TEST_DIR/*/ztest.out || tail -n 1000 $TEST_DIR/*/ztest.out
|
||||||
|
- name: Gdb log
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
sed -n '/Backtraces (full)/q;p' $TEST_DIR/*/ztest.gdb
|
||||||
|
- name: Zdb log
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
cat $TEST_DIR/*/ztest.zdb
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: Logs
|
||||||
|
path: |
|
||||||
|
/var/tmp/zloop/*/
|
||||||
|
!/var/tmp/zloop/*/vdev/
|
||||||
|
if-no-files-found: ignore
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: Pool files
|
||||||
|
path: |
|
||||||
|
/var/tmp/zloop/*/vdev/
|
||||||
|
if-no-files-found: ignore
|
||||||
@@ -30,6 +30,7 @@ Andreas Dilger <adilger@dilger.ca>
|
|||||||
Andrew Walker <awalker@ixsystems.com>
|
Andrew Walker <awalker@ixsystems.com>
|
||||||
Benedikt Neuffer <github@itfriend.de>
|
Benedikt Neuffer <github@itfriend.de>
|
||||||
Chengfei Zhu <chengfeix.zhu@intel.com>
|
Chengfei Zhu <chengfeix.zhu@intel.com>
|
||||||
|
ChenHao Lu <18302010006@fudan.edu.cn>
|
||||||
Chris Lindee <chris.lindee+github@gmail.com>
|
Chris Lindee <chris.lindee+github@gmail.com>
|
||||||
Colm Buckley <colm@tuatha.org>
|
Colm Buckley <colm@tuatha.org>
|
||||||
Crag Wang <crag0715@gmail.com>
|
Crag Wang <crag0715@gmail.com>
|
||||||
@@ -43,6 +44,7 @@ Glenn Washburn <development@efficientek.com>
|
|||||||
Gordan Bobic <gordan.bobic@gmail.com>
|
Gordan Bobic <gordan.bobic@gmail.com>
|
||||||
Gregory Bartholomew <gregory.lee.bartholomew@gmail.com>
|
Gregory Bartholomew <gregory.lee.bartholomew@gmail.com>
|
||||||
hedong zhang <h_d_zhang@163.com>
|
hedong zhang <h_d_zhang@163.com>
|
||||||
|
Ilkka Sovanto <github@ilkka.kapsi.fi>
|
||||||
InsanePrawn <Insane.Prawny@gmail.com>
|
InsanePrawn <Insane.Prawny@gmail.com>
|
||||||
Jason Cohen <jwittlincohen@gmail.com>
|
Jason Cohen <jwittlincohen@gmail.com>
|
||||||
Jason Harmening <jason.harmening@gmail.com>
|
Jason Harmening <jason.harmening@gmail.com>
|
||||||
@@ -57,6 +59,7 @@ KernelOfTruth <kerneloftruth@gmail.com>
|
|||||||
Liu Hua <liu.hua130@zte.com.cn>
|
Liu Hua <liu.hua130@zte.com.cn>
|
||||||
Liu Qing <winglq@gmail.com>
|
Liu Qing <winglq@gmail.com>
|
||||||
loli10K <ezomori.nozomu@gmail.com>
|
loli10K <ezomori.nozomu@gmail.com>
|
||||||
|
Mart Frauenlob <allkind@fastest.cc>
|
||||||
Matthias Blankertz <matthias@blankertz.org>
|
Matthias Blankertz <matthias@blankertz.org>
|
||||||
Michael Gmelin <grembo@FreeBSD.org>
|
Michael Gmelin <grembo@FreeBSD.org>
|
||||||
Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
|
Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
|
||||||
@@ -73,6 +76,12 @@ WHR <msl0000023508@gmail.com>
|
|||||||
Yanping Gao <yanping.gao@xtaotech.com>
|
Yanping Gao <yanping.gao@xtaotech.com>
|
||||||
Youzhong Yang <youzhong@gmail.com>
|
Youzhong Yang <youzhong@gmail.com>
|
||||||
|
|
||||||
|
# Signed-off-by: overriding Author:
|
||||||
|
Ryan <errornointernet@envs.net> <error.nointernet@gmail.com>
|
||||||
|
Qiuhao Chen <chenqiuhao1997@gmail.com> <haohao0924@126.com>
|
||||||
|
Yuxin Wang <yuxinwang9999@gmail.com> <Bi11gates9999@gmail.com>
|
||||||
|
Zhenlei Huang <zlei@FreeBSD.org> <zlei.huang@gmail.com>
|
||||||
|
|
||||||
# Commits from strange places, long ago
|
# Commits from strange places, long ago
|
||||||
Brian Behlendorf <behlendorf1@llnl.gov> <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
|
Brian Behlendorf <behlendorf1@llnl.gov> <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
|
||||||
Brian Behlendorf <behlendorf1@llnl.gov> <behlendo@fedora-17-amd64.(none)>
|
Brian Behlendorf <behlendorf1@llnl.gov> <behlendo@fedora-17-amd64.(none)>
|
||||||
@@ -89,6 +98,7 @@ Alek Pinchuk <apinchuk@axcient.com> <alek-p@users.noreply.github.com>
|
|||||||
Alexander Lobakin <alobakin@pm.me> <solbjorn@users.noreply.github.com>
|
Alexander Lobakin <alobakin@pm.me> <solbjorn@users.noreply.github.com>
|
||||||
Alexey Smirnoff <fling@member.fsf.org> <fling-@users.noreply.github.com>
|
Alexey Smirnoff <fling@member.fsf.org> <fling-@users.noreply.github.com>
|
||||||
Allen Holl <allen.m.holl@gmail.com> <65494904+allen-4@users.noreply.github.com>
|
Allen Holl <allen.m.holl@gmail.com> <65494904+allen-4@users.noreply.github.com>
|
||||||
|
Alphan Yılmaz <alphanyilmaz@gmail.com> <a1ea321@users.noreply.github.com>
|
||||||
Ameer Hamza <ahamza@ixsystems.com> <106930537+ixhamza@users.noreply.github.com>
|
Ameer Hamza <ahamza@ixsystems.com> <106930537+ixhamza@users.noreply.github.com>
|
||||||
Andrew J. Hesford <ajh@sideband.org> <48421688+ahesford@users.noreply.github.com>>
|
Andrew J. Hesford <ajh@sideband.org> <48421688+ahesford@users.noreply.github.com>>
|
||||||
Andrew Sun <me@andrewsun.com> <as-com@users.noreply.github.com>
|
Andrew Sun <me@andrewsun.com> <as-com@users.noreply.github.com>
|
||||||
@@ -96,18 +106,22 @@ Aron Xu <happyaron.xu@gmail.com> <happyaron@users.noreply.github.com>
|
|||||||
Arun KV <arun.kv@datacore.com> <65647132+arun-kv@users.noreply.github.com>
|
Arun KV <arun.kv@datacore.com> <65647132+arun-kv@users.noreply.github.com>
|
||||||
Ben Wolsieffer <benwolsieffer@gmail.com> <lopsided98@users.noreply.github.com>
|
Ben Wolsieffer <benwolsieffer@gmail.com> <lopsided98@users.noreply.github.com>
|
||||||
bernie1995 <bernie.pikes@gmail.com> <42413912+bernie1995@users.noreply.github.com>
|
bernie1995 <bernie.pikes@gmail.com> <42413912+bernie1995@users.noreply.github.com>
|
||||||
|
Bojan Novković <bnovkov@FreeBSD.org> <72801811+bnovkov@users.noreply.github.com>
|
||||||
Boris Protopopov <boris.protopopov@actifio.com> <bprotopopov@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 Forschinger <github@bnjf.id.au> <bnjf@users.noreply.github.com>
|
||||||
Brandon Thetford <brandon@dodecatec.com> <dodexahedron@users.noreply.github.com>
|
Brandon Thetford <brandon@dodecatec.com> <dodexahedron@users.noreply.github.com>
|
||||||
buzzingwires <buzzingwires@outlook.com> <131118055+buzzingwires@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>
|
Cedric Maunoury <cedric.maunoury@gmail.com> <38213715+cedricmaunoury@users.noreply.github.com>
|
||||||
Charles Suh <charles.suh@gmail.com> <charlessuh@users.noreply.github.com>
|
Charles Suh <charles.suh@gmail.com> <charlessuh@users.noreply.github.com>
|
||||||
|
Chris Peredun <chris.peredun@ixsystems.com> <126915832+chrisperedun@users.noreply.github.com>
|
||||||
Dacian Reece-Stremtan <dacianstremtan@gmail.com> <35844628+dacianstremtan@users.noreply.github.com>
|
Dacian Reece-Stremtan <dacianstremtan@gmail.com> <35844628+dacianstremtan@users.noreply.github.com>
|
||||||
Damian Szuberski <szuberskidamian@gmail.com> <30863496+szubersk@users.noreply.github.com>
|
Damian Szuberski <szuberskidamian@gmail.com> <30863496+szubersk@users.noreply.github.com>
|
||||||
Daniel Hiepler <d-git@coderdu.de> <32984777+heeplr@users.noreply.github.com>
|
Daniel Hiepler <d-git@coderdu.de> <32984777+heeplr@users.noreply.github.com>
|
||||||
Daniel Kobras <d.kobras@science-computing.de> <sckobras@users.noreply.github.com>
|
Daniel Kobras <d.kobras@science-computing.de> <sckobras@users.noreply.github.com>
|
||||||
Daniel Reichelt <hacking@nachtgeist.net> <nachtgeist@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>
|
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>
|
||||||
|
Dex Wood <slash2314@gmail.com> <slash2314@users.noreply.github.com>
|
||||||
DHE <git@dehacked.net> <DeHackEd@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>
|
Dmitri John Ledkov <dimitri.ledkov@canonical.com> <19779+xnox@users.noreply.github.com>
|
||||||
Dries Michiels <driesm.michiels@gmail.com> <32487486+driesmp@users.noreply.github.com>
|
Dries Michiels <driesm.michiels@gmail.com> <32487486+driesmp@users.noreply.github.com>
|
||||||
@@ -128,6 +142,7 @@ Harry Mallon <hjmallon@gmail.com> <1816667+hjmallon@users.noreply.github.com>
|
|||||||
Hiếu Lê <leorize+oss@disroot.org> <alaviss@users.noreply.github.com>
|
Hiếu Lê <leorize+oss@disroot.org> <alaviss@users.noreply.github.com>
|
||||||
Jake Howard <git@theorangeone.net> <RealOrangeOne@users.noreply.github.com>
|
Jake Howard <git@theorangeone.net> <RealOrangeOne@users.noreply.github.com>
|
||||||
James Cowgill <james.cowgill@mips.com> <jcowgill@users.noreply.github.com>
|
James Cowgill <james.cowgill@mips.com> <jcowgill@users.noreply.github.com>
|
||||||
|
Jaron Kent-Dobias <jaron@kent-dobias.com> <kentdobias@users.noreply.github.com>
|
||||||
Jason King <jason.king@joyent.com> <jasonbking@users.noreply.github.com>
|
Jason King <jason.king@joyent.com> <jasonbking@users.noreply.github.com>
|
||||||
Jeff Dike <jdike@akamai.com> <52420226+jdike@users.noreply.github.com>
|
Jeff Dike <jdike@akamai.com> <52420226+jdike@users.noreply.github.com>
|
||||||
Jitendra Patidar <jitendra.patidar@nutanix.com> <53164267+jsai20@users.noreply.github.com>
|
Jitendra Patidar <jitendra.patidar@nutanix.com> <53164267+jsai20@users.noreply.github.com>
|
||||||
@@ -137,7 +152,9 @@ John L. Hammond <john.hammond@intel.com> <35266395+jhammond-intel@users.noreply.
|
|||||||
John-Mark Gurney <jmg@funkthat.com> <jmgurney@users.noreply.github.com>
|
John-Mark Gurney <jmg@funkthat.com> <jmgurney@users.noreply.github.com>
|
||||||
John Ramsden <johnramsden@riseup.net> <johnramsden@users.noreply.github.com>
|
John Ramsden <johnramsden@riseup.net> <johnramsden@users.noreply.github.com>
|
||||||
Jonathon Fernyhough <jonathon@m2x.dev> <559369+jonathonf@users.noreply.github.com>
|
Jonathon Fernyhough <jonathon@m2x.dev> <559369+jonathonf@users.noreply.github.com>
|
||||||
|
Jose Luis Duran <jlduran@gmail.com> <jlduran@users.noreply.github.com>
|
||||||
Justin Hibbits <chmeeedalf@gmail.com> <chmeeedalf@users.noreply.github.com>
|
Justin Hibbits <chmeeedalf@gmail.com> <chmeeedalf@users.noreply.github.com>
|
||||||
|
Kevin Greene <kevin.greene@delphix.com> <104801862+kxgreene@users.noreply.github.com>
|
||||||
Kevin Jin <lostking2008@hotmail.com> <33590050+jxdking@users.noreply.github.com>
|
Kevin Jin <lostking2008@hotmail.com> <33590050+jxdking@users.noreply.github.com>
|
||||||
Kevin P. Fleming <kevin@km6g.us> <kpfleming@users.noreply.github.com>
|
Kevin P. Fleming <kevin@km6g.us> <kpfleming@users.noreply.github.com>
|
||||||
Krzysztof Piecuch <piecuch@kpiecuch.pl> <3964215+pikrzysztof@users.noreply.github.com>
|
Krzysztof Piecuch <piecuch@kpiecuch.pl> <3964215+pikrzysztof@users.noreply.github.com>
|
||||||
@@ -148,9 +165,11 @@ Lorenz Hüdepohl <dev@stellardeath.org> <lhuedepohl@users.noreply.github.com>
|
|||||||
Luís Henriques <henrix@camandro.org> <73643340+lumigch@users.noreply.github.com>
|
Luís Henriques <henrix@camandro.org> <73643340+lumigch@users.noreply.github.com>
|
||||||
Marcin Skarbek <git@skarbek.name> <mskarbek@users.noreply.github.com>
|
Marcin Skarbek <git@skarbek.name> <mskarbek@users.noreply.github.com>
|
||||||
Matt Fiddaman <github@m.fiddaman.uk> <81489167+matt-fidd@users.noreply.github.com>
|
Matt Fiddaman <github@m.fiddaman.uk> <81489167+matt-fidd@users.noreply.github.com>
|
||||||
|
Maxim Filimonov <che@bein.link> <part1zano@users.noreply.github.com>
|
||||||
Max Zettlmeißl <max@zettlmeissl.de> <6818198+maxz@users.noreply.github.com>
|
Max Zettlmeißl <max@zettlmeissl.de> <6818198+maxz@users.noreply.github.com>
|
||||||
Michael Niewöhner <foss@mniewoehner.de> <c0d3z3r0@users.noreply.github.com>
|
Michael Niewöhner <foss@mniewoehner.de> <c0d3z3r0@users.noreply.github.com>
|
||||||
Michael Zhivich <mzhivich@akamai.com> <33133421+mzhivich@users.noreply.github.com>
|
Michael Zhivich <mzhivich@akamai.com> <33133421+mzhivich@users.noreply.github.com>
|
||||||
|
MigeljanImeri <ImeriMigel@gmail.com> <78048439+MigeljanImeri@users.noreply.github.com>
|
||||||
Mo Zhou <cdluminate@gmail.com> <5723047+cdluminate@users.noreply.github.com>
|
Mo Zhou <cdluminate@gmail.com> <5723047+cdluminate@users.noreply.github.com>
|
||||||
Nick Mattis <nickm970@gmail.com> <nmattis@users.noreply.github.com>
|
Nick Mattis <nickm970@gmail.com> <nmattis@users.noreply.github.com>
|
||||||
omni <omni+vagant@hack.org> <79493359+omnivagant@users.noreply.github.com>
|
omni <omni+vagant@hack.org> <79493359+omnivagant@users.noreply.github.com>
|
||||||
@@ -164,6 +183,7 @@ Ping Huang <huangping@smartx.com> <101400146+hpingfs@users.noreply.github.com>
|
|||||||
Piotr P. Stefaniak <pstef@freebsd.org> <pstef@users.noreply.github.com>
|
Piotr P. Stefaniak <pstef@freebsd.org> <pstef@users.noreply.github.com>
|
||||||
Richard Allen <belperite@gmail.com> <33836503+belperite@users.noreply.github.com>
|
Richard Allen <belperite@gmail.com> <33836503+belperite@users.noreply.github.com>
|
||||||
Rich Ercolani <rincebrain@gmail.com> <214141+rincebrain@users.noreply.github.com>
|
Rich Ercolani <rincebrain@gmail.com> <214141+rincebrain@users.noreply.github.com>
|
||||||
|
Rick Macklem <rmacklem@uoguelph.ca> <64620010+rmacklem@users.noreply.github.com>
|
||||||
Rob Wing <rob.wing@klarasystems.com> <98866084+rob-wing@users.noreply.github.com>
|
Rob Wing <rob.wing@klarasystems.com> <98866084+rob-wing@users.noreply.github.com>
|
||||||
Roman Strashkin <roman.strashkin@nexenta.com> <Ramzec@users.noreply.github.com>
|
Roman Strashkin <roman.strashkin@nexenta.com> <Ramzec@users.noreply.github.com>
|
||||||
Ryan Hirasaki <ryanhirasaki@gmail.com> <4690732+RyanHir@users.noreply.github.com>
|
Ryan Hirasaki <ryanhirasaki@gmail.com> <4690732+RyanHir@users.noreply.github.com>
|
||||||
@@ -174,13 +194,17 @@ Scott Colby <scott@scolby.com> <scolby33@users.noreply.github.com>
|
|||||||
Sean Eric Fagan <kithrup@mac.com> <kithrup@users.noreply.github.com>
|
Sean Eric Fagan <kithrup@mac.com> <kithrup@users.noreply.github.com>
|
||||||
Spencer Kinny <spencerkinny1995@gmail.com> <30333052+Spencer-Kinny@users.noreply.github.com>
|
Spencer Kinny <spencerkinny1995@gmail.com> <30333052+Spencer-Kinny@users.noreply.github.com>
|
||||||
Srikanth N S <srikanth.nagasubbaraoseetharaman@hpe.com> <75025422+nssrikanth@users.noreply.github.com>
|
Srikanth N S <srikanth.nagasubbaraoseetharaman@hpe.com> <75025422+nssrikanth@users.noreply.github.com>
|
||||||
|
Stefan Lendl <s.lendl@proxmox.com> <1321542+stfl@users.noreply.github.com>
|
||||||
|
Thomas Bertschinger <bertschinger@lanl.gov> <101425190+bertschinger@users.noreply.github.com>
|
||||||
Thomas Geppert <geppi@digitx.de> <geppi@users.noreply.github.com>
|
Thomas Geppert <geppi@digitx.de> <geppi@users.noreply.github.com>
|
||||||
Tim Crawford <tcrawford@datto.com> <crawfxrd@users.noreply.github.com>
|
Tim Crawford <tcrawford@datto.com> <crawfxrd@users.noreply.github.com>
|
||||||
|
Todd Seidelmann <18294602+seidelma@users.noreply.github.com>
|
||||||
Tom Matthews <tom@axiom-partners.com> <tomtastic@users.noreply.github.com>
|
Tom Matthews <tom@axiom-partners.com> <tomtastic@users.noreply.github.com>
|
||||||
Tony Perkins <tperkins@datto.com> <62951051+tony-zfs@users.noreply.github.com>
|
Tony Perkins <tperkins@datto.com> <62951051+tony-zfs@users.noreply.github.com>
|
||||||
Torsten Wörtwein <twoertwein@gmail.com> <twoertwein@users.noreply.github.com>
|
Torsten Wörtwein <twoertwein@gmail.com> <twoertwein@users.noreply.github.com>
|
||||||
Tulsi Jain <tulsi.jain@delphix.com> <TulsiJain@users.noreply.github.com>
|
Tulsi Jain <tulsi.jain@delphix.com> <TulsiJain@users.noreply.github.com>
|
||||||
Václav Skála <skala@vshosting.cz> <33496485+vaclavskala@users.noreply.github.com>
|
Václav Skála <skala@vshosting.cz> <33496485+vaclavskala@users.noreply.github.com>
|
||||||
|
Vaibhav Bhanawat <vaibhav.bhanawat@delphix.com> <88050553+vaibhav-delphix@users.noreply.github.com>
|
||||||
Violet Purcell <vimproved@inventati.org> <66446404+vimproved@users.noreply.github.com>
|
Violet Purcell <vimproved@inventati.org> <66446404+vimproved@users.noreply.github.com>
|
||||||
Vipin Kumar Verma <vipin.verma@hpe.com> <75025470+vermavipinkumar@users.noreply.github.com>
|
Vipin Kumar Verma <vipin.verma@hpe.com> <75025470+vermavipinkumar@users.noreply.github.com>
|
||||||
Wolfgang Bumiller <w.bumiller@proxmox.com> <Blub@users.noreply.github.com>
|
Wolfgang Bumiller <w.bumiller@proxmox.com> <Blub@users.noreply.github.com>
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ CONTRIBUTORS:
|
|||||||
Alex Zhuravlev <alexey.zhuravlev@intel.com>
|
Alex Zhuravlev <alexey.zhuravlev@intel.com>
|
||||||
Allan Jude <allanjude@freebsd.org>
|
Allan Jude <allanjude@freebsd.org>
|
||||||
Allen Holl <allen.m.holl@gmail.com>
|
Allen Holl <allen.m.holl@gmail.com>
|
||||||
|
Alphan Yılmaz <alphanyilmaz@gmail.com>
|
||||||
alteriks <alteriks@gmail.com>
|
alteriks <alteriks@gmail.com>
|
||||||
Alyssa Ross <hi@alyssa.is>
|
Alyssa Ross <hi@alyssa.is>
|
||||||
Ameer Hamza <ahamza@ixsystems.com>
|
Ameer Hamza <ahamza@ixsystems.com>
|
||||||
@@ -88,15 +89,18 @@ CONTRIBUTORS:
|
|||||||
Bassu <bassu@phi9.com>
|
Bassu <bassu@phi9.com>
|
||||||
Ben Allen <bsallen@alcf.anl.gov>
|
Ben Allen <bsallen@alcf.anl.gov>
|
||||||
Ben Cordero <bencord0@condi.me>
|
Ben Cordero <bencord0@condi.me>
|
||||||
|
Benda Xu <orv@debian.org>
|
||||||
Benedikt Neuffer <github@itfriend.de>
|
Benedikt Neuffer <github@itfriend.de>
|
||||||
Benjamin Albrecht <git@albrecht.io>
|
Benjamin Albrecht <git@albrecht.io>
|
||||||
Benjamin Gentil <benjgentil.pro@gmail.com>
|
Benjamin Gentil <benjgentil.pro@gmail.com>
|
||||||
|
Benjamin Sherman <benjamin@holyarmy.org>
|
||||||
Ben McGough <bmcgough@fredhutch.org>
|
Ben McGough <bmcgough@fredhutch.org>
|
||||||
Ben Rubson <ben.rubson@gmail.com>
|
Ben Rubson <ben.rubson@gmail.com>
|
||||||
Ben Wolsieffer <benwolsieffer@gmail.com>
|
Ben Wolsieffer <benwolsieffer@gmail.com>
|
||||||
bernie1995 <bernie.pikes@gmail.com>
|
bernie1995 <bernie.pikes@gmail.com>
|
||||||
Bill McGonigle <bill-github.com-public1@bfccomputing.com>
|
Bill McGonigle <bill-github.com-public1@bfccomputing.com>
|
||||||
Bill Pijewski <wdp@joyent.com>
|
Bill Pijewski <wdp@joyent.com>
|
||||||
|
Bojan Novković <bnovkov@FreeBSD.org>
|
||||||
Boris Protopopov <boris.protopopov@nexenta.com>
|
Boris Protopopov <boris.protopopov@nexenta.com>
|
||||||
Brad Forschinger <github@bnjf.id.au>
|
Brad Forschinger <github@bnjf.id.au>
|
||||||
Brad Lewis <brad.lewis@delphix.com>
|
Brad Lewis <brad.lewis@delphix.com>
|
||||||
@@ -111,6 +115,7 @@ CONTRIBUTORS:
|
|||||||
bzzz77 <bzzz.tomas@gmail.com>
|
bzzz77 <bzzz.tomas@gmail.com>
|
||||||
cable2999 <cable2999@users.noreply.github.com>
|
cable2999 <cable2999@users.noreply.github.com>
|
||||||
Caleb James DeLisle <calebdelisle@lavabit.com>
|
Caleb James DeLisle <calebdelisle@lavabit.com>
|
||||||
|
Cameron Harr <harr1@llnl.gov>
|
||||||
Cao Xuewen <cao.xuewen@zte.com.cn>
|
Cao Xuewen <cao.xuewen@zte.com.cn>
|
||||||
Carlo Landmeter <clandmeter@gmail.com>
|
Carlo Landmeter <clandmeter@gmail.com>
|
||||||
Carlos Alberto Lopez Perez <clopez@igalia.com>
|
Carlos Alberto Lopez Perez <clopez@igalia.com>
|
||||||
@@ -120,12 +125,15 @@ CONTRIBUTORS:
|
|||||||
Chen Can <chen.can2@zte.com.cn>
|
Chen Can <chen.can2@zte.com.cn>
|
||||||
Chengfei Zhu <chengfeix.zhu@intel.com>
|
Chengfei Zhu <chengfeix.zhu@intel.com>
|
||||||
Chen Haiquan <oc@yunify.com>
|
Chen Haiquan <oc@yunify.com>
|
||||||
|
ChenHao Lu <18302010006@fudan.edu.cn>
|
||||||
Chip Parker <aparker@enthought.com>
|
Chip Parker <aparker@enthought.com>
|
||||||
Chris Burroughs <chris.burroughs@gmail.com>
|
Chris Burroughs <chris.burroughs@gmail.com>
|
||||||
|
Chris Davidson <christopher.davidson@gmail.com>
|
||||||
Chris Dunlap <cdunlap@llnl.gov>
|
Chris Dunlap <cdunlap@llnl.gov>
|
||||||
Chris Dunlop <chris@onthe.net.au>
|
Chris Dunlop <chris@onthe.net.au>
|
||||||
Chris Lindee <chris.lindee+github@gmail.com>
|
Chris Lindee <chris.lindee+github@gmail.com>
|
||||||
Chris McDonough <chrism@plope.com>
|
Chris McDonough <chrism@plope.com>
|
||||||
|
Chris Peredun <chris.peredun@ixsystems.com>
|
||||||
Chris Siden <chris.siden@delphix.com>
|
Chris Siden <chris.siden@delphix.com>
|
||||||
Chris Siebenmann <cks.github@cs.toronto.edu>
|
Chris Siebenmann <cks.github@cs.toronto.edu>
|
||||||
Christer Ekholm <che@chrekh.se>
|
Christer Ekholm <che@chrekh.se>
|
||||||
@@ -144,6 +152,7 @@ CONTRIBUTORS:
|
|||||||
Clint Armstrong <clint@clintarmstrong.net>
|
Clint Armstrong <clint@clintarmstrong.net>
|
||||||
Coleman Kane <ckane@colemankane.org>
|
Coleman Kane <ckane@colemankane.org>
|
||||||
Colin Ian King <colin.king@canonical.com>
|
Colin Ian King <colin.king@canonical.com>
|
||||||
|
Colin Percival <cperciva@tarsnap.com>
|
||||||
Colm Buckley <colm@tuatha.org>
|
Colm Buckley <colm@tuatha.org>
|
||||||
Crag Wang <crag0715@gmail.com>
|
Crag Wang <crag0715@gmail.com>
|
||||||
Craig Loomis <cloomis@astro.princeton.edu>
|
Craig Loomis <cloomis@astro.princeton.edu>
|
||||||
@@ -156,10 +165,12 @@ CONTRIBUTORS:
|
|||||||
Damiano Albani <damiano.albani@gmail.com>
|
Damiano Albani <damiano.albani@gmail.com>
|
||||||
Damian Szuberski <szuberskidamian@gmail.com>
|
Damian Szuberski <szuberskidamian@gmail.com>
|
||||||
Damian Wojsław <damian@wojslaw.pl>
|
Damian Wojsław <damian@wojslaw.pl>
|
||||||
|
Daniel Berlin <dberlin@dberlin.org>
|
||||||
Daniel Hiepler <d-git@coderdu.de>
|
Daniel Hiepler <d-git@coderdu.de>
|
||||||
Daniel Hoffman <dj.hoffman@delphix.com>
|
Daniel Hoffman <dj.hoffman@delphix.com>
|
||||||
Daniel Kobras <d.kobras@science-computing.de>
|
Daniel Kobras <d.kobras@science-computing.de>
|
||||||
Daniel Kolesa <daniel@octaforge.org>
|
Daniel Kolesa <daniel@octaforge.org>
|
||||||
|
Daniel Perry <dtperry@amazon.com>
|
||||||
Daniel Reichelt <hacking@nachtgeist.net>
|
Daniel Reichelt <hacking@nachtgeist.net>
|
||||||
Daniel Stevenson <bot@dstev.net>
|
Daniel Stevenson <bot@dstev.net>
|
||||||
Daniel Verite <daniel@verite.pro>
|
Daniel Verite <daniel@verite.pro>
|
||||||
@@ -176,8 +187,11 @@ CONTRIBUTORS:
|
|||||||
David Quigley <david.quigley@intel.com>
|
David Quigley <david.quigley@intel.com>
|
||||||
Debabrata Banerjee <dbanerje@akamai.com>
|
Debabrata Banerjee <dbanerje@akamai.com>
|
||||||
D. Ebdrup <debdrup@freebsd.org>
|
D. Ebdrup <debdrup@freebsd.org>
|
||||||
|
Dennis R. Friedrichsen <dennis.r.friedrichsen@gmail.com>
|
||||||
Denys Rtveliashvili <denys@rtveliashvili.name>
|
Denys Rtveliashvili <denys@rtveliashvili.name>
|
||||||
Derek Dai <daiderek@gmail.com>
|
Derek Dai <daiderek@gmail.com>
|
||||||
|
Derek Schrock <dereks@lifeofadishwasher.com>
|
||||||
|
Dex Wood <slash2314@gmail.com>
|
||||||
DHE <git@dehacked.net>
|
DHE <git@dehacked.net>
|
||||||
Didier Roche <didrocks@ubuntu.com>
|
Didier Roche <didrocks@ubuntu.com>
|
||||||
Dimitri John Ledkov <xnox@ubuntu.com>
|
Dimitri John Ledkov <xnox@ubuntu.com>
|
||||||
@@ -235,9 +249,12 @@ CONTRIBUTORS:
|
|||||||
Gionatan Danti <g.danti@assyoma.it>
|
Gionatan Danti <g.danti@assyoma.it>
|
||||||
Giuseppe Di Natale <guss80@gmail.com>
|
Giuseppe Di Natale <guss80@gmail.com>
|
||||||
Glenn Washburn <development@efficientek.com>
|
Glenn Washburn <development@efficientek.com>
|
||||||
|
glibg10b <glibg10b@users.noreply.github.com>
|
||||||
|
gofaster <felix.gofaster@gmail.com>
|
||||||
Gordan Bobic <gordan@redsleeve.org>
|
Gordan Bobic <gordan@redsleeve.org>
|
||||||
Gordon Bergling <gbergling@googlemail.com>
|
Gordon Bergling <gbergling@googlemail.com>
|
||||||
Gordon Ross <gwr@nexenta.com>
|
Gordon Ross <gwr@nexenta.com>
|
||||||
|
Gordon Tetlow <gordon@freebsd.org>
|
||||||
Graham Christensen <graham@grahamc.com>
|
Graham Christensen <graham@grahamc.com>
|
||||||
Graham Perrin <grahamperrin@gmail.com>
|
Graham Perrin <grahamperrin@gmail.com>
|
||||||
Gregor Kopka <gregor@kopka.net>
|
Gregor Kopka <gregor@kopka.net>
|
||||||
@@ -265,6 +282,7 @@ CONTRIBUTORS:
|
|||||||
Igor Kozhukhov <ikozhukhov@gmail.com>
|
Igor Kozhukhov <ikozhukhov@gmail.com>
|
||||||
Igor Lvovsky <ilvovsky@gmail.com>
|
Igor Lvovsky <ilvovsky@gmail.com>
|
||||||
ilbsmart <wgqimut@gmail.com>
|
ilbsmart <wgqimut@gmail.com>
|
||||||
|
Ilkka Sovanto <github@ilkka.kapsi.fi>
|
||||||
illiliti <illiliti@protonmail.com>
|
illiliti <illiliti@protonmail.com>
|
||||||
ilovezfs <ilovezfs@icloud.com>
|
ilovezfs <ilovezfs@icloud.com>
|
||||||
InsanePrawn <Insane.Prawny@gmail.com>
|
InsanePrawn <Insane.Prawny@gmail.com>
|
||||||
@@ -280,9 +298,11 @@ CONTRIBUTORS:
|
|||||||
Jan Engelhardt <jengelh@inai.de>
|
Jan Engelhardt <jengelh@inai.de>
|
||||||
Jan Kryl <jan.kryl@nexenta.com>
|
Jan Kryl <jan.kryl@nexenta.com>
|
||||||
Jan Sanislo <oystr@cs.washington.edu>
|
Jan Sanislo <oystr@cs.washington.edu>
|
||||||
|
Jaron Kent-Dobias <jaron@kent-dobias.com>
|
||||||
Jason Cohen <jwittlincohen@gmail.com>
|
Jason Cohen <jwittlincohen@gmail.com>
|
||||||
Jason Harmening <jason.harmening@gmail.com>
|
Jason Harmening <jason.harmening@gmail.com>
|
||||||
Jason King <jason.brian.king@gmail.com>
|
Jason King <jason.brian.king@gmail.com>
|
||||||
|
Jason Lee <jasonlee@lanl.gov>
|
||||||
Jason Zaman <jasonzaman@gmail.com>
|
Jason Zaman <jasonzaman@gmail.com>
|
||||||
Javen Wu <wu.javen@gmail.com>
|
Javen Wu <wu.javen@gmail.com>
|
||||||
Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
|
Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
|
||||||
@@ -313,6 +333,7 @@ CONTRIBUTORS:
|
|||||||
Jonathon Fernyhough <jonathon@m2x.dev>
|
Jonathon Fernyhough <jonathon@m2x.dev>
|
||||||
Jorgen Lundman <lundman@lundman.net>
|
Jorgen Lundman <lundman@lundman.net>
|
||||||
Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
|
Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
|
||||||
|
Jose Luis Duran <jlduran@gmail.com>
|
||||||
Josh Soref <jsoref@users.noreply.github.com>
|
Josh Soref <jsoref@users.noreply.github.com>
|
||||||
Joshua M. Clulow <josh@sysmgr.org>
|
Joshua M. Clulow <josh@sysmgr.org>
|
||||||
José Luis Salvador Rufo <salvador.joseluis@gmail.com>
|
José Luis Salvador Rufo <salvador.joseluis@gmail.com>
|
||||||
@@ -336,8 +357,10 @@ CONTRIBUTORS:
|
|||||||
Kash Pande <kash@tripleback.net>
|
Kash Pande <kash@tripleback.net>
|
||||||
Kay Pedersen <christianpe96@gmail.com>
|
Kay Pedersen <christianpe96@gmail.com>
|
||||||
Keith M Wesolowski <wesolows@foobazco.org>
|
Keith M Wesolowski <wesolows@foobazco.org>
|
||||||
|
Kent Ross <k@mad.cash>
|
||||||
KernelOfTruth <kerneloftruth@gmail.com>
|
KernelOfTruth <kerneloftruth@gmail.com>
|
||||||
Kevin Bowling <kevin.bowling@kev009.com>
|
Kevin Bowling <kevin.bowling@kev009.com>
|
||||||
|
Kevin Greene <kevin.greene@delphix.com>
|
||||||
Kevin Jin <lostking2008@hotmail.com>
|
Kevin Jin <lostking2008@hotmail.com>
|
||||||
Kevin P. Fleming <kevin@km6g.us>
|
Kevin P. Fleming <kevin@km6g.us>
|
||||||
Kevin Tanguy <kevin.tanguy@ovh.net>
|
Kevin Tanguy <kevin.tanguy@ovh.net>
|
||||||
@@ -389,8 +412,10 @@ CONTRIBUTORS:
|
|||||||
Mark Shellenbaum <Mark.Shellenbaum@Oracle.COM>
|
Mark Shellenbaum <Mark.Shellenbaum@Oracle.COM>
|
||||||
marku89 <mar42@kola.li>
|
marku89 <mar42@kola.li>
|
||||||
Mark Wright <markwright@internode.on.net>
|
Mark Wright <markwright@internode.on.net>
|
||||||
|
Mart Frauenlob <allkind@fastest.cc>
|
||||||
Martin Matuska <mm@FreeBSD.org>
|
Martin Matuska <mm@FreeBSD.org>
|
||||||
Martin Rüegg <martin.rueegg@metaworx.ch>
|
Martin Rüegg <martin.rueegg@metaworx.ch>
|
||||||
|
Martin Wagner <martin.wagner.dev@gmail.com>
|
||||||
Massimo Maggi <me@massimo-maggi.eu>
|
Massimo Maggi <me@massimo-maggi.eu>
|
||||||
Mateusz Guzik <mjguzik@gmail.com>
|
Mateusz Guzik <mjguzik@gmail.com>
|
||||||
Mateusz Piotrowski <0mp@FreeBSD.org>
|
Mateusz Piotrowski <0mp@FreeBSD.org>
|
||||||
@@ -405,6 +430,7 @@ CONTRIBUTORS:
|
|||||||
Matus Kral <matuskral@me.com>
|
Matus Kral <matuskral@me.com>
|
||||||
Mauricio Faria de Oliveira <mfo@canonical.com>
|
Mauricio Faria de Oliveira <mfo@canonical.com>
|
||||||
Max Grossman <max.grossman@delphix.com>
|
Max Grossman <max.grossman@delphix.com>
|
||||||
|
Maxim Filimonov <che@bein.link>
|
||||||
Maximilian Mehnert <maximilian.mehnert@gmx.de>
|
Maximilian Mehnert <maximilian.mehnert@gmx.de>
|
||||||
Max Zettlmeißl <max@zettlmeissl.de>
|
Max Zettlmeißl <max@zettlmeissl.de>
|
||||||
Md Islam <mdnahian@outlook.com>
|
Md Islam <mdnahian@outlook.com>
|
||||||
@@ -417,6 +443,7 @@ CONTRIBUTORS:
|
|||||||
Michael Niewöhner <foss@mniewoehner.de>
|
Michael Niewöhner <foss@mniewoehner.de>
|
||||||
Michael Zhivich <mzhivich@akamai.com>
|
Michael Zhivich <mzhivich@akamai.com>
|
||||||
Michal Vasilek <michal@vasilek.cz>
|
Michal Vasilek <michal@vasilek.cz>
|
||||||
|
MigeljanImeri <ImeriMigel@gmail.com>
|
||||||
Mike Gerdts <mike.gerdts@joyent.com>
|
Mike Gerdts <mike.gerdts@joyent.com>
|
||||||
Mike Harsch <mike@harschsystems.com>
|
Mike Harsch <mike@harschsystems.com>
|
||||||
Mike Leddy <mike.leddy@gmail.com>
|
Mike Leddy <mike.leddy@gmail.com>
|
||||||
@@ -448,6 +475,7 @@ CONTRIBUTORS:
|
|||||||
Olaf Faaland <faaland1@llnl.gov>
|
Olaf Faaland <faaland1@llnl.gov>
|
||||||
Oleg Drokin <green@linuxhacker.ru>
|
Oleg Drokin <green@linuxhacker.ru>
|
||||||
Oleg Stepura <oleg@stepura.com>
|
Oleg Stepura <oleg@stepura.com>
|
||||||
|
Olivier Certner <olce.freebsd@certner.fr>
|
||||||
Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
|
Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
|
||||||
omni <omni+vagant@hack.org>
|
omni <omni+vagant@hack.org>
|
||||||
Orivej Desh <orivej@gmx.fr>
|
Orivej Desh <orivej@gmx.fr>
|
||||||
@@ -466,6 +494,7 @@ CONTRIBUTORS:
|
|||||||
Peng <peng.hse@xtaotech.com>
|
Peng <peng.hse@xtaotech.com>
|
||||||
Peter Ashford <ashford@accs.com>
|
Peter Ashford <ashford@accs.com>
|
||||||
Peter Dave Hello <hsu@peterdavehello.org>
|
Peter Dave Hello <hsu@peterdavehello.org>
|
||||||
|
Peter Doherty <peterd@acranox.org>
|
||||||
Peter Levine <plevine457@gmail.com>
|
Peter Levine <plevine457@gmail.com>
|
||||||
Peter Wirdemo <peter.wirdemo@gmail.com>
|
Peter Wirdemo <peter.wirdemo@gmail.com>
|
||||||
Petros Koutoupis <petros@petroskoutoupis.com>
|
Petros Koutoupis <petros@petroskoutoupis.com>
|
||||||
@@ -479,6 +508,8 @@ CONTRIBUTORS:
|
|||||||
Prasad Joshi <prasadjoshi124@gmail.com>
|
Prasad Joshi <prasadjoshi124@gmail.com>
|
||||||
privb0x23 <privb0x23@users.noreply.github.com>
|
privb0x23 <privb0x23@users.noreply.github.com>
|
||||||
P.SCH <p88@yahoo.com>
|
P.SCH <p88@yahoo.com>
|
||||||
|
Qiuhao Chen <chenqiuhao1997@gmail.com>
|
||||||
|
Quartz <yyhran@163.com>
|
||||||
Quentin Zdanis <zdanisq@gmail.com>
|
Quentin Zdanis <zdanisq@gmail.com>
|
||||||
Rafael Kitover <rkitover@gmail.com>
|
Rafael Kitover <rkitover@gmail.com>
|
||||||
RageLtMan <sempervictus@users.noreply.github.com>
|
RageLtMan <sempervictus@users.noreply.github.com>
|
||||||
@@ -491,11 +522,15 @@ CONTRIBUTORS:
|
|||||||
Riccardo Schirone <rschirone91@gmail.com>
|
Riccardo Schirone <rschirone91@gmail.com>
|
||||||
Richard Allen <belperite@gmail.com>
|
Richard Allen <belperite@gmail.com>
|
||||||
Richard Elling <Richard.Elling@RichardElling.com>
|
Richard Elling <Richard.Elling@RichardElling.com>
|
||||||
|
Richard Kojedzinszky <richard@kojedz.in>
|
||||||
Richard Laager <rlaager@wiktel.com>
|
Richard Laager <rlaager@wiktel.com>
|
||||||
Richard Lowe <richlowe@richlowe.net>
|
Richard Lowe <richlowe@richlowe.net>
|
||||||
Richard Sharpe <rsharpe@samba.org>
|
Richard Sharpe <rsharpe@samba.org>
|
||||||
Richard Yao <ryao@gentoo.org>
|
Richard Yao <ryao@gentoo.org>
|
||||||
Rich Ercolani <rincebrain@gmail.com>
|
Rich Ercolani <rincebrain@gmail.com>
|
||||||
|
Rick Macklem <rmacklem@uoguelph.ca>
|
||||||
|
rilysh <nightquick@proton.me>
|
||||||
|
Robert Evans <evansr@google.com>
|
||||||
Robert Novak <sailnfool@gmail.com>
|
Robert Novak <sailnfool@gmail.com>
|
||||||
Roberto Ricci <ricci@disroot.org>
|
Roberto Ricci <ricci@disroot.org>
|
||||||
Rob Norris <robn@despairlabs.com>
|
Rob Norris <robn@despairlabs.com>
|
||||||
@@ -505,11 +540,14 @@ CONTRIBUTORS:
|
|||||||
Roman Strashkin <roman.strashkin@nexenta.com>
|
Roman Strashkin <roman.strashkin@nexenta.com>
|
||||||
Ross Williams <ross@ross-williams.net>
|
Ross Williams <ross@ross-williams.net>
|
||||||
Ruben Kerkhof <ruben@rubenkerkhof.com>
|
Ruben Kerkhof <ruben@rubenkerkhof.com>
|
||||||
|
Ryan <errornointernet@envs.net>
|
||||||
Ryan Hirasaki <ryanhirasaki@gmail.com>
|
Ryan Hirasaki <ryanhirasaki@gmail.com>
|
||||||
Ryan Lahfa <masterancpp@gmail.com>
|
Ryan Lahfa <masterancpp@gmail.com>
|
||||||
Ryan Libby <rlibby@FreeBSD.org>
|
Ryan Libby <rlibby@FreeBSD.org>
|
||||||
Ryan Moeller <freqlabs@FreeBSD.org>
|
Ryan Moeller <freqlabs@FreeBSD.org>
|
||||||
|
Sam Atkinson <samatk@amazon.com>
|
||||||
Sam Hathaway <github.com@munkynet.org>
|
Sam Hathaway <github.com@munkynet.org>
|
||||||
|
Sam James <sam@gentoo.org>
|
||||||
Sam Lunt <samuel.j.lunt@gmail.com>
|
Sam Lunt <samuel.j.lunt@gmail.com>
|
||||||
Samuel VERSCHELDE <stormi-github@ylix.fr>
|
Samuel VERSCHELDE <stormi-github@ylix.fr>
|
||||||
Samuel Wycliffe <samuelwycliffe@gmail.com>
|
Samuel Wycliffe <samuelwycliffe@gmail.com>
|
||||||
@@ -527,9 +565,12 @@ CONTRIBUTORS:
|
|||||||
Sen Haerens <sen@senhaerens.be>
|
Sen Haerens <sen@senhaerens.be>
|
||||||
Serapheim Dimitropoulos <serapheim@delphix.com>
|
Serapheim Dimitropoulos <serapheim@delphix.com>
|
||||||
Seth Forshee <seth.forshee@canonical.com>
|
Seth Forshee <seth.forshee@canonical.com>
|
||||||
|
Seth Troisi <sethtroisi@google.com>
|
||||||
Shaan Nobee <sniper111@gmail.com>
|
Shaan Nobee <sniper111@gmail.com>
|
||||||
Shampavman <sham.pavman@nexenta.com>
|
Shampavman <sham.pavman@nexenta.com>
|
||||||
Shaun Tancheff <shaun@aeonazure.com>
|
Shaun Tancheff <shaun@aeonazure.com>
|
||||||
|
Shawn Bayern <sbayern@law.fsu.edu>
|
||||||
|
Shengqi Chen <harry-chen@outlook.com>
|
||||||
Shen Yan <shenyanxxxy@qq.com>
|
Shen Yan <shenyanxxxy@qq.com>
|
||||||
Simon Guest <simon.guest@tesujimath.org>
|
Simon Guest <simon.guest@tesujimath.org>
|
||||||
Simon Klinkert <simon.klinkert@gmail.com>
|
Simon Klinkert <simon.klinkert@gmail.com>
|
||||||
@@ -537,6 +578,7 @@ CONTRIBUTORS:
|
|||||||
Spencer Kinny <spencerkinny1995@gmail.com>
|
Spencer Kinny <spencerkinny1995@gmail.com>
|
||||||
Srikanth N S <srikanth.nagasubbaraoseetharaman@hpe.com>
|
Srikanth N S <srikanth.nagasubbaraoseetharaman@hpe.com>
|
||||||
Stanislav Seletskiy <s.seletskiy@gmail.com>
|
Stanislav Seletskiy <s.seletskiy@gmail.com>
|
||||||
|
Stefan Lendl <s.lendl@proxmox.com>
|
||||||
Steffen Müthing <steffen.muething@iwr.uni-heidelberg.de>
|
Steffen Müthing <steffen.muething@iwr.uni-heidelberg.de>
|
||||||
Stephen Blinick <stephen.blinick@delphix.com>
|
Stephen Blinick <stephen.blinick@delphix.com>
|
||||||
sterlingjensen <sterlingjensen@users.noreply.github.com>
|
sterlingjensen <sterlingjensen@users.noreply.github.com>
|
||||||
@@ -557,6 +599,7 @@ CONTRIBUTORS:
|
|||||||
Teodor Spæren <teodor_spaeren@riseup.net>
|
Teodor Spæren <teodor_spaeren@riseup.net>
|
||||||
TerraTech <TerraTech@users.noreply.github.com>
|
TerraTech <TerraTech@users.noreply.github.com>
|
||||||
Thijs Cramer <thijs.cramer@gmail.com>
|
Thijs Cramer <thijs.cramer@gmail.com>
|
||||||
|
Thomas Bertschinger <bertschinger@lanl.gov>
|
||||||
Thomas Geppert <geppi@digitx.de>
|
Thomas Geppert <geppi@digitx.de>
|
||||||
Thomas Lamprecht <guggentom@hotmail.de>
|
Thomas Lamprecht <guggentom@hotmail.de>
|
||||||
Till Maas <opensource@till.name>
|
Till Maas <opensource@till.name>
|
||||||
@@ -569,6 +612,7 @@ CONTRIBUTORS:
|
|||||||
Tim Schumacher <timschumi@gmx.de>
|
Tim Schumacher <timschumi@gmx.de>
|
||||||
Tino Reichardt <milky-zfs@mcmilk.de>
|
Tino Reichardt <milky-zfs@mcmilk.de>
|
||||||
Tobin Harding <me@tobin.cc>
|
Tobin Harding <me@tobin.cc>
|
||||||
|
Todd Seidelmann <seidelma@users.noreply.github.com>
|
||||||
Tom Caputi <tcaputi@datto.com>
|
Tom Caputi <tcaputi@datto.com>
|
||||||
Tom Matthews <tom@axiom-partners.com>
|
Tom Matthews <tom@axiom-partners.com>
|
||||||
Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
|
Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
|
||||||
@@ -586,6 +630,7 @@ CONTRIBUTORS:
|
|||||||
Turbo Fredriksson <turbo@bayour.com>
|
Turbo Fredriksson <turbo@bayour.com>
|
||||||
Tyler J. Stachecki <stachecki.tyler@gmail.com>
|
Tyler J. Stachecki <stachecki.tyler@gmail.com>
|
||||||
Umer Saleem <usaleem@ixsystems.com>
|
Umer Saleem <usaleem@ixsystems.com>
|
||||||
|
Vaibhav Bhanawat <vaibhav.bhanawat@delphix.com>
|
||||||
Valmiky Arquissandas <kayvlim@gmail.com>
|
Valmiky Arquissandas <kayvlim@gmail.com>
|
||||||
Val Packett <val@packett.cool>
|
Val Packett <val@packett.cool>
|
||||||
Vince van Oosten <techhazard@codeforyouand.me>
|
Vince van Oosten <techhazard@codeforyouand.me>
|
||||||
@@ -614,10 +659,13 @@ CONTRIBUTORS:
|
|||||||
yuina822 <ayuichi@club.kyutech.ac.jp>
|
yuina822 <ayuichi@club.kyutech.ac.jp>
|
||||||
YunQiang Su <syq@debian.org>
|
YunQiang Su <syq@debian.org>
|
||||||
Yuri Pankov <yuri.pankov@gmail.com>
|
Yuri Pankov <yuri.pankov@gmail.com>
|
||||||
|
Yuxin Wang <yuxinwang9999@gmail.com>
|
||||||
Yuxuan Shui <yshuiv7@gmail.com>
|
Yuxuan Shui <yshuiv7@gmail.com>
|
||||||
Zachary Bedell <zac@thebedells.org>
|
Zachary Bedell <zac@thebedells.org>
|
||||||
Zach Dykstra <dykstra.zachary@gmail.com>
|
Zach Dykstra <dykstra.zachary@gmail.com>
|
||||||
zgock <zgock@nuc.base.zgock-lab.net>
|
zgock <zgock@nuc.base.zgock-lab.net>
|
||||||
|
Zhao Yongming <zym@apache.org>
|
||||||
|
Zhenlei Huang <zlei@FreeBSD.org>
|
||||||
Zhu Chuang <chuang@melty.land>
|
Zhu Chuang <chuang@melty.land>
|
||||||
Érico Nogueira <erico.erc@gmail.com>
|
Érico Nogueira <erico.erc@gmail.com>
|
||||||
Đoàn Trần Công Danh <congdanhqx@gmail.com>
|
Đoàn Trần Công Danh <congdanhqx@gmail.com>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
Meta: 1
|
Meta: 1
|
||||||
Name: zfs
|
Name: zfs
|
||||||
Branch: 1.0
|
Branch: 1.0
|
||||||
Version: 2.2.3
|
Version: 2.2.7
|
||||||
Release: 1
|
Release: 1
|
||||||
Release-Tags: relext
|
Release-Tags: relext
|
||||||
License: CDDL
|
License: CDDL
|
||||||
Author: OpenZFS
|
Author: OpenZFS
|
||||||
Linux-Maximum: 6.7
|
Linux-Maximum: 6.12
|
||||||
Linux-Minimum: 3.10
|
Linux-Minimum: 4.18
|
||||||
|
|||||||
@@ -32,4 +32,4 @@ For more details see the NOTICE, LICENSE and COPYRIGHT files; `UCRL-CODE-235197`
|
|||||||
|
|
||||||
# Supported Kernels
|
# Supported Kernels
|
||||||
* The `META` file contains the officially recognized supported Linux kernel versions.
|
* The `META` file contains the officially recognized supported Linux kernel versions.
|
||||||
* Supported FreeBSD versions are any supported branches and releases starting from 12.4-RELEASE.
|
* Supported FreeBSD versions are any supported branches and releases starting from 13.0-RELEASE.
|
||||||
|
|||||||
+10
-1
@@ -793,18 +793,27 @@ def section_dmu(kstats_dict):
|
|||||||
|
|
||||||
zfetch_stats = isolate_section('zfetchstats', kstats_dict)
|
zfetch_stats = isolate_section('zfetchstats', kstats_dict)
|
||||||
|
|
||||||
zfetch_access_total = int(zfetch_stats['hits'])+int(zfetch_stats['misses'])
|
zfetch_access_total = int(zfetch_stats['hits']) +\
|
||||||
|
int(zfetch_stats['future']) + int(zfetch_stats['stride']) +\
|
||||||
|
int(zfetch_stats['past']) + int(zfetch_stats['misses'])
|
||||||
|
|
||||||
prt_1('DMU predictive prefetcher calls:', f_hits(zfetch_access_total))
|
prt_1('DMU predictive prefetcher calls:', f_hits(zfetch_access_total))
|
||||||
prt_i2('Stream hits:',
|
prt_i2('Stream hits:',
|
||||||
f_perc(zfetch_stats['hits'], zfetch_access_total),
|
f_perc(zfetch_stats['hits'], zfetch_access_total),
|
||||||
f_hits(zfetch_stats['hits']))
|
f_hits(zfetch_stats['hits']))
|
||||||
|
future = int(zfetch_stats['future']) + int(zfetch_stats['stride'])
|
||||||
|
prt_i2('Hits ahead of stream:', f_perc(future, zfetch_access_total),
|
||||||
|
f_hits(future))
|
||||||
|
prt_i2('Hits behind stream:',
|
||||||
|
f_perc(zfetch_stats['past'], zfetch_access_total),
|
||||||
|
f_hits(zfetch_stats['past']))
|
||||||
prt_i2('Stream misses:',
|
prt_i2('Stream misses:',
|
||||||
f_perc(zfetch_stats['misses'], zfetch_access_total),
|
f_perc(zfetch_stats['misses'], zfetch_access_total),
|
||||||
f_hits(zfetch_stats['misses']))
|
f_hits(zfetch_stats['misses']))
|
||||||
prt_i2('Streams limit reached:',
|
prt_i2('Streams limit reached:',
|
||||||
f_perc(zfetch_stats['max_streams'], zfetch_stats['misses']),
|
f_perc(zfetch_stats['max_streams'], zfetch_stats['misses']),
|
||||||
f_hits(zfetch_stats['max_streams']))
|
f_hits(zfetch_stats['max_streams']))
|
||||||
|
prt_i1('Stream strides:', f_hits(zfetch_stats['stride']))
|
||||||
prt_i1('Prefetches issued', f_hits(zfetch_stats['io_issued']))
|
prt_i1('Prefetches issued', f_hits(zfetch_stats['io_issued']))
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|||||||
+48
-5
@@ -157,6 +157,16 @@ cols = {
|
|||||||
"free": [5, 1024, "ARC free memory"],
|
"free": [5, 1024, "ARC free memory"],
|
||||||
"avail": [5, 1024, "ARC available memory"],
|
"avail": [5, 1024, "ARC available memory"],
|
||||||
"waste": [5, 1024, "Wasted memory due to round up to pagesize"],
|
"waste": [5, 1024, "Wasted memory due to round up to pagesize"],
|
||||||
|
"ztotal": [6, 1000, "zfetch total prefetcher calls per second"],
|
||||||
|
"zhits": [5, 1000, "zfetch stream hits per second"],
|
||||||
|
"zahead": [6, 1000, "zfetch hits ahead of streams per second"],
|
||||||
|
"zpast": [5, 1000, "zfetch hits behind streams per second"],
|
||||||
|
"zmisses": [7, 1000, "zfetch stream misses per second"],
|
||||||
|
"zmax": [4, 1000, "zfetch limit reached per second"],
|
||||||
|
"zfuture": [7, 1000, "zfetch stream future per second"],
|
||||||
|
"zstride": [7, 1000, "zfetch stream strides per second"],
|
||||||
|
"zissued": [7, 1000, "zfetch prefetches issued per second"],
|
||||||
|
"zactive": [7, 1000, "zfetch prefetches active per second"],
|
||||||
}
|
}
|
||||||
|
|
||||||
v = {}
|
v = {}
|
||||||
@@ -164,6 +174,8 @@ hdr = ["time", "read", "ddread", "ddh%", "dmread", "dmh%", "pread", "ph%",
|
|||||||
"size", "c", "avail"]
|
"size", "c", "avail"]
|
||||||
xhdr = ["time", "mfu", "mru", "mfug", "mrug", "unc", "eskip", "mtxmis",
|
xhdr = ["time", "mfu", "mru", "mfug", "mrug", "unc", "eskip", "mtxmis",
|
||||||
"dread", "pread", "read"]
|
"dread", "pread", "read"]
|
||||||
|
zhdr = ["time", "ztotal", "zhits", "zahead", "zpast", "zmisses", "zmax",
|
||||||
|
"zfuture", "zstride", "zissued", "zactive"]
|
||||||
sint = 1 # Default interval is 1 second
|
sint = 1 # Default interval is 1 second
|
||||||
count = 1 # Default count is 1
|
count = 1 # Default count is 1
|
||||||
hdr_intr = 20 # Print header every 20 lines of output
|
hdr_intr = 20 # Print header every 20 lines of output
|
||||||
@@ -188,6 +200,8 @@ if sys.platform.startswith('freebsd'):
|
|||||||
|
|
||||||
k = [ctl for ctl in sysctl.filter('kstat.zfs.misc.arcstats')
|
k = [ctl for ctl in sysctl.filter('kstat.zfs.misc.arcstats')
|
||||||
if ctl.type != sysctl.CTLTYPE_NODE]
|
if ctl.type != sysctl.CTLTYPE_NODE]
|
||||||
|
k += [ctl for ctl in sysctl.filter('kstat.zfs.misc.zfetchstats')
|
||||||
|
if ctl.type != sysctl.CTLTYPE_NODE]
|
||||||
|
|
||||||
if not k:
|
if not k:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@@ -199,19 +213,28 @@ if sys.platform.startswith('freebsd'):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
name, value = s.name, s.value
|
name, value = s.name, s.value
|
||||||
|
|
||||||
|
if "arcstats" in name:
|
||||||
# Trims 'kstat.zfs.misc.arcstats' from the name
|
# Trims 'kstat.zfs.misc.arcstats' from the name
|
||||||
kstat[name[24:]] = int(value)
|
kstat[name[24:]] = int(value)
|
||||||
|
else:
|
||||||
|
kstat["zfetch_" + name[27:]] = int(value)
|
||||||
|
|
||||||
elif sys.platform.startswith('linux'):
|
elif sys.platform.startswith('linux'):
|
||||||
def kstat_update():
|
def kstat_update():
|
||||||
global kstat
|
global kstat
|
||||||
|
|
||||||
k = [line.strip() for line in open('/proc/spl/kstat/zfs/arcstats')]
|
k1 = [line.strip() for line in open('/proc/spl/kstat/zfs/arcstats')]
|
||||||
|
|
||||||
if not k:
|
k2 = ["zfetch_" + line.strip() for line in
|
||||||
|
open('/proc/spl/kstat/zfs/zfetchstats')]
|
||||||
|
|
||||||
|
if k1 is None or k2 is None:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
del k[0:2]
|
del k1[0:2]
|
||||||
|
del k2[0:2]
|
||||||
|
k = k1 + k2
|
||||||
kstat = {}
|
kstat = {}
|
||||||
|
|
||||||
for s in k:
|
for s in k:
|
||||||
@@ -239,6 +262,7 @@ def usage():
|
|||||||
sys.stderr.write("\t -v : List all possible field headers and definitions"
|
sys.stderr.write("\t -v : List all possible field headers and definitions"
|
||||||
"\n")
|
"\n")
|
||||||
sys.stderr.write("\t -x : Print extended stats\n")
|
sys.stderr.write("\t -x : Print extended stats\n")
|
||||||
|
sys.stderr.write("\t -z : Print zfetch stats\n")
|
||||||
sys.stderr.write("\t -f : Specify specific fields to print (see -v)\n")
|
sys.stderr.write("\t -f : Specify specific fields to print (see -v)\n")
|
||||||
sys.stderr.write("\t -o : Redirect output to the specified file\n")
|
sys.stderr.write("\t -o : Redirect output to the specified file\n")
|
||||||
sys.stderr.write("\t -s : Override default field separator with custom "
|
sys.stderr.write("\t -s : Override default field separator with custom "
|
||||||
@@ -357,6 +381,7 @@ def init():
|
|||||||
global count
|
global count
|
||||||
global hdr
|
global hdr
|
||||||
global xhdr
|
global xhdr
|
||||||
|
global zhdr
|
||||||
global opfile
|
global opfile
|
||||||
global sep
|
global sep
|
||||||
global out
|
global out
|
||||||
@@ -368,15 +393,17 @@ def init():
|
|||||||
xflag = False
|
xflag = False
|
||||||
hflag = False
|
hflag = False
|
||||||
vflag = False
|
vflag = False
|
||||||
|
zflag = False
|
||||||
i = 1
|
i = 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(
|
opts, args = getopt.getopt(
|
||||||
sys.argv[1:],
|
sys.argv[1:],
|
||||||
"axo:hvs:f:p",
|
"axzo:hvs:f:p",
|
||||||
[
|
[
|
||||||
"all",
|
"all",
|
||||||
"extended",
|
"extended",
|
||||||
|
"zfetch",
|
||||||
"outfile",
|
"outfile",
|
||||||
"help",
|
"help",
|
||||||
"verbose",
|
"verbose",
|
||||||
@@ -410,13 +437,15 @@ def init():
|
|||||||
i += 1
|
i += 1
|
||||||
if opt in ('-p', '--parsable'):
|
if opt in ('-p', '--parsable'):
|
||||||
pretty_print = False
|
pretty_print = False
|
||||||
|
if opt in ('-z', '--zfetch'):
|
||||||
|
zflag = True
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
argv = sys.argv[i:]
|
argv = sys.argv[i:]
|
||||||
sint = int(argv[0]) if argv else sint
|
sint = int(argv[0]) if argv else sint
|
||||||
count = int(argv[1]) if len(argv) > 1 else (0 if len(argv) > 0 else 1)
|
count = int(argv[1]) if len(argv) > 1 else (0 if len(argv) > 0 else 1)
|
||||||
|
|
||||||
if hflag or (xflag and desired_cols):
|
if hflag or (xflag and zflag) or ((zflag or xflag) and desired_cols):
|
||||||
usage()
|
usage()
|
||||||
|
|
||||||
if vflag:
|
if vflag:
|
||||||
@@ -425,6 +454,9 @@ def init():
|
|||||||
if xflag:
|
if xflag:
|
||||||
hdr = xhdr
|
hdr = xhdr
|
||||||
|
|
||||||
|
if zflag:
|
||||||
|
hdr = zhdr
|
||||||
|
|
||||||
update_hdr_intr()
|
update_hdr_intr()
|
||||||
|
|
||||||
# check if L2ARC exists
|
# check if L2ARC exists
|
||||||
@@ -569,6 +601,17 @@ def calculate():
|
|||||||
v["el2mru"] = d["evict_l2_eligible_mru"] // sint
|
v["el2mru"] = d["evict_l2_eligible_mru"] // sint
|
||||||
v["el2inel"] = d["evict_l2_ineligible"] // sint
|
v["el2inel"] = d["evict_l2_ineligible"] // sint
|
||||||
v["mtxmis"] = d["mutex_miss"] // sint
|
v["mtxmis"] = d["mutex_miss"] // sint
|
||||||
|
v["ztotal"] = (d["zfetch_hits"] + d["zfetch_future"] + d["zfetch_stride"] +
|
||||||
|
d["zfetch_past"] + d["zfetch_misses"]) // sint
|
||||||
|
v["zhits"] = d["zfetch_hits"] // sint
|
||||||
|
v["zahead"] = (d["zfetch_future"] + d["zfetch_stride"]) // sint
|
||||||
|
v["zpast"] = d["zfetch_past"] // sint
|
||||||
|
v["zmisses"] = d["zfetch_misses"] // sint
|
||||||
|
v["zmax"] = d["zfetch_max_streams"] // sint
|
||||||
|
v["zfuture"] = d["zfetch_future"] // sint
|
||||||
|
v["zstride"] = d["zfetch_stride"] // sint
|
||||||
|
v["zissued"] = d["zfetch_io_issued"] // sint
|
||||||
|
v["zactive"] = d["zfetch_io_active"] // sint
|
||||||
|
|
||||||
if l2exist:
|
if l2exist:
|
||||||
v["l2hits"] = d["l2_hits"] // sint
|
v["l2hits"] = d["l2_hits"] // sint
|
||||||
|
|||||||
+120
-17
@@ -48,6 +48,7 @@
|
|||||||
#include <sys/spa_impl.h>
|
#include <sys/spa_impl.h>
|
||||||
#include <sys/dmu.h>
|
#include <sys/dmu.h>
|
||||||
#include <sys/zap.h>
|
#include <sys/zap.h>
|
||||||
|
#include <sys/zap_impl.h>
|
||||||
#include <sys/fs/zfs.h>
|
#include <sys/fs/zfs.h>
|
||||||
#include <sys/zfs_znode.h>
|
#include <sys/zfs_znode.h>
|
||||||
#include <sys/zfs_sa.h>
|
#include <sys/zfs_sa.h>
|
||||||
@@ -84,6 +85,9 @@
|
|||||||
#include <sys/brt_impl.h>
|
#include <sys/brt_impl.h>
|
||||||
#include <zfs_comutil.h>
|
#include <zfs_comutil.h>
|
||||||
#include <sys/zstd/zstd.h>
|
#include <sys/zstd/zstd.h>
|
||||||
|
#if (__GLIBC__ && !__UCLIBC__)
|
||||||
|
#include <execinfo.h> /* for backtrace() */
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <libnvpair.h>
|
#include <libnvpair.h>
|
||||||
#include <libzutil.h>
|
#include <libzutil.h>
|
||||||
@@ -926,11 +930,41 @@ usage(void)
|
|||||||
static void
|
static void
|
||||||
dump_debug_buffer(void)
|
dump_debug_buffer(void)
|
||||||
{
|
{
|
||||||
if (dump_opt['G']) {
|
ssize_t ret __attribute__((unused));
|
||||||
(void) printf("\n");
|
|
||||||
(void) fflush(stdout);
|
if (!dump_opt['G'])
|
||||||
zfs_dbgmsg_print("zdb");
|
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, "zdb");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define BACKTRACE_SZ 100
|
||||||
|
|
||||||
|
static void sig_handler(int signo)
|
||||||
|
{
|
||||||
|
struct sigaction action;
|
||||||
|
#if (__GLIBC__ && !__UCLIBC__) /* backtrace() is a GNU extension */
|
||||||
|
int nptrs;
|
||||||
|
void *buffer[BACKTRACE_SZ];
|
||||||
|
|
||||||
|
nptrs = backtrace(buffer, BACKTRACE_SZ);
|
||||||
|
backtrace_symbols_fd(buffer, nptrs, STDERR_FILENO);
|
||||||
|
#endif
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1199,16 +1233,33 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size)
|
|||||||
for (zap_cursor_init(&zc, os, object);
|
for (zap_cursor_init(&zc, os, object);
|
||||||
zap_cursor_retrieve(&zc, &attr) == 0;
|
zap_cursor_retrieve(&zc, &attr) == 0;
|
||||||
zap_cursor_advance(&zc)) {
|
zap_cursor_advance(&zc)) {
|
||||||
|
boolean_t key64 =
|
||||||
|
!!(zap_getflags(zc.zc_zap) & ZAP_FLAG_UINT64_KEY);
|
||||||
|
|
||||||
|
if (key64)
|
||||||
|
(void) printf("\t\t0x%010lx = ",
|
||||||
|
*(uint64_t *)attr.za_name);
|
||||||
|
else
|
||||||
(void) printf("\t\t%s = ", attr.za_name);
|
(void) printf("\t\t%s = ", attr.za_name);
|
||||||
|
|
||||||
if (attr.za_num_integers == 0) {
|
if (attr.za_num_integers == 0) {
|
||||||
(void) printf("\n");
|
(void) printf("\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
prop = umem_zalloc(attr.za_num_integers *
|
prop = umem_zalloc(attr.za_num_integers *
|
||||||
attr.za_integer_length, UMEM_NOFAIL);
|
attr.za_integer_length, UMEM_NOFAIL);
|
||||||
|
|
||||||
|
if (key64)
|
||||||
|
(void) zap_lookup_uint64(os, object,
|
||||||
|
(const uint64_t *)attr.za_name, 1,
|
||||||
|
attr.za_integer_length, attr.za_num_integers,
|
||||||
|
prop);
|
||||||
|
else
|
||||||
(void) zap_lookup(os, object, attr.za_name,
|
(void) zap_lookup(os, object, attr.za_name,
|
||||||
attr.za_integer_length, attr.za_num_integers, prop);
|
attr.za_integer_length, attr.za_num_integers,
|
||||||
if (attr.za_integer_length == 1) {
|
prop);
|
||||||
|
|
||||||
|
if (attr.za_integer_length == 1 && !key64) {
|
||||||
if (strcmp(attr.za_name,
|
if (strcmp(attr.za_name,
|
||||||
DSL_CRYPTO_KEY_MASTER_KEY) == 0 ||
|
DSL_CRYPTO_KEY_MASTER_KEY) == 0 ||
|
||||||
strcmp(attr.za_name,
|
strcmp(attr.za_name,
|
||||||
@@ -1227,6 +1278,10 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size)
|
|||||||
} else {
|
} else {
|
||||||
for (i = 0; i < attr.za_num_integers; i++) {
|
for (i = 0; i < attr.za_num_integers; i++) {
|
||||||
switch (attr.za_integer_length) {
|
switch (attr.za_integer_length) {
|
||||||
|
case 1:
|
||||||
|
(void) printf("%u ",
|
||||||
|
((uint8_t *)prop)[i]);
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
(void) printf("%u ",
|
(void) printf("%u ",
|
||||||
((uint16_t *)prop)[i]);
|
((uint16_t *)prop)[i]);
|
||||||
@@ -2140,7 +2195,12 @@ dump_brt(spa_t *spa)
|
|||||||
if (dump_opt['T'] < 3)
|
if (dump_opt['T'] < 3)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* -TTT shows a per-vdev histograms; -TTTT shows all entries */
|
||||||
|
boolean_t do_histo = dump_opt['T'] == 3;
|
||||||
|
|
||||||
char dva[64];
|
char dva[64];
|
||||||
|
|
||||||
|
if (!do_histo)
|
||||||
printf("\n%-16s %-10s\n", "DVA", "REFCNT");
|
printf("\n%-16s %-10s\n", "DVA", "REFCNT");
|
||||||
|
|
||||||
for (uint64_t vdevid = 0; vdevid < brt->brt_nvdevs; vdevid++) {
|
for (uint64_t vdevid = 0; vdevid < brt->brt_nvdevs; vdevid++) {
|
||||||
@@ -2148,19 +2208,38 @@ dump_brt(spa_t *spa)
|
|||||||
if (brtvd == NULL || !brtvd->bv_initiated)
|
if (brtvd == NULL || !brtvd->bv_initiated)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
uint64_t counts[64] = {};
|
||||||
|
|
||||||
zap_cursor_t zc;
|
zap_cursor_t zc;
|
||||||
zap_attribute_t za;
|
zap_attribute_t za;
|
||||||
for (zap_cursor_init(&zc, brt->brt_mos, brtvd->bv_mos_entries);
|
for (zap_cursor_init(&zc, brt->brt_mos, brtvd->bv_mos_entries);
|
||||||
zap_cursor_retrieve(&zc, &za) == 0;
|
zap_cursor_retrieve(&zc, &za) == 0;
|
||||||
zap_cursor_advance(&zc)) {
|
zap_cursor_advance(&zc)) {
|
||||||
uint64_t offset = *(uint64_t *)za.za_name;
|
uint64_t refcnt;
|
||||||
uint64_t refcnt = za.za_first_integer;
|
VERIFY0(zap_lookup_uint64(brt->brt_mos,
|
||||||
|
brtvd->bv_mos_entries,
|
||||||
|
(const uint64_t *)za.za_name, 1,
|
||||||
|
za.za_integer_length, za.za_num_integers, &refcnt));
|
||||||
|
|
||||||
snprintf(dva, sizeof (dva), "%" PRIu64 ":%llx", vdevid,
|
if (do_histo)
|
||||||
(u_longlong_t)offset);
|
counts[highbit64(refcnt)]++;
|
||||||
printf("%-16s %-10llu\n", dva, (u_longlong_t)refcnt);
|
else {
|
||||||
|
uint64_t offset =
|
||||||
|
*(const uint64_t *)za.za_name;
|
||||||
|
|
||||||
|
snprintf(dva, sizeof (dva), "%" PRIu64 ":%llx",
|
||||||
|
vdevid, (u_longlong_t)offset);
|
||||||
|
printf("%-16s %-10llu\n", dva,
|
||||||
|
(u_longlong_t)refcnt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
zap_cursor_fini(&zc);
|
zap_cursor_fini(&zc);
|
||||||
|
|
||||||
|
if (do_histo) {
|
||||||
|
printf("\nBRT: vdev %" PRIu64
|
||||||
|
": DVAs with 2^n refcnts:\n", vdevid);
|
||||||
|
dump_histogram(counts, 64, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4192,6 +4271,10 @@ dump_uberblock(uberblock_t *ub, const char *header, const char *footer)
|
|||||||
(void) printf("\ttimestamp = %llu UTC = %s",
|
(void) printf("\ttimestamp = %llu UTC = %s",
|
||||||
(u_longlong_t)ub->ub_timestamp, ctime(×tamp));
|
(u_longlong_t)ub->ub_timestamp, ctime(×tamp));
|
||||||
|
|
||||||
|
char blkbuf[BP_SPRINTF_LEN];
|
||||||
|
snprintf_blkptr(blkbuf, sizeof (blkbuf), &ub->ub_rootbp);
|
||||||
|
(void) printf("\tbp = %s\n", blkbuf);
|
||||||
|
|
||||||
(void) printf("\tmmp_magic = %016llx\n",
|
(void) printf("\tmmp_magic = %016llx\n",
|
||||||
(u_longlong_t)ub->ub_mmp_magic);
|
(u_longlong_t)ub->ub_mmp_magic);
|
||||||
if (MMP_VALID(ub)) {
|
if (MMP_VALID(ub)) {
|
||||||
@@ -5217,7 +5300,7 @@ dump_label(const char *dev)
|
|||||||
sizeof (cksum_record_t), offsetof(cksum_record_t, link));
|
sizeof (cksum_record_t), offsetof(cksum_record_t, link));
|
||||||
|
|
||||||
psize = statbuf.st_size;
|
psize = statbuf.st_size;
|
||||||
psize = P2ALIGN(psize, (uint64_t)sizeof (vdev_label_t));
|
psize = P2ALIGN_TYPED(psize, sizeof (vdev_label_t), uint64_t);
|
||||||
ashift = SPA_MINBLOCKSHIFT;
|
ashift = SPA_MINBLOCKSHIFT;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -8601,7 +8684,7 @@ zdb_read_block(char *thing, spa_t *spa)
|
|||||||
void *lbuf, *buf;
|
void *lbuf, *buf;
|
||||||
char *s, *p, *dup, *flagstr, *sizes, *tmp = NULL;
|
char *s, *p, *dup, *flagstr, *sizes, *tmp = NULL;
|
||||||
const char *vdev, *errmsg = NULL;
|
const char *vdev, *errmsg = NULL;
|
||||||
int i, error;
|
int i, len, error;
|
||||||
boolean_t borrowed = B_FALSE, found = B_FALSE;
|
boolean_t borrowed = B_FALSE, found = B_FALSE;
|
||||||
|
|
||||||
dup = strdup(thing);
|
dup = strdup(thing);
|
||||||
@@ -8629,7 +8712,8 @@ zdb_read_block(char *thing, spa_t *spa)
|
|||||||
for (s = strtok_r(flagstr, ":", &tmp);
|
for (s = strtok_r(flagstr, ":", &tmp);
|
||||||
s != NULL;
|
s != NULL;
|
||||||
s = strtok_r(NULL, ":", &tmp)) {
|
s = strtok_r(NULL, ":", &tmp)) {
|
||||||
for (i = 0; i < strlen(flagstr); i++) {
|
len = strlen(flagstr);
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
int bit = flagbits[(uchar_t)flagstr[i]];
|
int bit = flagbits[(uchar_t)flagstr[i]];
|
||||||
|
|
||||||
if (bit == 0) {
|
if (bit == 0) {
|
||||||
@@ -8900,13 +8984,14 @@ zdb_embedded_block(char *thing)
|
|||||||
static boolean_t
|
static boolean_t
|
||||||
zdb_numeric(char *str)
|
zdb_numeric(char *str)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0, len;
|
||||||
|
|
||||||
if (strlen(str) == 0)
|
len = strlen(str);
|
||||||
|
if (len == 0)
|
||||||
return (B_FALSE);
|
return (B_FALSE);
|
||||||
if (strncmp(str, "0x", 2) == 0 || strncmp(str, "0X", 2) == 0)
|
if (strncmp(str, "0x", 2) == 0 || strncmp(str, "0X", 2) == 0)
|
||||||
i = 2;
|
i = 2;
|
||||||
for (; i < strlen(str); i++) {
|
for (; i < len; i++) {
|
||||||
if (!isxdigit(str[i]))
|
if (!isxdigit(str[i]))
|
||||||
return (B_FALSE);
|
return (B_FALSE);
|
||||||
}
|
}
|
||||||
@@ -8934,9 +9019,27 @@ main(int argc, char **argv)
|
|||||||
char *spa_config_path_env, *objset_str;
|
char *spa_config_path_env, *objset_str;
|
||||||
boolean_t target_is_spa = B_TRUE, dataset_lookup = B_FALSE;
|
boolean_t target_is_spa = B_TRUE, dataset_lookup = B_FALSE;
|
||||||
nvlist_t *cfg = NULL;
|
nvlist_t *cfg = NULL;
|
||||||
|
struct sigaction action;
|
||||||
|
|
||||||
dprintf_setup(&argc, argv);
|
dprintf_setup(&argc, argv);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 zdb 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, "zdb: cannot catch SIGSEGV: %s\n",
|
||||||
|
strerror(errno));
|
||||||
|
}
|
||||||
|
if (sigaction(SIGABRT, &action, NULL) < 0) {
|
||||||
|
(void) fprintf(stderr, "zdb: cannot catch SIGABRT: %s\n",
|
||||||
|
strerror(errno));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If there is an environment variable SPA_CONFIG_PATH it overrides
|
* If there is an environment variable SPA_CONFIG_PATH it overrides
|
||||||
* default spa_config_path setting. If -U flag is specified it will
|
* default spa_config_path setting. If -U flag is specified it will
|
||||||
|
|||||||
+4
-2
@@ -64,7 +64,8 @@ static void
|
|||||||
zil_prt_rec_create(zilog_t *zilog, int txtype, const void *arg)
|
zil_prt_rec_create(zilog_t *zilog, int txtype, const void *arg)
|
||||||
{
|
{
|
||||||
(void) zilog;
|
(void) zilog;
|
||||||
const lr_create_t *lr = arg;
|
const lr_create_t *lrc = arg;
|
||||||
|
const _lr_create_t *lr = &lrc->lr_create;
|
||||||
time_t crtime = lr->lr_crtime[0];
|
time_t crtime = lr->lr_crtime[0];
|
||||||
char *name, *link;
|
char *name, *link;
|
||||||
lr_attr_t *lrattr;
|
lr_attr_t *lrattr;
|
||||||
@@ -121,7 +122,8 @@ static void
|
|||||||
zil_prt_rec_rename(zilog_t *zilog, int txtype, const void *arg)
|
zil_prt_rec_rename(zilog_t *zilog, int txtype, const void *arg)
|
||||||
{
|
{
|
||||||
(void) zilog, (void) txtype;
|
(void) zilog, (void) txtype;
|
||||||
const lr_rename_t *lr = arg;
|
const lr_rename_t *lrr = arg;
|
||||||
|
const _lr_rename_t *lr = &lrr->lr_rename;
|
||||||
char *snm = (char *)(lr + 1);
|
char *snm = (char *)(lr + 1);
|
||||||
char *tnm = snm + strlen(snm) + 1;
|
char *tnm = snm + strlen(snm) + 1;
|
||||||
|
|
||||||
|
|||||||
+25
-30
@@ -22,6 +22,7 @@
|
|||||||
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2016, Intel Corporation.
|
* Copyright (c) 2016, Intel Corporation.
|
||||||
|
* Copyright (c) 2023, Klara Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -231,28 +232,6 @@ fmd_prop_get_int32(fmd_hdl_t *hdl, const char *name)
|
|||||||
if (strcmp(name, "spare_on_remove") == 0)
|
if (strcmp(name, "spare_on_remove") == 0)
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
if (strcmp(name, "io_N") == 0 || strcmp(name, "checksum_N") == 0)
|
|
||||||
return (10); /* N = 10 events */
|
|
||||||
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t
|
|
||||||
fmd_prop_get_int64(fmd_hdl_t *hdl, const char *name)
|
|
||||||
{
|
|
||||||
(void) hdl;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* These can be looked up in mp->modinfo->fmdi_props
|
|
||||||
* For now we just hard code for phase 2. In the
|
|
||||||
* future, there can be a ZED based override.
|
|
||||||
*/
|
|
||||||
if (strcmp(name, "remove_timeout") == 0)
|
|
||||||
return (15ULL * 1000ULL * 1000ULL * 1000ULL); /* 15 sec */
|
|
||||||
|
|
||||||
if (strcmp(name, "io_T") == 0 || strcmp(name, "checksum_T") == 0)
|
|
||||||
return (1000ULL * 1000ULL * 1000ULL * 600ULL); /* 10 min */
|
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -535,6 +514,19 @@ fmd_serd_exists(fmd_hdl_t *hdl, const char *name)
|
|||||||
return (fmd_serd_eng_lookup(&mp->mod_serds, name) != NULL);
|
return (fmd_serd_eng_lookup(&mp->mod_serds, name) != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
fmd_serd_active(fmd_hdl_t *hdl, const char *name)
|
||||||
|
{
|
||||||
|
fmd_module_t *mp = (fmd_module_t *)hdl;
|
||||||
|
fmd_serd_eng_t *sgp;
|
||||||
|
|
||||||
|
if ((sgp = fmd_serd_eng_lookup(&mp->mod_serds, name)) == NULL) {
|
||||||
|
zed_log_msg(LOG_ERR, "serd engine '%s' does not exist", name);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
return (fmd_serd_eng_fired(sgp) || !fmd_serd_eng_empty(sgp));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fmd_serd_reset(fmd_hdl_t *hdl, const char *name)
|
fmd_serd_reset(fmd_hdl_t *hdl, const char *name)
|
||||||
{
|
{
|
||||||
@@ -543,29 +535,32 @@ fmd_serd_reset(fmd_hdl_t *hdl, const char *name)
|
|||||||
|
|
||||||
if ((sgp = fmd_serd_eng_lookup(&mp->mod_serds, name)) == NULL) {
|
if ((sgp = fmd_serd_eng_lookup(&mp->mod_serds, name)) == NULL) {
|
||||||
zed_log_msg(LOG_ERR, "serd engine '%s' does not exist", name);
|
zed_log_msg(LOG_ERR, "serd engine '%s' does not exist", name);
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
fmd_serd_eng_reset(sgp);
|
fmd_serd_eng_reset(sgp);
|
||||||
|
|
||||||
fmd_hdl_debug(hdl, "serd_reset %s", name);
|
fmd_hdl_debug(hdl, "serd_reset %s", name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
fmd_serd_record(fmd_hdl_t *hdl, const char *name, fmd_event_t *ep)
|
fmd_serd_record(fmd_hdl_t *hdl, const char *name, fmd_event_t *ep)
|
||||||
{
|
{
|
||||||
fmd_module_t *mp = (fmd_module_t *)hdl;
|
fmd_module_t *mp = (fmd_module_t *)hdl;
|
||||||
fmd_serd_eng_t *sgp;
|
fmd_serd_eng_t *sgp;
|
||||||
int err;
|
|
||||||
|
|
||||||
if ((sgp = fmd_serd_eng_lookup(&mp->mod_serds, name)) == NULL) {
|
if ((sgp = fmd_serd_eng_lookup(&mp->mod_serds, name)) == NULL) {
|
||||||
zed_log_msg(LOG_ERR, "failed to add record to SERD engine '%s'",
|
zed_log_msg(LOG_ERR, "failed to add record to SERD engine '%s'",
|
||||||
name);
|
name);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
err = fmd_serd_eng_record(sgp, ep->ev_hrt);
|
return (fmd_serd_eng_record(sgp, ep->ev_hrt));
|
||||||
|
}
|
||||||
|
|
||||||
return (err);
|
void
|
||||||
|
fmd_serd_gc(fmd_hdl_t *hdl)
|
||||||
|
{
|
||||||
|
fmd_module_t *mp = (fmd_module_t *)hdl;
|
||||||
|
|
||||||
|
fmd_serd_hash_apply(&mp->mod_serds, fmd_serd_eng_gc, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FMD Timers */
|
/* FMD Timers */
|
||||||
@@ -579,7 +574,7 @@ _timer_notify(union sigval sv)
|
|||||||
const fmd_hdl_ops_t *ops = mp->mod_info->fmdi_ops;
|
const fmd_hdl_ops_t *ops = mp->mod_info->fmdi_ops;
|
||||||
struct itimerspec its;
|
struct itimerspec its;
|
||||||
|
|
||||||
fmd_hdl_debug(hdl, "timer fired (%p)", ftp->ft_tid);
|
fmd_hdl_debug(hdl, "%s timer fired (%p)", mp->mod_name, ftp->ft_tid);
|
||||||
|
|
||||||
/* disarm the timer */
|
/* disarm the timer */
|
||||||
memset(&its, 0, sizeof (struct itimerspec));
|
memset(&its, 0, sizeof (struct itimerspec));
|
||||||
|
|||||||
@@ -151,7 +151,6 @@ extern void fmd_hdl_vdebug(fmd_hdl_t *, const char *, va_list);
|
|||||||
extern void fmd_hdl_debug(fmd_hdl_t *, const char *, ...);
|
extern void fmd_hdl_debug(fmd_hdl_t *, const char *, ...);
|
||||||
|
|
||||||
extern int32_t fmd_prop_get_int32(fmd_hdl_t *, const char *);
|
extern int32_t fmd_prop_get_int32(fmd_hdl_t *, const char *);
|
||||||
extern int64_t fmd_prop_get_int64(fmd_hdl_t *, const char *);
|
|
||||||
|
|
||||||
#define FMD_STAT_NOALLOC 0x0 /* fmd should use caller's memory */
|
#define FMD_STAT_NOALLOC 0x0 /* fmd should use caller's memory */
|
||||||
#define FMD_STAT_ALLOC 0x1 /* fmd should allocate stats memory */
|
#define FMD_STAT_ALLOC 0x1 /* fmd should allocate stats memory */
|
||||||
@@ -195,10 +194,12 @@ extern size_t fmd_buf_size(fmd_hdl_t *, fmd_case_t *, const char *);
|
|||||||
extern void fmd_serd_create(fmd_hdl_t *, const char *, uint_t, hrtime_t);
|
extern void fmd_serd_create(fmd_hdl_t *, const char *, uint_t, hrtime_t);
|
||||||
extern void fmd_serd_destroy(fmd_hdl_t *, const char *);
|
extern void fmd_serd_destroy(fmd_hdl_t *, const char *);
|
||||||
extern int fmd_serd_exists(fmd_hdl_t *, const char *);
|
extern int fmd_serd_exists(fmd_hdl_t *, const char *);
|
||||||
|
extern int fmd_serd_active(fmd_hdl_t *, const char *);
|
||||||
extern void fmd_serd_reset(fmd_hdl_t *, const char *);
|
extern void fmd_serd_reset(fmd_hdl_t *, const char *);
|
||||||
extern int fmd_serd_record(fmd_hdl_t *, const char *, fmd_event_t *);
|
extern int fmd_serd_record(fmd_hdl_t *, const char *, fmd_event_t *);
|
||||||
extern int fmd_serd_fired(fmd_hdl_t *, const char *);
|
extern int fmd_serd_fired(fmd_hdl_t *, const char *);
|
||||||
extern int fmd_serd_empty(fmd_hdl_t *, const char *);
|
extern int fmd_serd_empty(fmd_hdl_t *, const char *);
|
||||||
|
extern void fmd_serd_gc(fmd_hdl_t *);
|
||||||
|
|
||||||
extern id_t fmd_timer_install(fmd_hdl_t *, void *, fmd_event_t *, hrtime_t);
|
extern id_t fmd_timer_install(fmd_hdl_t *, void *, fmd_event_t *, hrtime_t);
|
||||||
extern void fmd_timer_remove(fmd_hdl_t *, id_t);
|
extern void fmd_timer_remove(fmd_hdl_t *, id_t);
|
||||||
|
|||||||
@@ -310,8 +310,9 @@ fmd_serd_eng_reset(fmd_serd_eng_t *sgp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fmd_serd_eng_gc(fmd_serd_eng_t *sgp)
|
fmd_serd_eng_gc(fmd_serd_eng_t *sgp, void *arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
fmd_serd_elem_t *sep, *nep;
|
fmd_serd_elem_t *sep, *nep;
|
||||||
hrtime_t hrt;
|
hrtime_t hrt;
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ extern int fmd_serd_eng_fired(fmd_serd_eng_t *);
|
|||||||
extern int fmd_serd_eng_empty(fmd_serd_eng_t *);
|
extern int fmd_serd_eng_empty(fmd_serd_eng_t *);
|
||||||
|
|
||||||
extern void fmd_serd_eng_reset(fmd_serd_eng_t *);
|
extern void fmd_serd_eng_reset(fmd_serd_eng_t *);
|
||||||
extern void fmd_serd_eng_gc(fmd_serd_eng_t *);
|
extern void fmd_serd_eng_gc(fmd_serd_eng_t *, void *);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
+116
-25
@@ -23,6 +23,7 @@
|
|||||||
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
|
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2016, Intel Corporation.
|
* Copyright (c) 2016, Intel Corporation.
|
||||||
|
* Copyright (c) 2023, Klara Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
@@ -47,11 +48,16 @@
|
|||||||
#define DEFAULT_CHECKSUM_T 600 /* seconds */
|
#define DEFAULT_CHECKSUM_T 600 /* seconds */
|
||||||
#define DEFAULT_IO_N 10 /* events */
|
#define DEFAULT_IO_N 10 /* events */
|
||||||
#define DEFAULT_IO_T 600 /* seconds */
|
#define DEFAULT_IO_T 600 /* seconds */
|
||||||
|
#define DEFAULT_SLOW_IO_N 10 /* events */
|
||||||
|
#define DEFAULT_SLOW_IO_T 30 /* seconds */
|
||||||
|
|
||||||
|
#define CASE_GC_TIMEOUT_SECS 43200 /* 12 hours */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Our serd engines are named 'zfs_<pool_guid>_<vdev_guid>_{checksum,io}'. This
|
* Our serd engines are named in the following format:
|
||||||
* #define reserves enough space for two 64-bit hex values plus the length of
|
* 'zfs_<pool_guid>_<vdev_guid>_{checksum,io,slow_io}'
|
||||||
* the longest string.
|
* This #define reserves enough space for two 64-bit hex values plus the
|
||||||
|
* length of the longest string.
|
||||||
*/
|
*/
|
||||||
#define MAX_SERDLEN (16 * 2 + sizeof ("zfs___checksum"))
|
#define MAX_SERDLEN (16 * 2 + sizeof ("zfs___checksum"))
|
||||||
|
|
||||||
@@ -68,6 +74,7 @@ typedef struct zfs_case_data {
|
|||||||
int zc_pool_state;
|
int zc_pool_state;
|
||||||
char zc_serd_checksum[MAX_SERDLEN];
|
char zc_serd_checksum[MAX_SERDLEN];
|
||||||
char zc_serd_io[MAX_SERDLEN];
|
char zc_serd_io[MAX_SERDLEN];
|
||||||
|
char zc_serd_slow_io[MAX_SERDLEN];
|
||||||
int zc_has_remove_timer;
|
int zc_has_remove_timer;
|
||||||
} zfs_case_data_t;
|
} zfs_case_data_t;
|
||||||
|
|
||||||
@@ -114,7 +121,8 @@ zfs_de_stats_t zfs_stats = {
|
|||||||
{ "resource_drops", FMD_TYPE_UINT64, "resource related ereports" }
|
{ "resource_drops", FMD_TYPE_UINT64, "resource related ereports" }
|
||||||
};
|
};
|
||||||
|
|
||||||
static hrtime_t zfs_remove_timeout;
|
/* wait 15 seconds after a removal */
|
||||||
|
static hrtime_t zfs_remove_timeout = SEC2NSEC(15);
|
||||||
|
|
||||||
uu_list_pool_t *zfs_case_pool;
|
uu_list_pool_t *zfs_case_pool;
|
||||||
uu_list_t *zfs_cases;
|
uu_list_t *zfs_cases;
|
||||||
@@ -124,6 +132,8 @@ uu_list_t *zfs_cases;
|
|||||||
#define ZFS_MAKE_EREPORT(type) \
|
#define ZFS_MAKE_EREPORT(type) \
|
||||||
FM_EREPORT_CLASS "." ZFS_ERROR_CLASS "." type
|
FM_EREPORT_CLASS "." ZFS_ERROR_CLASS "." type
|
||||||
|
|
||||||
|
static void zfs_purge_cases(fmd_hdl_t *hdl);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Write out the persistent representation of an active case.
|
* Write out the persistent representation of an active case.
|
||||||
*/
|
*/
|
||||||
@@ -170,6 +180,42 @@ zfs_case_unserialize(fmd_hdl_t *hdl, fmd_case_t *cp)
|
|||||||
return (zcp);
|
return (zcp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* count other unique slow-io cases in a pool
|
||||||
|
*/
|
||||||
|
static uint_t
|
||||||
|
zfs_other_slow_cases(fmd_hdl_t *hdl, const zfs_case_data_t *zfs_case)
|
||||||
|
{
|
||||||
|
zfs_case_t *zcp;
|
||||||
|
uint_t cases = 0;
|
||||||
|
static hrtime_t next_check = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note that plumbing in some external GC would require adding locking,
|
||||||
|
* since most of this module code is not thread safe and assumes there
|
||||||
|
* is only one thread running against the module. So we perform GC here
|
||||||
|
* inline periodically so that future delay induced faults will be
|
||||||
|
* possible once the issue causing multiple vdev delays is resolved.
|
||||||
|
*/
|
||||||
|
if (gethrestime_sec() > next_check) {
|
||||||
|
/* Periodically purge old SERD entries and stale cases */
|
||||||
|
fmd_serd_gc(hdl);
|
||||||
|
zfs_purge_cases(hdl);
|
||||||
|
next_check = gethrestime_sec() + CASE_GC_TIMEOUT_SECS;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (zcp = uu_list_first(zfs_cases); zcp != NULL;
|
||||||
|
zcp = uu_list_next(zfs_cases, zcp)) {
|
||||||
|
if (zcp->zc_data.zc_pool_guid == zfs_case->zc_pool_guid &&
|
||||||
|
zcp->zc_data.zc_vdev_guid != zfs_case->zc_vdev_guid &&
|
||||||
|
zcp->zc_data.zc_serd_slow_io[0] != '\0' &&
|
||||||
|
fmd_serd_active(hdl, zcp->zc_data.zc_serd_slow_io)) {
|
||||||
|
cases++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (cases);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Iterate over any active cases. If any cases are associated with a pool or
|
* Iterate over any active cases. If any cases are associated with a pool or
|
||||||
* vdev which is no longer present on the system, close the associated case.
|
* vdev which is no longer present on the system, close the associated case.
|
||||||
@@ -376,6 +422,14 @@ zfs_serd_name(char *buf, uint64_t pool_guid, uint64_t vdev_guid,
|
|||||||
(long long unsigned int)vdev_guid, type);
|
(long long unsigned int)vdev_guid, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
zfs_case_retire(fmd_hdl_t *hdl, zfs_case_t *zcp)
|
||||||
|
{
|
||||||
|
fmd_hdl_debug(hdl, "retiring case");
|
||||||
|
|
||||||
|
fmd_case_close(hdl, zcp->zc_case);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Solve a given ZFS case. This first checks to make sure the diagnosis is
|
* Solve a given ZFS case. This first checks to make sure the diagnosis is
|
||||||
* still valid, as well as cleaning up any pending timer associated with the
|
* still valid, as well as cleaning up any pending timer associated with the
|
||||||
@@ -632,9 +686,7 @@ zfs_fm_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class)
|
|||||||
if (strcmp(class,
|
if (strcmp(class,
|
||||||
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_DATA)) == 0 ||
|
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_DATA)) == 0 ||
|
||||||
strcmp(class,
|
strcmp(class,
|
||||||
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_CONFIG_CACHE_WRITE)) == 0 ||
|
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_CONFIG_CACHE_WRITE)) == 0) {
|
||||||
strcmp(class,
|
|
||||||
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_DELAY)) == 0) {
|
|
||||||
zfs_stats.resource_drops.fmds_value.ui64++;
|
zfs_stats.resource_drops.fmds_value.ui64++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -702,6 +754,9 @@ zfs_fm_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class)
|
|||||||
if (zcp->zc_data.zc_serd_checksum[0] != '\0')
|
if (zcp->zc_data.zc_serd_checksum[0] != '\0')
|
||||||
fmd_serd_reset(hdl,
|
fmd_serd_reset(hdl,
|
||||||
zcp->zc_data.zc_serd_checksum);
|
zcp->zc_data.zc_serd_checksum);
|
||||||
|
if (zcp->zc_data.zc_serd_slow_io[0] != '\0')
|
||||||
|
fmd_serd_reset(hdl,
|
||||||
|
zcp->zc_data.zc_serd_slow_io);
|
||||||
} else if (fmd_nvl_class_match(hdl, nvl,
|
} else if (fmd_nvl_class_match(hdl, nvl,
|
||||||
ZFS_MAKE_RSRC(FM_RESOURCE_STATECHANGE))) {
|
ZFS_MAKE_RSRC(FM_RESOURCE_STATECHANGE))) {
|
||||||
uint64_t state = 0;
|
uint64_t state = 0;
|
||||||
@@ -730,6 +785,10 @@ zfs_fm_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class)
|
|||||||
if (fmd_case_solved(hdl, zcp->zc_case))
|
if (fmd_case_solved(hdl, zcp->zc_case))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (vdev_guid)
|
||||||
|
fmd_hdl_debug(hdl, "error event '%s', vdev %llu", class,
|
||||||
|
vdev_guid);
|
||||||
|
else
|
||||||
fmd_hdl_debug(hdl, "error event '%s'", class);
|
fmd_hdl_debug(hdl, "error event '%s'", class);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -779,6 +838,8 @@ zfs_fm_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class)
|
|||||||
fmd_nvl_class_match(hdl, nvl,
|
fmd_nvl_class_match(hdl, nvl,
|
||||||
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_IO_FAILURE)) ||
|
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_IO_FAILURE)) ||
|
||||||
fmd_nvl_class_match(hdl, nvl,
|
fmd_nvl_class_match(hdl, nvl,
|
||||||
|
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_DELAY)) ||
|
||||||
|
fmd_nvl_class_match(hdl, nvl,
|
||||||
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_PROBE_FAILURE))) {
|
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_PROBE_FAILURE))) {
|
||||||
const char *failmode = NULL;
|
const char *failmode = NULL;
|
||||||
boolean_t checkremove = B_FALSE;
|
boolean_t checkremove = B_FALSE;
|
||||||
@@ -814,6 +875,51 @@ zfs_fm_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class)
|
|||||||
}
|
}
|
||||||
if (fmd_serd_record(hdl, zcp->zc_data.zc_serd_io, ep))
|
if (fmd_serd_record(hdl, zcp->zc_data.zc_serd_io, ep))
|
||||||
checkremove = B_TRUE;
|
checkremove = B_TRUE;
|
||||||
|
} else if (fmd_nvl_class_match(hdl, nvl,
|
||||||
|
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_DELAY))) {
|
||||||
|
uint64_t slow_io_n, slow_io_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create a slow io SERD engine when the VDEV has the
|
||||||
|
* 'vdev_slow_io_n' and 'vdev_slow_io_n' properties.
|
||||||
|
*/
|
||||||
|
if (zcp->zc_data.zc_serd_slow_io[0] == '\0' &&
|
||||||
|
nvlist_lookup_uint64(nvl,
|
||||||
|
FM_EREPORT_PAYLOAD_ZFS_VDEV_SLOW_IO_N,
|
||||||
|
&slow_io_n) == 0 &&
|
||||||
|
nvlist_lookup_uint64(nvl,
|
||||||
|
FM_EREPORT_PAYLOAD_ZFS_VDEV_SLOW_IO_T,
|
||||||
|
&slow_io_t) == 0) {
|
||||||
|
zfs_serd_name(zcp->zc_data.zc_serd_slow_io,
|
||||||
|
pool_guid, vdev_guid, "slow_io");
|
||||||
|
fmd_serd_create(hdl,
|
||||||
|
zcp->zc_data.zc_serd_slow_io,
|
||||||
|
slow_io_n,
|
||||||
|
SEC2NSEC(slow_io_t));
|
||||||
|
zfs_case_serialize(zcp);
|
||||||
|
}
|
||||||
|
/* Pass event to SERD engine and see if this triggers */
|
||||||
|
if (zcp->zc_data.zc_serd_slow_io[0] != '\0' &&
|
||||||
|
fmd_serd_record(hdl, zcp->zc_data.zc_serd_slow_io,
|
||||||
|
ep)) {
|
||||||
|
/*
|
||||||
|
* Ignore a slow io diagnosis when other
|
||||||
|
* VDEVs in the pool show signs of being slow.
|
||||||
|
*/
|
||||||
|
if (zfs_other_slow_cases(hdl, &zcp->zc_data)) {
|
||||||
|
zfs_case_retire(hdl, zcp);
|
||||||
|
fmd_hdl_debug(hdl, "pool %llu has "
|
||||||
|
"multiple slow io cases -- skip "
|
||||||
|
"degrading vdev %llu",
|
||||||
|
(u_longlong_t)
|
||||||
|
zcp->zc_data.zc_pool_guid,
|
||||||
|
(u_longlong_t)
|
||||||
|
zcp->zc_data.zc_vdev_guid);
|
||||||
|
} else {
|
||||||
|
zfs_case_solve(hdl, zcp,
|
||||||
|
"fault.fs.zfs.vdev.slow_io");
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (fmd_nvl_class_match(hdl, nvl,
|
} else if (fmd_nvl_class_match(hdl, nvl,
|
||||||
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_CHECKSUM))) {
|
ZFS_MAKE_EREPORT(FM_EREPORT_ZFS_CHECKSUM))) {
|
||||||
/*
|
/*
|
||||||
@@ -924,6 +1030,8 @@ zfs_fm_close(fmd_hdl_t *hdl, fmd_case_t *cs)
|
|||||||
fmd_serd_destroy(hdl, zcp->zc_data.zc_serd_checksum);
|
fmd_serd_destroy(hdl, zcp->zc_data.zc_serd_checksum);
|
||||||
if (zcp->zc_data.zc_serd_io[0] != '\0')
|
if (zcp->zc_data.zc_serd_io[0] != '\0')
|
||||||
fmd_serd_destroy(hdl, zcp->zc_data.zc_serd_io);
|
fmd_serd_destroy(hdl, zcp->zc_data.zc_serd_io);
|
||||||
|
if (zcp->zc_data.zc_serd_slow_io[0] != '\0')
|
||||||
|
fmd_serd_destroy(hdl, zcp->zc_data.zc_serd_slow_io);
|
||||||
if (zcp->zc_data.zc_has_remove_timer)
|
if (zcp->zc_data.zc_has_remove_timer)
|
||||||
fmd_timer_remove(hdl, zcp->zc_remove_timer);
|
fmd_timer_remove(hdl, zcp->zc_remove_timer);
|
||||||
|
|
||||||
@@ -932,30 +1040,15 @@ zfs_fm_close(fmd_hdl_t *hdl, fmd_case_t *cs)
|
|||||||
fmd_hdl_free(hdl, zcp, sizeof (zfs_case_t));
|
fmd_hdl_free(hdl, zcp, sizeof (zfs_case_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* We use the fmd gc entry point to look for old cases that no longer apply.
|
|
||||||
* This allows us to keep our set of case data small in a long running system.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
zfs_fm_gc(fmd_hdl_t *hdl)
|
|
||||||
{
|
|
||||||
zfs_purge_cases(hdl);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const fmd_hdl_ops_t fmd_ops = {
|
static const fmd_hdl_ops_t fmd_ops = {
|
||||||
zfs_fm_recv, /* fmdo_recv */
|
zfs_fm_recv, /* fmdo_recv */
|
||||||
zfs_fm_timeout, /* fmdo_timeout */
|
zfs_fm_timeout, /* fmdo_timeout */
|
||||||
zfs_fm_close, /* fmdo_close */
|
zfs_fm_close, /* fmdo_close */
|
||||||
NULL, /* fmdo_stats */
|
NULL, /* fmdo_stats */
|
||||||
zfs_fm_gc, /* fmdo_gc */
|
NULL, /* fmdo_gc */
|
||||||
};
|
};
|
||||||
|
|
||||||
static const fmd_prop_t fmd_props[] = {
|
static const fmd_prop_t fmd_props[] = {
|
||||||
{ "checksum_N", FMD_TYPE_UINT32, "10" },
|
|
||||||
{ "checksum_T", FMD_TYPE_TIME, "10min" },
|
|
||||||
{ "io_N", FMD_TYPE_UINT32, "10" },
|
|
||||||
{ "io_T", FMD_TYPE_TIME, "10min" },
|
|
||||||
{ "remove_timeout", FMD_TYPE_TIME, "15sec" },
|
|
||||||
{ NULL, 0, NULL }
|
{ NULL, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -996,8 +1089,6 @@ _zfs_diagnosis_init(fmd_hdl_t *hdl)
|
|||||||
|
|
||||||
(void) fmd_stat_create(hdl, FMD_STAT_NOALLOC, sizeof (zfs_stats) /
|
(void) fmd_stat_create(hdl, FMD_STAT_NOALLOC, sizeof (zfs_stats) /
|
||||||
sizeof (fmd_stat_t), (fmd_stat_t *)&zfs_stats);
|
sizeof (fmd_stat_t), (fmd_stat_t *)&zfs_stats);
|
||||||
|
|
||||||
zfs_remove_timeout = fmd_prop_get_int64(hdl, "remove_timeout");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -523,6 +523,9 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
|
|||||||
} else if (fmd_nvl_class_match(hdl, fault,
|
} else if (fmd_nvl_class_match(hdl, fault,
|
||||||
"fault.fs.zfs.vdev.checksum")) {
|
"fault.fs.zfs.vdev.checksum")) {
|
||||||
degrade_device = B_TRUE;
|
degrade_device = B_TRUE;
|
||||||
|
} else if (fmd_nvl_class_match(hdl, fault,
|
||||||
|
"fault.fs.zfs.vdev.slow_io")) {
|
||||||
|
degrade_device = B_TRUE;
|
||||||
} else if (fmd_nvl_class_match(hdl, fault,
|
} else if (fmd_nvl_class_match(hdl, fault,
|
||||||
"fault.fs.zfs.device")) {
|
"fault.fs.zfs.device")) {
|
||||||
fault_device = B_FALSE;
|
fault_device = B_FALSE;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ dist_zedexec_SCRIPTS = \
|
|||||||
%D%/all-debug.sh \
|
%D%/all-debug.sh \
|
||||||
%D%/all-syslog.sh \
|
%D%/all-syslog.sh \
|
||||||
%D%/data-notify.sh \
|
%D%/data-notify.sh \
|
||||||
|
%D%/deadman-slot_off.sh \
|
||||||
%D%/generic-notify.sh \
|
%D%/generic-notify.sh \
|
||||||
%D%/pool_import-led.sh \
|
%D%/pool_import-led.sh \
|
||||||
%D%/resilver_finish-notify.sh \
|
%D%/resilver_finish-notify.sh \
|
||||||
@@ -29,6 +30,7 @@ SUBSTFILES += $(nodist_zedexec_SCRIPTS)
|
|||||||
zedconfdefaults = \
|
zedconfdefaults = \
|
||||||
all-syslog.sh \
|
all-syslog.sh \
|
||||||
data-notify.sh \
|
data-notify.sh \
|
||||||
|
deadman-slot_off.sh \
|
||||||
history_event-zfs-list-cacher.sh \
|
history_event-zfs-list-cacher.sh \
|
||||||
pool_import-led.sh \
|
pool_import-led.sh \
|
||||||
resilver_finish-notify.sh \
|
resilver_finish-notify.sh \
|
||||||
|
|||||||
Executable
+71
@@ -0,0 +1,71 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# shellcheck disable=SC3014,SC2154,SC2086,SC2034
|
||||||
|
#
|
||||||
|
# Turn off disk's enclosure slot if an I/O is hung triggering the deadman.
|
||||||
|
#
|
||||||
|
# It's possible for outstanding I/O to a misbehaving SCSI disk to neither
|
||||||
|
# promptly complete or return an error. This can occur due to retry and
|
||||||
|
# recovery actions taken by the SCSI layer, driver, or disk. When it occurs
|
||||||
|
# the pool will be unresponsive even though there may be sufficient redundancy
|
||||||
|
# configured to proceeded without this single disk.
|
||||||
|
#
|
||||||
|
# When a hung I/O is detected by the kmods it will be posted as a deadman
|
||||||
|
# event. By default an I/O is considered to be hung after 5 minutes. This
|
||||||
|
# value can be changed with the zfs_deadman_ziotime_ms module parameter.
|
||||||
|
# If ZED_POWER_OFF_ENCLOSURE_SLOT_ON_DEADMAN is set the disk's enclosure
|
||||||
|
# slot will be powered off causing the outstanding I/O to fail. The ZED
|
||||||
|
# will then handle this like a normal disk failure and FAULT the vdev.
|
||||||
|
#
|
||||||
|
# We assume the user will be responsible for turning the slot back on
|
||||||
|
# after replacing the disk.
|
||||||
|
#
|
||||||
|
# Note that this script requires that your enclosure be supported by the
|
||||||
|
# Linux SCSI Enclosure services (SES) driver. The script will do nothing
|
||||||
|
# if you have no enclosure, or if your enclosure isn't supported.
|
||||||
|
#
|
||||||
|
# Exit codes:
|
||||||
|
# 0: slot successfully powered off
|
||||||
|
# 1: enclosure not available
|
||||||
|
# 2: ZED_POWER_OFF_ENCLOSURE_SLOT_ON_DEADMAN disabled
|
||||||
|
# 3: System not configured to wait on deadman
|
||||||
|
# 4: The enclosure sysfs path passed from ZFS does not exist
|
||||||
|
# 5: Enclosure slot didn't actually turn off after we told it to
|
||||||
|
|
||||||
|
[ -f "${ZED_ZEDLET_DIR}/zed.rc" ] && . "${ZED_ZEDLET_DIR}/zed.rc"
|
||||||
|
. "${ZED_ZEDLET_DIR}/zed-functions.sh"
|
||||||
|
|
||||||
|
if [ ! -d /sys/class/enclosure ] ; then
|
||||||
|
# No JBOD enclosure or NVMe slots
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${ZED_POWER_OFF_ENCLOSURE_SLOT_ON_DEADMAN}" != "1" ] ; then
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$ZEVENT_POOL_FAILMODE" != "wait" ] ; then
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$ZEVENT_VDEV_ENC_SYSFS_PATH/power_status" ] ; then
|
||||||
|
exit 4
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Turn off the slot and wait for sysfs to report that the slot is off.
|
||||||
|
# It can take ~400ms on some enclosures and multiple retries may be needed.
|
||||||
|
for i in $(seq 1 20) ; do
|
||||||
|
echo "off" | tee "$ZEVENT_VDEV_ENC_SYSFS_PATH/power_status"
|
||||||
|
|
||||||
|
for j in $(seq 1 5) ; do
|
||||||
|
if [ "$(cat $ZEVENT_VDEV_ENC_SYSFS_PATH/power_status)" == "off" ] ; then
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$(cat $ZEVENT_VDEV_ENC_SYSFS_PATH/power_status)" != "off" ] ; then
|
||||||
|
exit 5
|
||||||
|
fi
|
||||||
|
|
||||||
|
zed_log_msg "powered down slot $ZEVENT_VDEV_ENC_SYSFS_PATH for $ZEVENT_VDEV_PATH"
|
||||||
@@ -148,6 +148,13 @@ ZED_SYSLOG_SUBCLASS_EXCLUDE="history_event"
|
|||||||
# supports slot power control via sysfs.
|
# supports slot power control via sysfs.
|
||||||
#ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT=1
|
#ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT=1
|
||||||
|
|
||||||
|
##
|
||||||
|
# Power off the drive's slot in the enclosure if there is a hung I/O which
|
||||||
|
# exceeds the deadman timeout. This can help prevent a single misbehaving
|
||||||
|
# drive from rendering a redundant pool unavailable. This assumes your drive
|
||||||
|
# enclosure fully supports slot power control via sysfs.
|
||||||
|
#ZED_POWER_OFF_ENCLOSURE_SLOT_ON_DEADMAN=1
|
||||||
|
|
||||||
##
|
##
|
||||||
# Ntfy topic
|
# Ntfy topic
|
||||||
# This defines which topic will receive the ntfy notification.
|
# This defines which topic will receive the ntfy notification.
|
||||||
|
|||||||
@@ -139,7 +139,8 @@ dev_event_nvlist(struct udev_device *dev)
|
|||||||
* is /dev/sda.
|
* is /dev/sda.
|
||||||
*/
|
*/
|
||||||
struct udev_device *parent_dev = udev_device_get_parent(dev);
|
struct udev_device *parent_dev = udev_device_get_parent(dev);
|
||||||
if ((value = udev_device_get_sysattr_value(parent_dev, "size"))
|
if (parent_dev != NULL &&
|
||||||
|
(value = udev_device_get_sysattr_value(parent_dev, "size"))
|
||||||
!= NULL) {
|
!= NULL) {
|
||||||
uint64_t numval = DEV_BSIZE;
|
uint64_t numval = DEV_BSIZE;
|
||||||
|
|
||||||
|
|||||||
+61
-14
@@ -309,7 +309,8 @@ get_usage(zfs_help_t idx)
|
|||||||
"[filesystem|volume|snapshot] ...\n"));
|
"[filesystem|volume|snapshot] ...\n"));
|
||||||
case HELP_MOUNT:
|
case HELP_MOUNT:
|
||||||
return (gettext("\tmount\n"
|
return (gettext("\tmount\n"
|
||||||
"\tmount [-flvO] [-o opts] <-a | filesystem>\n"));
|
"\tmount [-flvO] [-o opts] <-a|-R filesystem|"
|
||||||
|
"filesystem>\n"));
|
||||||
case HELP_PROMOTE:
|
case HELP_PROMOTE:
|
||||||
return (gettext("\tpromote <clone-filesystem>\n"));
|
return (gettext("\tpromote <clone-filesystem>\n"));
|
||||||
case HELP_RECEIVE:
|
case HELP_RECEIVE:
|
||||||
@@ -6750,6 +6751,8 @@ zfs_do_holds(int argc, char **argv)
|
|||||||
#define MOUNT_TIME 1 /* seconds */
|
#define MOUNT_TIME 1 /* seconds */
|
||||||
|
|
||||||
typedef struct get_all_state {
|
typedef struct get_all_state {
|
||||||
|
char **ga_datasets;
|
||||||
|
int ga_count;
|
||||||
boolean_t ga_verbose;
|
boolean_t ga_verbose;
|
||||||
get_all_cb_t *ga_cbp;
|
get_all_cb_t *ga_cbp;
|
||||||
} get_all_state_t;
|
} get_all_state_t;
|
||||||
@@ -6796,19 +6799,35 @@ get_one_dataset(zfs_handle_t *zhp, void *data)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
get_all_datasets(get_all_cb_t *cbp, boolean_t verbose)
|
get_recursive_datasets(zfs_handle_t *zhp, void *data)
|
||||||
{
|
{
|
||||||
get_all_state_t state = {
|
get_all_state_t *state = data;
|
||||||
.ga_verbose = verbose,
|
int len = strlen(zfs_get_name(zhp));
|
||||||
.ga_cbp = cbp
|
for (int i = 0; i < state->ga_count; ++i) {
|
||||||
};
|
if (strcmp(state->ga_datasets[i], zfs_get_name(zhp)) == 0)
|
||||||
|
return (get_one_dataset(zhp, data));
|
||||||
|
else if ((strncmp(state->ga_datasets[i], zfs_get_name(zhp),
|
||||||
|
len) == 0) && state->ga_datasets[i][len] == '/') {
|
||||||
|
(void) zfs_iter_filesystems_v2(zhp, 0,
|
||||||
|
get_recursive_datasets, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
zfs_close(zhp);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
if (verbose)
|
static void
|
||||||
|
get_all_datasets(get_all_state_t *state)
|
||||||
|
{
|
||||||
|
if (state->ga_verbose)
|
||||||
set_progress_header(gettext("Reading ZFS config"));
|
set_progress_header(gettext("Reading ZFS config"));
|
||||||
(void) zfs_iter_root(g_zfs, get_one_dataset, &state);
|
if (state->ga_datasets == NULL)
|
||||||
|
(void) zfs_iter_root(g_zfs, get_one_dataset, state);
|
||||||
|
else
|
||||||
|
(void) zfs_iter_root(g_zfs, get_recursive_datasets, state);
|
||||||
|
|
||||||
if (verbose)
|
if (state->ga_verbose)
|
||||||
finish_progress(gettext("done."));
|
finish_progress(gettext("done."));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7154,18 +7173,22 @@ static int
|
|||||||
share_mount(int op, int argc, char **argv)
|
share_mount(int op, int argc, char **argv)
|
||||||
{
|
{
|
||||||
int do_all = 0;
|
int do_all = 0;
|
||||||
|
int recursive = 0;
|
||||||
boolean_t verbose = B_FALSE;
|
boolean_t verbose = B_FALSE;
|
||||||
int c, ret = 0;
|
int c, ret = 0;
|
||||||
char *options = NULL;
|
char *options = NULL;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
|
||||||
/* check options */
|
/* check options */
|
||||||
while ((c = getopt(argc, argv, op == OP_MOUNT ? ":alvo:Of" : "al"))
|
while ((c = getopt(argc, argv, op == OP_MOUNT ? ":aRlvo:Of" : "al"))
|
||||||
!= -1) {
|
!= -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'a':
|
case 'a':
|
||||||
do_all = 1;
|
do_all = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'R':
|
||||||
|
recursive = 1;
|
||||||
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
verbose = B_TRUE;
|
verbose = B_TRUE;
|
||||||
break;
|
break;
|
||||||
@@ -7207,7 +7230,7 @@ share_mount(int op, int argc, char **argv)
|
|||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
/* check number of arguments */
|
/* check number of arguments */
|
||||||
if (do_all) {
|
if (do_all || recursive) {
|
||||||
enum sa_protocol protocol = SA_NO_PROTOCOL;
|
enum sa_protocol protocol = SA_NO_PROTOCOL;
|
||||||
|
|
||||||
if (op == OP_SHARE && argc > 0) {
|
if (op == OP_SHARE && argc > 0) {
|
||||||
@@ -7216,14 +7239,38 @@ share_mount(int op, int argc, char **argv)
|
|||||||
argv++;
|
argv++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc != 0) {
|
if (argc != 0 && do_all) {
|
||||||
(void) fprintf(stderr, gettext("too many arguments\n"));
|
(void) fprintf(stderr, gettext("too many arguments\n"));
|
||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argc == 0 && recursive) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
gettext("no dataset provided\n"));
|
||||||
|
usage(B_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
start_progress_timer();
|
start_progress_timer();
|
||||||
get_all_cb_t cb = { 0 };
|
get_all_cb_t cb = { 0 };
|
||||||
get_all_datasets(&cb, verbose);
|
get_all_state_t state = { 0 };
|
||||||
|
if (argc == 0) {
|
||||||
|
state.ga_datasets = NULL;
|
||||||
|
state.ga_count = -1;
|
||||||
|
} else {
|
||||||
|
zfs_handle_t *zhp;
|
||||||
|
for (int i = 0; i < argc; i++) {
|
||||||
|
zhp = zfs_open(g_zfs, argv[i],
|
||||||
|
ZFS_TYPE_FILESYSTEM);
|
||||||
|
if (zhp == NULL)
|
||||||
|
usage(B_FALSE);
|
||||||
|
zfs_close(zhp);
|
||||||
|
}
|
||||||
|
state.ga_datasets = argv;
|
||||||
|
state.ga_count = argc;
|
||||||
|
}
|
||||||
|
state.ga_verbose = verbose;
|
||||||
|
state.ga_cbp = &cb;
|
||||||
|
get_all_datasets(&state);
|
||||||
|
|
||||||
if (cb.cb_used == 0) {
|
if (cb.cb_used == 0) {
|
||||||
free(options);
|
free(options);
|
||||||
|
|||||||
@@ -1083,6 +1083,22 @@ main(int argc, char **argv)
|
|||||||
libzfs_fini(g_zfs);
|
libzfs_fini(g_zfs);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (record.zi_nlanes) {
|
||||||
|
switch (io_type) {
|
||||||
|
case ZIO_TYPE_READ:
|
||||||
|
case ZIO_TYPE_WRITE:
|
||||||
|
case ZIO_TYPES:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
(void) fprintf(stderr, "I/O type for a delay "
|
||||||
|
"must be 'read' or 'write'\n");
|
||||||
|
usage();
|
||||||
|
libzfs_fini(g_zfs);
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!error)
|
if (!error)
|
||||||
error = ENXIO;
|
error = ENXIO;
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,8 @@ dist_zpoolcompat_DATA = \
|
|||||||
%D%/compatibility.d/freebsd-11.2 \
|
%D%/compatibility.d/freebsd-11.2 \
|
||||||
%D%/compatibility.d/freebsd-11.3 \
|
%D%/compatibility.d/freebsd-11.3 \
|
||||||
%D%/compatibility.d/freenas-9.10.2 \
|
%D%/compatibility.d/freenas-9.10.2 \
|
||||||
%D%/compatibility.d/grub2 \
|
%D%/compatibility.d/grub2-2.06 \
|
||||||
|
%D%/compatibility.d/grub2-2.12 \
|
||||||
%D%/compatibility.d/openzfs-2.0-freebsd \
|
%D%/compatibility.d/openzfs-2.0-freebsd \
|
||||||
%D%/compatibility.d/openzfs-2.0-linux \
|
%D%/compatibility.d/openzfs-2.0-linux \
|
||||||
%D%/compatibility.d/openzfs-2.1-freebsd \
|
%D%/compatibility.d/openzfs-2.1-freebsd \
|
||||||
@@ -171,6 +172,7 @@ zpoolcompatlinks = \
|
|||||||
"freebsd-11.3 freebsd-12.2" \
|
"freebsd-11.3 freebsd-12.2" \
|
||||||
"freebsd-11.3 freebsd-12.3" \
|
"freebsd-11.3 freebsd-12.3" \
|
||||||
"freebsd-11.3 freebsd-12.4" \
|
"freebsd-11.3 freebsd-12.4" \
|
||||||
|
"grub2-2.12 grub2" \
|
||||||
"openzfs-2.1-freebsd freebsd-13.0" \
|
"openzfs-2.1-freebsd freebsd-13.0" \
|
||||||
"openzfs-2.1-freebsd freebsd-13.1" \
|
"openzfs-2.1-freebsd freebsd-13.1" \
|
||||||
"openzfs-2.1-freebsd freebsd-13.2" \
|
"openzfs-2.1-freebsd freebsd-13.2" \
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Features which are supported by GRUB2 versions prior to v2.12.
|
||||||
|
#
|
||||||
|
# GRUB is not able to detect ZFS pool if snaphsot of top level boot pool
|
||||||
|
# is created. This issue is observed with GRUB versions before v2.12 if
|
||||||
|
# extensible_dataset feature is enabled on ZFS boot pool.
|
||||||
|
#
|
||||||
|
# This file lists all read-only comaptible features except
|
||||||
|
# extensible_dataset and any other feature that depends on it.
|
||||||
|
#
|
||||||
|
allocation_classes
|
||||||
|
async_destroy
|
||||||
|
block_cloning
|
||||||
|
device_rebuild
|
||||||
|
embedded_data
|
||||||
|
empty_bpobj
|
||||||
|
enabled_txg
|
||||||
|
hole_birth
|
||||||
|
log_spacemap
|
||||||
|
lz4_compress
|
||||||
|
resilver_defer
|
||||||
|
spacemap_histogram
|
||||||
|
spacemap_v2
|
||||||
|
zpool_checkpoint
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Features which are supported by GRUB2
|
# Features which are supported by GRUB2 versions from v2.12 onwards.
|
||||||
allocation_classes
|
allocation_classes
|
||||||
async_destroy
|
async_destroy
|
||||||
block_cloning
|
block_cloning
|
||||||
@@ -438,7 +438,7 @@ static char *zpool_sysfs_gets(char *path)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = calloc(sizeof (*buf), statbuf.st_size + 1);
|
buf = calloc(statbuf.st_size + 1, sizeof (*buf));
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
close(fd);
|
close(fd);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
@@ -458,7 +458,7 @@ static char *zpool_sysfs_gets(char *path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Remove trailing newline */
|
/* Remove trailing newline */
|
||||||
if (buf[count - 1] == '\n')
|
if (count > 0 && buf[count - 1] == '\n')
|
||||||
buf[count - 1] = 0;
|
buf[count - 1] = 0;
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|||||||
+94
-50
@@ -22,7 +22,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
|
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2011, 2020 by Delphix. All rights reserved.
|
* Copyright (c) 2011, 2024 by Delphix. All rights reserved.
|
||||||
* Copyright (c) 2012 by Frederik Wessels. All rights reserved.
|
* Copyright (c) 2012 by Frederik Wessels. All rights reserved.
|
||||||
* Copyright (c) 2012 by Cyril Plisko. All rights reserved.
|
* Copyright (c) 2012 by Cyril Plisko. All rights reserved.
|
||||||
* Copyright (c) 2013 by Prasad Joshi (sTec). All rights reserved.
|
* Copyright (c) 2013 by Prasad Joshi (sTec). All rights reserved.
|
||||||
@@ -131,6 +131,13 @@ static int zpool_do_help(int argc, char **argv);
|
|||||||
static zpool_compat_status_t zpool_do_load_compat(
|
static zpool_compat_status_t zpool_do_load_compat(
|
||||||
const char *, boolean_t *);
|
const char *, boolean_t *);
|
||||||
|
|
||||||
|
enum zpool_options {
|
||||||
|
ZPOOL_OPTION_POWER = 1024,
|
||||||
|
ZPOOL_OPTION_ALLOW_INUSE,
|
||||||
|
ZPOOL_OPTION_ALLOW_REPLICATION_MISMATCH,
|
||||||
|
ZPOOL_OPTION_ALLOW_ASHIFT_MISMATCH
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These libumem hooks provide a reasonable set of defaults for the allocator's
|
* These libumem hooks provide a reasonable set of defaults for the allocator's
|
||||||
* debugging facilities.
|
* debugging facilities.
|
||||||
@@ -347,7 +354,7 @@ get_usage(zpool_help_t idx)
|
|||||||
{
|
{
|
||||||
switch (idx) {
|
switch (idx) {
|
||||||
case HELP_ADD:
|
case HELP_ADD:
|
||||||
return (gettext("\tadd [-fgLnP] [-o property=value] "
|
return (gettext("\tadd [-afgLnP] [-o property=value] "
|
||||||
"<pool> <vdev> ...\n"));
|
"<pool> <vdev> ...\n"));
|
||||||
case HELP_ATTACH:
|
case HELP_ATTACH:
|
||||||
return (gettext("\tattach [-fsw] [-o property=value] "
|
return (gettext("\tattach [-fsw] [-o property=value] "
|
||||||
@@ -413,7 +420,7 @@ get_usage(zpool_help_t idx)
|
|||||||
"[<device> ...]\n"));
|
"[<device> ...]\n"));
|
||||||
case HELP_STATUS:
|
case HELP_STATUS:
|
||||||
return (gettext("\tstatus [--power] [-c [script1,script2,...]] "
|
return (gettext("\tstatus [--power] [-c [script1,script2,...]] "
|
||||||
"[-igLpPstvxD] [-T d|u] [pool] ... \n"
|
"[-DegiLpPstvx] [-T d|u] [pool] ...\n"
|
||||||
"\t [interval [count]]\n"));
|
"\t [interval [count]]\n"));
|
||||||
case HELP_UPGRADE:
|
case HELP_UPGRADE:
|
||||||
return (gettext("\tupgrade\n"
|
return (gettext("\tupgrade\n"
|
||||||
@@ -1009,8 +1016,9 @@ add_prop_list_default(const char *propname, const char *propval,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* zpool add [-fgLnP] [-o property=value] <pool> <vdev> ...
|
* zpool add [-afgLnP] [-o property=value] <pool> <vdev> ...
|
||||||
*
|
*
|
||||||
|
* -a Disable the ashift validation checks
|
||||||
* -f Force addition of devices, even if they appear in use
|
* -f Force addition of devices, even if they appear in use
|
||||||
* -g Display guid for individual vdev name.
|
* -g Display guid for individual vdev name.
|
||||||
* -L Follow links when resolving vdev path name.
|
* -L Follow links when resolving vdev path name.
|
||||||
@@ -1026,8 +1034,11 @@ add_prop_list_default(const char *propname, const char *propval,
|
|||||||
int
|
int
|
||||||
zpool_do_add(int argc, char **argv)
|
zpool_do_add(int argc, char **argv)
|
||||||
{
|
{
|
||||||
boolean_t force = B_FALSE;
|
boolean_t check_replication = B_TRUE;
|
||||||
|
boolean_t check_inuse = B_TRUE;
|
||||||
boolean_t dryrun = B_FALSE;
|
boolean_t dryrun = B_FALSE;
|
||||||
|
boolean_t check_ashift = B_TRUE;
|
||||||
|
boolean_t force = B_FALSE;
|
||||||
int name_flags = 0;
|
int name_flags = 0;
|
||||||
int c;
|
int c;
|
||||||
nvlist_t *nvroot;
|
nvlist_t *nvroot;
|
||||||
@@ -1038,8 +1049,18 @@ zpool_do_add(int argc, char **argv)
|
|||||||
nvlist_t *props = NULL;
|
nvlist_t *props = NULL;
|
||||||
char *propval;
|
char *propval;
|
||||||
|
|
||||||
|
struct option long_options[] = {
|
||||||
|
{"allow-in-use", no_argument, NULL, ZPOOL_OPTION_ALLOW_INUSE},
|
||||||
|
{"allow-replication-mismatch", no_argument, NULL,
|
||||||
|
ZPOOL_OPTION_ALLOW_REPLICATION_MISMATCH},
|
||||||
|
{"allow-ashift-mismatch", no_argument, NULL,
|
||||||
|
ZPOOL_OPTION_ALLOW_ASHIFT_MISMATCH},
|
||||||
|
{0, 0, 0, 0}
|
||||||
|
};
|
||||||
|
|
||||||
/* check options */
|
/* check options */
|
||||||
while ((c = getopt(argc, argv, "fgLno:P")) != -1) {
|
while ((c = getopt_long(argc, argv, "fgLno:P", long_options, NULL))
|
||||||
|
!= -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'f':
|
case 'f':
|
||||||
force = B_TRUE;
|
force = B_TRUE;
|
||||||
@@ -1069,6 +1090,15 @@ zpool_do_add(int argc, char **argv)
|
|||||||
case 'P':
|
case 'P':
|
||||||
name_flags |= VDEV_NAME_PATH;
|
name_flags |= VDEV_NAME_PATH;
|
||||||
break;
|
break;
|
||||||
|
case ZPOOL_OPTION_ALLOW_INUSE:
|
||||||
|
check_inuse = B_FALSE;
|
||||||
|
break;
|
||||||
|
case ZPOOL_OPTION_ALLOW_REPLICATION_MISMATCH:
|
||||||
|
check_replication = B_FALSE;
|
||||||
|
break;
|
||||||
|
case ZPOOL_OPTION_ALLOW_ASHIFT_MISMATCH:
|
||||||
|
check_ashift = B_FALSE;
|
||||||
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
||||||
optopt);
|
optopt);
|
||||||
@@ -1089,6 +1119,19 @@ zpool_do_add(int argc, char **argv)
|
|||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (force) {
|
||||||
|
if (!check_inuse || !check_replication || !check_ashift) {
|
||||||
|
(void) fprintf(stderr, gettext("'-f' option is not "
|
||||||
|
"allowed with '--allow-replication-mismatch', "
|
||||||
|
"'--allow-ashift-mismatch', or "
|
||||||
|
"'--allow-in-use'\n"));
|
||||||
|
usage(B_FALSE);
|
||||||
|
}
|
||||||
|
check_inuse = B_FALSE;
|
||||||
|
check_replication = B_FALSE;
|
||||||
|
check_ashift = B_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
poolname = argv[0];
|
poolname = argv[0];
|
||||||
|
|
||||||
argc--;
|
argc--;
|
||||||
@@ -1119,8 +1162,8 @@ zpool_do_add(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* pass off to make_root_vdev for processing */
|
/* pass off to make_root_vdev for processing */
|
||||||
nvroot = make_root_vdev(zhp, props, force, !force, B_FALSE, dryrun,
|
nvroot = make_root_vdev(zhp, props, !check_inuse,
|
||||||
argc, argv);
|
check_replication, B_FALSE, dryrun, argc, argv);
|
||||||
if (nvroot == NULL) {
|
if (nvroot == NULL) {
|
||||||
zpool_close(zhp);
|
zpool_close(zhp);
|
||||||
return (1);
|
return (1);
|
||||||
@@ -1224,7 +1267,7 @@ zpool_do_add(int argc, char **argv)
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
} else {
|
||||||
ret = (zpool_add(zhp, nvroot) != 0);
|
ret = (zpool_add(zhp, nvroot, check_ashift) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
nvlist_free(props);
|
nvlist_free(props);
|
||||||
@@ -2246,7 +2289,6 @@ print_status_initialize(vdev_stat_t *vs, boolean_t verbose)
|
|||||||
!vs->vs_scan_removing) {
|
!vs->vs_scan_removing) {
|
||||||
char zbuf[1024];
|
char zbuf[1024];
|
||||||
char tbuf[256];
|
char tbuf[256];
|
||||||
struct tm zaction_ts;
|
|
||||||
|
|
||||||
time_t t = vs->vs_initialize_action_time;
|
time_t t = vs->vs_initialize_action_time;
|
||||||
int initialize_pct = 100;
|
int initialize_pct = 100;
|
||||||
@@ -2256,8 +2298,8 @@ print_status_initialize(vdev_stat_t *vs, boolean_t verbose)
|
|||||||
100 / (vs->vs_initialize_bytes_est + 1));
|
100 / (vs->vs_initialize_bytes_est + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) localtime_r(&t, &zaction_ts);
|
(void) ctime_r(&t, tbuf);
|
||||||
(void) strftime(tbuf, sizeof (tbuf), "%c", &zaction_ts);
|
tbuf[24] = 0;
|
||||||
|
|
||||||
switch (vs->vs_initialize_state) {
|
switch (vs->vs_initialize_state) {
|
||||||
case VDEV_INITIALIZE_SUSPENDED:
|
case VDEV_INITIALIZE_SUSPENDED:
|
||||||
@@ -2297,7 +2339,6 @@ print_status_trim(vdev_stat_t *vs, boolean_t verbose)
|
|||||||
!vs->vs_scan_removing) {
|
!vs->vs_scan_removing) {
|
||||||
char zbuf[1024];
|
char zbuf[1024];
|
||||||
char tbuf[256];
|
char tbuf[256];
|
||||||
struct tm zaction_ts;
|
|
||||||
|
|
||||||
time_t t = vs->vs_trim_action_time;
|
time_t t = vs->vs_trim_action_time;
|
||||||
int trim_pct = 100;
|
int trim_pct = 100;
|
||||||
@@ -2306,8 +2347,8 @@ print_status_trim(vdev_stat_t *vs, boolean_t verbose)
|
|||||||
100 / (vs->vs_trim_bytes_est + 1));
|
100 / (vs->vs_trim_bytes_est + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) localtime_r(&t, &zaction_ts);
|
(void) ctime_r(&t, tbuf);
|
||||||
(void) strftime(tbuf, sizeof (tbuf), "%c", &zaction_ts);
|
tbuf[24] = 0;
|
||||||
|
|
||||||
switch (vs->vs_trim_state) {
|
switch (vs->vs_trim_state) {
|
||||||
case VDEV_TRIM_SUSPENDED:
|
case VDEV_TRIM_SUSPENDED:
|
||||||
@@ -2569,7 +2610,13 @@ print_status_config(zpool_handle_t *zhp, status_cbdata_t *cb, const char *name,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VDEV_AUX_ERR_EXCEEDED:
|
case VDEV_AUX_ERR_EXCEEDED:
|
||||||
|
if (vs->vs_read_errors + vs->vs_write_errors +
|
||||||
|
vs->vs_checksum_errors == 0 && children == 0 &&
|
||||||
|
vs->vs_slow_ios > 0) {
|
||||||
|
(void) printf(gettext("too many slow I/Os"));
|
||||||
|
} else {
|
||||||
(void) printf(gettext("too many errors"));
|
(void) printf(gettext("too many errors"));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VDEV_AUX_IO_FAILURE:
|
case VDEV_AUX_IO_FAILURE:
|
||||||
@@ -3396,10 +3443,10 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts,
|
|||||||
ms_status = zpool_enable_datasets(zhp, mntopts, 0);
|
ms_status = zpool_enable_datasets(zhp, mntopts, 0);
|
||||||
if (ms_status == EZFS_SHAREFAILED) {
|
if (ms_status == EZFS_SHAREFAILED) {
|
||||||
(void) fprintf(stderr, gettext("Import was "
|
(void) fprintf(stderr, gettext("Import was "
|
||||||
"successful, but unable to share some datasets"));
|
"successful, but unable to share some datasets\n"));
|
||||||
} else if (ms_status == EZFS_MOUNTFAILED) {
|
} else if (ms_status == EZFS_MOUNTFAILED) {
|
||||||
(void) fprintf(stderr, gettext("Import was "
|
(void) fprintf(stderr, gettext("Import was "
|
||||||
"successful, but unable to mount some datasets"));
|
"successful, but unable to mount some datasets\n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7064,7 +7111,6 @@ zpool_do_split(int argc, char **argv)
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define POWER_OPT 1024
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* zpool online [--power] <pool> <device> ...
|
* zpool online [--power] <pool> <device> ...
|
||||||
@@ -7082,7 +7128,7 @@ zpool_do_online(int argc, char **argv)
|
|||||||
int flags = 0;
|
int flags = 0;
|
||||||
boolean_t is_power_on = B_FALSE;
|
boolean_t is_power_on = B_FALSE;
|
||||||
struct option long_options[] = {
|
struct option long_options[] = {
|
||||||
{"power", no_argument, NULL, POWER_OPT},
|
{"power", no_argument, NULL, ZPOOL_OPTION_POWER},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -7092,7 +7138,7 @@ zpool_do_online(int argc, char **argv)
|
|||||||
case 'e':
|
case 'e':
|
||||||
flags |= ZFS_ONLINE_EXPAND;
|
flags |= ZFS_ONLINE_EXPAND;
|
||||||
break;
|
break;
|
||||||
case POWER_OPT:
|
case ZPOOL_OPTION_POWER:
|
||||||
is_power_on = B_TRUE;
|
is_power_on = B_TRUE;
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
@@ -7205,7 +7251,7 @@ zpool_do_offline(int argc, char **argv)
|
|||||||
boolean_t is_power_off = B_FALSE;
|
boolean_t is_power_off = B_FALSE;
|
||||||
|
|
||||||
struct option long_options[] = {
|
struct option long_options[] = {
|
||||||
{"power", no_argument, NULL, POWER_OPT},
|
{"power", no_argument, NULL, ZPOOL_OPTION_POWER},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -7218,7 +7264,7 @@ zpool_do_offline(int argc, char **argv)
|
|||||||
case 't':
|
case 't':
|
||||||
istmp = B_TRUE;
|
istmp = B_TRUE;
|
||||||
break;
|
break;
|
||||||
case POWER_OPT:
|
case ZPOOL_OPTION_POWER:
|
||||||
is_power_off = B_TRUE;
|
is_power_off = B_TRUE;
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
@@ -7318,7 +7364,7 @@ zpool_do_clear(int argc, char **argv)
|
|||||||
char *pool, *device;
|
char *pool, *device;
|
||||||
|
|
||||||
struct option long_options[] = {
|
struct option long_options[] = {
|
||||||
{"power", no_argument, NULL, POWER_OPT},
|
{"power", no_argument, NULL, ZPOOL_OPTION_POWER},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -7335,7 +7381,7 @@ zpool_do_clear(int argc, char **argv)
|
|||||||
case 'X':
|
case 'X':
|
||||||
xtreme_rewind = B_TRUE;
|
xtreme_rewind = B_TRUE;
|
||||||
break;
|
break;
|
||||||
case POWER_OPT:
|
case ZPOOL_OPTION_POWER:
|
||||||
is_power_on = B_TRUE;
|
is_power_on = B_TRUE;
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
@@ -8864,7 +8910,7 @@ status_callback(zpool_handle_t *zhp, void *data)
|
|||||||
printf_color(ANSI_BOLD, gettext("action: "));
|
printf_color(ANSI_BOLD, gettext("action: "));
|
||||||
printf_color(ANSI_YELLOW, gettext("Make sure the pool's devices"
|
printf_color(ANSI_YELLOW, gettext("Make sure the pool's devices"
|
||||||
" are connected, then reboot your system and\n\timport the "
|
" are connected, then reboot your system and\n\timport the "
|
||||||
"pool.\n"));
|
"pool or run 'zpool clear' to resume the pool.\n"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ZPOOL_STATUS_IO_FAILURE_WAIT:
|
case ZPOOL_STATUS_IO_FAILURE_WAIT:
|
||||||
@@ -9064,22 +9110,22 @@ status_callback(zpool_handle_t *zhp, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* zpool status [-c [script1,script2,...]] [-igLpPstvx] [--power] [-T d|u] ...
|
* zpool status [-c [script1,script2,...]] [-DegiLpPstvx] [--power] [-T d|u] ...
|
||||||
* [pool] [interval [count]]
|
* [pool] [interval [count]]
|
||||||
*
|
*
|
||||||
* -c CMD For each vdev, run command CMD
|
* -c CMD For each vdev, run command CMD
|
||||||
|
* -D Display dedup status (undocumented)
|
||||||
* -e Display only unhealthy vdevs
|
* -e Display only unhealthy vdevs
|
||||||
* -i Display vdev initialization status.
|
|
||||||
* -g Display guid for individual vdev name.
|
* -g Display guid for individual vdev name.
|
||||||
|
* -i Display vdev initialization status.
|
||||||
* -L Follow links when resolving vdev path name.
|
* -L Follow links when resolving vdev path name.
|
||||||
* -p Display values in parsable (exact) format.
|
* -p Display values in parsable (exact) format.
|
||||||
* -P Display full path for vdev name.
|
* -P Display full path for vdev name.
|
||||||
* -s Display slow IOs column.
|
* -s Display slow IOs column.
|
||||||
* -v Display complete error logs
|
|
||||||
* -x Display only pools with potential problems
|
|
||||||
* -D Display dedup status (undocumented)
|
|
||||||
* -t Display vdev TRIM status.
|
* -t Display vdev TRIM status.
|
||||||
* -T Display a timestamp in date(1) or Unix format
|
* -T Display a timestamp in date(1) or Unix format
|
||||||
|
* -v Display complete error logs
|
||||||
|
* -x Display only pools with potential problems
|
||||||
* --power Display vdev enclosure slot power status
|
* --power Display vdev enclosure slot power status
|
||||||
*
|
*
|
||||||
* Describes the health status of all pools or some subset.
|
* Describes the health status of all pools or some subset.
|
||||||
@@ -9095,12 +9141,12 @@ zpool_do_status(int argc, char **argv)
|
|||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
|
|
||||||
struct option long_options[] = {
|
struct option long_options[] = {
|
||||||
{"power", no_argument, NULL, POWER_OPT},
|
{"power", no_argument, NULL, ZPOOL_OPTION_POWER},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* check options */
|
/* check options */
|
||||||
while ((c = getopt_long(argc, argv, "c:eigLpPsvxDtT:", long_options,
|
while ((c = getopt_long(argc, argv, "c:DegiLpPstT:vx", long_options,
|
||||||
NULL)) != -1) {
|
NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'c':
|
case 'c':
|
||||||
@@ -9127,15 +9173,18 @@ zpool_do_status(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
cmd = optarg;
|
cmd = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'D':
|
||||||
|
cb.cb_dedup_stats = B_TRUE;
|
||||||
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
cb.cb_print_unhealthy = B_TRUE;
|
cb.cb_print_unhealthy = B_TRUE;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
|
||||||
cb.cb_print_vdev_init = B_TRUE;
|
|
||||||
break;
|
|
||||||
case 'g':
|
case 'g':
|
||||||
cb.cb_name_flags |= VDEV_NAME_GUID;
|
cb.cb_name_flags |= VDEV_NAME_GUID;
|
||||||
break;
|
break;
|
||||||
|
case 'i':
|
||||||
|
cb.cb_print_vdev_init = B_TRUE;
|
||||||
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
cb.cb_name_flags |= VDEV_NAME_FOLLOW_LINKS;
|
cb.cb_name_flags |= VDEV_NAME_FOLLOW_LINKS;
|
||||||
break;
|
break;
|
||||||
@@ -9148,22 +9197,19 @@ zpool_do_status(int argc, char **argv)
|
|||||||
case 's':
|
case 's':
|
||||||
cb.cb_print_slow_ios = B_TRUE;
|
cb.cb_print_slow_ios = B_TRUE;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
|
||||||
cb.cb_verbose = B_TRUE;
|
|
||||||
break;
|
|
||||||
case 'x':
|
|
||||||
cb.cb_explain = B_TRUE;
|
|
||||||
break;
|
|
||||||
case 'D':
|
|
||||||
cb.cb_dedup_stats = B_TRUE;
|
|
||||||
break;
|
|
||||||
case 't':
|
case 't':
|
||||||
cb.cb_print_vdev_trim = B_TRUE;
|
cb.cb_print_vdev_trim = B_TRUE;
|
||||||
break;
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
get_timestamp_arg(*optarg);
|
get_timestamp_arg(*optarg);
|
||||||
break;
|
break;
|
||||||
case POWER_OPT:
|
case 'v':
|
||||||
|
cb.cb_verbose = B_TRUE;
|
||||||
|
break;
|
||||||
|
case 'x':
|
||||||
|
cb.cb_explain = B_TRUE;
|
||||||
|
break;
|
||||||
|
case ZPOOL_OPTION_POWER:
|
||||||
cb.cb_print_power = B_TRUE;
|
cb.cb_print_power = B_TRUE;
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
@@ -9202,7 +9248,6 @@ zpool_do_status(int argc, char **argv)
|
|||||||
|
|
||||||
if (cb.vcdl != NULL)
|
if (cb.vcdl != NULL)
|
||||||
free_vdev_cmd_data_list(cb.vcdl);
|
free_vdev_cmd_data_list(cb.vcdl);
|
||||||
|
|
||||||
if (argc == 0 && cb.cb_count == 0)
|
if (argc == 0 && cb.cb_count == 0)
|
||||||
(void) fprintf(stderr, gettext("no pools available\n"));
|
(void) fprintf(stderr, gettext("no pools available\n"));
|
||||||
else if (cb.cb_explain && cb.cb_first && cb.cb_allpools)
|
else if (cb.cb_explain && cb.cb_first && cb.cb_allpools)
|
||||||
@@ -10638,11 +10683,10 @@ found:
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* The first arg isn't a pool name,
|
* The first arg isn't the name of a valid pool.
|
||||||
*/
|
*/
|
||||||
fprintf(stderr, gettext("missing pool name.\n"));
|
fprintf(stderr, gettext("Cannot get properties of %s: "
|
||||||
fprintf(stderr, "\n");
|
"no such pool available.\n"), argv[0]);
|
||||||
usage(B_FALSE);
|
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ static void
|
|||||||
zfs_redup_stream(int infd, int outfd, boolean_t verbose)
|
zfs_redup_stream(int infd, int outfd, boolean_t verbose)
|
||||||
{
|
{
|
||||||
int bufsz = SPA_MAXBLOCKSIZE;
|
int bufsz = SPA_MAXBLOCKSIZE;
|
||||||
dmu_replay_record_t thedrr = { 0 };
|
dmu_replay_record_t thedrr;
|
||||||
dmu_replay_record_t *drr = &thedrr;
|
dmu_replay_record_t *drr = &thedrr;
|
||||||
redup_table_t rdt;
|
redup_table_t rdt;
|
||||||
zio_cksum_t stream_cksum;
|
zio_cksum_t stream_cksum;
|
||||||
@@ -194,6 +194,8 @@ zfs_redup_stream(int infd, int outfd, boolean_t verbose)
|
|||||||
uint64_t num_records = 0;
|
uint64_t num_records = 0;
|
||||||
uint64_t num_write_byref_records = 0;
|
uint64_t num_write_byref_records = 0;
|
||||||
|
|
||||||
|
memset(&thedrr, 0, sizeof (dmu_replay_record_t));
|
||||||
|
|
||||||
#ifdef _ILP32
|
#ifdef _ILP32
|
||||||
uint64_t max_rde_size = SMALLEST_POSSIBLE_MAX_RDT_MB << 20;
|
uint64_t max_rde_size = SMALLEST_POSSIBLE_MAX_RDT_MB << 20;
|
||||||
#else
|
#else
|
||||||
|
|||||||
+31
-25
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2011, 2018 by Delphix. All rights reserved.
|
* Copyright (c) 2011, 2024 by Delphix. All rights reserved.
|
||||||
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
|
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2013 Steven Hartland. All rights reserved.
|
* Copyright (c) 2013 Steven Hartland. All rights reserved.
|
||||||
* Copyright (c) 2014 Integros [integros.com]
|
* Copyright (c) 2014 Integros [integros.com]
|
||||||
@@ -593,8 +593,8 @@ dump_debug_buffer(void)
|
|||||||
* We use write() instead of printf() so that this function
|
* We use write() instead of printf() so that this function
|
||||||
* is safe to call from a signal handler.
|
* is safe to call from a signal handler.
|
||||||
*/
|
*/
|
||||||
ret = write(STDOUT_FILENO, "\n", 1);
|
ret = write(STDERR_FILENO, "\n", 1);
|
||||||
zfs_dbgmsg_print("ztest");
|
zfs_dbgmsg_print(STDERR_FILENO, "ztest");
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BACKTRACE_SZ 100
|
#define BACKTRACE_SZ 100
|
||||||
@@ -663,15 +663,17 @@ static int
|
|||||||
str2shift(const char *buf)
|
str2shift(const char *buf)
|
||||||
{
|
{
|
||||||
const char *ends = "BKMGTPEZ";
|
const char *ends = "BKMGTPEZ";
|
||||||
int i;
|
int i, len;
|
||||||
|
|
||||||
if (buf[0] == '\0')
|
if (buf[0] == '\0')
|
||||||
return (0);
|
return (0);
|
||||||
for (i = 0; i < strlen(ends); i++) {
|
|
||||||
|
len = strlen(ends);
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
if (toupper(buf[0]) == ends[i])
|
if (toupper(buf[0]) == ends[i])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i == strlen(ends)) {
|
if (i == len) {
|
||||||
(void) fprintf(stderr, "ztest: invalid bytes suffix: %s\n",
|
(void) fprintf(stderr, "ztest: invalid bytes suffix: %s\n",
|
||||||
buf);
|
buf);
|
||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
@@ -1861,7 +1863,7 @@ ztest_verify_unused_bonus(dmu_buf_t *db, void *end, uint64_t obj,
|
|||||||
static void
|
static void
|
||||||
ztest_log_create(ztest_ds_t *zd, dmu_tx_t *tx, lr_create_t *lr)
|
ztest_log_create(ztest_ds_t *zd, dmu_tx_t *tx, lr_create_t *lr)
|
||||||
{
|
{
|
||||||
char *name = (void *)(lr + 1); /* name follows lr */
|
char *name = (char *)&lr->lr_data[0]; /* name follows lr */
|
||||||
size_t namesize = strlen(name) + 1;
|
size_t namesize = strlen(name) + 1;
|
||||||
itx_t *itx;
|
itx_t *itx;
|
||||||
|
|
||||||
@@ -1869,7 +1871,7 @@ ztest_log_create(ztest_ds_t *zd, dmu_tx_t *tx, lr_create_t *lr)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
itx = zil_itx_create(TX_CREATE, sizeof (*lr) + namesize);
|
itx = zil_itx_create(TX_CREATE, sizeof (*lr) + namesize);
|
||||||
memcpy(&itx->itx_lr + 1, &lr->lr_common + 1,
|
memcpy(&itx->itx_lr + 1, &lr->lr_create.lr_common + 1,
|
||||||
sizeof (*lr) + namesize - sizeof (lr_t));
|
sizeof (*lr) + namesize - sizeof (lr_t));
|
||||||
|
|
||||||
zil_itx_assign(zd->zd_zilog, itx, tx);
|
zil_itx_assign(zd->zd_zilog, itx, tx);
|
||||||
@@ -1878,7 +1880,7 @@ ztest_log_create(ztest_ds_t *zd, dmu_tx_t *tx, lr_create_t *lr)
|
|||||||
static void
|
static void
|
||||||
ztest_log_remove(ztest_ds_t *zd, dmu_tx_t *tx, lr_remove_t *lr, uint64_t object)
|
ztest_log_remove(ztest_ds_t *zd, dmu_tx_t *tx, lr_remove_t *lr, uint64_t object)
|
||||||
{
|
{
|
||||||
char *name = (void *)(lr + 1); /* name follows lr */
|
char *name = (char *)&lr->lr_data[0]; /* name follows lr */
|
||||||
size_t namesize = strlen(name) + 1;
|
size_t namesize = strlen(name) + 1;
|
||||||
itx_t *itx;
|
itx_t *itx;
|
||||||
|
|
||||||
@@ -1964,8 +1966,9 @@ static int
|
|||||||
ztest_replay_create(void *arg1, void *arg2, boolean_t byteswap)
|
ztest_replay_create(void *arg1, void *arg2, boolean_t byteswap)
|
||||||
{
|
{
|
||||||
ztest_ds_t *zd = arg1;
|
ztest_ds_t *zd = arg1;
|
||||||
lr_create_t *lr = arg2;
|
lr_create_t *lrc = arg2;
|
||||||
char *name = (void *)(lr + 1); /* name follows lr */
|
_lr_create_t *lr = &lrc->lr_create;
|
||||||
|
char *name = (char *)&lrc->lr_data[0]; /* name follows lr */
|
||||||
objset_t *os = zd->zd_os;
|
objset_t *os = zd->zd_os;
|
||||||
ztest_block_tag_t *bbt;
|
ztest_block_tag_t *bbt;
|
||||||
dmu_buf_t *db;
|
dmu_buf_t *db;
|
||||||
@@ -2043,7 +2046,7 @@ ztest_replay_create(void *arg1, void *arg2, boolean_t byteswap)
|
|||||||
VERIFY0(zap_add(os, lr->lr_doid, name, sizeof (uint64_t), 1,
|
VERIFY0(zap_add(os, lr->lr_doid, name, sizeof (uint64_t), 1,
|
||||||
&lr->lr_foid, tx));
|
&lr->lr_foid, tx));
|
||||||
|
|
||||||
(void) ztest_log_create(zd, tx, lr);
|
(void) ztest_log_create(zd, tx, lrc);
|
||||||
|
|
||||||
dmu_tx_commit(tx);
|
dmu_tx_commit(tx);
|
||||||
|
|
||||||
@@ -2055,7 +2058,7 @@ ztest_replay_remove(void *arg1, void *arg2, boolean_t byteswap)
|
|||||||
{
|
{
|
||||||
ztest_ds_t *zd = arg1;
|
ztest_ds_t *zd = arg1;
|
||||||
lr_remove_t *lr = arg2;
|
lr_remove_t *lr = arg2;
|
||||||
char *name = (void *)(lr + 1); /* name follows lr */
|
char *name = (char *)&lr->lr_data[0]; /* name follows lr */
|
||||||
objset_t *os = zd->zd_os;
|
objset_t *os = zd->zd_os;
|
||||||
dmu_object_info_t doi;
|
dmu_object_info_t doi;
|
||||||
dmu_tx_t *tx;
|
dmu_tx_t *tx;
|
||||||
@@ -2109,9 +2112,9 @@ ztest_replay_write(void *arg1, void *arg2, boolean_t byteswap)
|
|||||||
ztest_ds_t *zd = arg1;
|
ztest_ds_t *zd = arg1;
|
||||||
lr_write_t *lr = arg2;
|
lr_write_t *lr = arg2;
|
||||||
objset_t *os = zd->zd_os;
|
objset_t *os = zd->zd_os;
|
||||||
void *data = lr + 1; /* data follows lr */
|
uint8_t *data = &lr->lr_data[0]; /* data follows lr */
|
||||||
uint64_t offset, length;
|
uint64_t offset, length;
|
||||||
ztest_block_tag_t *bt = data;
|
ztest_block_tag_t *bt = (ztest_block_tag_t *)data;
|
||||||
ztest_block_tag_t *bbt;
|
ztest_block_tag_t *bbt;
|
||||||
uint64_t gen, txg, lrtxg, crtxg;
|
uint64_t gen, txg, lrtxg, crtxg;
|
||||||
dmu_object_info_t doi;
|
dmu_object_info_t doi;
|
||||||
@@ -2448,7 +2451,7 @@ ztest_get_data(void *arg, uint64_t arg2, lr_write_t *lr, char *buf,
|
|||||||
ASSERT3P(zio, !=, NULL);
|
ASSERT3P(zio, !=, NULL);
|
||||||
size = doi.doi_data_block_size;
|
size = doi.doi_data_block_size;
|
||||||
if (ISP2(size)) {
|
if (ISP2(size)) {
|
||||||
offset = P2ALIGN(offset, size);
|
offset = P2ALIGN_TYPED(offset, size, uint64_t);
|
||||||
} else {
|
} else {
|
||||||
ASSERT3U(offset, <, size);
|
ASSERT3U(offset, <, size);
|
||||||
offset = 0;
|
offset = 0;
|
||||||
@@ -2563,7 +2566,8 @@ ztest_create(ztest_ds_t *zd, ztest_od_t *od, int count)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
lr_create_t *lr = ztest_lr_alloc(sizeof (*lr), od->od_name);
|
lr_create_t *lrc = ztest_lr_alloc(sizeof (*lrc), od->od_name);
|
||||||
|
_lr_create_t *lr = &lrc->lr_create;
|
||||||
|
|
||||||
lr->lr_doid = od->od_dir;
|
lr->lr_doid = od->od_dir;
|
||||||
lr->lr_foid = 0; /* 0 to allocate, > 0 to claim */
|
lr->lr_foid = 0; /* 0 to allocate, > 0 to claim */
|
||||||
@@ -2647,7 +2651,7 @@ ztest_write(ztest_ds_t *zd, uint64_t object, uint64_t offset, uint64_t size,
|
|||||||
lr->lr_blkoff = 0;
|
lr->lr_blkoff = 0;
|
||||||
BP_ZERO(&lr->lr_blkptr);
|
BP_ZERO(&lr->lr_blkptr);
|
||||||
|
|
||||||
memcpy(lr + 1, data, size);
|
memcpy(&lr->lr_data[0], data, size);
|
||||||
|
|
||||||
error = ztest_replay_write(zd, lr, B_FALSE);
|
error = ztest_replay_write(zd, lr, B_FALSE);
|
||||||
|
|
||||||
@@ -3270,7 +3274,7 @@ ztest_vdev_add_remove(ztest_ds_t *zd, uint64_t id)
|
|||||||
"log" : NULL, ztest_opts.zo_raid_children, zs->zs_mirrors,
|
"log" : NULL, ztest_opts.zo_raid_children, zs->zs_mirrors,
|
||||||
1);
|
1);
|
||||||
|
|
||||||
error = spa_vdev_add(spa, nvroot);
|
error = spa_vdev_add(spa, nvroot, B_FALSE);
|
||||||
fnvlist_free(nvroot);
|
fnvlist_free(nvroot);
|
||||||
|
|
||||||
switch (error) {
|
switch (error) {
|
||||||
@@ -3332,7 +3336,7 @@ ztest_vdev_class_add(ztest_ds_t *zd, uint64_t id)
|
|||||||
nvroot = make_vdev_root(NULL, NULL, NULL, ztest_opts.zo_vdev_size, 0,
|
nvroot = make_vdev_root(NULL, NULL, NULL, ztest_opts.zo_vdev_size, 0,
|
||||||
class, ztest_opts.zo_raid_children, zs->zs_mirrors, 1);
|
class, ztest_opts.zo_raid_children, zs->zs_mirrors, 1);
|
||||||
|
|
||||||
error = spa_vdev_add(spa, nvroot);
|
error = spa_vdev_add(spa, nvroot, B_FALSE);
|
||||||
fnvlist_free(nvroot);
|
fnvlist_free(nvroot);
|
||||||
|
|
||||||
if (error == ENOSPC)
|
if (error == ENOSPC)
|
||||||
@@ -3439,7 +3443,7 @@ ztest_vdev_aux_add_remove(ztest_ds_t *zd, uint64_t id)
|
|||||||
*/
|
*/
|
||||||
nvlist_t *nvroot = make_vdev_root(NULL, aux, NULL,
|
nvlist_t *nvroot = make_vdev_root(NULL, aux, NULL,
|
||||||
(ztest_opts.zo_vdev_size * 5) / 4, 0, NULL, 0, 0, 1);
|
(ztest_opts.zo_vdev_size * 5) / 4, 0, NULL, 0, 0, 1);
|
||||||
error = spa_vdev_add(spa, nvroot);
|
error = spa_vdev_add(spa, nvroot, B_FALSE);
|
||||||
|
|
||||||
switch (error) {
|
switch (error) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -4668,7 +4672,8 @@ ztest_dmu_object_next_chunk(ztest_ds_t *zd, uint64_t id)
|
|||||||
*/
|
*/
|
||||||
mutex_enter(&os->os_obj_lock);
|
mutex_enter(&os->os_obj_lock);
|
||||||
object = ztest_random(os->os_obj_next_chunk);
|
object = ztest_random(os->os_obj_next_chunk);
|
||||||
os->os_obj_next_chunk = P2ALIGN(object, dnodes_per_chunk);
|
os->os_obj_next_chunk = P2ALIGN_TYPED(object, dnodes_per_chunk,
|
||||||
|
uint64_t);
|
||||||
mutex_exit(&os->os_obj_lock);
|
mutex_exit(&os->os_obj_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6284,7 +6289,8 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id)
|
|||||||
* the end of the disk (vdev_psize) is aligned to
|
* the end of the disk (vdev_psize) is aligned to
|
||||||
* sizeof (vdev_label_t).
|
* sizeof (vdev_label_t).
|
||||||
*/
|
*/
|
||||||
uint64_t psize = P2ALIGN(fsize, sizeof (vdev_label_t));
|
uint64_t psize = P2ALIGN_TYPED(fsize, sizeof (vdev_label_t),
|
||||||
|
uint64_t);
|
||||||
if ((leaf & 1) == 1 &&
|
if ((leaf & 1) == 1 &&
|
||||||
offset + sizeof (bad) > psize - VDEV_LABEL_END_SIZE)
|
offset + sizeof (bad) > psize - VDEV_LABEL_END_SIZE)
|
||||||
continue;
|
continue;
|
||||||
@@ -6600,8 +6606,8 @@ ztest_fletcher_incr(ztest_ds_t *zd, uint64_t id)
|
|||||||
size_t inc = 64 * ztest_random(size / 67);
|
size_t inc = 64 * ztest_random(size / 67);
|
||||||
/* sometimes add few bytes to test non-simd */
|
/* sometimes add few bytes to test non-simd */
|
||||||
if (ztest_random(100) < 10)
|
if (ztest_random(100) < 10)
|
||||||
inc += P2ALIGN(ztest_random(64),
|
inc += P2ALIGN_TYPED(ztest_random(64),
|
||||||
sizeof (uint32_t));
|
sizeof (uint32_t), uint64_t);
|
||||||
|
|
||||||
if (inc > (size - pos))
|
if (inc > (size - pos))
|
||||||
inc = size - pos;
|
inc = size - pos;
|
||||||
|
|||||||
+2
-1
@@ -10,7 +10,8 @@ AM_CPPFLAGS = \
|
|||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/module/icp/include \
|
-I$(top_srcdir)/module/icp/include \
|
||||||
-I$(top_srcdir)/lib/libspl/include \
|
-I$(top_srcdir)/lib/libspl/include \
|
||||||
-I$(top_srcdir)/lib/libspl/include/os/@ac_system_l@
|
-I$(top_srcdir)/lib/libspl/include/os/@ac_system_l@ \
|
||||||
|
-I$(top_srcdir)/lib/libzpool/include
|
||||||
|
|
||||||
AM_LIBTOOLFLAGS = --silent
|
AM_LIBTOOLFLAGS = --silent
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ subst_sed_cmd = \
|
|||||||
-e 's|@ASAN_ENABLED[@]|$(ASAN_ENABLED)|g' \
|
-e 's|@ASAN_ENABLED[@]|$(ASAN_ENABLED)|g' \
|
||||||
-e 's|@DEFAULT_INIT_NFS_SERVER[@]|$(DEFAULT_INIT_NFS_SERVER)|g' \
|
-e 's|@DEFAULT_INIT_NFS_SERVER[@]|$(DEFAULT_INIT_NFS_SERVER)|g' \
|
||||||
-e 's|@DEFAULT_INIT_SHELL[@]|$(DEFAULT_INIT_SHELL)|g' \
|
-e 's|@DEFAULT_INIT_SHELL[@]|$(DEFAULT_INIT_SHELL)|g' \
|
||||||
|
-e 's|@IS_SYSV_RC[@]|$(IS_SYSV_RC)|g' \
|
||||||
-e 's|@LIBFETCH_DYNAMIC[@]|$(LIBFETCH_DYNAMIC)|g' \
|
-e 's|@LIBFETCH_DYNAMIC[@]|$(LIBFETCH_DYNAMIC)|g' \
|
||||||
-e 's|@LIBFETCH_SONAME[@]|$(LIBFETCH_SONAME)|g' \
|
-e 's|@LIBFETCH_SONAME[@]|$(LIBFETCH_SONAME)|g' \
|
||||||
-e 's|@PYTHON[@]|$(PYTHON)|g' \
|
-e 's|@PYTHON[@]|$(PYTHON)|g' \
|
||||||
@@ -43,4 +44,4 @@ SUBSTFILES =
|
|||||||
CLEANFILES += $(SUBSTFILES)
|
CLEANFILES += $(SUBSTFILES)
|
||||||
dist_noinst_DATA += $(SUBSTFILES:=.in)
|
dist_noinst_DATA += $(SUBSTFILES:=.in)
|
||||||
|
|
||||||
$(call SUBST,%,)
|
$(SUBSTFILES): $(call SUBST,%,)
|
||||||
|
|||||||
@@ -80,10 +80,11 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_PYZFS], [
|
|||||||
[AC_MSG_ERROR("Python $PYTHON_VERSION unknown")]
|
[AC_MSG_ERROR("Python $PYTHON_VERSION unknown")]
|
||||||
)
|
)
|
||||||
|
|
||||||
AX_PYTHON_DEVEL([$PYTHON_REQUIRED_VERSION], [
|
|
||||||
AS_IF([test "x$enable_pyzfs" = xyes], [
|
AS_IF([test "x$enable_pyzfs" = xyes], [
|
||||||
AC_MSG_ERROR("Python $PYTHON_REQUIRED_VERSION development library is not installed")
|
AX_PYTHON_DEVEL([$PYTHON_REQUIRED_VERSION])
|
||||||
], [test "x$enable_pyzfs" != xno], [
|
], [
|
||||||
|
AX_PYTHON_DEVEL([$PYTHON_REQUIRED_VERSION], [true])
|
||||||
|
AS_IF([test "x$ax_python_devel_found" = xno], [
|
||||||
enable_pyzfs=no
|
enable_pyzfs=no
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|||||||
+152
-35
@@ -4,18 +4,13 @@
|
|||||||
#
|
#
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
#
|
#
|
||||||
# AX_PYTHON_DEVEL([version], [action-if-not-found])
|
# AX_PYTHON_DEVEL([version[,optional]])
|
||||||
#
|
#
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
#
|
#
|
||||||
# Note: Defines as a precious variable "PYTHON_VERSION". Don't override it
|
# Note: Defines as a precious variable "PYTHON_VERSION". Don't override it
|
||||||
# in your configure.ac.
|
# in your configure.ac.
|
||||||
#
|
#
|
||||||
# Note: this is a slightly modified version of the original AX_PYTHON_DEVEL
|
|
||||||
# macro which accepts an additional [action-if-not-found] argument. This
|
|
||||||
# allow to detect if Python development is available without aborting the
|
|
||||||
# configure phase with an hard error in case it is not.
|
|
||||||
#
|
|
||||||
# This macro checks for Python and tries to get the include path to
|
# This macro checks for Python and tries to get the include path to
|
||||||
# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LIBS) output
|
# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LIBS) output
|
||||||
# variables. It also exports $(PYTHON_EXTRA_LIBS) and
|
# variables. It also exports $(PYTHON_EXTRA_LIBS) and
|
||||||
@@ -28,6 +23,11 @@
|
|||||||
# version number. Don't use "PYTHON_VERSION" for this: that environment
|
# version number. Don't use "PYTHON_VERSION" for this: that environment
|
||||||
# variable is declared as precious and thus reserved for the end-user.
|
# variable is declared as precious and thus reserved for the end-user.
|
||||||
#
|
#
|
||||||
|
# By default this will fail if it does not detect a development version of
|
||||||
|
# python. If you want it to continue, set optional to true, like
|
||||||
|
# AX_PYTHON_DEVEL([], [true]). The ax_python_devel_found variable will be
|
||||||
|
# "no" if it fails.
|
||||||
|
#
|
||||||
# This macro should work for all versions of Python >= 2.1.0. As an end
|
# This macro should work for all versions of Python >= 2.1.0. As an end
|
||||||
# user, you can disable the check for the python version by setting the
|
# user, you can disable the check for the python version by setting the
|
||||||
# PYTHON_NOVERSIONCHECK environment variable to something else than the
|
# PYTHON_NOVERSIONCHECK environment variable to something else than the
|
||||||
@@ -45,7 +45,6 @@
|
|||||||
# Copyright (c) 2009 Matteo Settenvini <matteo@member.fsf.org>
|
# Copyright (c) 2009 Matteo Settenvini <matteo@member.fsf.org>
|
||||||
# Copyright (c) 2009 Horst Knorr <hk_classes@knoda.org>
|
# Copyright (c) 2009 Horst Knorr <hk_classes@knoda.org>
|
||||||
# Copyright (c) 2013 Daniel Mullner <muellner@math.stanford.edu>
|
# Copyright (c) 2013 Daniel Mullner <muellner@math.stanford.edu>
|
||||||
# Copyright (c) 2018 loli10K <ezomori.nozomu@gmail.com>
|
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
# This program is free software: you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by the
|
# under the terms of the GNU General Public License as published by the
|
||||||
@@ -73,10 +72,18 @@
|
|||||||
# modified version of the Autoconf Macro, you may extend this special
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
# exception to the GPL to apply to your modified version as well.
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
#serial 21
|
#serial 36
|
||||||
|
|
||||||
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
|
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
|
||||||
AC_DEFUN([AX_PYTHON_DEVEL],[
|
AC_DEFUN([AX_PYTHON_DEVEL],[
|
||||||
|
# Get whether it's optional
|
||||||
|
if test -z "$2"; then
|
||||||
|
ax_python_devel_optional=false
|
||||||
|
else
|
||||||
|
ax_python_devel_optional=$2
|
||||||
|
fi
|
||||||
|
ax_python_devel_found=yes
|
||||||
|
|
||||||
#
|
#
|
||||||
# Allow the use of a (user set) custom python version
|
# Allow the use of a (user set) custom python version
|
||||||
#
|
#
|
||||||
@@ -87,12 +94,15 @@ AC_DEFUN([AX_PYTHON_DEVEL],[
|
|||||||
|
|
||||||
AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
|
AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
|
||||||
if test -z "$PYTHON"; then
|
if test -z "$PYTHON"; then
|
||||||
m4_ifvaln([$2],[$2],[
|
AC_MSG_WARN([Cannot find python$PYTHON_VERSION in your system path])
|
||||||
AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
|
if ! $ax_python_devel_optional; then
|
||||||
|
AC_MSG_ERROR([Giving up, python development not available])
|
||||||
|
fi
|
||||||
|
ax_python_devel_found=no
|
||||||
PYTHON_VERSION=""
|
PYTHON_VERSION=""
|
||||||
])
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test $ax_python_devel_found = yes; then
|
||||||
#
|
#
|
||||||
# Check for a version of Python >= 2.1.0
|
# Check for a version of Python >= 2.1.0
|
||||||
#
|
#
|
||||||
@@ -103,7 +113,7 @@ AC_DEFUN([AX_PYTHON_DEVEL],[
|
|||||||
if test "$ac_supports_python_ver" != "True"; then
|
if test "$ac_supports_python_ver" != "True"; then
|
||||||
if test -z "$PYTHON_NOVERSIONCHECK"; then
|
if test -z "$PYTHON_NOVERSIONCHECK"; then
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
AC_MSG_FAILURE([
|
AC_MSG_WARN([
|
||||||
This version of the AC@&t@_PYTHON_DEVEL macro
|
This version of the AC@&t@_PYTHON_DEVEL macro
|
||||||
doesn't work properly with versions of Python before
|
doesn't work properly with versions of Python before
|
||||||
2.1.0. You may need to re-run configure, setting the
|
2.1.0. You may need to re-run configure, setting the
|
||||||
@@ -112,13 +122,20 @@ PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
|
|||||||
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
|
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
|
||||||
to something else than an empty string.
|
to something else than an empty string.
|
||||||
])
|
])
|
||||||
|
if ! $ax_python_devel_optional; then
|
||||||
|
AC_MSG_FAILURE([Giving up])
|
||||||
|
fi
|
||||||
|
ax_python_devel_found=no
|
||||||
|
PYTHON_VERSION=""
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([skip at user request])
|
AC_MSG_RESULT([skip at user request])
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $ax_python_devel_found = yes; then
|
||||||
#
|
#
|
||||||
# If the macro parameter ``version'' is set, honour it.
|
# If the macro parameter ``version'' is set, honour it.
|
||||||
# A Python shim class, VPy, is used to implement correct version comparisons via
|
# A Python shim class, VPy, is used to implement correct version comparisons via
|
||||||
@@ -133,7 +150,7 @@ class VPy:
|
|||||||
return tuple(map(int, s.strip().replace("rc", ".").split(".")))
|
return tuple(map(int, s.strip().replace("rc", ".").split(".")))
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
import sys
|
import sys
|
||||||
self.vpy = tuple(sys.version_info)
|
self.vpy = tuple(sys.version_info)[[:3]]
|
||||||
def __eq__(self, s):
|
def __eq__(self, s):
|
||||||
return self.vpy == self.vtup(s)
|
return self.vpy == self.vtup(s)
|
||||||
def __ne__(self, s):
|
def __ne__(self, s):
|
||||||
@@ -155,25 +172,69 @@ EOF
|
|||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
AC_MSG_ERROR([this package requires Python $1.
|
AC_MSG_WARN([this package requires Python $1.
|
||||||
If you have it installed, but it isn't the default Python
|
If you have it installed, but it isn't the default Python
|
||||||
interpreter in your system path, please pass the PYTHON_VERSION
|
interpreter in your system path, please pass the PYTHON_VERSION
|
||||||
variable to configure. See ``configure --help'' for reference.
|
variable to configure. See ``configure --help'' for reference.
|
||||||
])
|
])
|
||||||
|
if ! $ax_python_devel_optional; then
|
||||||
|
AC_MSG_ERROR([Giving up])
|
||||||
|
fi
|
||||||
|
ax_python_devel_found=no
|
||||||
PYTHON_VERSION=""
|
PYTHON_VERSION=""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $ax_python_devel_found = yes; then
|
||||||
|
#
|
||||||
|
# Check if you have distutils, else fail
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([for the sysconfig Python package])
|
||||||
|
ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1`
|
||||||
|
if test $? -eq 0; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
IMPORT_SYSCONFIG="import sysconfig"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for the distutils Python package])
|
||||||
|
ac_sysconfig_result=`$PYTHON -c "from distutils import sysconfig" 2>&1`
|
||||||
|
if test $? -eq 0; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
IMPORT_SYSCONFIG="from distutils import sysconfig"
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([cannot import Python module "distutils".
|
||||||
|
Please check your Python installation. The error was:
|
||||||
|
$ac_sysconfig_result])
|
||||||
|
if ! $ax_python_devel_optional; then
|
||||||
|
AC_MSG_ERROR([Giving up])
|
||||||
|
fi
|
||||||
|
ax_python_devel_found=no
|
||||||
|
PYTHON_VERSION=""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $ax_python_devel_found = yes; then
|
||||||
#
|
#
|
||||||
# Check for Python include path
|
# Check for Python include path
|
||||||
#
|
#
|
||||||
#
|
|
||||||
AC_MSG_CHECKING([for Python include path])
|
AC_MSG_CHECKING([for Python include path])
|
||||||
if test -z "$PYTHON_CPPFLAGS"; then
|
if test -z "$PYTHON_CPPFLAGS"; then
|
||||||
python_path=`$PYTHON -c "import sysconfig; \
|
if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then
|
||||||
|
# sysconfig module has different functions
|
||||||
|
python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \
|
||||||
print (sysconfig.get_path ('include'));"`
|
print (sysconfig.get_path ('include'));"`
|
||||||
plat_python_path=`$PYTHON -c "import sysconfig; \
|
plat_python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \
|
||||||
print (sysconfig.get_path ('platinclude'));"`
|
print (sysconfig.get_path ('platinclude'));"`
|
||||||
|
else
|
||||||
|
# old distutils way
|
||||||
|
python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \
|
||||||
|
print (sysconfig.get_python_inc ());"`
|
||||||
|
plat_python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \
|
||||||
|
print (sysconfig.get_python_inc (plat_specific=1));"`
|
||||||
|
fi
|
||||||
if test -n "${python_path}"; then
|
if test -n "${python_path}"; then
|
||||||
if test "${plat_python_path}" != "${python_path}"; then
|
if test "${plat_python_path}" != "${python_path}"; then
|
||||||
python_path="-I$python_path -I$plat_python_path"
|
python_path="-I$python_path -I$plat_python_path"
|
||||||
@@ -208,7 +269,7 @@ EOD`
|
|||||||
ac_python_version=$PYTHON_VERSION
|
ac_python_version=$PYTHON_VERSION
|
||||||
else
|
else
|
||||||
ac_python_version=`$PYTHON -c "import sys; \
|
ac_python_version=`$PYTHON -c "import sys; \
|
||||||
print ('.'.join(sys.version.split('.')[[:2]]))"`
|
print ("%d.%d" % sys.version_info[[:2]])"`
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -220,7 +281,7 @@ EOD`
|
|||||||
ac_python_libdir=`cat<<EOD | $PYTHON -
|
ac_python_libdir=`cat<<EOD | $PYTHON -
|
||||||
|
|
||||||
# There should be only one
|
# There should be only one
|
||||||
import sysconfig
|
$IMPORT_SYSCONFIG
|
||||||
e = sysconfig.get_config_var('LIBDIR')
|
e = sysconfig.get_config_var('LIBDIR')
|
||||||
if e is not None:
|
if e is not None:
|
||||||
print (e)
|
print (e)
|
||||||
@@ -229,7 +290,7 @@ EOD`
|
|||||||
# Now, for the library:
|
# Now, for the library:
|
||||||
ac_python_library=`cat<<EOD | $PYTHON -
|
ac_python_library=`cat<<EOD | $PYTHON -
|
||||||
|
|
||||||
import sysconfig
|
$IMPORT_SYSCONFIG
|
||||||
c = sysconfig.get_config_vars()
|
c = sysconfig.get_config_vars()
|
||||||
if 'LDVERSION' in c:
|
if 'LDVERSION' in c:
|
||||||
print ('python'+c[['LDVERSION']])
|
print ('python'+c[['LDVERSION']])
|
||||||
@@ -249,21 +310,27 @@ EOD`
|
|||||||
else
|
else
|
||||||
# old way: use libpython from python_configdir
|
# old way: use libpython from python_configdir
|
||||||
ac_python_libdir=`$PYTHON -c \
|
ac_python_libdir=`$PYTHON -c \
|
||||||
"import sysconfig; \
|
"from sysconfig import get_python_lib as f; \
|
||||||
import os; \
|
import os; \
|
||||||
print (os.path.join(sysconfig.get_path('platstdlib'), 'config'));"`
|
print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
|
||||||
PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
|
PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "PYTHON_LIBS"; then
|
if test -z "PYTHON_LIBS"; then
|
||||||
m4_ifvaln([$2],[$2],[
|
AC_MSG_WARN([
|
||||||
AC_MSG_ERROR([
|
|
||||||
Cannot determine location of your Python DSO. Please check it was installed with
|
Cannot determine location of your Python DSO. Please check it was installed with
|
||||||
dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
|
dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
|
||||||
])
|
])
|
||||||
])
|
if ! $ax_python_devel_optional; then
|
||||||
|
AC_MSG_ERROR([Giving up])
|
||||||
|
fi
|
||||||
|
ax_python_devel_found=no
|
||||||
|
PYTHON_VERSION=""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $ax_python_devel_found = yes; then
|
||||||
AC_MSG_RESULT([$PYTHON_LIBS])
|
AC_MSG_RESULT([$PYTHON_LIBS])
|
||||||
AC_SUBST([PYTHON_LIBS])
|
AC_SUBST([PYTHON_LIBS])
|
||||||
|
|
||||||
@@ -272,20 +339,65 @@ EOD`
|
|||||||
#
|
#
|
||||||
AC_MSG_CHECKING([for Python site-packages path])
|
AC_MSG_CHECKING([for Python site-packages path])
|
||||||
if test -z "$PYTHON_SITE_PKG"; then
|
if test -z "$PYTHON_SITE_PKG"; then
|
||||||
PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
|
if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then
|
||||||
print (distutils.sysconfig.get_python_lib(0,0));" 2>/dev/null || \
|
PYTHON_SITE_PKG=`$PYTHON -c "
|
||||||
$PYTHON -c "import sysconfig; \
|
$IMPORT_SYSCONFIG;
|
||||||
print (sysconfig.get_path('purelib'));"`
|
if hasattr(sysconfig, 'get_default_scheme'):
|
||||||
|
scheme = sysconfig.get_default_scheme()
|
||||||
|
else:
|
||||||
|
scheme = sysconfig._get_default_scheme()
|
||||||
|
if scheme == 'posix_local':
|
||||||
|
# Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
|
||||||
|
scheme = 'posix_prefix'
|
||||||
|
prefix = '$prefix'
|
||||||
|
if prefix == 'NONE':
|
||||||
|
prefix = '$ac_default_prefix'
|
||||||
|
sitedir = sysconfig.get_path('purelib', scheme, vars={'base': prefix})
|
||||||
|
print(sitedir)"`
|
||||||
|
else
|
||||||
|
# distutils.sysconfig way
|
||||||
|
PYTHON_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \
|
||||||
|
print (sysconfig.get_python_lib(0,0));"`
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT([$PYTHON_SITE_PKG])
|
AC_MSG_RESULT([$PYTHON_SITE_PKG])
|
||||||
AC_SUBST([PYTHON_SITE_PKG])
|
AC_SUBST([PYTHON_SITE_PKG])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for platform-specific site packages
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([for Python platform specific site-packages path])
|
||||||
|
if test -z "$PYTHON_PLATFORM_SITE_PKG"; then
|
||||||
|
if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then
|
||||||
|
PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c "
|
||||||
|
$IMPORT_SYSCONFIG;
|
||||||
|
if hasattr(sysconfig, 'get_default_scheme'):
|
||||||
|
scheme = sysconfig.get_default_scheme()
|
||||||
|
else:
|
||||||
|
scheme = sysconfig._get_default_scheme()
|
||||||
|
if scheme == 'posix_local':
|
||||||
|
# Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
|
||||||
|
scheme = 'posix_prefix'
|
||||||
|
prefix = '$prefix'
|
||||||
|
if prefix == 'NONE':
|
||||||
|
prefix = '$ac_default_prefix'
|
||||||
|
sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase': prefix})
|
||||||
|
print(sitedir)"`
|
||||||
|
else
|
||||||
|
# distutils.sysconfig way
|
||||||
|
PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \
|
||||||
|
print (sysconfig.get_python_lib(1,0));"`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$PYTHON_PLATFORM_SITE_PKG])
|
||||||
|
AC_SUBST([PYTHON_PLATFORM_SITE_PKG])
|
||||||
|
|
||||||
#
|
#
|
||||||
# libraries which must be linked in when embedding
|
# libraries which must be linked in when embedding
|
||||||
#
|
#
|
||||||
AC_MSG_CHECKING(python extra libraries)
|
AC_MSG_CHECKING(python extra libraries)
|
||||||
if test -z "$PYTHON_EXTRA_LIBS"; then
|
if test -z "$PYTHON_EXTRA_LIBS"; then
|
||||||
PYTHON_EXTRA_LIBS=`$PYTHON -c "import sysconfig; \
|
PYTHON_EXTRA_LIBS=`$PYTHON -c "$IMPORT_SYSCONFIG; \
|
||||||
conf = sysconfig.get_config_var; \
|
conf = sysconfig.get_config_var; \
|
||||||
print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
|
print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
|
||||||
fi
|
fi
|
||||||
@@ -297,9 +409,11 @@ EOD`
|
|||||||
#
|
#
|
||||||
AC_MSG_CHECKING(python extra linking flags)
|
AC_MSG_CHECKING(python extra linking flags)
|
||||||
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
|
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
|
||||||
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import sysconfig; \
|
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "$IMPORT_SYSCONFIG; \
|
||||||
conf = sysconfig.get_config_var; \
|
conf = sysconfig.get_config_var; \
|
||||||
print (conf('LINKFORSHARED'))"`
|
print (conf('LINKFORSHARED'))"`
|
||||||
|
# Hack for macos, it sticks this in here.
|
||||||
|
PYTHON_EXTRA_LDFLAGS=`echo $PYTHON_EXTRA_LDFLAGS | sed 's/CoreFoundation.*$/CoreFoundation/'`
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
|
AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
|
||||||
AC_SUBST(PYTHON_EXTRA_LDFLAGS)
|
AC_SUBST(PYTHON_EXTRA_LDFLAGS)
|
||||||
@@ -312,7 +426,7 @@ EOD`
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
ac_save_LDFLAGS="$LDFLAGS"
|
ac_save_LDFLAGS="$LDFLAGS"
|
||||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||||
LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS"
|
LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS"
|
||||||
LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS"
|
LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS"
|
||||||
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
|
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
|
||||||
AC_LANG_PUSH([C])
|
AC_LANG_PUSH([C])
|
||||||
@@ -329,8 +443,7 @@ EOD`
|
|||||||
AC_MSG_RESULT([$pythonexists])
|
AC_MSG_RESULT([$pythonexists])
|
||||||
|
|
||||||
if test ! "x$pythonexists" = "xyes"; then
|
if test ! "x$pythonexists" = "xyes"; then
|
||||||
m4_ifvaln([$2],[$2],[
|
AC_MSG_WARN([
|
||||||
AC_MSG_FAILURE([
|
|
||||||
Could not link test program to Python. Maybe the main Python library has been
|
Could not link test program to Python. Maybe the main Python library has been
|
||||||
installed in some non-standard library path. If so, pass it to configure,
|
installed in some non-standard library path. If so, pass it to configure,
|
||||||
via the LIBS environment variable.
|
via the LIBS environment variable.
|
||||||
@@ -341,8 +454,12 @@ EOD`
|
|||||||
for your distribution. The exact name of this package varies among them.
|
for your distribution. The exact name of this package varies among them.
|
||||||
============================================================================
|
============================================================================
|
||||||
])
|
])
|
||||||
|
if ! $ax_python_devel_optional; then
|
||||||
|
AC_MSG_ERROR([Giving up])
|
||||||
|
fi
|
||||||
|
ax_python_devel_found=no
|
||||||
PYTHON_VERSION=""
|
PYTHON_VERSION=""
|
||||||
])
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
+8
-2
@@ -93,11 +93,17 @@ debian:
|
|||||||
cp -r contrib/debian debian; chmod +x debian/rules;
|
cp -r contrib/debian debian; chmod +x debian/rules;
|
||||||
|
|
||||||
native-deb-utils: native-deb-local debian
|
native-deb-utils: native-deb-local debian
|
||||||
|
while [ -f debian/deb-build.lock ]; do sleep 1; done; \
|
||||||
|
echo "native-deb-utils" > debian/deb-build.lock; \
|
||||||
cp contrib/debian/control debian/control; \
|
cp contrib/debian/control debian/control; \
|
||||||
$(DPKGBUILD) -b -rfakeroot -us -uc;
|
$(DPKGBUILD) -b -rfakeroot -us -uc; \
|
||||||
|
$(RM) -f debian/deb-build.lock
|
||||||
|
|
||||||
native-deb-kmod: native-deb-local debian
|
native-deb-kmod: native-deb-local debian
|
||||||
|
while [ -f debian/deb-build.lock ]; do sleep 1; done; \
|
||||||
|
echo "native-deb-kmod" > debian/deb-build.lock; \
|
||||||
sh scripts/make_gitrev.sh; \
|
sh scripts/make_gitrev.sh; \
|
||||||
fakeroot debian/rules override_dh_binary-modules;
|
fakeroot debian/rules override_dh_binary-modules; \
|
||||||
|
$(RM) -f debian/deb-build.lock
|
||||||
|
|
||||||
native-deb: native-deb-utils native-deb-kmod
|
native-deb: native-deb-utils native-deb-kmod
|
||||||
|
|||||||
@@ -90,8 +90,8 @@ AC_DEFUN([ZFS_AC_FIND_SYSTEM_LIBRARY], [
|
|||||||
AC_DEFINE([HAVE_][$1], [1], [Define if you have [$5]])
|
AC_DEFINE([HAVE_][$1], [1], [Define if you have [$5]])
|
||||||
$7
|
$7
|
||||||
],[dnl ELSE
|
],[dnl ELSE
|
||||||
AC_SUBST([$1]_CFLAGS, [])
|
AC_SUBST([$1]_CFLAGS, [""])
|
||||||
AC_SUBST([$1]_LIBS, [])
|
AC_SUBST([$1]_LIBS, [""])
|
||||||
AC_MSG_WARN([cannot find [$5] via pkg-config or in the standard locations])
|
AC_MSG_WARN([cannot find [$5] via pkg-config or in the standard locations])
|
||||||
$8
|
$8
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
# intlmacosx.m4 serial 6 (gettext-0.20)
|
|
||||||
dnl Copyright (C) 2004-2014, 2016, 2019 Free Software Foundation, Inc.
|
|
||||||
dnl This file is free software; the Free Software Foundation
|
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
|
||||||
dnl with or without modifications, as long as this notice is preserved.
|
|
||||||
dnl
|
|
||||||
dnl This file can be used in projects which are not available under
|
|
||||||
dnl the GNU General Public License or the GNU Library General Public
|
|
||||||
dnl License but which still want to provide support for the GNU gettext
|
|
||||||
dnl functionality.
|
|
||||||
dnl Please note that the actual code of the GNU gettext library is covered
|
|
||||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
|
||||||
dnl gettext package is covered by the GNU General Public License.
|
|
||||||
dnl They are *not* in the public domain.
|
|
||||||
|
|
||||||
dnl Checks for special options needed on Mac OS X.
|
|
||||||
dnl Defines INTL_MACOSX_LIBS.
|
|
||||||
AC_DEFUN([gt_INTL_MACOSX],
|
|
||||||
[
|
|
||||||
dnl Check for API introduced in Mac OS X 10.4.
|
|
||||||
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
|
|
||||||
[gt_cv_func_CFPreferencesCopyAppValue],
|
|
||||||
[gt_save_LIBS="$LIBS"
|
|
||||||
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
|
|
||||||
AC_LINK_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM(
|
|
||||||
[[#include <CoreFoundation/CFPreferences.h>]],
|
|
||||||
[[CFPreferencesCopyAppValue(NULL, NULL)]])],
|
|
||||||
[gt_cv_func_CFPreferencesCopyAppValue=yes],
|
|
||||||
[gt_cv_func_CFPreferencesCopyAppValue=no])
|
|
||||||
LIBS="$gt_save_LIBS"])
|
|
||||||
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
|
|
||||||
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
|
|
||||||
[Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
|
|
||||||
fi
|
|
||||||
dnl Check for API introduced in Mac OS X 10.5.
|
|
||||||
AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
|
|
||||||
[gt_save_LIBS="$LIBS"
|
|
||||||
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
|
|
||||||
AC_LINK_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM(
|
|
||||||
[[#include <CoreFoundation/CFLocale.h>]],
|
|
||||||
[[CFLocaleCopyCurrent();]])],
|
|
||||||
[gt_cv_func_CFLocaleCopyCurrent=yes],
|
|
||||||
[gt_cv_func_CFLocaleCopyCurrent=no])
|
|
||||||
LIBS="$gt_save_LIBS"])
|
|
||||||
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
|
|
||||||
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
|
|
||||||
[Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
|
|
||||||
fi
|
|
||||||
AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages],
|
|
||||||
[gt_save_LIBS="$LIBS"
|
|
||||||
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
|
|
||||||
AC_LINK_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM(
|
|
||||||
[[#include <CoreFoundation/CFLocale.h>]],
|
|
||||||
[[CFLocaleCopyPreferredLanguages();]])],
|
|
||||||
[gt_cv_func_CFLocaleCopyPreferredLanguages=yes],
|
|
||||||
[gt_cv_func_CFLocaleCopyPreferredLanguages=no])
|
|
||||||
LIBS="$gt_save_LIBS"])
|
|
||||||
if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
|
|
||||||
AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1],
|
|
||||||
[Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.])
|
|
||||||
fi
|
|
||||||
INTL_MACOSX_LIBS=
|
|
||||||
if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
|
|
||||||
|| test $gt_cv_func_CFLocaleCopyCurrent = yes \
|
|
||||||
|| test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
|
|
||||||
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
|
|
||||||
fi
|
|
||||||
AC_SUBST([INTL_MACOSX_LIBS])
|
|
||||||
])
|
|
||||||
+1
-212
@@ -1,112 +1,3 @@
|
|||||||
dnl #
|
|
||||||
dnl # Check if posix_acl_release can be used from a ZFS_META_LICENSED
|
|
||||||
dnl # module. The is_owner_or_cap macro was replaced by
|
|
||||||
dnl # inode_owner_or_capable
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_POSIX_ACL_RELEASE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([posix_acl_release], [
|
|
||||||
#include <linux/cred.h>
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/posix_acl.h>
|
|
||||||
], [
|
|
||||||
struct posix_acl *tmp = posix_acl_alloc(1, 0);
|
|
||||||
posix_acl_release(tmp);
|
|
||||||
], [], [ZFS_META_LICENSE])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_RELEASE], [
|
|
||||||
AC_MSG_CHECKING([whether posix_acl_release() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([posix_acl_release], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_POSIX_ACL_RELEASE, 1,
|
|
||||||
[posix_acl_release() is available])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether posix_acl_release() is GPL-only])
|
|
||||||
ZFS_LINUX_TEST_RESULT([posix_acl_release_license], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_POSIX_ACL_RELEASE_GPL_ONLY, 1,
|
|
||||||
[posix_acl_release() is GPL-only])
|
|
||||||
])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 3.14 API change,
|
|
||||||
dnl # set_cached_acl() and forget_cached_acl() changed from inline to
|
|
||||||
dnl # EXPORT_SYMBOL. In the former case, they may not be usable because of
|
|
||||||
dnl # posix_acl_release. In the latter case, we can always use them.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SET_CACHED_ACL_USABLE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([set_cached_acl], [
|
|
||||||
#include <linux/cred.h>
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/posix_acl.h>
|
|
||||||
], [
|
|
||||||
struct inode *ip = NULL;
|
|
||||||
struct posix_acl *acl = posix_acl_alloc(1, 0);
|
|
||||||
set_cached_acl(ip, ACL_TYPE_ACCESS, acl);
|
|
||||||
forget_cached_acl(ip, ACL_TYPE_ACCESS);
|
|
||||||
], [], [ZFS_META_LICENSE])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SET_CACHED_ACL_USABLE], [
|
|
||||||
AC_MSG_CHECKING([whether set_cached_acl() is usable])
|
|
||||||
ZFS_LINUX_TEST_RESULT([set_cached_acl_license], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_SET_CACHED_ACL_USABLE, 1,
|
|
||||||
[set_cached_acl() is usable])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 3.1 API change,
|
|
||||||
dnl # posix_acl_chmod() was added as the preferred interface.
|
|
||||||
dnl #
|
|
||||||
dnl # 3.14 API change,
|
|
||||||
dnl # posix_acl_chmod() was changed to __posix_acl_chmod()
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_POSIX_ACL_CHMOD], [
|
|
||||||
ZFS_LINUX_TEST_SRC([posix_acl_chmod], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/posix_acl.h>
|
|
||||||
],[
|
|
||||||
posix_acl_chmod(NULL, 0, 0)
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([__posix_acl_chmod], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/posix_acl.h>
|
|
||||||
],[
|
|
||||||
__posix_acl_chmod(NULL, 0, 0)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_CHMOD], [
|
|
||||||
AC_MSG_CHECKING([whether __posix_acl_chmod exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([__posix_acl_chmod], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE___POSIX_ACL_CHMOD, 1,
|
|
||||||
[__posix_acl_chmod() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether posix_acl_chmod exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([posix_acl_chmod], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_POSIX_ACL_CHMOD, 1,
|
|
||||||
[posix_acl_chmod() exists])
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_ERROR([posix_acl_chmod()])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 3.1 API change,
|
dnl # 3.1 API change,
|
||||||
dnl # posix_acl_equiv_mode now wants an umode_t instead of a mode_t
|
dnl # posix_acl_equiv_mode now wants an umode_t instead of a mode_t
|
||||||
@@ -130,34 +21,6 @@ AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.8 API change,
|
|
||||||
dnl # The function posix_acl_valid now must be passed a namespace.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_POSIX_ACL_VALID_WITH_NS], [
|
|
||||||
ZFS_LINUX_TEST_SRC([posix_acl_valid_with_ns], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/posix_acl.h>
|
|
||||||
],[
|
|
||||||
struct user_namespace *user_ns = NULL;
|
|
||||||
const struct posix_acl *acl = NULL;
|
|
||||||
int error;
|
|
||||||
|
|
||||||
error = posix_acl_valid(user_ns, acl);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS], [
|
|
||||||
AC_MSG_CHECKING([whether posix_acl_valid() wants user namespace])
|
|
||||||
ZFS_LINUX_TEST_RESULT([posix_acl_valid_with_ns], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_POSIX_ACL_VALID_WITH_NS, 1,
|
|
||||||
[posix_acl_valid() wants user namespace])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 3.1 API change,
|
dnl # 3.1 API change,
|
||||||
dnl # Check if inode_operations contains the function get_acl
|
dnl # Check if inode_operations contains the function get_acl
|
||||||
@@ -226,9 +89,6 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 3.14 API change,
|
|
||||||
dnl # Check if inode_operations contains the function set_acl
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 5.12 API change,
|
dnl # 5.12 API change,
|
||||||
dnl # set_acl() added a user_namespace* parameter first
|
dnl # set_acl() added a user_namespace* parameter first
|
||||||
@@ -290,106 +150,35 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL], [
|
AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL], [
|
||||||
AC_MSG_CHECKING([whether iops->set_acl() exists])
|
AC_MSG_CHECKING([whether iops->set_acl() with 4 args exists])
|
||||||
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_userns], [
|
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_userns], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists])
|
|
||||||
AC_DEFINE(HAVE_SET_ACL_USERNS, 1, [iops->set_acl() takes 4 args])
|
AC_DEFINE(HAVE_SET_ACL_USERNS, 1, [iops->set_acl() takes 4 args])
|
||||||
],[
|
],[
|
||||||
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_mnt_idmap_dentry], [
|
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_mnt_idmap_dentry], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists])
|
|
||||||
AC_DEFINE(HAVE_SET_ACL_IDMAP_DENTRY, 1,
|
AC_DEFINE(HAVE_SET_ACL_IDMAP_DENTRY, 1,
|
||||||
[iops->set_acl() takes 4 args, arg1 is struct mnt_idmap *])
|
[iops->set_acl() takes 4 args, arg1 is struct mnt_idmap *])
|
||||||
],[
|
],[
|
||||||
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_userns_dentry], [
|
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_userns_dentry], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists])
|
|
||||||
AC_DEFINE(HAVE_SET_ACL_USERNS_DENTRY_ARG2, 1,
|
AC_DEFINE(HAVE_SET_ACL_USERNS_DENTRY_ARG2, 1,
|
||||||
[iops->set_acl() takes 4 args, arg2 is struct dentry *])
|
[iops->set_acl() takes 4 args, arg2 is struct dentry *])
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists, takes 3 args])
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_REQUIRE_API([i_op->set_acl()], [3.14])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.7 API change,
|
|
||||||
dnl # The kernel get_acl will now check cache before calling i_op->get_acl and
|
|
||||||
dnl # do set_cached_acl after that, so i_op->get_acl don't need to do that
|
|
||||||
dnl # anymore.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_ACL_HANDLE_CACHE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([get_acl_handle_cache], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
],[
|
|
||||||
void *sentinel __attribute__ ((unused)) =
|
|
||||||
uncached_acl_sentinel(NULL);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GET_ACL_HANDLE_CACHE], [
|
|
||||||
AC_MSG_CHECKING([whether uncached_acl_sentinel() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([get_acl_handle_cache], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_KERNEL_GET_ACL_HANDLE_CACHE, 1,
|
|
||||||
[uncached_acl_sentinel() exists])
|
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.16 kernel: check if struct posix_acl acl.a_refcount is a refcount_t.
|
|
||||||
dnl # It's an atomic_t on older kernels.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL_HAS_REFCOUNT], [
|
|
||||||
ZFS_LINUX_TEST_SRC([acl_refcount], [
|
|
||||||
#include <linux/backing-dev.h>
|
|
||||||
#include <linux/refcount.h>
|
|
||||||
#include <linux/posix_acl.h>
|
|
||||||
],[
|
|
||||||
struct posix_acl acl;
|
|
||||||
refcount_t *r __attribute__ ((unused)) = &acl.a_refcount;
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_ACL_HAS_REFCOUNT], [
|
|
||||||
AC_MSG_CHECKING([whether posix_acl has refcount_t])
|
|
||||||
ZFS_LINUX_TEST_RESULT([acl_refcount], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_ACL_REFCOUNT, 1, [posix_acl has refcount_t])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [
|
||||||
ZFS_AC_KERNEL_SRC_POSIX_ACL_RELEASE
|
|
||||||
ZFS_AC_KERNEL_SRC_SET_CACHED_ACL_USABLE
|
|
||||||
ZFS_AC_KERNEL_SRC_POSIX_ACL_CHMOD
|
|
||||||
ZFS_AC_KERNEL_SRC_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
|
ZFS_AC_KERNEL_SRC_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
|
||||||
ZFS_AC_KERNEL_SRC_POSIX_ACL_VALID_WITH_NS
|
|
||||||
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL
|
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL
|
||||||
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL
|
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL
|
||||||
ZFS_AC_KERNEL_SRC_GET_ACL_HANDLE_CACHE
|
|
||||||
ZFS_AC_KERNEL_SRC_ACL_HAS_REFCOUNT
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_ACL], [
|
AC_DEFUN([ZFS_AC_KERNEL_ACL], [
|
||||||
ZFS_AC_KERNEL_POSIX_ACL_RELEASE
|
|
||||||
ZFS_AC_KERNEL_SET_CACHED_ACL_USABLE
|
|
||||||
ZFS_AC_KERNEL_POSIX_ACL_CHMOD
|
|
||||||
ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
|
ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
|
||||||
ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS
|
|
||||||
ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL
|
ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL
|
||||||
ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL
|
ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL
|
||||||
ZFS_AC_KERNEL_GET_ACL_HANDLE_CACHE
|
|
||||||
ZFS_AC_KERNEL_ACL_HAS_REFCOUNT
|
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # Linux 4.9-rc5+ ABI, removal of the .aio_fsync field
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_AIO_FSYNC], [
|
|
||||||
ZFS_LINUX_TEST_SRC([aio_fsync], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
static const struct file_operations
|
|
||||||
fops __attribute__ ((unused)) = {
|
|
||||||
.aio_fsync = NULL,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_AIO_FSYNC], [
|
|
||||||
AC_MSG_CHECKING([whether fops->aio_fsync() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([aio_fsync], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_FILE_AIO_FSYNC, 1, [fops->aio_fsync() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # 6.10 kernel, check number of args of __assign_str() for trace:
|
||||||
|
dnl
|
||||||
|
dnl # 6.10+: one arg
|
||||||
|
dnl # 6.9 and older: two args
|
||||||
|
dnl #
|
||||||
|
dnl # More specifically, this will test to see if __assign_str() takes one
|
||||||
|
dnl # arg. If __assign_str() takes two args, or is not defined, then
|
||||||
|
dnl # HAVE_1ARG_ASSIGN_STR will not be set.
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_1ARG_ASSIGN_STR], [
|
||||||
|
AC_MSG_CHECKING([whether __assign_str() has one arg])
|
||||||
|
ZFS_LINUX_TRY_COMPILE_HEADER([
|
||||||
|
#include <linux/module.h>
|
||||||
|
MODULE_LICENSE("$ZFS_META_LICENSE");
|
||||||
|
|
||||||
|
#define CREATE_TRACE_POINTS
|
||||||
|
#include "conftest.h"
|
||||||
|
],[
|
||||||
|
trace_zfs_autoconf_event_one("1");
|
||||||
|
trace_zfs_autoconf_event_two("2");
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_1ARG_ASSIGN_STR, 1,
|
||||||
|
[__assign_str() has one arg])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
],[
|
||||||
|
#if !defined(_CONFTEST_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||||
|
#define _CONFTEST_H
|
||||||
|
|
||||||
|
#undef TRACE_SYSTEM
|
||||||
|
#define TRACE_SYSTEM zfs
|
||||||
|
#include <linux/tracepoint.h>
|
||||||
|
|
||||||
|
DECLARE_EVENT_CLASS(zfs_autoconf_event_class,
|
||||||
|
TP_PROTO(char *string),
|
||||||
|
TP_ARGS(string),
|
||||||
|
TP_STRUCT__entry(
|
||||||
|
__string(str, string)
|
||||||
|
),
|
||||||
|
TP_fast_assign(
|
||||||
|
__assign_str(str);
|
||||||
|
),
|
||||||
|
TP_printk("str = %s", __get_str(str))
|
||||||
|
);
|
||||||
|
|
||||||
|
#define DEFINE_AUTOCONF_EVENT(name) \
|
||||||
|
DEFINE_EVENT(zfs_autoconf_event_class, name, \
|
||||||
|
TP_PROTO(char * str), \
|
||||||
|
TP_ARGS(str))
|
||||||
|
DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_one);
|
||||||
|
DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_two);
|
||||||
|
|
||||||
|
#endif /* _CONFTEST_H */
|
||||||
|
|
||||||
|
#undef TRACE_INCLUDE_PATH
|
||||||
|
#define TRACE_INCLUDE_PATH .
|
||||||
|
#define TRACE_INCLUDE_FILE conftest
|
||||||
|
#include <trace/define_trace.h>
|
||||||
|
])
|
||||||
|
])
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # Check available BDI interfaces.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BDI], [
|
|
||||||
ZFS_LINUX_TEST_SRC([super_setup_bdi_name], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
struct super_block sb;
|
|
||||||
], [
|
|
||||||
char *name = "bdi";
|
|
||||||
atomic_long_t zfs_bdi_seq;
|
|
||||||
int error __attribute__((unused));
|
|
||||||
atomic_long_set(&zfs_bdi_seq, 0);
|
|
||||||
error =
|
|
||||||
super_setup_bdi_name(&sb, "%.28s-%ld", name,
|
|
||||||
atomic_long_inc_return(&zfs_bdi_seq));
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([bdi_setup_and_register], [
|
|
||||||
#include <linux/backing-dev.h>
|
|
||||||
struct backing_dev_info bdi;
|
|
||||||
], [
|
|
||||||
char *name = "bdi";
|
|
||||||
int error __attribute__((unused)) =
|
|
||||||
bdi_setup_and_register(&bdi, name);
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([bdi_setup_and_register_3args], [
|
|
||||||
#include <linux/backing-dev.h>
|
|
||||||
struct backing_dev_info bdi;
|
|
||||||
], [
|
|
||||||
char *name = "bdi";
|
|
||||||
unsigned int cap = BDI_CAP_MAP_COPY;
|
|
||||||
int error __attribute__((unused)) =
|
|
||||||
bdi_setup_and_register(&bdi, name, cap);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BDI], [
|
|
||||||
dnl #
|
|
||||||
dnl # 4.12, super_setup_bdi_name() introduced.
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING([whether super_setup_bdi_name() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT_SYMBOL([super_setup_bdi_name],
|
|
||||||
[super_setup_bdi_name], [fs/super.c], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_SUPER_SETUP_BDI_NAME, 1,
|
|
||||||
[super_setup_bdi_name() exits])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.0 - 4.11, bdi_setup_and_register() takes 2 arguments.
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING(
|
|
||||||
[whether bdi_setup_and_register() wants 2 args])
|
|
||||||
ZFS_LINUX_TEST_RESULT_SYMBOL([bdi_setup_and_register],
|
|
||||||
[bdi_setup_and_register], [mm/backing-dev.c], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_2ARGS_BDI_SETUP_AND_REGISTER, 1,
|
|
||||||
[bdi_setup_and_register() wants 2 args])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 2.6.34 - 3.19, bdi_setup_and_register()
|
|
||||||
dnl # takes 3 arguments.
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING(
|
|
||||||
[whether bdi_setup_and_register() wants 3 args])
|
|
||||||
ZFS_LINUX_TEST_RESULT_SYMBOL(
|
|
||||||
[bdi_setup_and_register_3args],
|
|
||||||
[bdi_setup_and_register], [mm/backing-dev.c], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_3ARGS_BDI_SETUP_AND_REGISTER, 1,
|
|
||||||
[bdi_setup_and_register() wants 3 args])
|
|
||||||
], [
|
|
||||||
ZFS_LINUX_TEST_ERROR([bdi_setup])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,81 +1,3 @@
|
|||||||
dnl #
|
|
||||||
dnl # 2.6.36 API change,
|
|
||||||
dnl # REQ_FAILFAST_{DEV|TRANSPORT|DRIVER}
|
|
||||||
dnl # REQ_DISCARD
|
|
||||||
dnl # REQ_FLUSH
|
|
||||||
dnl #
|
|
||||||
dnl # 4.8 - 4.9 API,
|
|
||||||
dnl # REQ_FLUSH was renamed to REQ_PREFLUSH
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_REQ], [
|
|
||||||
ZFS_LINUX_TEST_SRC([req_failfast_mask], [
|
|
||||||
#include <linux/bio.h>
|
|
||||||
],[
|
|
||||||
int flags __attribute__ ((unused));
|
|
||||||
flags = REQ_FAILFAST_MASK;
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([req_discard], [
|
|
||||||
#include <linux/bio.h>
|
|
||||||
],[
|
|
||||||
int flags __attribute__ ((unused));
|
|
||||||
flags = REQ_DISCARD;
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([req_flush], [
|
|
||||||
#include <linux/bio.h>
|
|
||||||
],[
|
|
||||||
int flags __attribute__ ((unused));
|
|
||||||
flags = REQ_FLUSH;
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([req_preflush], [
|
|
||||||
#include <linux/bio.h>
|
|
||||||
],[
|
|
||||||
int flags __attribute__ ((unused));
|
|
||||||
flags = REQ_PREFLUSH;
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_REQ_FAILFAST_MASK], [
|
|
||||||
AC_MSG_CHECKING([whether REQ_FAILFAST_MASK is defined])
|
|
||||||
ZFS_LINUX_TEST_RESULT([req_failfast_mask], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_ERROR([REQ_FAILFAST_MASK])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_REQ_DISCARD], [
|
|
||||||
AC_MSG_CHECKING([whether REQ_DISCARD is defined])
|
|
||||||
ZFS_LINUX_TEST_RESULT([req_discard], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_REQ_DISCARD, 1, [REQ_DISCARD is defined])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_REQ_FLUSH], [
|
|
||||||
AC_MSG_CHECKING([whether REQ_FLUSH is defined])
|
|
||||||
ZFS_LINUX_TEST_RESULT([req_flush], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_REQ_FLUSH, 1, [REQ_FLUSH is defined])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_REQ_PREFLUSH], [
|
|
||||||
AC_MSG_CHECKING([whether REQ_PREFLUSH is defined])
|
|
||||||
ZFS_LINUX_TEST_RESULT([req_preflush], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_REQ_PREFLUSH, 1, [REQ_PREFLUSH is defined])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # Linux 4.8 API,
|
dnl # Linux 4.8 API,
|
||||||
dnl #
|
dnl #
|
||||||
@@ -84,31 +6,6 @@ dnl # checking the bio->bi_rw flags. The following checks are used to
|
|||||||
dnl # detect if a specific operation is supported.
|
dnl # detect if a specific operation is supported.
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_OPS], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_OPS], [
|
||||||
ZFS_LINUX_TEST_SRC([req_op_discard], [
|
|
||||||
#include <linux/blk_types.h>
|
|
||||||
],[
|
|
||||||
int op __attribute__ ((unused)) = REQ_OP_DISCARD;
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([req_op_secure_erase], [
|
|
||||||
#include <linux/blk_types.h>
|
|
||||||
],[
|
|
||||||
int op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([req_op_flush], [
|
|
||||||
#include <linux/blk_types.h>
|
|
||||||
],[
|
|
||||||
int op __attribute__ ((unused)) = REQ_OP_FLUSH;
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([bio_bi_opf], [
|
|
||||||
#include <linux/bio.h>
|
|
||||||
],[
|
|
||||||
struct bio bio __attribute__ ((unused));
|
|
||||||
bio.bi_opf = 0;
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([bio_set_op_attrs], [
|
ZFS_LINUX_TEST_SRC([bio_set_op_attrs], [
|
||||||
#include <linux/bio.h>
|
#include <linux/bio.h>
|
||||||
],[
|
],[
|
||||||
@@ -117,47 +14,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_OPS], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_REQ_OP_DISCARD], [
|
|
||||||
AC_MSG_CHECKING([whether REQ_OP_DISCARD is defined])
|
|
||||||
ZFS_LINUX_TEST_RESULT([req_op_discard], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_REQ_OP_DISCARD, 1, [REQ_OP_DISCARD is defined])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_REQ_OP_SECURE_ERASE], [
|
|
||||||
AC_MSG_CHECKING([whether REQ_OP_SECURE_ERASE is defined])
|
|
||||||
ZFS_LINUX_TEST_RESULT([req_op_secure_erase], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_REQ_OP_SECURE_ERASE, 1,
|
|
||||||
[REQ_OP_SECURE_ERASE is defined])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_REQ_OP_FLUSH], [
|
|
||||||
AC_MSG_CHECKING([whether REQ_OP_FLUSH is defined])
|
|
||||||
ZFS_LINUX_TEST_RESULT([req_op_flush], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_REQ_OP_FLUSH, 1, [REQ_OP_FLUSH is defined])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_BI_OPF], [
|
|
||||||
AC_MSG_CHECKING([whether bio->bi_opf is defined])
|
|
||||||
ZFS_LINUX_TEST_RESULT([bio_bi_opf], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BIO_BI_OPF, 1, [bio->bi_opf is defined])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_SET_OP_ATTRS], [
|
AC_DEFUN([ZFS_AC_KERNEL_BIO_SET_OP_ATTRS], [
|
||||||
AC_MSG_CHECKING([whether bio_set_op_attrs is available])
|
AC_MSG_CHECKING([whether bio_set_op_attrs is available])
|
||||||
ZFS_LINUX_TEST_RESULT([bio_set_op_attrs], [
|
ZFS_LINUX_TEST_RESULT([bio_set_op_attrs], [
|
||||||
@@ -210,11 +66,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_SET_DEV_MACRO], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_SET_DEV], [
|
AC_DEFUN([ZFS_AC_KERNEL_BIO_SET_DEV], [
|
||||||
AC_MSG_CHECKING([whether bio_set_dev() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([bio_set_dev], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BIO_SET_DEV, 1, [bio_set_dev() is available])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether bio_set_dev() is GPL-only])
|
AC_MSG_CHECKING([whether bio_set_dev() is GPL-only])
|
||||||
ZFS_LINUX_TEST_RESULT([bio_set_dev_license], [
|
ZFS_LINUX_TEST_RESULT([bio_set_dev_license], [
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
@@ -232,108 +83,6 @@ AC_DEFUN([ZFS_AC_KERNEL_BIO_SET_DEV], [
|
|||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.3 API change
|
|
||||||
dnl # Error argument dropped from bio_endio in favor of newly introduced
|
|
||||||
dnl # bio->bi_error. This also replaces bio->bi_flags value BIO_UPTODATE.
|
|
||||||
dnl # Introduced by torvalds/linux@4246a0b63bd8f56a1469b12eafeb875b1041a451
|
|
||||||
dnl # ("block: add a bi_error field to struct bio").
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_END_IO_T_ARGS], [
|
|
||||||
ZFS_LINUX_TEST_SRC([bio_end_io_t_args], [
|
|
||||||
#include <linux/bio.h>
|
|
||||||
static void wanted_end_io(struct bio *bio) { return; }
|
|
||||||
bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
|
|
||||||
], [])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_END_IO_T_ARGS], [
|
|
||||||
AC_MSG_CHECKING([whether bio_end_io_t wants 1 arg])
|
|
||||||
ZFS_LINUX_TEST_RESULT([bio_end_io_t_args], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_1ARG_BIO_END_IO_T, 1,
|
|
||||||
[bio_end_io_t wants 1 arg])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.13 API change
|
|
||||||
dnl # The bio->bi_error field was replaced with bio->bi_status which is an
|
|
||||||
dnl # enum which describes all possible error types.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_BI_STATUS], [
|
|
||||||
ZFS_LINUX_TEST_SRC([bio_bi_status], [
|
|
||||||
#include <linux/bio.h>
|
|
||||||
], [
|
|
||||||
struct bio bio __attribute__ ((unused));
|
|
||||||
blk_status_t status __attribute__ ((unused)) = BLK_STS_OK;
|
|
||||||
bio.bi_status = status;
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_BI_STATUS], [
|
|
||||||
AC_MSG_CHECKING([whether bio->bi_status exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([bio_bi_status], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BIO_BI_STATUS, 1, [bio->bi_status exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 3.14 API change,
|
|
||||||
dnl # Immutable biovecs. A number of fields of struct bio are moved to
|
|
||||||
dnl # struct bvec_iter.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_BVEC_ITER], [
|
|
||||||
ZFS_LINUX_TEST_SRC([bio_bvec_iter], [
|
|
||||||
#include <linux/bio.h>
|
|
||||||
],[
|
|
||||||
struct bio bio;
|
|
||||||
bio.bi_iter.bi_sector = 0;
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_BVEC_ITER], [
|
|
||||||
AC_MSG_CHECKING([whether bio has bi_iter])
|
|
||||||
ZFS_LINUX_TEST_RESULT([bio_bvec_iter], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BIO_BVEC_ITER, 1, [bio has bi_iter])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.8 API change
|
|
||||||
dnl # The rw argument has been removed from submit_bio/submit_bio_wait.
|
|
||||||
dnl # Callers are now expected to set bio->bi_rw instead of passing it in.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_SUBMIT_BIO], [
|
|
||||||
ZFS_LINUX_TEST_SRC([submit_bio], [
|
|
||||||
#include <linux/bio.h>
|
|
||||||
],[
|
|
||||||
struct bio *bio = NULL;
|
|
||||||
(void) submit_bio(bio);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO_SUBMIT_BIO], [
|
|
||||||
AC_MSG_CHECKING([whether submit_bio() wants 1 arg])
|
|
||||||
ZFS_LINUX_TEST_RESULT([submit_bio], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_1ARG_SUBMIT_BIO, 1, [submit_bio() wants 1 arg])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
@@ -449,31 +198,6 @@ AC_DEFUN([ZFS_AC_KERNEL_BDEV_SUBMIT_BIO_RETURNS_VOID], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # Linux 5.16 API
|
|
||||||
dnl #
|
|
||||||
dnl # The Linux 5.16 API moved struct blkcg_gq into linux/blk-cgroup.h, which
|
|
||||||
dnl # has been around since 2015. This test looks for the presence of that
|
|
||||||
dnl # header, so that it can be conditionally included where it exists, but
|
|
||||||
dnl # still be backward compatible with kernels that pre-date its introduction.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_CGROUP_HEADER], [
|
|
||||||
ZFS_LINUX_TEST_SRC([blk_cgroup_header], [
|
|
||||||
#include <linux/blk-cgroup.h>
|
|
||||||
], [])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_CGROUP_HEADER], [
|
|
||||||
AC_MSG_CHECKING([whether linux/blk-cgroup.h exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([blk_cgroup_header],[
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_LINUX_BLK_CGROUP_HEADER, 1,
|
|
||||||
[linux/blk-cgroup.h exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # Linux 5.18 API
|
dnl # Linux 5.18 API
|
||||||
dnl #
|
dnl #
|
||||||
@@ -510,43 +234,22 @@ AC_DEFUN([ZFS_AC_KERNEL_BIO_ALLOC_4ARG], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO], [
|
||||||
ZFS_AC_KERNEL_SRC_REQ
|
|
||||||
ZFS_AC_KERNEL_SRC_BIO_OPS
|
ZFS_AC_KERNEL_SRC_BIO_OPS
|
||||||
ZFS_AC_KERNEL_SRC_BIO_SET_DEV
|
ZFS_AC_KERNEL_SRC_BIO_SET_DEV
|
||||||
ZFS_AC_KERNEL_SRC_BIO_END_IO_T_ARGS
|
|
||||||
ZFS_AC_KERNEL_SRC_BIO_BI_STATUS
|
|
||||||
ZFS_AC_KERNEL_SRC_BIO_BVEC_ITER
|
|
||||||
ZFS_AC_KERNEL_SRC_BIO_SUBMIT_BIO
|
|
||||||
ZFS_AC_KERNEL_SRC_BIO_CURRENT_BIO_LIST
|
ZFS_AC_KERNEL_SRC_BIO_CURRENT_BIO_LIST
|
||||||
ZFS_AC_KERNEL_SRC_BLKG_TRYGET
|
ZFS_AC_KERNEL_SRC_BLKG_TRYGET
|
||||||
ZFS_AC_KERNEL_SRC_BIO_BDEV_DISK
|
ZFS_AC_KERNEL_SRC_BIO_BDEV_DISK
|
||||||
ZFS_AC_KERNEL_SRC_BDEV_SUBMIT_BIO_RETURNS_VOID
|
ZFS_AC_KERNEL_SRC_BDEV_SUBMIT_BIO_RETURNS_VOID
|
||||||
ZFS_AC_KERNEL_SRC_BIO_SET_DEV_MACRO
|
ZFS_AC_KERNEL_SRC_BIO_SET_DEV_MACRO
|
||||||
ZFS_AC_KERNEL_SRC_BLK_CGROUP_HEADER
|
|
||||||
ZFS_AC_KERNEL_SRC_BIO_ALLOC_4ARG
|
ZFS_AC_KERNEL_SRC_BIO_ALLOC_4ARG
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BIO], [
|
AC_DEFUN([ZFS_AC_KERNEL_BIO], [
|
||||||
ZFS_AC_KERNEL_BIO_REQ_FAILFAST_MASK
|
|
||||||
ZFS_AC_KERNEL_BIO_REQ_DISCARD
|
|
||||||
ZFS_AC_KERNEL_BIO_REQ_FLUSH
|
|
||||||
ZFS_AC_KERNEL_BIO_REQ_PREFLUSH
|
|
||||||
|
|
||||||
ZFS_AC_KERNEL_BIO_REQ_OP_DISCARD
|
|
||||||
ZFS_AC_KERNEL_BIO_REQ_OP_SECURE_ERASE
|
|
||||||
ZFS_AC_KERNEL_BIO_REQ_OP_FLUSH
|
|
||||||
ZFS_AC_KERNEL_BIO_BI_OPF
|
|
||||||
ZFS_AC_KERNEL_BIO_SET_OP_ATTRS
|
ZFS_AC_KERNEL_BIO_SET_OP_ATTRS
|
||||||
|
|
||||||
ZFS_AC_KERNEL_BIO_SET_DEV
|
ZFS_AC_KERNEL_BIO_SET_DEV
|
||||||
ZFS_AC_KERNEL_BIO_END_IO_T_ARGS
|
|
||||||
ZFS_AC_KERNEL_BIO_BI_STATUS
|
|
||||||
ZFS_AC_KERNEL_BIO_BVEC_ITER
|
|
||||||
ZFS_AC_KERNEL_BIO_SUBMIT_BIO
|
|
||||||
ZFS_AC_KERNEL_BIO_CURRENT_BIO_LIST
|
ZFS_AC_KERNEL_BIO_CURRENT_BIO_LIST
|
||||||
ZFS_AC_KERNEL_BLKG_TRYGET
|
ZFS_AC_KERNEL_BLKG_TRYGET
|
||||||
ZFS_AC_KERNEL_BIO_BDEV_DISK
|
ZFS_AC_KERNEL_BIO_BDEV_DISK
|
||||||
ZFS_AC_KERNEL_BDEV_SUBMIT_BIO_RETURNS_VOID
|
ZFS_AC_KERNEL_BDEV_SUBMIT_BIO_RETURNS_VOID
|
||||||
ZFS_AC_KERNEL_BLK_CGROUP_HEADER
|
|
||||||
ZFS_AC_KERNEL_BIO_ALLOC_4ARG
|
ZFS_AC_KERNEL_BIO_ALLOC_4ARG
|
||||||
])
|
])
|
||||||
|
|||||||
+42
-166
@@ -25,6 +25,8 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_PLUG], [
|
|||||||
dnl #
|
dnl #
|
||||||
dnl # 2.6.32 - 4.11: statically allocated bdi in request_queue
|
dnl # 2.6.32 - 4.11: statically allocated bdi in request_queue
|
||||||
dnl # 4.12: dynamically allocated bdi in request_queue
|
dnl # 4.12: dynamically allocated bdi in request_queue
|
||||||
|
dnl # 6.11: bdi no longer available through request_queue, so get it from
|
||||||
|
dnl # the gendisk attached to the queue
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_BDI], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_BDI], [
|
||||||
ZFS_LINUX_TEST_SRC([blk_queue_bdi], [
|
ZFS_LINUX_TEST_SRC([blk_queue_bdi], [
|
||||||
@@ -47,6 +49,30 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_BDI], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_DISK_BDI], [
|
||||||
|
ZFS_LINUX_TEST_SRC([blk_queue_disk_bdi], [
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
#include <linux/backing-dev.h>
|
||||||
|
], [
|
||||||
|
struct request_queue q;
|
||||||
|
struct gendisk disk;
|
||||||
|
struct backing_dev_info bdi __attribute__ ((unused));
|
||||||
|
q.disk = &disk;
|
||||||
|
q.disk->bdi = &bdi;
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_DISK_BDI], [
|
||||||
|
AC_MSG_CHECKING([whether backing_dev_info is available through queue gendisk])
|
||||||
|
ZFS_LINUX_TEST_RESULT([blk_queue_disk_bdi], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_BLK_QUEUE_DISK_BDI, 1,
|
||||||
|
[backing_dev_info is available through queue gendisk])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 5.9: added blk_queue_update_readahead(),
|
dnl # 5.9: added blk_queue_update_readahead(),
|
||||||
dnl # 5.15: renamed to disk_update_readahead()
|
dnl # 5.15: renamed to disk_update_readahead()
|
||||||
@@ -135,7 +161,6 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_DISCARD], [
|
|||||||
dnl #
|
dnl #
|
||||||
dnl # 5.19: bdev_max_secure_erase_sectors() available
|
dnl # 5.19: bdev_max_secure_erase_sectors() available
|
||||||
dnl # 4.8: blk_queue_secure_erase() available
|
dnl # 4.8: blk_queue_secure_erase() available
|
||||||
dnl # 2.6.36: blk_queue_secdiscard() available
|
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_SECURE_ERASE], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_SECURE_ERASE], [
|
||||||
ZFS_LINUX_TEST_SRC([bdev_max_secure_erase_sectors], [
|
ZFS_LINUX_TEST_SRC([bdev_max_secure_erase_sectors], [
|
||||||
@@ -156,16 +181,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_SECURE_ERASE], [
|
|||||||
memset(q, 0, sizeof(r));
|
memset(q, 0, sizeof(r));
|
||||||
value = blk_queue_secure_erase(q);
|
value = blk_queue_secure_erase(q);
|
||||||
],[-Wframe-larger-than=8192])
|
],[-Wframe-larger-than=8192])
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([blk_queue_secdiscard], [
|
|
||||||
#include <linux/blkdev.h>
|
|
||||||
],[
|
|
||||||
struct request_queue r;
|
|
||||||
struct request_queue *q = &r;
|
|
||||||
int value __attribute__ ((unused));
|
|
||||||
memset(q, 0, sizeof(r));
|
|
||||||
value = blk_queue_secdiscard(q);
|
|
||||||
])
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_SECURE_ERASE], [
|
AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_SECURE_ERASE], [
|
||||||
@@ -182,137 +197,11 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_SECURE_ERASE], [
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_BLK_QUEUE_SECURE_ERASE, 1,
|
AC_DEFINE(HAVE_BLK_QUEUE_SECURE_ERASE, 1,
|
||||||
[blk_queue_secure_erase() is available])
|
[blk_queue_secure_erase() is available])
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether blk_queue_secdiscard() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([blk_queue_secdiscard], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BLK_QUEUE_SECDISCARD, 1,
|
|
||||||
[blk_queue_secdiscard() is available])
|
|
||||||
],[
|
],[
|
||||||
ZFS_LINUX_TEST_ERROR([blk_queue_secure_erase])
|
ZFS_LINUX_TEST_ERROR([blk_queue_secure_erase])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.16 API change,
|
|
||||||
dnl # Introduction of blk_queue_flag_set and blk_queue_flag_clear
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_FLAG_SET], [
|
|
||||||
ZFS_LINUX_TEST_SRC([blk_queue_flag_set], [
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/blkdev.h>
|
|
||||||
],[
|
|
||||||
struct request_queue *q = NULL;
|
|
||||||
blk_queue_flag_set(0, q);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_FLAG_SET], [
|
|
||||||
AC_MSG_CHECKING([whether blk_queue_flag_set() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([blk_queue_flag_set], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BLK_QUEUE_FLAG_SET, 1,
|
|
||||||
[blk_queue_flag_set() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_FLAG_CLEAR], [
|
|
||||||
ZFS_LINUX_TEST_SRC([blk_queue_flag_clear], [
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/blkdev.h>
|
|
||||||
],[
|
|
||||||
struct request_queue *q = NULL;
|
|
||||||
blk_queue_flag_clear(0, q);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_FLAG_CLEAR], [
|
|
||||||
AC_MSG_CHECKING([whether blk_queue_flag_clear() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([blk_queue_flag_clear], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BLK_QUEUE_FLAG_CLEAR, 1,
|
|
||||||
[blk_queue_flag_clear() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 2.6.36 API change,
|
|
||||||
dnl # Added blk_queue_flush() interface, while the previous interface
|
|
||||||
dnl # was available to all the new one is GPL-only. Thus in addition to
|
|
||||||
dnl # detecting if this function is available we determine if it is
|
|
||||||
dnl # GPL-only. If the GPL-only interface is there we implement our own
|
|
||||||
dnl # compatibility function, otherwise we use the function. The hope
|
|
||||||
dnl # is that long term this function will be opened up.
|
|
||||||
dnl #
|
|
||||||
dnl # 4.7 API change,
|
|
||||||
dnl # Replace blk_queue_flush with blk_queue_write_cache
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_FLUSH], [
|
|
||||||
ZFS_LINUX_TEST_SRC([blk_queue_flush], [
|
|
||||||
#include <linux/blkdev.h>
|
|
||||||
], [
|
|
||||||
struct request_queue *q __attribute__ ((unused)) = NULL;
|
|
||||||
(void) blk_queue_flush(q, REQ_FLUSH);
|
|
||||||
], [], [ZFS_META_LICENSE])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([blk_queue_write_cache], [
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/blkdev.h>
|
|
||||||
], [
|
|
||||||
struct request_queue *q __attribute__ ((unused)) = NULL;
|
|
||||||
blk_queue_write_cache(q, true, true);
|
|
||||||
], [], [ZFS_META_LICENSE])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_FLUSH], [
|
|
||||||
AC_MSG_CHECKING([whether blk_queue_flush() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([blk_queue_flush], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BLK_QUEUE_FLUSH, 1,
|
|
||||||
[blk_queue_flush() is available])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether blk_queue_flush() is GPL-only])
|
|
||||||
ZFS_LINUX_TEST_RESULT([blk_queue_flush_license], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BLK_QUEUE_FLUSH_GPL_ONLY, 1,
|
|
||||||
[blk_queue_flush() is GPL-only])
|
|
||||||
])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.7 API change
|
|
||||||
dnl # Replace blk_queue_flush with blk_queue_write_cache
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING([whether blk_queue_write_cache() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([blk_queue_write_cache], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BLK_QUEUE_WRITE_CACHE, 1,
|
|
||||||
[blk_queue_write_cache() exists])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether blk_queue_write_cache() is GPL-only])
|
|
||||||
ZFS_LINUX_TEST_RESULT([blk_queue_write_cache_license], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY, 1,
|
|
||||||
[blk_queue_write_cache() is GPL-only])
|
|
||||||
])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 2.6.34 API change
|
dnl # 2.6.34 API change
|
||||||
@@ -332,7 +221,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_MAX_HW_SECTORS], [
|
|||||||
ZFS_LINUX_TEST_RESULT([blk_queue_max_hw_sectors], [
|
ZFS_LINUX_TEST_RESULT([blk_queue_max_hw_sectors], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
],[
|
],[
|
||||||
ZFS_LINUX_TEST_ERROR([blk_queue_max_hw_sectors])
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -355,35 +244,26 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS], [
|
|||||||
ZFS_LINUX_TEST_RESULT([blk_queue_max_segments], [
|
ZFS_LINUX_TEST_RESULT([blk_queue_max_segments], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
], [
|
], [
|
||||||
ZFS_LINUX_TEST_ERROR([blk_queue_max_segments])
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_MQ_RQ_HCTX], [
|
||||||
dnl # See if kernel supports block multi-queue and blk_status_t.
|
ZFS_LINUX_TEST_SRC([blk_mq_rq_hctx], [
|
||||||
dnl # blk_status_t represents the new status codes introduced in the 4.13
|
|
||||||
dnl # kernel patch:
|
|
||||||
dnl #
|
|
||||||
dnl # block: introduce new block status code type
|
|
||||||
dnl #
|
|
||||||
dnl # We do not currently support the "old" block multi-queue interfaces from
|
|
||||||
dnl # prior kernels.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_MQ], [
|
|
||||||
ZFS_LINUX_TEST_SRC([blk_mq], [
|
|
||||||
#include <linux/blk-mq.h>
|
#include <linux/blk-mq.h>
|
||||||
|
#include <linux/blkdev.h>
|
||||||
], [
|
], [
|
||||||
struct blk_mq_tag_set tag_set __attribute__ ((unused)) = {0};
|
struct request rq = {0};
|
||||||
(void) blk_mq_alloc_tag_set(&tag_set);
|
struct blk_mq_hw_ctx *hctx = NULL;
|
||||||
return BLK_STS_OK;
|
rq.mq_hctx = hctx;
|
||||||
], [])
|
], [])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_MQ], [
|
AC_DEFUN([ZFS_AC_KERNEL_BLK_MQ_RQ_HCTX], [
|
||||||
AC_MSG_CHECKING([whether block multiqueue with blk_status_t is available])
|
AC_MSG_CHECKING([whether block multiqueue hardware context is cached in struct request])
|
||||||
ZFS_LINUX_TEST_RESULT([blk_mq], [
|
ZFS_LINUX_TEST_RESULT([blk_mq_rq_hctx], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_BLK_MQ, 1, [block multiqueue is available])
|
AC_DEFINE(HAVE_BLK_MQ_RQ_HCTX, 1, [block multiqueue hardware context is cached in struct request])
|
||||||
], [
|
], [
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
@@ -392,27 +272,23 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_MQ], [
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE], [
|
||||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_PLUG
|
ZFS_AC_KERNEL_SRC_BLK_QUEUE_PLUG
|
||||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_BDI
|
ZFS_AC_KERNEL_SRC_BLK_QUEUE_BDI
|
||||||
|
ZFS_AC_KERNEL_SRC_BLK_QUEUE_DISK_BDI
|
||||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_UPDATE_READAHEAD
|
ZFS_AC_KERNEL_SRC_BLK_QUEUE_UPDATE_READAHEAD
|
||||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_DISCARD
|
ZFS_AC_KERNEL_SRC_BLK_QUEUE_DISCARD
|
||||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_SECURE_ERASE
|
ZFS_AC_KERNEL_SRC_BLK_QUEUE_SECURE_ERASE
|
||||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_FLAG_SET
|
|
||||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_FLAG_CLEAR
|
|
||||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_FLUSH
|
|
||||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_MAX_HW_SECTORS
|
ZFS_AC_KERNEL_SRC_BLK_QUEUE_MAX_HW_SECTORS
|
||||||
ZFS_AC_KERNEL_SRC_BLK_QUEUE_MAX_SEGMENTS
|
ZFS_AC_KERNEL_SRC_BLK_QUEUE_MAX_SEGMENTS
|
||||||
ZFS_AC_KERNEL_SRC_BLK_MQ
|
ZFS_AC_KERNEL_SRC_BLK_MQ_RQ_HCTX
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE], [
|
AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE], [
|
||||||
ZFS_AC_KERNEL_BLK_QUEUE_PLUG
|
ZFS_AC_KERNEL_BLK_QUEUE_PLUG
|
||||||
ZFS_AC_KERNEL_BLK_QUEUE_BDI
|
ZFS_AC_KERNEL_BLK_QUEUE_BDI
|
||||||
|
ZFS_AC_KERNEL_BLK_QUEUE_DISK_BDI
|
||||||
ZFS_AC_KERNEL_BLK_QUEUE_UPDATE_READAHEAD
|
ZFS_AC_KERNEL_BLK_QUEUE_UPDATE_READAHEAD
|
||||||
ZFS_AC_KERNEL_BLK_QUEUE_DISCARD
|
ZFS_AC_KERNEL_BLK_QUEUE_DISCARD
|
||||||
ZFS_AC_KERNEL_BLK_QUEUE_SECURE_ERASE
|
ZFS_AC_KERNEL_BLK_QUEUE_SECURE_ERASE
|
||||||
ZFS_AC_KERNEL_BLK_QUEUE_FLAG_SET
|
|
||||||
ZFS_AC_KERNEL_BLK_QUEUE_FLAG_CLEAR
|
|
||||||
ZFS_AC_KERNEL_BLK_QUEUE_FLUSH
|
|
||||||
ZFS_AC_KERNEL_BLK_QUEUE_MAX_HW_SECTORS
|
ZFS_AC_KERNEL_BLK_QUEUE_MAX_HW_SECTORS
|
||||||
ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS
|
ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS
|
||||||
ZFS_AC_KERNEL_BLK_MQ
|
ZFS_AC_KERNEL_BLK_MQ_RQ_HCTX
|
||||||
])
|
])
|
||||||
|
|||||||
+150
-53
@@ -54,6 +54,26 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_OPEN_BY_PATH], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.9.x API change
|
||||||
|
dnl # bdev_file_open_by_path() replaced bdev_open_by_path(),
|
||||||
|
dnl # and returns struct file*
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BDEV_FILE_OPEN_BY_PATH], [
|
||||||
|
ZFS_LINUX_TEST_SRC([bdev_file_open_by_path], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
], [
|
||||||
|
struct file *file __attribute__ ((unused)) = NULL;
|
||||||
|
const char *path = "path";
|
||||||
|
fmode_t mode = 0;
|
||||||
|
void *holder = NULL;
|
||||||
|
struct blk_holder_ops h;
|
||||||
|
|
||||||
|
file = bdev_file_open_by_path(path, mode, holder, &h);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH], [
|
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH], [
|
||||||
AC_MSG_CHECKING([whether blkdev_get_by_path() exists and takes 3 args])
|
AC_MSG_CHECKING([whether blkdev_get_by_path() exists and takes 3 args])
|
||||||
ZFS_LINUX_TEST_RESULT([blkdev_get_by_path], [
|
ZFS_LINUX_TEST_RESULT([blkdev_get_by_path], [
|
||||||
@@ -73,11 +93,20 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH], [
|
|||||||
[bdev_open_by_path() exists])
|
[bdev_open_by_path() exists])
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
], [
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_CHECKING([whether bdev_file_open_by_path() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([bdev_file_open_by_path], [
|
||||||
|
AC_DEFINE(HAVE_BDEV_FILE_OPEN_BY_PATH, 1,
|
||||||
|
[bdev_file_open_by_path() exists])
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
ZFS_LINUX_TEST_ERROR([blkdev_get_by_path()])
|
ZFS_LINUX_TEST_ERROR([blkdev_get_by_path()])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 6.5.x API change
|
dnl # 6.5.x API change
|
||||||
@@ -149,10 +178,19 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_RELEASE], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.9.x API change
|
||||||
|
dnl #
|
||||||
|
dnl # bdev_release() now private, but because bdev_file_open_by_path() returns
|
||||||
|
dnl # struct file*, we can just use fput(). So the blkdev_put test no longer
|
||||||
|
dnl # fails if not found.
|
||||||
|
dnl #
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_PUT], [
|
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_PUT], [
|
||||||
AC_MSG_CHECKING([whether blkdev_put() exists])
|
AC_MSG_CHECKING([whether blkdev_put() exists])
|
||||||
ZFS_LINUX_TEST_RESULT([blkdev_put], [
|
ZFS_LINUX_TEST_RESULT([blkdev_put], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_BLKDEV_PUT, 1, [blkdev_put() exists])
|
||||||
], [
|
], [
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
AC_MSG_CHECKING([whether blkdev_put() accepts void* as arg 2])
|
AC_MSG_CHECKING([whether blkdev_put() accepts void* as arg 2])
|
||||||
@@ -168,7 +206,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_PUT], [
|
|||||||
AC_DEFINE(HAVE_BDEV_RELEASE, 1,
|
AC_DEFINE(HAVE_BDEV_RELEASE, 1,
|
||||||
[bdev_release() exists])
|
[bdev_release() exists])
|
||||||
], [
|
], [
|
||||||
ZFS_LINUX_TEST_ERROR([blkdev_put()])
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@@ -358,7 +396,6 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_INVALIDATE_BDEV], [
|
|||||||
dnl #
|
dnl #
|
||||||
dnl # 5.11 API, lookup_bdev() takes dev_t argument.
|
dnl # 5.11 API, lookup_bdev() takes dev_t argument.
|
||||||
dnl # 2.6.27 API, lookup_bdev() was first exported.
|
dnl # 2.6.27 API, lookup_bdev() was first exported.
|
||||||
dnl # 4.4.0-6.21 API, lookup_bdev() on Ubuntu takes mode argument.
|
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_LOOKUP_BDEV], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_LOOKUP_BDEV], [
|
||||||
ZFS_LINUX_TEST_SRC([lookup_bdev_devt], [
|
ZFS_LINUX_TEST_SRC([lookup_bdev_devt], [
|
||||||
@@ -380,15 +417,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_LOOKUP_BDEV], [
|
|||||||
|
|
||||||
bdev = lookup_bdev(path);
|
bdev = lookup_bdev(path);
|
||||||
])
|
])
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([lookup_bdev_mode], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
], [
|
|
||||||
struct block_device *bdev __attribute__ ((unused));
|
|
||||||
const char path[] = "/example/path";
|
|
||||||
|
|
||||||
bdev = lookup_bdev(path, FMODE_READ);
|
|
||||||
])
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_LOOKUP_BDEV], [
|
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_LOOKUP_BDEV], [
|
||||||
@@ -407,21 +435,11 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_LOOKUP_BDEV], [
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_1ARG_LOOKUP_BDEV, 1,
|
AC_DEFINE(HAVE_1ARG_LOOKUP_BDEV, 1,
|
||||||
[lookup_bdev() wants 1 arg])
|
[lookup_bdev() wants 1 arg])
|
||||||
], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether lookup_bdev() wants mode arg])
|
|
||||||
ZFS_LINUX_TEST_RESULT_SYMBOL([lookup_bdev_mode],
|
|
||||||
[lookup_bdev], [fs/block_dev.c], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_MODE_LOOKUP_BDEV, 1,
|
|
||||||
[lookup_bdev() wants mode arg])
|
|
||||||
], [
|
], [
|
||||||
ZFS_LINUX_TEST_ERROR([lookup_bdev()])
|
ZFS_LINUX_TEST_ERROR([lookup_bdev()])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 2.6.30 API change
|
dnl # 2.6.30 API change
|
||||||
@@ -496,6 +514,30 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEV_WHOLE], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 5.16 API change
|
||||||
|
dnl # Added bdev_nr_bytes() helper.
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_NR_BYTES], [
|
||||||
|
ZFS_LINUX_TEST_SRC([bdev_nr_bytes], [
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
],[
|
||||||
|
struct block_device *bdev = NULL;
|
||||||
|
loff_t nr_bytes __attribute__ ((unused)) = 0;
|
||||||
|
nr_bytes = bdev_nr_bytes(bdev);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEV_NR_BYTES], [
|
||||||
|
AC_MSG_CHECKING([whether bdev_nr_bytes() is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([bdev_nr_bytes], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_BDEV_NR_BYTES, 1, [bdev_nr_bytes() is available])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 5.20 API change,
|
dnl # 5.20 API change,
|
||||||
dnl # Removed bdevname(), snprintf(.., %pg) should be used.
|
dnl # Removed bdevname(), snprintf(.., %pg) should be used.
|
||||||
@@ -523,12 +565,29 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEVNAME], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 5.19 API: blkdev_issue_secure_erase()
|
dnl # TRIM support: discard and secure erase. We make use of asynchronous
|
||||||
dnl # 4.7 API: __blkdev_issue_discard(..., BLKDEV_DISCARD_SECURE)
|
dnl # functions when available.
|
||||||
dnl # 3.10 API: blkdev_issue_discard(..., BLKDEV_DISCARD_SECURE)
|
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_SECURE_ERASE], [
|
dnl # 3.10:
|
||||||
ZFS_LINUX_TEST_SRC([blkdev_issue_secure_erase], [
|
dnl # sync discard: blkdev_issue_discard(..., 0)
|
||||||
|
dnl # sync erase: blkdev_issue_discard(..., BLKDEV_DISCARD_SECURE)
|
||||||
|
dnl # async discard: [not available]
|
||||||
|
dnl # async erase: [not available]
|
||||||
|
dnl #
|
||||||
|
dnl # 4.7:
|
||||||
|
dnl # sync discard: blkdev_issue_discard(..., 0)
|
||||||
|
dnl # sync erase: blkdev_issue_discard(..., BLKDEV_DISCARD_SECURE)
|
||||||
|
dnl # async discard: __blkdev_issue_discard(..., 0)
|
||||||
|
dnl # async erase: __blkdev_issue_discard(..., BLKDEV_DISCARD_SECURE)
|
||||||
|
dnl #
|
||||||
|
dnl # 5.19:
|
||||||
|
dnl # sync discard: blkdev_issue_discard(...)
|
||||||
|
dnl # sync erase: blkdev_issue_secure_erase(...)
|
||||||
|
dnl # async discard: __blkdev_issue_discard(...)
|
||||||
|
dnl # async erase: [not available]
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_DISCARD], [
|
||||||
|
ZFS_LINUX_TEST_SRC([blkdev_issue_discard_noflags], [
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
],[
|
],[
|
||||||
struct block_device *bdev = NULL;
|
struct block_device *bdev = NULL;
|
||||||
@@ -536,10 +595,33 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_SECURE_ERASE], [
|
|||||||
sector_t nr_sects = 0;
|
sector_t nr_sects = 0;
|
||||||
int error __attribute__ ((unused));
|
int error __attribute__ ((unused));
|
||||||
|
|
||||||
error = blkdev_issue_secure_erase(bdev,
|
error = blkdev_issue_discard(bdev,
|
||||||
sector, nr_sects, GFP_KERNEL);
|
sector, nr_sects, GFP_KERNEL);
|
||||||
])
|
])
|
||||||
|
ZFS_LINUX_TEST_SRC([blkdev_issue_discard_flags], [
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
],[
|
||||||
|
struct block_device *bdev = NULL;
|
||||||
|
sector_t sector = 0;
|
||||||
|
sector_t nr_sects = 0;
|
||||||
|
unsigned long flags = 0;
|
||||||
|
int error __attribute__ ((unused));
|
||||||
|
|
||||||
|
error = blkdev_issue_discard(bdev,
|
||||||
|
sector, nr_sects, GFP_KERNEL, flags);
|
||||||
|
])
|
||||||
|
ZFS_LINUX_TEST_SRC([blkdev_issue_discard_async_noflags], [
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
],[
|
||||||
|
struct block_device *bdev = NULL;
|
||||||
|
sector_t sector = 0;
|
||||||
|
sector_t nr_sects = 0;
|
||||||
|
struct bio *biop = NULL;
|
||||||
|
int error __attribute__ ((unused));
|
||||||
|
|
||||||
|
error = __blkdev_issue_discard(bdev,
|
||||||
|
sector, nr_sects, GFP_KERNEL, &biop);
|
||||||
|
])
|
||||||
ZFS_LINUX_TEST_SRC([blkdev_issue_discard_async_flags], [
|
ZFS_LINUX_TEST_SRC([blkdev_issue_discard_async_flags], [
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
],[
|
],[
|
||||||
@@ -553,22 +635,52 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_SECURE_ERASE], [
|
|||||||
error = __blkdev_issue_discard(bdev,
|
error = __blkdev_issue_discard(bdev,
|
||||||
sector, nr_sects, GFP_KERNEL, flags, &biop);
|
sector, nr_sects, GFP_KERNEL, flags, &biop);
|
||||||
])
|
])
|
||||||
|
ZFS_LINUX_TEST_SRC([blkdev_issue_secure_erase], [
|
||||||
ZFS_LINUX_TEST_SRC([blkdev_issue_discard_flags], [
|
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
],[
|
],[
|
||||||
struct block_device *bdev = NULL;
|
struct block_device *bdev = NULL;
|
||||||
sector_t sector = 0;
|
sector_t sector = 0;
|
||||||
sector_t nr_sects = 0;
|
sector_t nr_sects = 0;
|
||||||
unsigned long flags = 0;
|
|
||||||
int error __attribute__ ((unused));
|
int error __attribute__ ((unused));
|
||||||
|
|
||||||
error = blkdev_issue_discard(bdev,
|
error = blkdev_issue_secure_erase(bdev,
|
||||||
sector, nr_sects, GFP_KERNEL, flags);
|
sector, nr_sects, GFP_KERNEL);
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_ISSUE_SECURE_ERASE], [
|
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_ISSUE_DISCARD], [
|
||||||
|
AC_MSG_CHECKING([whether blkdev_issue_discard() is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([blkdev_issue_discard_noflags], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS, 1,
|
||||||
|
[blkdev_issue_discard() is available])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
AC_MSG_CHECKING([whether blkdev_issue_discard(flags) is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([blkdev_issue_discard_flags], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_BLKDEV_ISSUE_DISCARD_FLAGS, 1,
|
||||||
|
[blkdev_issue_discard(flags) is available])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
AC_MSG_CHECKING([whether __blkdev_issue_discard() is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([blkdev_issue_discard_async_noflags], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS, 1,
|
||||||
|
[__blkdev_issue_discard() is available])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
AC_MSG_CHECKING([whether __blkdev_issue_discard(flags) is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([blkdev_issue_discard_async_flags], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS, 1,
|
||||||
|
[__blkdev_issue_discard(flags) is available])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
AC_MSG_CHECKING([whether blkdev_issue_secure_erase() is available])
|
AC_MSG_CHECKING([whether blkdev_issue_secure_erase() is available])
|
||||||
ZFS_LINUX_TEST_RESULT([blkdev_issue_secure_erase], [
|
ZFS_LINUX_TEST_RESULT([blkdev_issue_secure_erase], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
@@ -576,24 +688,6 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_ISSUE_SECURE_ERASE], [
|
|||||||
[blkdev_issue_secure_erase() is available])
|
[blkdev_issue_secure_erase() is available])
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether __blkdev_issue_discard() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([blkdev_issue_discard_async_flags], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BLKDEV_ISSUE_DISCARD_ASYNC, 1,
|
|
||||||
[__blkdev_issue_discard() is available])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether blkdev_issue_discard() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([blkdev_issue_discard_flags], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_BLKDEV_ISSUE_DISCARD, 1,
|
|
||||||
[blkdev_issue_discard() is available])
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_ERROR([blkdev_issue_discard()])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -645,6 +739,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [
|
|||||||
ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH
|
ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG
|
ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_OPEN_BY_PATH
|
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_OPEN_BY_PATH
|
||||||
|
ZFS_AC_KERNEL_SRC_BDEV_FILE_OPEN_BY_PATH
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_PUT
|
ZFS_AC_KERNEL_SRC_BLKDEV_PUT
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_PUT_HOLDER
|
ZFS_AC_KERNEL_SRC_BLKDEV_PUT_HOLDER
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_RELEASE
|
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_RELEASE
|
||||||
@@ -656,8 +751,9 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [
|
|||||||
ZFS_AC_KERNEL_SRC_BLKDEV_CHECK_DISK_CHANGE
|
ZFS_AC_KERNEL_SRC_BLKDEV_CHECK_DISK_CHANGE
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_CHECK_MEDIA_CHANGE
|
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_CHECK_MEDIA_CHANGE
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_WHOLE
|
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_WHOLE
|
||||||
|
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_NR_BYTES
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_BDEVNAME
|
ZFS_AC_KERNEL_SRC_BLKDEV_BDEVNAME
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_SECURE_ERASE
|
ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_DISCARD
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_KOBJ
|
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_KOBJ
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_PART_TO_DEV
|
ZFS_AC_KERNEL_SRC_BLKDEV_PART_TO_DEV
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_DISK_CHECK_MEDIA_CHANGE
|
ZFS_AC_KERNEL_SRC_BLKDEV_DISK_CHECK_MEDIA_CHANGE
|
||||||
@@ -676,9 +772,10 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV], [
|
|||||||
ZFS_AC_KERNEL_BLKDEV_CHECK_DISK_CHANGE
|
ZFS_AC_KERNEL_BLKDEV_CHECK_DISK_CHANGE
|
||||||
ZFS_AC_KERNEL_BLKDEV_BDEV_CHECK_MEDIA_CHANGE
|
ZFS_AC_KERNEL_BLKDEV_BDEV_CHECK_MEDIA_CHANGE
|
||||||
ZFS_AC_KERNEL_BLKDEV_BDEV_WHOLE
|
ZFS_AC_KERNEL_BLKDEV_BDEV_WHOLE
|
||||||
|
ZFS_AC_KERNEL_BLKDEV_BDEV_NR_BYTES
|
||||||
ZFS_AC_KERNEL_BLKDEV_BDEVNAME
|
ZFS_AC_KERNEL_BLKDEV_BDEVNAME
|
||||||
ZFS_AC_KERNEL_BLKDEV_GET_ERESTARTSYS
|
ZFS_AC_KERNEL_BLKDEV_GET_ERESTARTSYS
|
||||||
ZFS_AC_KERNEL_BLKDEV_ISSUE_SECURE_ERASE
|
ZFS_AC_KERNEL_BLKDEV_ISSUE_DISCARD
|
||||||
ZFS_AC_KERNEL_BLKDEV_BDEV_KOBJ
|
ZFS_AC_KERNEL_BLKDEV_BDEV_KOBJ
|
||||||
ZFS_AC_KERNEL_BLKDEV_PART_TO_DEV
|
ZFS_AC_KERNEL_BLKDEV_PART_TO_DEV
|
||||||
ZFS_AC_KERNEL_BLKDEV_DISK_CHECK_MEDIA_CHANGE
|
ZFS_AC_KERNEL_BLKDEV_DISK_CHECK_MEDIA_CHANGE
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 3.5.0 API change
|
|
||||||
dnl # torvalds/linux@dbd5768f87ff6fb0a4fe09c4d7b6c4a24de99430 and
|
|
||||||
dnl # torvalds/linux@7994e6f7254354e03028a11f98a27bd67dace9f1 reworked
|
|
||||||
dnl # where inode_sync_wait() is called.
|
|
||||||
dnl #
|
|
||||||
dnl # Prior to these changes it would occur in end_writeback() but due
|
|
||||||
dnl # to various issues (described in the above commits) it has been
|
|
||||||
dnl # moved to evict(). This changes the ordering is which sync occurs
|
|
||||||
dnl # but otherwise doesn't impact the zpl implementation.
|
|
||||||
dnl #
|
|
||||||
dnl # The major impact here is the renaming of end_writeback() to
|
|
||||||
dnl # clear_inode(). However, care must be taken when detecting this
|
|
||||||
dnl # API change because as recently as 2.6.35 there was a clear_inode()
|
|
||||||
dnl # function. However, it was made obsolete by the evict_inode() API
|
|
||||||
dnl # change at the same time.
|
|
||||||
dnl #
|
|
||||||
dnl # Therefore, to ensure we have the correct API we only allow the
|
|
||||||
dnl # clear_inode() compatibility code to be defined iff the evict_inode()
|
|
||||||
dnl # functionality is also detected.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_CLEAR_INODE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([clear_inode], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
], [
|
|
||||||
clear_inode(NULL);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_CLEAR_INODE], [
|
|
||||||
AC_MSG_CHECKING([whether clear_inode() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT_SYMBOL([clear_inode],
|
|
||||||
[clear_inode], [fs/inode.c], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_CLEAR_INODE, 1, [clear_inode() is available])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -4,21 +4,6 @@ dnl # detected at configure time and cause a build failure. Otherwise
|
|||||||
dnl # modules may be successfully built that behave incorrectly.
|
dnl # modules may be successfully built that behave incorrectly.
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_CONFIG_DEFINED], [
|
AC_DEFUN([ZFS_AC_KERNEL_CONFIG_DEFINED], [
|
||||||
AS_IF([test "x$cross_compiling" != xyes], [
|
|
||||||
AC_RUN_IFELSE([
|
|
||||||
AC_LANG_PROGRAM([
|
|
||||||
#include "$LINUX/include/linux/license.h"
|
|
||||||
], [
|
|
||||||
return !license_is_gpl_compatible(
|
|
||||||
"$ZFS_META_LICENSE");
|
|
||||||
])
|
|
||||||
], [
|
|
||||||
AC_DEFINE([ZFS_IS_GPL_COMPATIBLE], [1],
|
|
||||||
[Define to 1 if GPL-only symbols can be used])
|
|
||||||
], [
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_AC_KERNEL_SRC_CONFIG_MODULES
|
ZFS_AC_KERNEL_SRC_CONFIG_MODULES
|
||||||
ZFS_AC_KERNEL_SRC_CONFIG_BLOCK
|
ZFS_AC_KERNEL_SRC_CONFIG_BLOCK
|
||||||
ZFS_AC_KERNEL_SRC_CONFIG_DEBUG_LOCK_ALLOC
|
ZFS_AC_KERNEL_SRC_CONFIG_DEBUG_LOCK_ALLOC
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 4.9, current_time() added
|
|
||||||
dnl # 4.18, return type changed from timespec to timespec64
|
|
||||||
dnl #
|
|
||||||
dnl # Note that we don't care about the return type in this check. If we have
|
|
||||||
dnl # to implement a fallback, we'll know we're <4.9, which was timespec.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_CURRENT_TIME], [
|
|
||||||
ZFS_LINUX_TEST_SRC([current_time], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
], [
|
|
||||||
struct inode ip __attribute__ ((unused));
|
|
||||||
(void) current_time(&ip);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_CURRENT_TIME], [
|
|
||||||
AC_MSG_CHECKING([whether current_time() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT_SYMBOL([current_time],
|
|
||||||
[current_time], [fs/inode.c], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_CURRENT_TIME, 1, [current_time() exists])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 3.18 API change
|
|
||||||
dnl # Dentry aliases are in d_u struct dentry member
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY_ALIAS_D_U], [
|
|
||||||
ZFS_LINUX_TEST_SRC([dentry_alias_d_u], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
#include <linux/dcache.h>
|
|
||||||
#include <linux/list.h>
|
|
||||||
], [
|
|
||||||
struct inode *inode __attribute__ ((unused)) = NULL;
|
|
||||||
struct dentry *dentry __attribute__ ((unused)) = NULL;
|
|
||||||
hlist_for_each_entry(dentry, &inode->i_dentry,
|
|
||||||
d_u.d_alias) {
|
|
||||||
d_drop(dentry);
|
|
||||||
}
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_DENTRY_ALIAS_D_U], [
|
|
||||||
AC_MSG_CHECKING([whether dentry aliases are in d_u member])
|
|
||||||
ZFS_LINUX_TEST_RESULT([dentry_alias_d_u], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_DENTRY_D_U_ALIASES, 1,
|
|
||||||
[dentry aliases are in d_u member])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
@@ -1,26 +1,3 @@
|
|||||||
dnl #
|
|
||||||
dnl # 3.4.0 API change
|
|
||||||
dnl # Added d_make_root() to replace previous d_alloc_root() function.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_D_MAKE_ROOT], [
|
|
||||||
ZFS_LINUX_TEST_SRC([d_make_root], [
|
|
||||||
#include <linux/dcache.h>
|
|
||||||
], [
|
|
||||||
d_make_root(NULL);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_D_MAKE_ROOT], [
|
|
||||||
AC_MSG_CHECKING([whether d_make_root() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT_SYMBOL([d_make_root],
|
|
||||||
[d_make_root], [fs/dcache.c], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_D_MAKE_ROOT, 1, [d_make_root() is available])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 2.6.28 API change
|
dnl # 2.6.28 API change
|
||||||
dnl # Added d_obtain_alias() helper function.
|
dnl # Added d_obtain_alias() helper function.
|
||||||
@@ -43,31 +20,6 @@ AC_DEFUN([ZFS_AC_KERNEL_D_OBTAIN_ALIAS], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 2.6.12 API change
|
|
||||||
dnl # d_prune_aliases() helper function available.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_D_PRUNE_ALIASES], [
|
|
||||||
ZFS_LINUX_TEST_SRC([d_prune_aliases], [
|
|
||||||
#include <linux/dcache.h>
|
|
||||||
], [
|
|
||||||
struct inode *ip = NULL;
|
|
||||||
d_prune_aliases(ip);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_D_PRUNE_ALIASES], [
|
|
||||||
AC_MSG_CHECKING([whether d_prune_aliases() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT_SYMBOL([d_prune_aliases],
|
|
||||||
[d_prune_aliases], [fs/dcache.c], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_D_PRUNE_ALIASES, 1,
|
|
||||||
[d_prune_aliases() is available])
|
|
||||||
], [
|
|
||||||
ZFS_LINUX_TEST_ERROR([d_prune_aliases()])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 2.6.38 API change
|
dnl # 2.6.38 API change
|
||||||
dnl # Added d_set_d_op() helper function.
|
dnl # Added d_set_d_op() helper function.
|
||||||
@@ -90,101 +42,14 @@ AC_DEFUN([ZFS_AC_KERNEL_D_SET_D_OP], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 3.6 API change
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_D_REVALIDATE_NAMEIDATA], [
|
|
||||||
ZFS_LINUX_TEST_SRC([dentry_operations_revalidate], [
|
|
||||||
#include <linux/dcache.h>
|
|
||||||
#include <linux/sched.h>
|
|
||||||
|
|
||||||
static int revalidate (struct dentry *dentry,
|
|
||||||
struct nameidata *nidata) { return 0; }
|
|
||||||
|
|
||||||
static const struct dentry_operations
|
|
||||||
dops __attribute__ ((unused)) = {
|
|
||||||
.d_revalidate = revalidate,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_D_REVALIDATE_NAMEIDATA], [
|
|
||||||
AC_MSG_CHECKING([whether dops->d_revalidate() takes struct nameidata])
|
|
||||||
ZFS_LINUX_TEST_RESULT([dentry_operations_revalidate], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_D_REVALIDATE_NAMEIDATA, 1,
|
|
||||||
[dops->d_revalidate() operation takes nameidata])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 2.6.30 API change
|
|
||||||
dnl # The 'struct dentry_operations' was constified in the dentry structure.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_CONST_DENTRY_OPERATIONS], [
|
|
||||||
ZFS_LINUX_TEST_SRC([dentry_operations_const], [
|
|
||||||
#include <linux/dcache.h>
|
|
||||||
|
|
||||||
const struct dentry_operations test_d_op = {
|
|
||||||
.d_revalidate = NULL,
|
|
||||||
};
|
|
||||||
],[
|
|
||||||
struct dentry d __attribute__ ((unused));
|
|
||||||
d.d_op = &test_d_op;
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_CONST_DENTRY_OPERATIONS], [
|
|
||||||
AC_MSG_CHECKING([whether dentry uses const struct dentry_operations])
|
|
||||||
ZFS_LINUX_TEST_RESULT([dentry_operations_const], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_CONST_DENTRY_OPERATIONS, 1,
|
|
||||||
[dentry uses const struct dentry_operations])
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_ERROR([const dentry_operations])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 2.6.38 API change
|
|
||||||
dnl # Added sb->s_d_op default dentry_operations member
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_S_D_OP], [
|
|
||||||
ZFS_LINUX_TEST_SRC([super_block_s_d_op], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
],[
|
|
||||||
struct super_block sb __attribute__ ((unused));
|
|
||||||
sb.s_d_op = NULL;
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_S_D_OP], [
|
|
||||||
AC_MSG_CHECKING([whether super_block has s_d_op])
|
|
||||||
ZFS_LINUX_TEST_RESULT([super_block_s_d_op], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
], [
|
|
||||||
ZFS_LINUX_TEST_ERROR([super_block s_d_op])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY], [
|
||||||
ZFS_AC_KERNEL_SRC_D_MAKE_ROOT
|
|
||||||
ZFS_AC_KERNEL_SRC_D_OBTAIN_ALIAS
|
ZFS_AC_KERNEL_SRC_D_OBTAIN_ALIAS
|
||||||
ZFS_AC_KERNEL_SRC_D_PRUNE_ALIASES
|
|
||||||
ZFS_AC_KERNEL_SRC_D_SET_D_OP
|
ZFS_AC_KERNEL_SRC_D_SET_D_OP
|
||||||
ZFS_AC_KERNEL_SRC_D_REVALIDATE_NAMEIDATA
|
|
||||||
ZFS_AC_KERNEL_SRC_CONST_DENTRY_OPERATIONS
|
|
||||||
ZFS_AC_KERNEL_SRC_S_D_OP
|
ZFS_AC_KERNEL_SRC_S_D_OP
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_DENTRY], [
|
AC_DEFUN([ZFS_AC_KERNEL_DENTRY], [
|
||||||
ZFS_AC_KERNEL_D_MAKE_ROOT
|
|
||||||
ZFS_AC_KERNEL_D_OBTAIN_ALIAS
|
ZFS_AC_KERNEL_D_OBTAIN_ALIAS
|
||||||
ZFS_AC_KERNEL_D_PRUNE_ALIASES
|
|
||||||
ZFS_AC_KERNEL_D_SET_D_OP
|
ZFS_AC_KERNEL_D_SET_D_OP
|
||||||
ZFS_AC_KERNEL_D_REVALIDATE_NAMEIDATA
|
|
||||||
ZFS_AC_KERNEL_CONST_DENTRY_OPERATIONS
|
|
||||||
ZFS_AC_KERNEL_S_D_OP
|
ZFS_AC_KERNEL_S_D_OP
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 3.0 API change
|
|
||||||
dnl # The sops->dirty_inode() callbacks were updated to take a flags
|
|
||||||
dnl # argument. This allows the greater control over whether the
|
|
||||||
dnl # filesystem needs to push out a transaction or not.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_DIRTY_INODE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([dirty_inode_with_flags], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
static void dirty_inode(struct inode *a, int b) { return; }
|
|
||||||
|
|
||||||
static const struct super_operations
|
|
||||||
sops __attribute__ ((unused)) = {
|
|
||||||
.dirty_inode = dirty_inode,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_DIRTY_INODE], [
|
|
||||||
AC_MSG_CHECKING([whether sops->dirty_inode() wants flags])
|
|
||||||
ZFS_LINUX_TEST_RESULT([dirty_inode_with_flags], [
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE(HAVE_DIRTY_INODE_WITH_FLAGS, 1,
|
|
||||||
[sops->dirty_inode() wants flags])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 3.5.0 API change
|
|
||||||
dnl # torvalds/linux@b0b0382bb4904965a9e9fca77ad87514dfda0d1c changed the
|
|
||||||
dnl # ->encode_fh() callback to pass the child inode and its parents inode
|
|
||||||
dnl # rather than a dentry and a boolean saying whether we want the parent.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_ENCODE_FH_WITH_INODE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([export_operations_encode_fh], [
|
|
||||||
#include <linux/exportfs.h>
|
|
||||||
static int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
|
|
||||||
struct inode *parent) { return 0; }
|
|
||||||
static struct export_operations eops __attribute__ ((unused))={
|
|
||||||
.encode_fh = encode_fh,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_ENCODE_FH_WITH_INODE], [
|
|
||||||
AC_MSG_CHECKING([whether eops->encode_fh() wants inode])
|
|
||||||
ZFS_LINUX_TEST_RESULT([export_operations_encode_fh], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_ENCODE_FH_WITH_INODE, 1,
|
|
||||||
[eops->encode_fh() wants child and parent inodes])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 2.6.36 API change
|
|
||||||
dnl # The sops->delete_inode() and sops->clear_inode() callbacks have
|
|
||||||
dnl # replaced by a single sops->evict_inode() callback.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_EVICT_INODE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([evict_inode], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
static void evict_inode (struct inode * t) { return; }
|
|
||||||
static struct super_operations sops __attribute__ ((unused)) = {
|
|
||||||
.evict_inode = evict_inode,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_EVICT_INODE], [
|
|
||||||
AC_MSG_CHECKING([whether sops->evict_inode() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([evict_inode], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_EVICT_INODE, 1, [sops->evict_inode() exists])
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_ERROR([evict_inode])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # Linux 4.19 API
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_FADVISE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([file_fadvise], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
static const struct file_operations
|
|
||||||
fops __attribute__ ((unused)) = {
|
|
||||||
.fadvise = NULL,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_FADVISE], [
|
|
||||||
AC_MSG_CHECKING([whether fops->fadvise() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([file_fadvise], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_FILE_FADVISE, 1, [fops->fadvise() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # Linux 2.6.38 - 3.x API
|
|
||||||
dnl # The fallocate callback was moved from the inode_operations
|
|
||||||
dnl # structure to the file_operations structure.
|
|
||||||
dnl #
|
|
||||||
dnl #
|
|
||||||
dnl # Linux 3.15+
|
|
||||||
dnl # fallocate learned a new flag, FALLOC_FL_ZERO_RANGE
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_FALLOCATE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([file_fallocate], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
static long test_fallocate(struct file *file, int mode,
|
|
||||||
loff_t offset, loff_t len) { return 0; }
|
|
||||||
|
|
||||||
static const struct file_operations
|
|
||||||
fops __attribute__ ((unused)) = {
|
|
||||||
.fallocate = test_fallocate,
|
|
||||||
};
|
|
||||||
], [])
|
|
||||||
ZFS_LINUX_TEST_SRC([falloc_fl_zero_range], [
|
|
||||||
#include <linux/falloc.h>
|
|
||||||
],[
|
|
||||||
int flags __attribute__ ((unused));
|
|
||||||
flags = FALLOC_FL_ZERO_RANGE;
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_FALLOCATE], [
|
|
||||||
AC_MSG_CHECKING([whether fops->fallocate() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([file_fallocate], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_MSG_CHECKING([whether FALLOC_FL_ZERO_RANGE exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([falloc_fl_zero_range], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_FALLOC_FL_ZERO_RANGE, 1, [FALLOC_FL_ZERO_RANGE is defined])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_ERROR([file_fallocate])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 4.1 API change
|
|
||||||
dnl # struct access file->f_path.dentry was replaced by accessor function
|
|
||||||
dnl # since fix torvalds/linux@4bacc9c9234c ("overlayfs: Make f_path always
|
|
||||||
dnl # point to the overlay and f_inode to the underlay").
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_FILE_DENTRY], [
|
|
||||||
ZFS_LINUX_TEST_SRC([file_dentry], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
],[
|
|
||||||
struct file *f = NULL;
|
|
||||||
file_dentry(f);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_FILE_DENTRY], [
|
|
||||||
AC_MSG_CHECKING([whether file_dentry() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([file_dentry], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_FILE_DENTRY, 1, [file_dentry() is available])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 3.19 API change
|
|
||||||
dnl # struct access f->f_dentry->d_inode was replaced by accessor function
|
|
||||||
dnl # file_inode(f)
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_FILE_INODE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([file_inode], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
],[
|
|
||||||
struct file *f = NULL;
|
|
||||||
file_inode(f);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_FILE_INODE], [
|
|
||||||
AC_MSG_CHECKING([whether file_inode() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([file_inode], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_FILE_INODE, 1, [file_inode() is available])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # 6.12 removed f_version from struct file
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_FILE_F_VERSION], [
|
||||||
|
ZFS_LINUX_TEST_SRC([file_f_version], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
|
||||||
|
static const struct f __attribute__((unused)) = {
|
||||||
|
.f_version = 0;
|
||||||
|
};
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_FILE_F_VERSION], [
|
||||||
|
AC_MSG_CHECKING([whether file->f_version exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([file_f_version], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_FILE_F_VERSION, 1,
|
||||||
|
[file->f_version exists])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_FILE], [
|
||||||
|
ZFS_AC_KERNEL_FILE_F_VERSION
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_FILE], [
|
||||||
|
ZFS_AC_KERNEL_SRC_FILE_F_VERSION
|
||||||
|
])
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # filemap_range_has_page was not available till 4.13
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_FILEMAP], [
|
|
||||||
ZFS_LINUX_TEST_SRC([filemap_range_has_page], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
],[
|
|
||||||
struct address_space *mapping = NULL;
|
|
||||||
loff_t lstart = 0;
|
|
||||||
loff_t lend = 0;
|
|
||||||
bool ret __attribute__ ((unused));
|
|
||||||
|
|
||||||
ret = filemap_range_has_page(mapping, lstart, lend);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_FILEMAP], [
|
|
||||||
AC_MSG_CHECKING([whether filemap_range_has_page() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([filemap_range_has_page], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_FILEMAP_RANGE_HAS_PAGE, 1,
|
|
||||||
[filemap_range_has_page() is available])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # Check file_operations->fsync interface.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_FSYNC], [
|
|
||||||
ZFS_LINUX_TEST_SRC([fsync_without_dentry], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
static int test_fsync(struct file *f, int x) { return 0; }
|
|
||||||
|
|
||||||
static const struct file_operations
|
|
||||||
fops __attribute__ ((unused)) = {
|
|
||||||
.fsync = test_fsync,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([fsync_range], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
static int test_fsync(struct file *f, loff_t a, loff_t b, int c)
|
|
||||||
{ return 0; }
|
|
||||||
|
|
||||||
static const struct file_operations
|
|
||||||
fops __attribute__ ((unused)) = {
|
|
||||||
.fsync = test_fsync,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_FSYNC], [
|
|
||||||
dnl #
|
|
||||||
dnl # Linux 2.6.35 - Linux 3.0 API
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING([whether fops->fsync() wants no dentry])
|
|
||||||
ZFS_LINUX_TEST_RESULT([fsync_without_dentry], [
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE(HAVE_FSYNC_WITHOUT_DENTRY, 1,
|
|
||||||
[fops->fsync() without dentry])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # Linux 3.1 - 3.x API
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING([whether fops->fsync() wants range])
|
|
||||||
ZFS_LINUX_TEST_RESULT([fsync_range], [
|
|
||||||
AC_MSG_RESULT([range])
|
|
||||||
AC_DEFINE(HAVE_FSYNC_RANGE, 1,
|
|
||||||
[fops->fsync() with range])
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_ERROR([fops->fsync])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -48,12 +48,16 @@ AC_DEFUN([ZFS_AC_KERNEL_GENERIC_FILLATTR], [
|
|||||||
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP_REQMASK, 1,
|
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP_REQMASK, 1,
|
||||||
[generic_fillattr requires struct mnt_idmap* and u32 request_mask])
|
[generic_fillattr requires struct mnt_idmap* and u32 request_mask])
|
||||||
],[
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether generic_fillattr requires struct mnt_idmap*])
|
AC_MSG_CHECKING([whether generic_fillattr requires struct mnt_idmap*])
|
||||||
ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap], [
|
ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP, 1,
|
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP, 1,
|
||||||
[generic_fillattr requires struct mnt_idmap*])
|
[generic_fillattr requires struct mnt_idmap*])
|
||||||
],[
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether generic_fillattr requires struct user_namespace*])
|
AC_MSG_CHECKING([whether generic_fillattr requires struct user_namespace*])
|
||||||
ZFS_LINUX_TEST_RESULT([generic_fillattr_userns], [
|
ZFS_LINUX_TEST_RESULT([generic_fillattr_userns], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
|
|||||||
@@ -49,18 +49,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_IO_ACCT], [
|
|||||||
bio_end_io_acct(bio, start_time);
|
bio_end_io_acct(bio, start_time);
|
||||||
])
|
])
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([generic_acct_3args], [
|
|
||||||
#include <linux/bio.h>
|
|
||||||
|
|
||||||
void (*generic_start_io_acct_f)(int, unsigned long,
|
|
||||||
struct hd_struct *) = &generic_start_io_acct;
|
|
||||||
void (*generic_end_io_acct_f)(int, struct hd_struct *,
|
|
||||||
unsigned long) = &generic_end_io_acct;
|
|
||||||
], [
|
|
||||||
generic_start_io_acct(0, 0, NULL);
|
|
||||||
generic_end_io_acct(0, NULL, 0);
|
|
||||||
])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([generic_acct_4args], [
|
ZFS_LINUX_TEST_SRC([generic_acct_4args], [
|
||||||
#include <linux/bio.h>
|
#include <linux/bio.h>
|
||||||
|
|
||||||
@@ -136,22 +124,6 @@ AC_DEFUN([ZFS_AC_KERNEL_GENERIC_IO_ACCT], [
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_GENERIC_IO_ACCT_4ARG, 1,
|
AC_DEFINE(HAVE_GENERIC_IO_ACCT_4ARG, 1,
|
||||||
[generic_*_io_acct() 4 arg available])
|
[generic_*_io_acct() 4 arg available])
|
||||||
], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 3.19 API addition
|
|
||||||
dnl #
|
|
||||||
dnl # torvalds/linux@394ffa50 allows us to increment
|
|
||||||
dnl # iostat counters without generic_make_request().
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING(
|
|
||||||
[whether generic_*_io_acct wants 3 args])
|
|
||||||
ZFS_LINUX_TEST_RESULT_SYMBOL([generic_acct_3args],
|
|
||||||
[generic_start_io_acct], [block/bio.c], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_GENERIC_IO_ACCT_3ARG, 1,
|
|
||||||
[generic_*_io_acct() 3 arg available])
|
|
||||||
], [
|
], [
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
@@ -160,4 +132,3 @@ AC_DEFUN([ZFS_AC_KERNEL_GENERIC_IO_ACCT], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 4.10 API
|
|
||||||
dnl #
|
|
||||||
dnl # NULL inode_operations.readlink implies generic_readlink(), which
|
|
||||||
dnl # has been made static.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_READLINK_GLOBAL], [
|
|
||||||
ZFS_LINUX_TEST_SRC([generic_readlink_global], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
],[
|
|
||||||
int i __attribute__ ((unused));
|
|
||||||
i = generic_readlink(NULL, NULL, 0);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GENERIC_READLINK_GLOBAL], [
|
|
||||||
AC_MSG_CHECKING([whether generic_readlink is global])
|
|
||||||
ZFS_LINUX_TEST_RESULT([generic_readlink_global], [
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE(HAVE_GENERIC_READLINK, 1,
|
|
||||||
[generic_readlink is global])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -17,12 +17,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GENHD_FLAGS], [
|
|||||||
], [
|
], [
|
||||||
int flags __attribute__ ((unused)) = GENHD_FL_NO_PART;
|
int flags __attribute__ ((unused)) = GENHD_FL_NO_PART;
|
||||||
])
|
])
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([genhd_fl_no_part_scan], [
|
|
||||||
#include <linux/blkdev.h>
|
|
||||||
], [
|
|
||||||
int flags __attribute__ ((unused)) = GENHD_FL_NO_PART_SCAN;
|
|
||||||
])
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GENHD_FLAGS], [
|
AC_DEFUN([ZFS_AC_KERNEL_GENHD_FLAGS], [
|
||||||
@@ -30,29 +24,18 @@ AC_DEFUN([ZFS_AC_KERNEL_GENHD_FLAGS], [
|
|||||||
AC_MSG_CHECKING([whether GENHD_FL_EXT_DEVT flag is available])
|
AC_MSG_CHECKING([whether GENHD_FL_EXT_DEVT flag is available])
|
||||||
ZFS_LINUX_TEST_RESULT([genhd_fl_ext_devt], [
|
ZFS_LINUX_TEST_RESULT([genhd_fl_ext_devt], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(ZFS_GENHD_FL_EXT_DEVT, GENHD_FL_EXT_DEVT,
|
AC_DEFINE(HAVE_GENHD_FL_EXT_DEVT, 1,
|
||||||
[GENHD_FL_EXT_DEVT flag is available])
|
[GENHD_FL_EXT_DEVT flag is available])
|
||||||
], [
|
], [
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
AC_DEFINE(ZFS_GENHD_FL_EXT_DEVT, 0,
|
|
||||||
[GENHD_FL_EXT_DEVT flag is not available])
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether GENHD_FL_NO_PART flag is available])
|
AC_MSG_CHECKING([whether GENHD_FL_NO_PART flag is available])
|
||||||
ZFS_LINUX_TEST_RESULT([genhd_fl_no_part], [
|
ZFS_LINUX_TEST_RESULT([genhd_fl_no_part], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(ZFS_GENHD_FL_NO_PART, GENHD_FL_NO_PART,
|
AC_DEFINE(HAVE_GENHD_FL_NO_PART, 1,
|
||||||
[GENHD_FL_NO_PART flag is available])
|
[GENHD_FL_NO_PART flag is available])
|
||||||
], [
|
], [
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether GENHD_FL_NO_PART_SCAN flag is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([genhd_fl_no_part_scan], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(ZFS_GENHD_FL_NO_PART, GENHD_FL_NO_PART_SCAN,
|
|
||||||
[GENHD_FL_NO_PART_SCAN flag is available])
|
|
||||||
], [
|
|
||||||
ZFS_LINUX_TEST_ERROR([GENHD_FL_NO_PART|GENHD_FL_NO_PART_SCAN])
|
|
||||||
])
|
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,104 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # Supported get_link() interfaces checked newest to oldest.
|
|
||||||
dnl # Note this interface used to be named follow_link.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_get_link], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
static const char *get_link(struct dentry *de, struct inode *ip,
|
|
||||||
struct delayed_call *done) { return "symlink"; }
|
|
||||||
static struct inode_operations
|
|
||||||
iops __attribute__ ((unused)) = {
|
|
||||||
.get_link = get_link,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_get_link_cookie], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
static const char *get_link(struct dentry *de, struct
|
|
||||||
inode *ip, void **cookie) { return "symlink"; }
|
|
||||||
static struct inode_operations
|
|
||||||
iops __attribute__ ((unused)) = {
|
|
||||||
.get_link = get_link,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_follow_link], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
static const char *follow_link(struct dentry *de,
|
|
||||||
void **cookie) { return "symlink"; }
|
|
||||||
static struct inode_operations
|
|
||||||
iops __attribute__ ((unused)) = {
|
|
||||||
.follow_link = follow_link,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_follow_link_nameidata], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
static void *follow_link(struct dentry *de, struct
|
|
||||||
nameidata *nd) { return (void *)NULL; }
|
|
||||||
static struct inode_operations
|
|
||||||
iops __attribute__ ((unused)) = {
|
|
||||||
.follow_link = follow_link,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GET_LINK], [
|
|
||||||
dnl #
|
|
||||||
dnl # 4.5 API change
|
|
||||||
dnl # The get_link interface has added a delayed done call and
|
|
||||||
dnl # used it to retire the put_link() interface.
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING([whether iops->get_link() passes delayed])
|
|
||||||
ZFS_LINUX_TEST_RESULT([inode_operations_get_link], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_GET_LINK_DELAYED, 1, [iops->get_link() delayed])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.5 API change
|
|
||||||
dnl # The follow_link() interface has been replaced by
|
|
||||||
dnl # get_link() which behaves the same as before except:
|
|
||||||
dnl # - An inode is passed as a separate argument
|
|
||||||
dnl # - When called in RCU mode a NULL dentry is passed.
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING([whether iops->get_link() passes cookie])
|
|
||||||
ZFS_LINUX_TEST_RESULT([inode_operations_get_link_cookie], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_GET_LINK_COOKIE, 1,
|
|
||||||
[iops->get_link() cookie])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.2 API change
|
|
||||||
dnl # This kernel retired the nameidata structure.
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING(
|
|
||||||
[whether iops->follow_link() passes cookie])
|
|
||||||
ZFS_LINUX_TEST_RESULT([inode_operations_follow_link], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_FOLLOW_LINK_COOKIE, 1,
|
|
||||||
[iops->follow_link() cookie])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 2.6.32 API
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING(
|
|
||||||
[whether iops->follow_link() passes nameidata])
|
|
||||||
ZFS_LINUX_TEST_RESULT(
|
|
||||||
[inode_operations_follow_link_nameidata],[
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_FOLLOW_LINK_NAMEIDATA, 1,
|
|
||||||
[iops->follow_link() nameidata])
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_ERROR([get_link])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 4.8 API change
|
|
||||||
dnl #
|
|
||||||
dnl # 75ef71840539 mm, vmstat: add infrastructure for per-node vmstats
|
|
||||||
dnl # 599d0c954f91 mm, vmscan: move LRU lists to node
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GLOBAL_NODE_PAGE_STATE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([global_node_page_state], [
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/vmstat.h>
|
|
||||||
],[
|
|
||||||
(void) global_node_page_state(0);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_NODE_PAGE_STATE], [
|
|
||||||
AC_MSG_CHECKING([whether global_node_page_state() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([global_node_page_state], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(ZFS_GLOBAL_NODE_PAGE_STATE, 1,
|
|
||||||
[global_node_page_state() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.14 API change
|
|
||||||
dnl #
|
|
||||||
dnl # c41f012ade0b mm: rename global_page_state to global_zone_page_state
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GLOBAL_ZONE_PAGE_STATE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([global_zone_page_state], [
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/vmstat.h>
|
|
||||||
],[
|
|
||||||
(void) global_zone_page_state(0);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE], [
|
|
||||||
AC_MSG_CHECKING([whether global_zone_page_state() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([global_zone_page_state], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(ZFS_GLOBAL_ZONE_PAGE_STATE, 1,
|
|
||||||
[global_zone_page_state() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # Create a define and autoconf variable for an enum member
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_ENUM_MEMBER], [
|
|
||||||
AC_MSG_CHECKING([whether enum $2 contains $1])
|
|
||||||
AS_IF([AC_TRY_COMMAND(
|
|
||||||
"${srcdir}/scripts/enum-extract.pl" "$2" "$3" | grep -Eqx $1)],[
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE(m4_join([_], [ZFS_ENUM], m4_toupper($2), $1), 1,
|
|
||||||
[enum $2 contains $1])
|
|
||||||
m4_join([_], [ZFS_ENUM], m4_toupper($2), $1)=1
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # Sanity check helpers
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_PAGE_STATE_ENUM_ERROR],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
AC_MSG_RESULT([$1 in either node_stat_item or zone_stat_item: $2])
|
|
||||||
ZFS_LINUX_TEST_ERROR([global page state])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_PAGE_STATE_ENUM_CHECK], [
|
|
||||||
enum_check_a="m4_join([_], [$ZFS_ENUM_NODE_STAT_ITEM], $1)"
|
|
||||||
enum_check_b="m4_join([_], [$ZFS_ENUM_ZONE_STAT_ITEM], $1)"
|
|
||||||
AS_IF([test -n "$enum_check_a" -a -n "$enum_check_b"],[
|
|
||||||
ZFS_AC_KERNEL_GLOBAL_PAGE_STATE_ENUM_ERROR([$1], [DUPLICATE])
|
|
||||||
])
|
|
||||||
AS_IF([test -z "$enum_check_a" -a -z "$enum_check_b"],[
|
|
||||||
ZFS_AC_KERNEL_GLOBAL_PAGE_STATE_ENUM_ERROR([$1], [NOT FOUND])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # Ensure the config tests are finding one and only one of each enum.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE_SANITY], [
|
|
||||||
AC_MSG_CHECKING([whether global_page_state enums are sane])
|
|
||||||
|
|
||||||
ZFS_AC_KERNEL_GLOBAL_PAGE_STATE_ENUM_CHECK([NR_FILE_PAGES])
|
|
||||||
ZFS_AC_KERNEL_GLOBAL_PAGE_STATE_ENUM_CHECK([NR_INACTIVE_ANON])
|
|
||||||
ZFS_AC_KERNEL_GLOBAL_PAGE_STATE_ENUM_CHECK([NR_INACTIVE_FILE])
|
|
||||||
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GLOBAL_PAGE_STATE], [
|
|
||||||
ZFS_AC_KERNEL_SRC_GLOBAL_NODE_PAGE_STATE
|
|
||||||
ZFS_AC_KERNEL_SRC_GLOBAL_ZONE_PAGE_STATE
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # enum members in which we're interested
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GLOBAL_PAGE_STATE], [
|
|
||||||
ZFS_AC_KERNEL_GLOBAL_NODE_PAGE_STATE
|
|
||||||
ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE
|
|
||||||
|
|
||||||
ZFS_AC_KERNEL_ENUM_MEMBER([NR_FILE_PAGES],
|
|
||||||
[node_stat_item], [$LINUX/include/linux/mmzone.h])
|
|
||||||
ZFS_AC_KERNEL_ENUM_MEMBER([NR_INACTIVE_ANON],
|
|
||||||
[node_stat_item], [$LINUX/include/linux/mmzone.h])
|
|
||||||
ZFS_AC_KERNEL_ENUM_MEMBER([NR_INACTIVE_FILE],
|
|
||||||
[node_stat_item], [$LINUX/include/linux/mmzone.h])
|
|
||||||
|
|
||||||
ZFS_AC_KERNEL_ENUM_MEMBER([NR_FILE_PAGES],
|
|
||||||
[zone_stat_item], [$LINUX/include/linux/mmzone.h])
|
|
||||||
ZFS_AC_KERNEL_ENUM_MEMBER([NR_INACTIVE_ANON],
|
|
||||||
[zone_stat_item], [$LINUX/include/linux/mmzone.h])
|
|
||||||
ZFS_AC_KERNEL_ENUM_MEMBER([NR_INACTIVE_FILE],
|
|
||||||
[zone_stat_item], [$LINUX/include/linux/mmzone.h])
|
|
||||||
|
|
||||||
ZFS_AC_KERNEL_GLOBAL_ZONE_PAGE_STATE_SANITY
|
|
||||||
])
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 4.9 API change
|
|
||||||
dnl # group_info changed from 2d array via >blocks to 1d array via ->gid
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GROUP_INFO_GID], [
|
|
||||||
ZFS_LINUX_TEST_SRC([group_info_gid], [
|
|
||||||
#include <linux/cred.h>
|
|
||||||
],[
|
|
||||||
struct group_info gi __attribute__ ((unused)) = {};
|
|
||||||
gi.gid[0] = KGIDT_INIT(0);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GROUP_INFO_GID], [
|
|
||||||
AC_MSG_CHECKING([whether group_info->gid exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([group_info_gid], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_GROUP_INFO_GID, 1, [group_info->gid exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 4.6 API change
|
|
||||||
dnl # Added CPU hotplug APIs
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_CPU_HOTPLUG], [
|
|
||||||
ZFS_LINUX_TEST_SRC([cpu_hotplug], [
|
|
||||||
#include <linux/cpuhotplug.h>
|
|
||||||
],[
|
|
||||||
enum cpuhp_state state = CPUHP_ONLINE;
|
|
||||||
int (*fp)(unsigned int, struct hlist_node *) = NULL;
|
|
||||||
cpuhp_state_add_instance_nocalls(0, (struct hlist_node *)NULL);
|
|
||||||
cpuhp_state_remove_instance_nocalls(0, (struct hlist_node *)NULL);
|
|
||||||
cpuhp_setup_state_multi(state, "", fp, fp);
|
|
||||||
cpuhp_remove_multi_state(0);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_CPU_HOTPLUG], [
|
|
||||||
AC_MSG_CHECKING([whether CPU hotplug APIs exist])
|
|
||||||
ZFS_LINUX_TEST_RESULT([cpu_hotplug], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_CPU_HOTPLUG, 1, [yes])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 4.5 API change
|
|
||||||
dnl # Added in_compat_syscall() which can be overridden on a per-
|
|
||||||
dnl # architecture basis. Prior to this is_compat_task() was the
|
|
||||||
dnl # provided interface.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_IN_COMPAT_SYSCALL], [
|
|
||||||
ZFS_LINUX_TEST_SRC([in_compat_syscall], [
|
|
||||||
#include <linux/compat.h>
|
|
||||||
],[
|
|
||||||
in_compat_syscall();
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_IN_COMPAT_SYSCALL], [
|
|
||||||
AC_MSG_CHECKING([whether in_compat_syscall() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([in_compat_syscall], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_IN_COMPAT_SYSCALL, 1,
|
|
||||||
[in_compat_syscall() is available])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -57,20 +57,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
|
|||||||
.getattr = test_getattr,
|
.getattr = test_getattr,
|
||||||
};
|
};
|
||||||
],[])
|
],[])
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_getattr_vfsmount], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
static int test_getattr(
|
|
||||||
struct vfsmount *mnt, struct dentry *d,
|
|
||||||
struct kstat *k)
|
|
||||||
{ return 0; }
|
|
||||||
|
|
||||||
static const struct inode_operations
|
|
||||||
iops __attribute__ ((unused)) = {
|
|
||||||
.getattr = test_getattr,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_INODE_GETATTR], [
|
AC_DEFUN([ZFS_AC_KERNEL_INODE_GETATTR], [
|
||||||
@@ -103,21 +89,9 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_GETATTR], [
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_PATH_IOPS_GETATTR, 1,
|
AC_DEFINE(HAVE_PATH_IOPS_GETATTR, 1,
|
||||||
[iops->getattr() takes a path])
|
[iops->getattr() takes a path])
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # Kernel < 4.11 test
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING([whether iops->getattr() takes a vfsmount])
|
|
||||||
ZFS_LINUX_TEST_RESULT([inode_operations_getattr_vfsmount], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_VFSMOUNT_IOPS_GETATTR, 1,
|
|
||||||
[iops->getattr() takes a vfsmount])
|
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 4.7 API change
|
|
||||||
dnl # i_mutex is changed to i_rwsem. Instead of directly using
|
|
||||||
dnl # i_mutex/i_rwsem, we should use inode_lock() and inode_lock_shared()
|
|
||||||
dnl # We test inode_lock_shared because inode_lock is introduced earlier.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_LOCK], [
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_lock], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
],[
|
|
||||||
struct inode *inode = NULL;
|
|
||||||
inode_lock_shared(inode);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_INODE_LOCK], [
|
|
||||||
AC_MSG_CHECKING([whether inode_lock_shared() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([inode_lock], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_INODE_LOCK_SHARED, 1, [yes])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -42,6 +42,8 @@ AC_DEFUN([ZFS_AC_KERNEL_PERMISSION], [
|
|||||||
AC_DEFINE(HAVE_IOPS_PERMISSION_IDMAP, 1,
|
AC_DEFINE(HAVE_IOPS_PERMISSION_IDMAP, 1,
|
||||||
[iops->permission() takes struct mnt_idmap*])
|
[iops->permission() takes struct mnt_idmap*])
|
||||||
],[
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether iops->permission() takes struct user_namespace*])
|
AC_MSG_CHECKING([whether iops->permission() takes struct user_namespace*])
|
||||||
ZFS_LINUX_TEST_RESULT([permission_userns], [
|
ZFS_LINUX_TEST_RESULT([permission_userns], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 3.15 API change
|
|
||||||
dnl # inode_set_flags introduced to set i_flags
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SET_FLAGS], [
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_set_flags], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
],[
|
|
||||||
struct inode inode;
|
|
||||||
inode_set_flags(&inode, S_IMMUTABLE, S_IMMUTABLE);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_INODE_SET_FLAGS], [
|
|
||||||
AC_MSG_CHECKING([whether inode_set_flags() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([inode_set_flags], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_INODE_SET_FLAGS, 1, [inode_set_flags() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 4.16 API change
|
|
||||||
dnl # inode_set_iversion introduced to set i_version
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SET_IVERSION], [
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_set_iversion], [
|
|
||||||
#include <linux/iversion.h>
|
|
||||||
],[
|
|
||||||
struct inode inode;
|
|
||||||
inode_set_iversion(&inode, 1);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_INODE_SET_IVERSION], [
|
|
||||||
AC_MSG_CHECKING([whether inode_set_iversion() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([inode_set_iversion], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_INODE_SET_IVERSION, 1,
|
|
||||||
[inode_set_iversion() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -37,19 +37,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [
|
|||||||
.setattr = test_setattr,
|
.setattr = test_setattr,
|
||||||
};
|
};
|
||||||
],[])
|
],[])
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_setattr], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
static int test_setattr(
|
|
||||||
struct dentry *de, struct iattr *ia)
|
|
||||||
{ return 0; }
|
|
||||||
|
|
||||||
static const struct inode_operations
|
|
||||||
iops __attribute__ ((unused)) = {
|
|
||||||
.setattr = test_setattr,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_INODE_SETATTR], [
|
AC_DEFUN([ZFS_AC_KERNEL_INODE_SETATTR], [
|
||||||
@@ -71,17 +58,8 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_SETATTR], [
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_USERNS_IOPS_SETATTR, 1,
|
AC_DEFINE(HAVE_USERNS_IOPS_SETATTR, 1,
|
||||||
[iops->setattr() takes struct user_namespace*])
|
[iops->setattr() takes struct user_namespace*])
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether iops->setattr() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([inode_operations_setattr], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_IOPS_SETATTR, 1,
|
|
||||||
[iops->setattr() exists])
|
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
|
||||||
|
|||||||
@@ -14,20 +14,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [
|
|||||||
ts = timestamp_truncate(ts, &ip);
|
ts = timestamp_truncate(ts, &ip);
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.18 API change
|
|
||||||
dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64.
|
|
||||||
dnl #
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_times], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
],[
|
|
||||||
struct inode ip;
|
|
||||||
struct timespec ts;
|
|
||||||
|
|
||||||
memset(&ip, 0, sizeof(ip));
|
|
||||||
ts = ip.i_mtime;
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 6.6 API change
|
dnl # 6.6 API change
|
||||||
dnl # i_ctime no longer directly accessible, must use
|
dnl # i_ctime no longer directly accessible, must use
|
||||||
@@ -106,15 +92,6 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
|
|||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether inode->i_*time's are timespec64])
|
|
||||||
ZFS_LINUX_TEST_RESULT([inode_times], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_INODE_TIMESPEC64_TIMES, 1,
|
|
||||||
[inode->i_*time's are timespec64])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether inode_get_ctime() exists])
|
AC_MSG_CHECKING([whether inode_get_ctime() exists])
|
||||||
ZFS_LINUX_TEST_RESULT([inode_get_ctime], [
|
ZFS_LINUX_TEST_RESULT([inode_get_ctime], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # 5.11 API change
|
||||||
|
dnl # kmap_atomic() was deprecated in favor of kmap_local_page()
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_KMAP_LOCAL_PAGE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([kmap_local_page], [
|
||||||
|
#include <linux/highmem.h>
|
||||||
|
],[
|
||||||
|
struct page page;
|
||||||
|
kmap_local_page(&page);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_KMAP_LOCAL_PAGE], [
|
||||||
|
AC_MSG_CHECKING([whether kmap_local_page exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([kmap_local_page], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_KMAP_LOCAL_PAGE, 1,
|
||||||
|
[kernel has kmap_local_page])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
])
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # grsecurity API change,
|
|
||||||
dnl # kmem_cache_create() with SLAB_USERCOPY flag replaced by
|
|
||||||
dnl # kmem_cache_create_usercopy().
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_KMEM_CACHE_CREATE_USERCOPY], [
|
|
||||||
ZFS_LINUX_TEST_SRC([kmem_cache_create_usercopy], [
|
|
||||||
#include <linux/slab.h>
|
|
||||||
static void ctor(void *foo) { /* fake ctor */ }
|
|
||||||
],[
|
|
||||||
struct kmem_cache *skc_linux_cache;
|
|
||||||
const char *name = "test";
|
|
||||||
size_t size = 4096;
|
|
||||||
size_t align = 8;
|
|
||||||
unsigned long flags = 0;
|
|
||||||
size_t useroffset = 0;
|
|
||||||
size_t usersize = size - useroffset;
|
|
||||||
|
|
||||||
skc_linux_cache = kmem_cache_create_usercopy(
|
|
||||||
name, size, align, flags, useroffset, usersize, ctor);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_KMEM_CACHE_CREATE_USERCOPY], [
|
|
||||||
AC_MSG_CHECKING([whether kmem_cache_create_usercopy() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([kmem_cache_create_usercopy], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_KMEM_CACHE_CREATE_USERCOPY, 1,
|
|
||||||
[kmem_cache_create_usercopy() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_KMEM_CACHE], [
|
|
||||||
ZFS_AC_KERNEL_SRC_KMEM_CACHE_CREATE_USERCOPY
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_KMEM_CACHE], [
|
|
||||||
ZFS_AC_KERNEL_KMEM_CACHE_CREATE_USERCOPY
|
|
||||||
])
|
|
||||||
@@ -57,31 +57,6 @@ AC_DEFUN([SPL_AC_DEBUG_KMEM_TRACKING], [
|
|||||||
AC_MSG_RESULT([$enable_debug_kmem_tracking])
|
AC_MSG_RESULT([$enable_debug_kmem_tracking])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.12 API,
|
|
||||||
dnl # Added kvmalloc allocation strategy
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_KVMALLOC], [
|
|
||||||
ZFS_LINUX_TEST_SRC([kvmalloc], [
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
],[
|
|
||||||
void *p __attribute__ ((unused));
|
|
||||||
|
|
||||||
p = kvmalloc(0, GFP_KERNEL);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_KVMALLOC], [
|
|
||||||
AC_MSG_CHECKING([whether kvmalloc(ptr, flags) is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([kvmalloc], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_KVMALLOC, 1, [kvmalloc exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 5.8 API,
|
dnl # 5.8 API,
|
||||||
dnl # __vmalloc PAGE_KERNEL removal
|
dnl # __vmalloc PAGE_KERNEL removal
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 2.6.39 API change
|
|
||||||
dnl # Added kstrtoul()
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_KSTRTOUL], [
|
|
||||||
ZFS_LINUX_TEST_SRC([kstrtoul], [
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
],[
|
|
||||||
int ret __attribute__ ((unused)) = kstrtoul(NULL, 10, NULL);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_KSTRTOUL], [
|
|
||||||
AC_MSG_CHECKING([whether kstrtoul() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([kstrtoul], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_KSTRTOUL, 1, [kstrtoul() exists])
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_ERROR([kstrtoul()])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user