mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
Compare commits
275 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 92f430b00f | |||
| 2f8fc4a869 | |||
| a39a14eb6e | |||
| 36864e3d77 | |||
| fea534d1d0 | |||
| cc43549b08 | |||
| 04b02f0663 | |||
| 20f00819f3 | |||
| 81de1eae4c | |||
| 5952fc15b9 | |||
| a486cac359 | |||
| fbac52e1e9 | |||
| 8539bdf568 | |||
| c312a988b5 | |||
| bd5465e4eb | |||
| 5fb1d520fe | |||
| 6f2080f1ab | |||
| 9f0be8fca0 | |||
| 12657df52a | |||
| 153c982aac | |||
| 398bdcd884 | |||
| a9c37b7c38 | |||
| 1c6d2f71aa | |||
| ab455c7b80 | |||
| 76bd2ae5c8 | |||
| e6f8c1f612 | |||
| 4f2118edaf | |||
| 8f6f85472f | |||
| c22f5c1c55 | |||
| 01095b288f | |||
| eff0634c1c | |||
| 2c41e2a109 | |||
| 81bcab3525 | |||
| 1422bcaaf8 | |||
| 97c2569371 | |||
| 2bbc8e10ae | |||
| 74fadc0cc9 | |||
| 08b0a161cc | |||
| 559d34e8c2 | |||
| a848b05b13 | |||
| 7cc60afb0b | |||
| b0f2bcd063 | |||
| a6a2f37acd | |||
| 9e009acbdc | |||
| be73f72453 | |||
| 76d0c74c35 | |||
| c30a228608 | |||
| 846796c424 | |||
| e4a2ab7c90 | |||
| 38468bbad6 | |||
| 61d88b0243 | |||
| 6b2c046d18 | |||
| 9070f890e1 | |||
| 091da72c66 | |||
| 8cacac7ed4 | |||
| 865ca576ab | |||
| 9530eb64e0 | |||
| 059ab2ddc2 | |||
| 4541c95a9b | |||
| 3062b3866c | |||
| 52f3f92bbf | |||
| 91656b4e2a | |||
| 53cbf06d68 | |||
| 6503f8c6f0 | |||
| ad07b09cc3 | |||
| 49da67eb39 | |||
| 112dca3483 | |||
| a2c5295d70 | |||
| f145371660 | |||
| 8100e476ea | |||
| 95bd9d4ebc | |||
| 6f8ff94016 | |||
| a1786ca93c | |||
| c2a1ea3a33 | |||
| c48d819d8d | |||
| fcd0a2fb89 | |||
| bb05632632 | |||
| a901229fe6 | |||
| 5f7037067e | |||
| f3e4043a36 | |||
| 91bc62642e | |||
| acfd6511cf | |||
| f741c841dd | |||
| 637f918211 | |||
| 7e72312eff | |||
| 383256c329 | |||
| c2668b2d10 | |||
| b4ce059a76 | |||
| 92d1686a2a | |||
| 7ea899be04 | |||
| e085d66f7a | |||
| af062c480c | |||
| f2ab5b82da | |||
| 1bdce0410c | |||
| 55b21552d3 | |||
| c4fa9c2962 | |||
| 8487b6c9b4 | |||
| 0be3b266ed | |||
| 001ab5941d | |||
| 7784947923 | |||
| a0f8d3c584 | |||
| 2adca179b6 | |||
| a77b6398ed | |||
| d1b0c4ec5a | |||
| 3266d4d655 | |||
| 51bec16060 | |||
| 3b5c3f52d2 | |||
| 67f0469f70 | |||
| 1aa4351c1f | |||
| 0e21e473a7 | |||
| 6e9911212e | |||
| 42bad93414 | |||
| a28f5a94f4 | |||
| 0dfcfe023e | |||
| cf55fdea24 | |||
| 6edbbe0646 | |||
| 198621f910 | |||
| e6c98d11ec | |||
| 083d322fa0 | |||
| c36faf668b | |||
| 404254bacb | |||
| 8eba6a5ba1 | |||
| fabdd502f4 | |||
| 675b49d2a1 | |||
| 54eec0fa59 | |||
| bc06d8164b | |||
| 76745cf5b8 | |||
| 0c88ae6187 | |||
| 307fd0da1f | |||
| 9f1c5e0b10 | |||
| 5ba50c8135 | |||
| 25565403aa | |||
| 47b7dc976b | |||
| 125731436d | |||
| 4425a7bb85 | |||
| e47b033eae | |||
| cfec8f13a2 | |||
| 997db7a7fc | |||
| e411081aa0 | |||
| a55b6fe94a | |||
| 939e9f0b6a | |||
| 679b164cd3 | |||
| c2d9494f99 | |||
| b952e061df | |||
| 0fea7fc109 | |||
| 0f6d955a35 | |||
| c3d2412b05 | |||
| 74064cb175 | |||
| 30b97ce218 | |||
| 9519e7ebcc | |||
| f9b02fe7e3 | |||
| cb8da70329 | |||
| c944c46a98 | |||
| 166a7bc602 | |||
| e90124a7c8 | |||
| 18b3bea861 | |||
| d67eb17e27 | |||
| 1862c1c0a8 | |||
| b57f53036d | |||
| 4b8bf3c48a | |||
| 696943533c | |||
| 2284a61129 | |||
| e1833a72f9 | |||
| 5bb034f533 | |||
| 1e08e49a28 | |||
| 6604fe9a06 | |||
| 7cbe7bbbd4 | |||
| 2dcc8fe035 | |||
| 38875918d8 | |||
| 0d51852ec7 | |||
| 73a73cba71 | |||
| 87947f2440 | |||
| 0e87150b6c | |||
| 7742e29387 | |||
| f54052a122 | |||
| d874f27776 | |||
| 84d7d53e91 | |||
| d90042dedb | |||
| 0e46085ee6 | |||
| 3b0c1131ef | |||
| 5988de77b0 | |||
| 00debc1361 | |||
| af10714e42 | |||
| 747781a345 | |||
| b17ea73f9d | |||
| 17cdb7a2b1 | |||
| b673bcba4d | |||
| d8886275df | |||
| 1aee375947 | |||
| a1907b038a | |||
| d359f7f547 | |||
| 90603601b4 | |||
| ecd0b1528e | |||
| 3ed1d608a8 | |||
| c165daa0b1 | |||
| 1a5414ba2f | |||
| 409aad3f33 | |||
| 1917c26944 | |||
| 2b64d41be8 | |||
| 9753feaa63 | |||
| 3c0b8da206 | |||
| d7abeef621 | |||
| 7fb7eb9a63 | |||
| 3f9af023f6 | |||
| f7675ae30f | |||
| 920603990a | |||
| 9a4b2f08d3 | |||
| 8023d9d4b5 | |||
| 23f063d2e6 | |||
| 18474efeec | |||
| 260065099e | |||
| 4c9f2cec46 | |||
| ee3677d321 | |||
| 0274a9a57d | |||
| 025f8b2e74 | |||
| 37e8f3ae17 | |||
| 7313c6e382 | |||
| 1c6b0302ef | |||
| 7e3af4658b | |||
| 1a54b13aaf | |||
| 9061a4da0b | |||
| e12d76176d | |||
| 8131793d6f | |||
| c82eb27b22 | |||
| 661bb434e6 | |||
| ae48c2f6a9 | |||
| b96845b632 | |||
| 55cbd1f9bd | |||
| 880b73956b | |||
| d367ef2995 | |||
| 7546fbd6e9 | |||
| 903d3f9187 | |||
| 86b5853cfb | |||
| 19a8dd48e1 | |||
| 8ac70aade7 | |||
| bbc0d34bfd | |||
| f3823a9ab2 | |||
| fd2cae969f | |||
| f7b4bca66a | |||
| 7e3ce4efaa | |||
| 77d81974b6 | |||
| 5237760b17 | |||
| ede715d1e4 | |||
| e30c69365d | |||
| 78d39d91fa | |||
| 2b359c7824 | |||
| ace2e17a9b | |||
| b4cd10ce5b | |||
| f52d7aaaac | |||
| d5db840260 | |||
| bcd61d9579 | |||
| 36a67b50a2 | |||
| 3d9129a7b6 | |||
| 0409c47fe0 | |||
| b5a3825244 | |||
| 77df762a1b | |||
| 56871e465a | |||
| c645b07eaa | |||
| 5bc27acf51 | |||
| 7f830d783b | |||
| 58162960a1 | |||
| 666903610d | |||
| 26ecd8b993 | |||
| 774dcba86d | |||
| 09f6b2ebe3 | |||
| 2609d93b65 | |||
| 10f46d2aba | |||
| 0df10dc911 | |||
| 0fbe9d352c | |||
| 84f44ec07f | |||
| fc9608e2e6 | |||
| d32c05949a | |||
| 1ebb6b866f | |||
| f019b445f3 | |||
| 03822a61be |
+21
@@ -0,0 +1,21 @@
|
|||||||
|
env:
|
||||||
|
CIRRUS_CLONE_DEPTH: 1
|
||||||
|
ARCH: amd64
|
||||||
|
|
||||||
|
build_task:
|
||||||
|
matrix:
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-13-5
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-14-2
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-15-0-snap
|
||||||
|
prepare_script:
|
||||||
|
- pkg install -y autoconf automake libtool gettext-runtime gmake ksh93 py311-packaging py311-cffi py311-sysctl
|
||||||
|
configure_script:
|
||||||
|
- env MAKE=gmake ./autogen.sh
|
||||||
|
- env MAKE=gmake ./configure --with-config="user" --with-python=3.11
|
||||||
|
build_script:
|
||||||
|
- gmake -j `sysctl -n kern.smp.cpus`
|
||||||
|
install_script:
|
||||||
|
- gmake install
|
||||||
@@ -14,7 +14,7 @@ Please check our issue tracker before opening a new feature request.
|
|||||||
Filling out the following template will help other contributors better understand your proposed feature.
|
Filling out the following template will help other contributors better understand your proposed feature.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
### Describe the feature you would like to see added to OpenZFS
|
### Describe the feature would like to see added to OpenZFS
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Provide a clear and concise description of the feature.
|
Provide a clear and concise description of the feature.
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
<!--- Provide a general summary of your changes in the Title above -->
|
<!--- Provide a general summary of your changes in the Title above -->
|
||||||
|
|
||||||
|
<!---
|
||||||
|
Documentation on ZFS Buildbot options can be found at
|
||||||
|
https://openzfs.github.io/openzfs-docs/Developer%20Resources/Buildbot%20Options.html
|
||||||
|
-->
|
||||||
|
|
||||||
### Motivation and Context
|
### Motivation and Context
|
||||||
<!--- Why is this change required? What problem does it solve? -->
|
<!--- Why is this change required? What problem does it solve? -->
|
||||||
<!--- If it fixes an open issue, please link to the issue here. -->
|
<!--- If it fixes an open issue, please link to the issue here. -->
|
||||||
@@ -22,7 +27,6 @@
|
|||||||
- [ ] New feature (non-breaking change which adds functionality)
|
- [ ] New feature (non-breaking change which adds functionality)
|
||||||
- [ ] Performance enhancement (non-breaking change which improves efficiency)
|
- [ ] Performance enhancement (non-breaking change which improves efficiency)
|
||||||
- [ ] Code cleanup (non-breaking change which makes code smaller or more readable)
|
- [ ] Code cleanup (non-breaking change which makes code smaller or more readable)
|
||||||
- [ ] Quality assurance (non-breaking change which makes the code more robust against bugs)
|
|
||||||
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
|
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
|
||||||
- [ ] Library ABI change (libzfs, libzfs\_core, libnvpair, libuutil and libzfsbootenv)
|
- [ ] Library ABI change (libzfs, libzfs\_core, libnvpair, libuutil and libzfsbootenv)
|
||||||
- [ ] Documentation (a change to man pages or other documentation)
|
- [ ] Documentation (a change to man pages or other documentation)
|
||||||
|
|||||||
@@ -2,4 +2,3 @@ name: "Custom CodeQL Analysis"
|
|||||||
|
|
||||||
queries:
|
queries:
|
||||||
- uses: ./.github/codeql/custom-queries/cpp/deprecatedFunctionUsage.ql
|
- uses: ./.github/codeql/custom-queries/cpp/deprecatedFunctionUsage.ql
|
||||||
- uses: ./.github/codeql/custom-queries/cpp/dslDatasetHoldReleMismatch.ql
|
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
/**
|
|
||||||
* @name Detect mismatched dsl_dataset_hold/_rele pairs
|
|
||||||
* @description Flags instances of issue #12014 where
|
|
||||||
* - a dataset held with dsl_dataset_hold_obj() ends up in dsl_dataset_rele_flags(), or
|
|
||||||
* - a dataset held with dsl_dataset_hold_obj_flags() ends up in dsl_dataset_rele().
|
|
||||||
* @kind problem
|
|
||||||
* @severity error
|
|
||||||
* @tags correctness
|
|
||||||
* @id cpp/dslDatasetHoldReleMismatch
|
|
||||||
*/
|
|
||||||
|
|
||||||
import cpp
|
|
||||||
|
|
||||||
from Variable ds, Call holdCall, Call releCall, string message
|
|
||||||
where
|
|
||||||
ds.getType().toString() = "dsl_dataset_t *" and
|
|
||||||
holdCall.getASuccessor*() = releCall and
|
|
||||||
(
|
|
||||||
(holdCall.getTarget().getName() = "dsl_dataset_hold_obj_flags" and
|
|
||||||
holdCall.getArgument(4).(AddressOfExpr).getOperand().(VariableAccess).getTarget() = ds and
|
|
||||||
releCall.getTarget().getName() = "dsl_dataset_rele" and
|
|
||||||
releCall.getArgument(0).(VariableAccess).getTarget() = ds and
|
|
||||||
message = "Held with dsl_dataset_hold_obj_flags but released with dsl_dataset_rele")
|
|
||||||
or
|
|
||||||
(holdCall.getTarget().getName() = "dsl_dataset_hold_obj" and
|
|
||||||
holdCall.getArgument(3).(AddressOfExpr).getOperand().(VariableAccess).getTarget() = ds and
|
|
||||||
releCall.getTarget().getName() = "dsl_dataset_rele_flags" and
|
|
||||||
releCall.getArgument(0).(VariableAccess).getTarget() = ds and
|
|
||||||
message = "Held with dsl_dataset_hold_obj but released with dsl_dataset_rele_flags")
|
|
||||||
)
|
|
||||||
select releCall,
|
|
||||||
"Mismatched release: held with $@ but released with " + releCall.getTarget().getName() + " for dataset $@",
|
|
||||||
holdCall, holdCall.getTarget().getName(),
|
|
||||||
ds, ds.toString()
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
name: labels
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types: [ opened, synchronize, reopened, converted_to_draft, ready_for_review ]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
open:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event.action == 'opened' && github.event.pull_request.draft }}
|
|
||||||
steps:
|
|
||||||
- env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ISSUE: ${{ github.event.pull_request.html_url }}
|
|
||||||
run: |
|
|
||||||
gh pr edit $ISSUE --add-label "Status: Work in Progress"
|
|
||||||
|
|
||||||
push:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event.action == 'synchronize' || github.event.action == 'reopened' }}
|
|
||||||
steps:
|
|
||||||
- env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ISSUE: ${{ github.event.pull_request.html_url }}
|
|
||||||
run: |
|
|
||||||
gh pr edit $ISSUE --remove-label "Status: Accepted,Status: Inactive,Status: Revision Needed,Status: Stale"
|
|
||||||
|
|
||||||
draft:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event.action == 'converted_to_draft' }}
|
|
||||||
steps:
|
|
||||||
- env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ISSUE: ${{ github.event.pull_request.html_url }}
|
|
||||||
run: |
|
|
||||||
gh pr edit $ISSUE --remove-label "Status: Accepted,Status: Code Review Needed,Status: Inactive,Status: Revision Needed,Status: Stale" --add-label "Status: Work in Progress"
|
|
||||||
|
|
||||||
rfr:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event.action == 'ready_for_review' }}
|
|
||||||
steps:
|
|
||||||
- env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ISSUE: ${{ github.event.pull_request.html_url }}
|
|
||||||
run: |
|
|
||||||
gh pr edit $ISSUE --remove-label "Status: Accepted,Status: Inactive,Status: Revision Needed,Status: Stale,Status: Work in Progress" --add-label "Status: Code Review Needed"
|
|
||||||
@@ -7,7 +7,7 @@ Prints "quick" if (explicity required by user):
|
|||||||
- the *last* commit message contains 'ZFS-CI-Type: quick'
|
- the *last* commit message contains 'ZFS-CI-Type: quick'
|
||||||
or if (heuristics):
|
or if (heuristics):
|
||||||
- the files changed are not in the list of specified directories, and
|
- the files changed are not in the list of specified directories, and
|
||||||
- all commit messages do not contain 'ZFS-CI-Type: (full|linux|freebsd)'
|
- all commit messages do not contain 'ZFS-CI-Type: full'
|
||||||
|
|
||||||
Otherwise prints "full".
|
Otherwise prints "full".
|
||||||
"""
|
"""
|
||||||
@@ -29,7 +29,6 @@ FULL_RUN_IGNORE_REGEX = list(map(re.compile, [
|
|||||||
Patterns of files that are considered to trigger full CI.
|
Patterns of files that are considered to trigger full CI.
|
||||||
"""
|
"""
|
||||||
FULL_RUN_REGEX = list(map(re.compile, [
|
FULL_RUN_REGEX = list(map(re.compile, [
|
||||||
r'\.github/workflows/scripts/.*',
|
|
||||||
r'cmd.*',
|
r'cmd.*',
|
||||||
r'configs/.*',
|
r'configs/.*',
|
||||||
r'META',
|
r'META',
|
||||||
@@ -65,12 +64,12 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# check last (HEAD) commit message
|
# check last (HEAD) commit message
|
||||||
last_commit_message_raw = subprocess.run([
|
last_commit_message_raw = subprocess.run([
|
||||||
'git', 'show', '-s', '--format=%B', head
|
'git', 'show', '-s', '--format=%B', 'HEAD'
|
||||||
], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
|
||||||
for line in last_commit_message_raw.stdout.decode().splitlines():
|
for line in last_commit_message_raw.stdout.decode().splitlines():
|
||||||
if line.strip().lower() == 'zfs-ci-type: quick':
|
if line.strip().lower() == 'zfs-ci-type: quick':
|
||||||
output_type('quick', f'requested by HEAD commit {head}')
|
output_type('quick', f'explicitly requested by HEAD commit {head}')
|
||||||
|
|
||||||
# check all commit messages
|
# check all commit messages
|
||||||
all_commit_message_raw = subprocess.run([
|
all_commit_message_raw = subprocess.run([
|
||||||
@@ -83,12 +82,8 @@ if __name__ == '__main__':
|
|||||||
for line in all_commit_message:
|
for line in all_commit_message:
|
||||||
if line.startswith('ZFS-CI-Commit:'):
|
if line.startswith('ZFS-CI-Commit:'):
|
||||||
commit_ref = line.lstrip('ZFS-CI-Commit:').rstrip()
|
commit_ref = line.lstrip('ZFS-CI-Commit:').rstrip()
|
||||||
if line.strip().lower() == 'zfs-ci-type: freebsd':
|
|
||||||
output_type('freebsd', f'requested by commit {commit_ref}')
|
|
||||||
if line.strip().lower() == 'zfs-ci-type: linux':
|
|
||||||
output_type('linux', f'requested by commit {commit_ref}')
|
|
||||||
if line.strip().lower() == 'zfs-ci-type: full':
|
if line.strip().lower() == 'zfs-ci-type: full':
|
||||||
output_type('full', f'requested by commit {commit_ref}')
|
output_type('full', f'explicitly requested by commit {commit_ref}')
|
||||||
|
|
||||||
# check changed files
|
# check changed files
|
||||||
changed_files_raw = subprocess.run([
|
changed_files_raw = subprocess.run([
|
||||||
|
|||||||
@@ -10,12 +10,36 @@ set -eu
|
|||||||
export DEBIAN_FRONTEND="noninteractive"
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
sudo apt-get install -y axel cloud-image-utils daemonize guestfs-tools \
|
sudo apt-get install -y axel cloud-image-utils daemonize guestfs-tools \
|
||||||
virt-manager linux-modules-extra-$(uname -r) zfsutils-linux
|
ksmtuned virt-manager linux-modules-extra-$(uname -r) zfsutils-linux
|
||||||
|
|
||||||
# generate ssh keys
|
# generate ssh keys
|
||||||
rm -f ~/.ssh/id_ed25519
|
rm -f ~/.ssh/id_ed25519
|
||||||
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -q -N ""
|
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
|
# not needed
|
||||||
sudo systemctl stop docker.socket
|
sudo systemctl stop docker.socket
|
||||||
sudo systemctl stop multipathd.socket
|
sudo systemctl stop multipathd.socket
|
||||||
@@ -41,14 +65,16 @@ $DISK
|
|||||||
sync
|
sync
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# swap with same size as RAM (16GiB)
|
# swap with same size as RAM
|
||||||
sudo mkswap $DISK-part1
|
sudo mkswap $DISK-part1
|
||||||
sudo swapon $DISK-part1
|
sudo swapon $DISK-part1
|
||||||
|
|
||||||
# JBOD 2xdisk for OpenZFS storage (test vm's)
|
# 60GB data disk
|
||||||
SSD1="$DISK-part2"
|
SSD1="$DISK-part2"
|
||||||
sudo fallocate -l 12G /test.ssd2
|
|
||||||
SSD2=$(sudo losetup -b 4096 -f /test.ssd2 --show)
|
# 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
|
# adjust zfs module parameter and create pool
|
||||||
exec 1>/dev/null
|
exec 1>/dev/null
|
||||||
@@ -57,11 +83,11 @@ ARC_MAX=$((1024*1024*512))
|
|||||||
echo $ARC_MIN | sudo tee /sys/module/zfs/parameters/zfs_arc_min
|
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 $ARC_MAX | sudo tee /sys/module/zfs/parameters/zfs_arc_max
|
||||||
echo 1 | sudo tee /sys/module/zfs/parameters/zvol_use_blk_mq
|
echo 1 | sudo tee /sys/module/zfs/parameters/zvol_use_blk_mq
|
||||||
sudo zpool create -f -o ashift=12 zpool $SSD1 $SSD2 -O relatime=off \
|
sudo zpool create -f -o ashift=12 zpool $SSD1 $SSD2 \
|
||||||
-O atime=off -O xattr=sa -O compression=lz4 -O sync=disabled \
|
-O relatime=off -O atime=off -O xattr=sa -O compression=lz4 \
|
||||||
-O redundant_metadata=none -O mountpoint=/mnt/tests
|
-O mountpoint=/mnt/tests
|
||||||
|
|
||||||
# no need for some scheduler
|
# no need for some scheduler
|
||||||
for i in /sys/block/s*/queue/scheduler; do
|
for i in /sys/block/s*/queue/scheduler; do
|
||||||
echo "none" | sudo tee $i
|
echo "none" | sudo tee $i > /dev/null
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -12,23 +12,19 @@ OS="$1"
|
|||||||
# OS variant (virt-install --os-variant list)
|
# OS variant (virt-install --os-variant list)
|
||||||
OSv=$OS
|
OSv=$OS
|
||||||
|
|
||||||
# FreeBSD urls's
|
# compressed with .zst extension
|
||||||
FREEBSD_REL="https://download.freebsd.org/releases/CI-IMAGES"
|
REPO="https://github.com/mcmilk/openzfs-freebsd-images"
|
||||||
FREEBSD_SNAP="https://download.freebsd.org/snapshots/CI-IMAGES"
|
FREEBSD="$REPO/releases/download/v2024-12-14"
|
||||||
URLxz=""
|
URLzs=""
|
||||||
|
|
||||||
# Ubuntu mirrors
|
# Ubuntu mirrors
|
||||||
UBMIRROR="https://cloud-images.ubuntu.com"
|
#UBMIRROR="https://cloud-images.ubuntu.com"
|
||||||
#UBMIRROR="https://mirrors.cloud.tencent.com/ubuntu-cloud-images"
|
#UBMIRROR="https://mirrors.cloud.tencent.com/ubuntu-cloud-images"
|
||||||
#UBMIRROR="https://mirror.citrahost.com/ubuntu-cloud-images"
|
UBMIRROR="https://mirror.citrahost.com/ubuntu-cloud-images"
|
||||||
|
|
||||||
# default nic model for vm's
|
# default nic model for vm's
|
||||||
NIC="virtio"
|
NIC="virtio"
|
||||||
|
|
||||||
# additional options for virt-install
|
|
||||||
OPTS[0]=""
|
|
||||||
OPTS[1]=""
|
|
||||||
|
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
almalinux8)
|
almalinux8)
|
||||||
OSNAME="AlmaLinux 8"
|
OSNAME="AlmaLinux 8"
|
||||||
@@ -38,24 +34,22 @@ case "$OS" in
|
|||||||
OSNAME="AlmaLinux 9"
|
OSNAME="AlmaLinux 9"
|
||||||
URL="https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-latest.x86_64.qcow2"
|
URL="https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-latest.x86_64.qcow2"
|
||||||
;;
|
;;
|
||||||
almalinux10)
|
|
||||||
OSNAME="AlmaLinux 10"
|
|
||||||
OSv="almalinux9"
|
|
||||||
URL="https://repo.almalinux.org/almalinux/10/cloud/x86_64/images/AlmaLinux-10-GenericCloud-latest.x86_64.qcow2"
|
|
||||||
;;
|
|
||||||
archlinux)
|
archlinux)
|
||||||
OSNAME="Archlinux"
|
OSNAME="Archlinux"
|
||||||
URL="https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2"
|
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-stream10)
|
||||||
|
OSNAME="CentOS Stream 10"
|
||||||
|
# TODO: #16903 Overwrite OSv to stream9 for virt-install until it's added to osinfo
|
||||||
|
OSv="centos-stream9"
|
||||||
|
URL="https://cloud.centos.org/centos/10-stream/x86_64/images/CentOS-Stream-GenericCloud-10-latest.x86_64.qcow2"
|
||||||
;;
|
;;
|
||||||
centos-stream9)
|
centos-stream9)
|
||||||
OSNAME="CentOS Stream 9"
|
OSNAME="CentOS Stream 9"
|
||||||
URL="https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-latest.x86_64.qcow2"
|
URL="https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-latest.x86_64.qcow2"
|
||||||
;;
|
;;
|
||||||
centos-stream10)
|
|
||||||
OSNAME="CentOS Stream 10"
|
|
||||||
OSv="centos-stream9"
|
|
||||||
URL="https://cloud.centos.org/centos/10-stream/x86_64/images/CentOS-Stream-GenericCloud-10-latest.x86_64.qcow2"
|
|
||||||
;;
|
|
||||||
debian11)
|
debian11)
|
||||||
OSNAME="Debian 11"
|
OSNAME="Debian 11"
|
||||||
URL="https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2"
|
URL="https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2"
|
||||||
@@ -64,13 +58,10 @@ case "$OS" in
|
|||||||
OSNAME="Debian 12"
|
OSNAME="Debian 12"
|
||||||
URL="https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2"
|
URL="https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2"
|
||||||
;;
|
;;
|
||||||
debian13)
|
fedora40)
|
||||||
OSNAME="Debian 13"
|
OSNAME="Fedora 40"
|
||||||
# TODO: Overwrite OSv to debian13 for virt-install until it's added to osinfo
|
OSv="fedora-unknown"
|
||||||
OSv="debian12"
|
URL="https://download.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2"
|
||||||
URL="https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2"
|
|
||||||
OPTS[0]="--boot"
|
|
||||||
OPTS[1]="uefi=on"
|
|
||||||
;;
|
;;
|
||||||
fedora41)
|
fedora41)
|
||||||
OSNAME="Fedora 41"
|
OSNAME="Fedora 41"
|
||||||
@@ -82,61 +73,37 @@ case "$OS" in
|
|||||||
OSv="fedora-unknown"
|
OSv="fedora-unknown"
|
||||||
URL="https://download.fedoraproject.org/pub/fedora/linux/releases/42/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-42-1.1.x86_64.qcow2"
|
URL="https://download.fedoraproject.org/pub/fedora/linux/releases/42/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-42-1.1.x86_64.qcow2"
|
||||||
;;
|
;;
|
||||||
fedora43)
|
freebsd13-4r)
|
||||||
OSNAME="Fedora 43"
|
OSNAME="FreeBSD 13.4-RELEASE"
|
||||||
OSv="fedora-unknown"
|
|
||||||
URL="https://download.fedoraproject.org/pub/fedora/linux/releases/43/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-43-1.6.x86_64.qcow2"
|
|
||||||
;;
|
|
||||||
freebsd13-5r)
|
|
||||||
FreeBSD="13.5-RELEASE"
|
|
||||||
OSNAME="FreeBSD $FreeBSD"
|
|
||||||
OSv="freebsd13.0"
|
OSv="freebsd13.0"
|
||||||
URLxz="$FREEBSD_REL/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI.raw.xz"
|
URLzs="$FREEBSD/amd64-freebsd-13.4-RELEASE.qcow2.zst"
|
||||||
KSRC="$FREEBSD_REL/../amd64/$FreeBSD/src.txz"
|
BASH="/usr/local/bin/bash"
|
||||||
NIC="rtl8139"
|
NIC="rtl8139"
|
||||||
;;
|
;;
|
||||||
freebsd14-2r)
|
freebsd14-2r)
|
||||||
FreeBSD="14.2-RELEASE"
|
OSNAME="FreeBSD 14.2-RELEASE"
|
||||||
OSNAME="FreeBSD $FreeBSD"
|
|
||||||
OSv="freebsd14.0"
|
OSv="freebsd14.0"
|
||||||
URLxz="$FREEBSD_REL/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI.raw.xz"
|
URLzs="$FREEBSD/amd64-freebsd-14.2-RELEASE.qcow2.zst"
|
||||||
KSRC="$FREEBSD_REL/../amd64/$FreeBSD/src.txz"
|
BASH="/usr/local/bin/bash"
|
||||||
;;
|
;;
|
||||||
freebsd14-3r)
|
freebsd13-4s)
|
||||||
FreeBSD="14.3-RELEASE"
|
OSNAME="FreeBSD 13.4-STABLE"
|
||||||
OSNAME="FreeBSD $FreeBSD"
|
|
||||||
OSv="freebsd14.0"
|
|
||||||
URLxz="$FREEBSD_REL/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI.raw.xz"
|
|
||||||
KSRC="$FREEBSD_REL/../amd64/$FreeBSD/src.txz"
|
|
||||||
;;
|
|
||||||
freebsd13-5s)
|
|
||||||
FreeBSD="13.5-STABLE"
|
|
||||||
OSNAME="FreeBSD $FreeBSD"
|
|
||||||
OSv="freebsd13.0"
|
OSv="freebsd13.0"
|
||||||
URLxz="$FREEBSD_SNAP/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI.raw.xz"
|
URLzs="$FREEBSD/amd64-freebsd-13.4-STABLE.qcow2.zst"
|
||||||
KSRC="$FREEBSD_SNAP/../amd64/$FreeBSD/src.txz"
|
BASH="/usr/local/bin/bash"
|
||||||
NIC="rtl8139"
|
NIC="rtl8139"
|
||||||
;;
|
;;
|
||||||
freebsd14-3s)
|
freebsd14-2s)
|
||||||
FreeBSD="14.3-STABLE"
|
OSNAME="FreeBSD 14.2-STABLE"
|
||||||
OSNAME="FreeBSD $FreeBSD"
|
|
||||||
OSv="freebsd14.0"
|
OSv="freebsd14.0"
|
||||||
URLxz="$FREEBSD_SNAP/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI-ufs.raw.xz"
|
URLzs="$FREEBSD/amd64-freebsd-14.2-STABLE.qcow2.zst"
|
||||||
KSRC="$FREEBSD_SNAP/../amd64/$FreeBSD/src.txz"
|
BASH="/usr/local/bin/bash"
|
||||||
;;
|
;;
|
||||||
freebsd15-0s)
|
freebsd15-0c)
|
||||||
FreeBSD="15.0-STABLE"
|
OSNAME="FreeBSD 15.0-CURRENT"
|
||||||
OSNAME="FreeBSD $FreeBSD"
|
|
||||||
OSv="freebsd14.0"
|
OSv="freebsd14.0"
|
||||||
URLxz="$FREEBSD_SNAP/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI-ufs.raw.xz"
|
URLzs="$FREEBSD/amd64-freebsd-15.0-CURRENT.qcow2.zst"
|
||||||
KSRC="$FREEBSD_SNAP/../amd64/$FreeBSD/src.txz"
|
BASH="/usr/local/bin/bash"
|
||||||
;;
|
|
||||||
freebsd16-0c)
|
|
||||||
FreeBSD="16.0-CURRENT"
|
|
||||||
OSNAME="FreeBSD $FreeBSD"
|
|
||||||
OSv="freebsd14.0"
|
|
||||||
URLxz="$FREEBSD_SNAP/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI-ufs.raw.xz"
|
|
||||||
KSRC="$FREEBSD_SNAP/../amd64/$FreeBSD/src.txz"
|
|
||||||
;;
|
;;
|
||||||
tumbleweed)
|
tumbleweed)
|
||||||
OSNAME="openSUSE Tumbleweed"
|
OSNAME="openSUSE Tumbleweed"
|
||||||
@@ -144,6 +111,11 @@ case "$OS" in
|
|||||||
MIRROR="http://opensuse-mirror-gce-us.susecloud.net"
|
MIRROR="http://opensuse-mirror-gce-us.susecloud.net"
|
||||||
URL="$MIRROR/tumbleweed/appliances/openSUSE-MicroOS.x86_64-OpenStack-Cloud.qcow2"
|
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)
|
ubuntu22)
|
||||||
OSNAME="Ubuntu 22.04"
|
OSNAME="Ubuntu 22.04"
|
||||||
OSv="ubuntu22.04"
|
OSv="ubuntu22.04"
|
||||||
@@ -167,7 +139,7 @@ echo "ENV=$ENV" >> $ENV
|
|||||||
# result path
|
# result path
|
||||||
echo 'RESPATH="/var/tmp/test_results"' >> $ENV
|
echo 'RESPATH="/var/tmp/test_results"' >> $ENV
|
||||||
|
|
||||||
# FreeBSD 13 has problems with: e1000 and virtio
|
# FreeBSD 13 has problems with: e1000+virtio
|
||||||
echo "NIC=$NIC" >> $ENV
|
echo "NIC=$NIC" >> $ENV
|
||||||
|
|
||||||
# freebsd15 -> used in zfs-qemu.yml
|
# freebsd15 -> used in zfs-qemu.yml
|
||||||
@@ -179,48 +151,34 @@ echo "OSv=\"$OSv\"" >> $ENV
|
|||||||
# FreeBSD 15 (Current) -> used for summary
|
# FreeBSD 15 (Current) -> used for summary
|
||||||
echo "OSNAME=\"$OSNAME\"" >> $ENV
|
echo "OSNAME=\"$OSNAME\"" >> $ENV
|
||||||
|
|
||||||
# default vm count for testings
|
|
||||||
VMs=2
|
|
||||||
echo "VMs=\"$VMs\"" >> $ENV
|
|
||||||
|
|
||||||
# default cpu count for testing vm's
|
|
||||||
CPU=2
|
|
||||||
echo "CPU=\"$CPU\"" >> $ENV
|
|
||||||
|
|
||||||
sudo mkdir -p "/mnt/tests"
|
sudo mkdir -p "/mnt/tests"
|
||||||
sudo chown -R $(whoami) /mnt/tests
|
sudo chown -R $(whoami) /mnt/tests
|
||||||
|
|
||||||
DISK="/dev/zvol/zpool/openzfs"
|
|
||||||
sudo zfs create -ps -b 64k -V 80g zpool/openzfs
|
|
||||||
while true; do test -b $DISK && break; sleep 1; done
|
|
||||||
|
|
||||||
# we are downloading via axel, curl and wget are mostly slower and
|
# we are downloading via axel, curl and wget are mostly slower and
|
||||||
# require more return value checking
|
# require more return value checking
|
||||||
IMG="/mnt/tests/cloud-image"
|
IMG="/mnt/tests/cloudimg.qcow2"
|
||||||
if [ ! -z "$URLxz" ]; then
|
if [ ! -z "$URLzs" ]; then
|
||||||
echo "Loading $URLxz ..."
|
echo "Loading image $URLzs ..."
|
||||||
time axel -q -o "$IMG" "$URLxz"
|
time axel -q -o "$IMG.zst" "$URLzs"
|
||||||
echo "Loading $KSRC ..."
|
zstd -q -d --rm "$IMG.zst"
|
||||||
time axel -q -o ~/src.txz $KSRC
|
|
||||||
else
|
else
|
||||||
echo "Loading $URL ..."
|
echo "Loading image $URL ..."
|
||||||
time axel -q -o "$IMG" "$URL"
|
time axel -q -o "$IMG" "$URL"
|
||||||
fi
|
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..."
|
echo "Importing VM image to zvol..."
|
||||||
if [ ! -z "$URLxz" ]; then
|
sudo qemu-img dd -f qcow2 -O raw if=$IMG of=$DISK bs=4M
|
||||||
xzcat -T0 $IMG | sudo dd of=$DISK bs=4M
|
|
||||||
else
|
|
||||||
sudo qemu-img dd -f qcow2 -O raw if=$IMG of=$DISK bs=4M
|
|
||||||
fi
|
|
||||||
rm -f $IMG
|
rm -f $IMG
|
||||||
|
|
||||||
PUBKEY=$(cat ~/.ssh/id_ed25519.pub)
|
PUBKEY=$(cat ~/.ssh/id_ed25519.pub)
|
||||||
if [ ${OS:0:7} != "freebsd" ]; then
|
cat <<EOF > /tmp/user-data
|
||||||
cat <<EOF > /tmp/user-data
|
|
||||||
#cloud-config
|
#cloud-config
|
||||||
|
|
||||||
hostname: $OS
|
fqdn: $OS
|
||||||
|
|
||||||
users:
|
users:
|
||||||
- name: root
|
- name: root
|
||||||
@@ -236,19 +194,6 @@ growpart:
|
|||||||
devices: ['/']
|
devices: ['/']
|
||||||
ignore_growroot_disabled: false
|
ignore_growroot_disabled: false
|
||||||
EOF
|
EOF
|
||||||
else
|
|
||||||
cat <<EOF > /tmp/user-data
|
|
||||||
#cloud-config
|
|
||||||
|
|
||||||
hostname: $OS
|
|
||||||
|
|
||||||
# minimized config without sudo for nuageinit of FreeBSD
|
|
||||||
growpart:
|
|
||||||
mode: auto
|
|
||||||
devices: ['/']
|
|
||||||
ignore_growroot_disabled: false
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
sudo virsh net-update default add ip-dhcp-host \
|
sudo virsh net-update default add ip-dhcp-host \
|
||||||
"<host mac='52:54:00:83:79:00' ip='192.168.122.10'/>" --live --config
|
"<host mac='52:54:00:83:79:00' ip='192.168.122.10'/>" --live --config
|
||||||
@@ -264,15 +209,15 @@ sudo virt-install \
|
|||||||
--graphics none \
|
--graphics none \
|
||||||
--network bridge=virbr0,model=$NIC,mac='52:54:00:83:79:00' \
|
--network bridge=virbr0,model=$NIC,mac='52:54:00:83:79:00' \
|
||||||
--cloud-init user-data=/tmp/user-data \
|
--cloud-init user-data=/tmp/user-data \
|
||||||
--disk $DISK,bus=virtio,cache=none,format=raw,driver.discard=unmap \
|
--disk $DISK,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
||||||
--import --noautoconsole ${OPTS[0]} ${OPTS[1]} >/dev/null
|
--import --noautoconsole >/dev/null
|
||||||
|
|
||||||
# Give the VMs hostnames so we don't have to refer to them with
|
# Give the VMs hostnames so we don't have to refer to them with
|
||||||
# hardcoded IP addresses.
|
# hardcoded IP addresses.
|
||||||
#
|
#
|
||||||
# vm0: Initial VM we install dependencies and build ZFS on.
|
# vm0: Initial VM we install dependencies and build ZFS on.
|
||||||
# vm1..2 Testing VMs
|
# vm1..2 Testing VMs
|
||||||
for ((i=0; i<=VMs; i++)); do
|
for i in {0..9} ; do
|
||||||
echo "192.168.122.1$i vm$i" | sudo tee -a /etc/hosts
|
echo "192.168.122.1$i vm$i" | sudo tee -a /etc/hosts
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -286,29 +231,3 @@ StrictHostKeyChecking no
|
|||||||
# small timeout, used in while loops later
|
# small timeout, used in while loops later
|
||||||
ConnectTimeout 1
|
ConnectTimeout 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ ${OS:0:7} != "freebsd" ]; then
|
|
||||||
# enable KSM on Linux
|
|
||||||
sudo virsh dommemstat --domain "openzfs" --period 5
|
|
||||||
sudo virsh node-memory-tune 100 50 1
|
|
||||||
echo 1 | sudo tee /sys/kernel/mm/ksm/run > /dev/null
|
|
||||||
else
|
|
||||||
# on FreeBSD we need some more init stuff, because of nuageinit
|
|
||||||
BASH="/usr/local/bin/bash"
|
|
||||||
while pidof /usr/bin/qemu-system-x86_64 >/dev/null; do
|
|
||||||
ssh 2>/dev/null root@vm0 "uname -a" && break
|
|
||||||
done
|
|
||||||
ssh root@vm0 "env IGNORE_OSVERSION=yes pkg install -y bash ca_root_nss git qemu-guest-agent python3 py311-cloud-init"
|
|
||||||
ssh root@vm0 "chsh -s $BASH root"
|
|
||||||
ssh root@vm0 'sysrc qemu_guest_agent_enable="YES"'
|
|
||||||
ssh root@vm0 'sysrc cloudinit_enable="YES"'
|
|
||||||
ssh root@vm0 "pw add user zfs -w no -s $BASH"
|
|
||||||
ssh root@vm0 'mkdir -p ~zfs/.ssh'
|
|
||||||
ssh root@vm0 'echo "zfs ALL=(ALL:ALL) NOPASSWD: ALL" >> /usr/local/etc/sudoers'
|
|
||||||
ssh root@vm0 'echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config'
|
|
||||||
scp ~/.ssh/id_ed25519.pub "root@vm0:~zfs/.ssh/authorized_keys"
|
|
||||||
ssh root@vm0 'chown -R zfs ~zfs'
|
|
||||||
ssh root@vm0 'service sshd restart'
|
|
||||||
scp ~/src.txz "root@vm0:/tmp/src.txz"
|
|
||||||
ssh root@vm0 'tar -C / -zxf /tmp/src.txz'
|
|
||||||
fi
|
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
# 3) install dependencies for compiling and loading
|
# 3) install dependencies for compiling and loading
|
||||||
#
|
#
|
||||||
# $1: OS name (like 'fedora41')
|
# $1: OS name (like 'fedora41')
|
||||||
# $2: (optional) Experimental Fedora kernel version, like "6.14" to
|
|
||||||
# install instead of Fedora defaults.
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
@@ -20,7 +18,7 @@ function archlinux() {
|
|||||||
sudo pacman -Sy --noconfirm base-devel bc cpio cryptsetup dhclient dkms \
|
sudo pacman -Sy --noconfirm base-devel bc cpio cryptsetup dhclient dkms \
|
||||||
fakeroot fio gdb inetutils jq less linux linux-headers lsscsi nfs-utils \
|
fakeroot fio gdb inetutils jq less linux linux-headers lsscsi nfs-utils \
|
||||||
parted pax perf python-packaging python-setuptools qemu-guest-agent ksh \
|
parted pax perf python-packaging python-setuptools qemu-guest-agent ksh \
|
||||||
samba strace sysstat rng-tools rsync wget xxhash
|
samba sysstat rng-tools rsync wget xxhash
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,7 +26,6 @@ function debian() {
|
|||||||
export DEBIAN_FRONTEND="noninteractive"
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|
||||||
echo "##[group]Running apt-get update+upgrade"
|
echo "##[group]Running apt-get update+upgrade"
|
||||||
sudo sed -i '/[[:alpha:]]-backports/d' /etc/apt/sources.list
|
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get upgrade -y
|
sudo apt-get upgrade -y
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
@@ -41,10 +38,9 @@ function debian() {
|
|||||||
libelf-dev libffi-dev libmount-dev libpam0g-dev libselinux-dev libssl-dev \
|
libelf-dev libffi-dev libmount-dev libpam0g-dev libselinux-dev libssl-dev \
|
||||||
libtool libtool-bin libudev-dev libunwind-dev linux-headers-$(uname -r) \
|
libtool libtool-bin libudev-dev libunwind-dev linux-headers-$(uname -r) \
|
||||||
lsscsi nfs-kernel-server pamtester parted python3 python3-all-dev \
|
lsscsi nfs-kernel-server pamtester parted python3 python3-all-dev \
|
||||||
python3-cffi python3-dev python3-distlib python3-packaging libtirpc-dev \
|
python3-cffi python3-dev python3-distlib python3-packaging \
|
||||||
python3-setuptools python3-sphinx qemu-guest-agent rng-tools rpm2cpio \
|
python3-setuptools python3-sphinx qemu-guest-agent rng-tools rpm2cpio \
|
||||||
rsync samba strace sysstat uuid-dev watchdog wget xfslibs-dev xxhash \
|
rsync samba sysstat uuid-dev watchdog wget xfslibs-dev xxhash zlib1g-dev
|
||||||
zlib1g-dev
|
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,13 +49,12 @@ function freebsd() {
|
|||||||
|
|
||||||
echo "##[group]Install Development Tools"
|
echo "##[group]Install Development Tools"
|
||||||
sudo pkg install -y autoconf automake autotools base64 checkbashisms fio \
|
sudo pkg install -y autoconf automake autotools base64 checkbashisms fio \
|
||||||
gdb gettext gettext-runtime git gmake gsed jq ksh lcov libtool lscpu \
|
gdb gettext gettext-runtime git gmake gsed jq ksh93 lcov libtool lscpu \
|
||||||
pkgconf python python3 pamtester pamtester qemu-guest-agent rsync xxhash
|
pkgconf python python3 pamtester pamtester qemu-guest-agent rsync xxhash
|
||||||
sudo pkg install -xy \
|
sudo pkg install -xy \
|
||||||
'^samba4[[:digit:]]+$' \
|
'^samba4[[:digit:]]+$' \
|
||||||
'^py3[[:digit:]]+-cffi$' \
|
'^py3[[:digit:]]+-cffi$' \
|
||||||
'^py3[[:digit:]]+-sysctl$' \
|
'^py3[[:digit:]]+-sysctl$' \
|
||||||
'^py3[[:digit:]]+-setuptools$' \
|
|
||||||
'^py3[[:digit:]]+-packaging$'
|
'^py3[[:digit:]]+-packaging$'
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
}
|
}
|
||||||
@@ -88,8 +83,8 @@ function rhel() {
|
|||||||
libuuid-devel lsscsi mdadm nfs-utils openssl-devel pam-devel pamtester \
|
libuuid-devel lsscsi mdadm nfs-utils openssl-devel pam-devel pamtester \
|
||||||
parted perf python3 python3-cffi python3-devel python3-packaging \
|
parted perf python3 python3-cffi python3-devel python3-packaging \
|
||||||
kernel-devel python3-setuptools qemu-guest-agent rng-tools rpcgen \
|
kernel-devel python3-setuptools qemu-guest-agent rng-tools rpcgen \
|
||||||
rpm-build rsync samba strace sysstat systemd watchdog wget xfsprogs-devel \
|
rpm-build rsync samba sysstat systemd watchdog wget xfsprogs-devel xxhash \
|
||||||
xxhash zlib-devel
|
zlib-devel
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,25 +94,6 @@ function tumbleweed() {
|
|||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1: Kernel version to install (like '6.14rc7')
|
|
||||||
function install_fedora_experimental_kernel {
|
|
||||||
|
|
||||||
our_version="$1"
|
|
||||||
sudo dnf -y copr enable @kernel-vanilla/stable
|
|
||||||
sudo dnf -y copr enable @kernel-vanilla/mainline
|
|
||||||
all="$(sudo dnf list --showduplicates kernel-* python3-perf* perf* bpftool*)"
|
|
||||||
echo "Available versions:"
|
|
||||||
echo "$all"
|
|
||||||
|
|
||||||
# You can have a bunch of minor variants of the version we want '6.14'.
|
|
||||||
# Pick the newest variant (sorted by version number).
|
|
||||||
specific_version=$(echo "$all" | grep $our_version | awk '{print $2}' | sort -V | tail -n 1)
|
|
||||||
list="$(echo "$all" | grep $specific_version | grep -Ev 'kernel-rt|kernel-selftests|kernel-debuginfo' | sed 's/.x86_64//g' | awk '{print $1"-"$2}')"
|
|
||||||
sudo dnf install -y $list
|
|
||||||
sudo dnf -y copr disable @kernel-vanilla/stable
|
|
||||||
sudo dnf -y copr disable @kernel-vanilla/mainline
|
|
||||||
}
|
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
case "$1" in
|
case "$1" in
|
||||||
almalinux8)
|
almalinux8)
|
||||||
@@ -130,7 +106,7 @@ case "$1" in
|
|||||||
sudo dnf install -y kernel-abi-whitelists
|
sudo dnf install -y kernel-abi-whitelists
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
;;
|
;;
|
||||||
almalinux9|almalinux10|centos-stream9|centos-stream10)
|
almalinux9|centos-stream9|centos-stream10)
|
||||||
echo "##[group]Enable epel and crb repositories"
|
echo "##[group]Enable epel and crb repositories"
|
||||||
sudo dnf config-manager -y --set-enabled crb
|
sudo dnf config-manager -y --set-enabled crb
|
||||||
sudo dnf install -y epel-release
|
sudo dnf install -y epel-release
|
||||||
@@ -156,11 +132,6 @@ case "$1" in
|
|||||||
|
|
||||||
# Fedora 42+ moves /usr/bin/script from 'util-linux' to 'util-linux-script'
|
# Fedora 42+ moves /usr/bin/script from 'util-linux' to 'util-linux-script'
|
||||||
sudo dnf install -y util-linux-script || true
|
sudo dnf install -y util-linux-script || true
|
||||||
|
|
||||||
# Optional: Install an experimental kernel ($2 = kernel version)
|
|
||||||
if [ -n "${2:-}" ] ; then
|
|
||||||
install_fedora_experimental_kernel "$2"
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
freebsd*)
|
freebsd*)
|
||||||
freebsd
|
freebsd
|
||||||
@@ -173,7 +144,9 @@ case "$1" in
|
|||||||
echo "##[group]Install Ubuntu specific"
|
echo "##[group]Install Ubuntu specific"
|
||||||
sudo apt-get install -yq linux-tools-common libtirpc-dev \
|
sudo apt-get install -yq linux-tools-common libtirpc-dev \
|
||||||
linux-modules-extra-$(uname -r)
|
linux-modules-extra-$(uname -r)
|
||||||
sudo apt-get install -yq dh-sequence-dkms
|
if [ "$1" != "ubuntu20" ]; then
|
||||||
|
sudo apt-get install -yq dh-sequence-dkms
|
||||||
|
fi
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
echo "##[group]Delete Ubuntu OpenZFS modules"
|
echo "##[group]Delete Ubuntu OpenZFS modules"
|
||||||
for i in $(find /lib/modules -name zfs -type d); do sudo rm -rvf $i; done
|
for i in $(find /lib/modules -name zfs -type d); do sudo rm -rvf $i; done
|
||||||
|
|||||||
@@ -3,25 +3,12 @@
|
|||||||
# script on it.
|
# script on it.
|
||||||
#
|
#
|
||||||
# $1: OS name (like 'fedora41')
|
# $1: OS name (like 'fedora41')
|
||||||
# $2: (optional) Experimental kernel version to install on fedora,
|
|
||||||
# like "6.14".
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
.github/workflows/scripts/qemu-wait-for-vm.sh vm0
|
.github/workflows/scripts/qemu-wait-for-vm.sh vm0
|
||||||
|
|
||||||
# SPECIAL CASE:
|
|
||||||
#
|
|
||||||
# If the user passed in an experimental kernel version to test on Fedora,
|
|
||||||
# we need to update the kernel version in zfs's META file to allow the
|
|
||||||
# build to happen. We update our local copy of META here, since we know
|
|
||||||
# it will be rsync'd up in the next step.
|
|
||||||
if [ -n "${2:-}" ] ; then
|
|
||||||
sed -i -E 's/Linux-Maximum: .+/Linux-Maximum: 99.99/g' META
|
|
||||||
fi
|
|
||||||
|
|
||||||
scp .github/workflows/scripts/qemu-3-deps-vm.sh zfs@vm0:qemu-3-deps-vm.sh
|
scp .github/workflows/scripts/qemu-3-deps-vm.sh zfs@vm0:qemu-3-deps-vm.sh
|
||||||
PID=`pidof /usr/bin/qemu-system-x86_64`
|
PID=`pidof /usr/bin/qemu-system-x86_64`
|
||||||
ssh zfs@vm0 '$HOME/qemu-3-deps-vm.sh' "$@"
|
ssh zfs@vm0 '$HOME/qemu-3-deps-vm.sh' $1
|
||||||
# wait for poweroff to succeed
|
# wait for poweroff to succeed
|
||||||
tail --pid=$PID -f /dev/null
|
tail --pid=$PID -f /dev/null
|
||||||
sleep 5 # avoid this: "error: Domain is already active"
|
sleep 5 # avoid this: "error: Domain is already active"
|
||||||
|
|||||||
@@ -5,13 +5,12 @@
|
|||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
#
|
#
|
||||||
# qemu-4-build-vm.sh OS [--enable-debug][--dkms][--patch-level NUM]
|
# qemu-4-build-vm.sh OS [--enable-debug][--dkms][--poweroff]
|
||||||
# [--poweroff][--release][--repo][--tarball]
|
# [--release][--repo][--tarball]
|
||||||
#
|
#
|
||||||
# OS: OS name like 'fedora41'
|
# OS: OS name like 'fedora41'
|
||||||
# --enable-debug: Build RPMs with '--enable-debug' (for testing)
|
# --enable-debug: Build RPMs with '--enable-debug' (for testing)
|
||||||
# --dkms: Build DKMS RPMs as well
|
# --dkms: Build DKMS RPMs as well
|
||||||
# --patch-level NUM: Use a custom patch level number for packages.
|
|
||||||
# --poweroff: Power-off the VM after building
|
# --poweroff: Power-off the VM after building
|
||||||
# --release Build zfs-release*.rpm as well
|
# --release Build zfs-release*.rpm as well
|
||||||
# --repo After building everything, copy RPMs into /tmp/repo
|
# --repo After building everything, copy RPMs into /tmp/repo
|
||||||
@@ -22,7 +21,6 @@
|
|||||||
|
|
||||||
ENABLE_DEBUG=""
|
ENABLE_DEBUG=""
|
||||||
DKMS=""
|
DKMS=""
|
||||||
PATCH_LEVEL=""
|
|
||||||
POWEROFF=""
|
POWEROFF=""
|
||||||
RELEASE=""
|
RELEASE=""
|
||||||
REPO=""
|
REPO=""
|
||||||
@@ -37,11 +35,6 @@ while [[ $# -gt 0 ]]; do
|
|||||||
DKMS=1
|
DKMS=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--patch-level)
|
|
||||||
PATCH_LEVEL=$2
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--poweroff)
|
--poweroff)
|
||||||
POWEROFF=1
|
POWEROFF=1
|
||||||
shift
|
shift
|
||||||
@@ -181,7 +174,7 @@ function freebsd() {
|
|||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
|
|
||||||
echo "##[group]Build"
|
echo "##[group]Build"
|
||||||
run gmake -j$(nproc)
|
run gmake -j$(sysctl -n hw.ncpu)
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
|
|
||||||
echo "##[group]Install"
|
echo "##[group]Install"
|
||||||
@@ -222,10 +215,6 @@ function rpm_build_and_install() {
|
|||||||
run ./autogen.sh
|
run ./autogen.sh
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
|
|
||||||
if [ -n "$PATCH_LEVEL" ] ; then
|
|
||||||
sed -i -E 's/(Release:\s+)1/\1'$PATCH_LEVEL'/g' META
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "##[group]Configure"
|
echo "##[group]Configure"
|
||||||
run ./configure --enable-debuginfo $extra
|
run ./configure --enable-debuginfo $extra
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
@@ -337,15 +326,9 @@ fi
|
|||||||
#
|
#
|
||||||
# rhel8.10
|
# rhel8.10
|
||||||
# almalinux9.5
|
# almalinux9.5
|
||||||
# fedora42
|
# fedora40
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
if which hostnamectl &> /dev/null ; then
|
sudo hostname "$ID$VERSION_ID"
|
||||||
# Fedora 42+ use hostnamectl
|
|
||||||
sudo hostnamectl set-hostname "$ID$VERSION_ID"
|
|
||||||
sudo hostnamectl set-hostname --pretty "$ID$VERSION_ID"
|
|
||||||
else
|
|
||||||
sudo hostname "$ID$VERSION_ID"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# save some sysinfo
|
# save some sysinfo
|
||||||
uname -a > /var/tmp/uname.txt
|
uname -a > /var/tmp/uname.txt
|
||||||
|
|||||||
@@ -12,45 +12,41 @@ source /var/tmp/env.txt
|
|||||||
# wait for poweroff to succeed
|
# wait for poweroff to succeed
|
||||||
PID=$(pidof /usr/bin/qemu-system-x86_64)
|
PID=$(pidof /usr/bin/qemu-system-x86_64)
|
||||||
tail --pid=$PID -f /dev/null
|
tail --pid=$PID -f /dev/null
|
||||||
sudo virsh undefine --nvram openzfs
|
sudo virsh undefine openzfs
|
||||||
|
|
||||||
|
# default values per test vm:
|
||||||
|
VMs=2
|
||||||
|
CPU=2
|
||||||
|
|
||||||
# cpu pinning
|
# cpu pinning
|
||||||
CPUSET=("0,1" "2,3")
|
CPUSET=("0,1" "2,3")
|
||||||
|
|
||||||
# additional options for virt-install
|
|
||||||
OPTS[0]=""
|
|
||||||
OPTS[1]=""
|
|
||||||
|
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
freebsd*)
|
freebsd*)
|
||||||
# FreeBSD needs only 6GiB
|
# FreeBSD can't be optimized via ksmtuned
|
||||||
RAM=6
|
RAM=6
|
||||||
;;
|
;;
|
||||||
debian13)
|
|
||||||
RAM=8
|
|
||||||
# Boot Debian 13 with uefi=on and secureboot=off (ZFS Kernel Module not signed)
|
|
||||||
OPTS[0]="--boot"
|
|
||||||
OPTS[1]="firmware=efi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=no"
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
# Linux needs more memory, but can be optimized to share it via KSM
|
# Linux can be optimized via ksmtuned
|
||||||
RAM=8
|
RAM=8
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# this can be different for each distro
|
||||||
|
echo "VMs=$VMs" >> $ENV
|
||||||
|
|
||||||
# create snapshot we can clone later
|
# create snapshot we can clone later
|
||||||
sudo zfs snapshot zpool/openzfs@now
|
sudo zfs snapshot zpool/openzfs@now
|
||||||
|
|
||||||
# setup the testing vm's
|
# setup the testing vm's
|
||||||
PUBKEY=$(cat ~/.ssh/id_ed25519.pub)
|
PUBKEY=$(cat ~/.ssh/id_ed25519.pub)
|
||||||
|
for i in $(seq 1 $VMs); do
|
||||||
|
|
||||||
# start testing VMs
|
|
||||||
for ((i=1; i<=VMs; i++)); do
|
|
||||||
echo "Creating disk for vm$i..."
|
echo "Creating disk for vm$i..."
|
||||||
DISK="/dev/zvol/zpool/vm$i"
|
DISK="/dev/zvol/zpool/vm$i"
|
||||||
FORMAT="raw"
|
FORMAT="raw"
|
||||||
sudo zfs clone zpool/openzfs@now zpool/vm$i-system
|
sudo zfs clone zpool/openzfs@now zpool/vm$i
|
||||||
sudo zfs create -ps -b 64k -V 64g zpool/vm$i-tests
|
sudo zfs create -ps -b 64k -V 80g zpool/vm$i-2
|
||||||
|
|
||||||
cat <<EOF > /tmp/user-data
|
cat <<EOF > /tmp/user-data
|
||||||
#cloud-config
|
#cloud-config
|
||||||
@@ -87,51 +83,42 @@ EOF
|
|||||||
--graphics none \
|
--graphics none \
|
||||||
--cloud-init user-data=/tmp/user-data \
|
--cloud-init user-data=/tmp/user-data \
|
||||||
--network bridge=virbr0,model=$NIC,mac="52:54:00:83:79:0$i" \
|
--network bridge=virbr0,model=$NIC,mac="52:54:00:83:79:0$i" \
|
||||||
--disk $DISK-system,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
--disk $DISK,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
||||||
--disk $DISK-tests,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
--disk $DISK-2,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
||||||
--import --noautoconsole ${OPTS[0]} ${OPTS[1]}
|
--import --noautoconsole >/dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
# generate some memory stats
|
# check the memory state from time to time
|
||||||
cat <<EOF > cronjob.sh
|
cat <<EOF > cronjob.sh
|
||||||
|
# $OS
|
||||||
exec 1>>/var/tmp/stats.txt
|
exec 1>>/var/tmp/stats.txt
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
echo "********************************************************************************"
|
echo "*******************************************************"
|
||||||
|
date
|
||||||
uptime
|
uptime
|
||||||
free -m
|
free -m
|
||||||
|
df -h /mnt/tests
|
||||||
zfs list
|
zfs list
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
sudo chmod +x cronjob.sh
|
sudo chmod +x cronjob.sh
|
||||||
sudo mv -f cronjob.sh /root/cronjob.sh
|
sudo mv -f cronjob.sh /root/cronjob.sh
|
||||||
echo '*/5 * * * * /root/cronjob.sh' > crontab.txt
|
echo '*/5 * * * * /root/cronjob.sh' > crontab.txt
|
||||||
sudo crontab crontab.txt
|
sudo crontab crontab.txt
|
||||||
rm crontab.txt
|
rm crontab.txt
|
||||||
|
|
||||||
# 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=1; i<=VMs; i++)); do
|
|
||||||
mkdir -p $RESPATH/vm$i
|
|
||||||
read "pty" <<< $(sudo virsh ttyconsole vm$i)
|
|
||||||
|
|
||||||
# Create the file so we can tail it, even if there's no output.
|
|
||||||
touch $RESPATH/vm$i/console.txt
|
|
||||||
|
|
||||||
sudo nohup bash -c "cat $pty > $RESPATH/vm$i/console.txt" &
|
|
||||||
|
|
||||||
# Write all VM boot lines to the console to aid in debugging failed boots.
|
|
||||||
# The boot lines from all the VMs will be munged together, so prepend each
|
|
||||||
# line with the vm hostname (like 'vm1:').
|
|
||||||
(while IFS=$'\n' read -r line; do echo "vm$i: $line" ; done < <(sudo tail -f $RESPATH/vm$i/console.txt)) &
|
|
||||||
|
|
||||||
done
|
|
||||||
echo "Console logging for ${VMs}x $OS started."
|
|
||||||
|
|
||||||
|
|
||||||
# check if the machines are okay
|
# check if the machines are okay
|
||||||
echo "Waiting for vm's to come up... (${VMs}x CPU=$CPU RAM=$RAM)"
|
echo "Waiting for vm's to come up... (${VMs}x CPU=$CPU RAM=$RAM)"
|
||||||
for ((i=1; i<=VMs; i++)); do
|
for i in $(seq 1 $VMs); do
|
||||||
.github/workflows/scripts/qemu-wait-for-vm.sh vm$i
|
.github/workflows/scripts/qemu-wait-for-vm.sh vm$i
|
||||||
done
|
done
|
||||||
echo "All $VMs VMs are up now."
|
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."
|
||||||
|
|||||||
@@ -21,13 +21,11 @@ function prefix() {
|
|||||||
S=$((DIFF-(M*60)))
|
S=$((DIFF-(M*60)))
|
||||||
|
|
||||||
CTR=$(cat /tmp/ctr)
|
CTR=$(cat /tmp/ctr)
|
||||||
echo $LINE| grep -q '^\[.*] Test[: ]' && CTR=$((CTR+1)) && echo $CTR > /tmp/ctr
|
echo $LINE| grep -q "^Test[: ]" && CTR=$((CTR+1)) && echo $CTR > /tmp/ctr
|
||||||
|
|
||||||
BASE="$HOME/work/zfs/zfs"
|
BASE="$HOME/work/zfs/zfs"
|
||||||
COLOR="$BASE/scripts/zfs-tests-color.sh"
|
COLOR="$BASE/scripts/zfs-tests-color.sh"
|
||||||
CLINE=$(echo $LINE| grep '^\[.*] Test[: ]' \
|
CLINE=$(echo $LINE| grep "^Test[ :]" | sed -e 's|/usr/local|/usr|g' \
|
||||||
| sed -e 's|^\[.*] Test|Test|g' \
|
|
||||||
| sed -e 's|/usr/local|/usr|g' \
|
|
||||||
| sed -e 's| /usr/share/zfs/zfs-tests/tests/| |g' | $COLOR)
|
| sed -e 's| /usr/share/zfs/zfs-tests/tests/| |g' | $COLOR)
|
||||||
if [ -z "$CLINE" ]; then
|
if [ -z "$CLINE" ]; then
|
||||||
printf "vm${ID}: %s\n" "$LINE"
|
printf "vm${ID}: %s\n" "$LINE"
|
||||||
@@ -47,7 +45,7 @@ if [ -z ${1:-} ]; then
|
|||||||
echo 0 > /tmp/ctr
|
echo 0 > /tmp/ctr
|
||||||
date "+%s" > /tmp/tsstart
|
date "+%s" > /tmp/tsstart
|
||||||
|
|
||||||
for ((i=1; i<=VMs; i++)); do
|
for i in $(seq 1 $VMs); do
|
||||||
IP="192.168.122.1$i"
|
IP="192.168.122.1$i"
|
||||||
daemonize -c /var/tmp -p vm${i}.pid -o vm${i}log.txt -- \
|
daemonize -c /var/tmp -p vm${i}.pid -o vm${i}log.txt -- \
|
||||||
$SSH zfs@$IP $TESTS $OS $i $VMs $CI_TYPE
|
$SSH zfs@$IP $TESTS $OS $i $VMs $CI_TYPE
|
||||||
@@ -60,7 +58,7 @@ if [ -z ${1:-} ]; then
|
|||||||
done
|
done
|
||||||
|
|
||||||
# wait for all vm's to finish
|
# wait for all vm's to finish
|
||||||
for ((i=1; i<=VMs; i++)); do
|
for i in $(seq 1 $VMs); do
|
||||||
tail --pid=$(cat vm${i}.pid) -f /dev/null
|
tail --pid=$(cat vm${i}.pid) -f /dev/null
|
||||||
pid=$(cat vm${i}log.pid)
|
pid=$(cat vm${i}log.pid)
|
||||||
rm -f vm${i}log.pid
|
rm -f vm${i}log.pid
|
||||||
@@ -74,31 +72,19 @@ fi
|
|||||||
export PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin"
|
export PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin"
|
||||||
case "$1" in
|
case "$1" in
|
||||||
freebsd*)
|
freebsd*)
|
||||||
TDIR="/usr/local/share/zfs"
|
|
||||||
sudo kldstat -n zfs 2>/dev/null && sudo kldunload zfs
|
sudo kldstat -n zfs 2>/dev/null && sudo kldunload zfs
|
||||||
sudo -E ./zfs/scripts/zfs.sh
|
sudo -E ./zfs/scripts/zfs.sh
|
||||||
sudo mv -f /var/tmp/*.txt /tmp
|
TDIR="/usr/local/share/zfs"
|
||||||
sudo newfs -U -t -L tmp /dev/vtbd1 >/dev/null
|
|
||||||
sudo mount -o noatime /dev/vtbd1 /var/tmp
|
|
||||||
sudo chmod 1777 /var/tmp
|
|
||||||
sudo mv -f /tmp/*.txt /var/tmp
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# use xfs @ /var/tmp for all distros
|
# use xfs @ /var/tmp for all distros
|
||||||
TDIR="/usr/share/zfs"
|
|
||||||
sudo -E modprobe zfs
|
|
||||||
sudo mv -f /var/tmp/*.txt /tmp
|
sudo mv -f /var/tmp/*.txt /tmp
|
||||||
sudo mkfs.xfs -fq /dev/vdb
|
sudo mkfs.xfs -fq /dev/vdb
|
||||||
sudo mount -o noatime /dev/vdb /var/tmp
|
sudo mount -o noatime /dev/vdb /var/tmp
|
||||||
sudo chmod 1777 /var/tmp
|
sudo chmod 1777 /var/tmp
|
||||||
sudo mv -f /tmp/*.txt /var/tmp
|
sudo mv -f /tmp/*.txt /var/tmp
|
||||||
;;
|
sudo -E modprobe zfs
|
||||||
esac
|
TDIR="/usr/share/zfs"
|
||||||
|
|
||||||
# enable io_uring on el9/el10
|
|
||||||
case "$1" in
|
|
||||||
almalinux9|almalinux10|centos-stream*)
|
|
||||||
sudo sysctl kernel.io_uring_disabled=0 > /dev/null
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -111,7 +97,7 @@ fi
|
|||||||
sudo dmesg -c > dmesg-prerun.txt
|
sudo dmesg -c > dmesg-prerun.txt
|
||||||
mount > mount.txt
|
mount > mount.txt
|
||||||
df -h > df-prerun.txt
|
df -h > df-prerun.txt
|
||||||
$TDIR/zfs-tests.sh -vKO -s 3GB -T $TAGS
|
$TDIR/zfs-tests.sh -vK -s 3GB -T $TAGS
|
||||||
RV=$?
|
RV=$?
|
||||||
df -h > df-postrun.txt
|
df -h > df-postrun.txt
|
||||||
echo $RV > tests-exitcode.txt
|
echo $RV > tests-exitcode.txt
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ BASE="$HOME/work/zfs/zfs"
|
|||||||
MERGE="$BASE/.github/workflows/scripts/merge_summary.awk"
|
MERGE="$BASE/.github/workflows/scripts/merge_summary.awk"
|
||||||
|
|
||||||
# catch result files of testings (vm's should be there)
|
# catch result files of testings (vm's should be there)
|
||||||
for ((i=1; i<=VMs; i++)); do
|
for i in $(seq 1 $VMs); do
|
||||||
rsync -arL zfs@vm$i:$RESPATH/current $RESPATH/vm$i || true
|
rsync -arL zfs@vm$i:$RESPATH/current $RESPATH/vm$i || true
|
||||||
scp zfs@vm$i:"/var/tmp/*.txt" $RESPATH/vm$i || true
|
scp zfs@vm$i:"/var/tmp/*.txt" $RESPATH/vm$i || true
|
||||||
scp zfs@vm$i:"/var/tmp/*.rpm" $RESPATH/vm$i || true
|
scp zfs@vm$i:"/var/tmp/*.rpm" $RESPATH/vm$i || true
|
||||||
@@ -37,7 +37,7 @@ cp -f /var/tmp/*.txt $RESPATH || true
|
|||||||
cd $RESPATH
|
cd $RESPATH
|
||||||
|
|
||||||
# prepare result files for summary
|
# prepare result files for summary
|
||||||
for ((i=1; i<=VMs; i++)); do
|
for i in $(seq 1 $VMs); do
|
||||||
file="vm$i/build-stderr.txt"
|
file="vm$i/build-stderr.txt"
|
||||||
test -s $file && mv -f $file build-stderr.txt
|
test -s $file && mv -f $file build-stderr.txt
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ fi
|
|||||||
|
|
||||||
echo -e "\nFull logs for download:\n $1\n"
|
echo -e "\nFull logs for download:\n $1\n"
|
||||||
|
|
||||||
for ((i=1; i<=VMs; i++)); do
|
for i in $(seq 1 $VMs); do
|
||||||
rv=$(cat vm$i/tests-exitcode.txt)
|
rv=$(cat vm$i/tests-exitcode.txt)
|
||||||
|
|
||||||
if [ $rv = 0 ]; then
|
if [ $rv = 0 ]; then
|
||||||
|
|||||||
@@ -42,10 +42,7 @@ function test_install {
|
|||||||
sudo sed -i "s;baseurl=http://download.zfsonlinux.org;baseurl=$host;g" /etc/yum.repos.d/zfs.repo
|
sudo sed -i "s;baseurl=http://download.zfsonlinux.org;baseurl=$host;g" /etc/yum.repos.d/zfs.repo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! sudo dnf -y install $args zfs zfs-test ; then
|
sudo dnf -y install $args zfs zfs-test
|
||||||
echo "$repo ${package}...[FAILED] $baseurl" >> $SUMMARY
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Load modules and create a simple pool as a sanity test.
|
# Load modules and create a simple pool as a sanity test.
|
||||||
sudo /usr/share/zfs/zfs.sh -r
|
sudo /usr/share/zfs/zfs.sh -r
|
||||||
@@ -73,19 +70,16 @@ almalinux*)
|
|||||||
name=$(curl -Ls $url | grep 'dnf install' | grep -Eo 'zfs-release-[0-9]+-[0-9]+')
|
name=$(curl -Ls $url | grep 'dnf install' | grep -Eo 'zfs-release-[0-9]+-[0-9]+')
|
||||||
sudo dnf -y install https://zfsonlinux.org/epel/$name$(rpm --eval "%{dist}").noarch.rpm 2>&1
|
sudo dnf -y install https://zfsonlinux.org/epel/$name$(rpm --eval "%{dist}").noarch.rpm 2>&1
|
||||||
sudo rpm -qi zfs-release
|
sudo rpm -qi zfs-release
|
||||||
for i in zfs zfs-kmod zfs-testing zfs-testing-kmod zfs-latest \
|
test_install zfs $ALTHOST
|
||||||
zfs-latest-kmod zfs-legacy zfs-legacy-kmod zfs-2.2 \
|
test_install zfs-kmod $ALTHOST
|
||||||
zfs-2.2-kmod zfs-2.3 zfs-2.3-kmod ; do
|
test_install zfs-testing $ALTHOST
|
||||||
test_install $i $ALTHOST
|
test_install zfs-testing-kmod $ALTHOST
|
||||||
done
|
|
||||||
;;
|
;;
|
||||||
fedora*)
|
fedora*)
|
||||||
url='https://raw.githubusercontent.com/openzfs/openzfs-docs/refs/heads/master/docs/Getting%20Started/Fedora/index.rst'
|
url='https://raw.githubusercontent.com/openzfs/openzfs-docs/refs/heads/master/docs/Getting%20Started/Fedora/index.rst'
|
||||||
name=$(curl -Ls $url | grep 'dnf install' | grep -Eo 'zfs-release-[0-9]+-[0-9]+')
|
name=$(curl -Ls $url | grep 'dnf install' | grep -Eo 'zfs-release-[0-9]+-[0-9]+')
|
||||||
sudo dnf -y install -y https://zfsonlinux.org/fedora/$name$(rpm --eval "%{dist}").noarch.rpm
|
sudo dnf -y install -y https://zfsonlinux.org/fedora/$name$(rpm --eval "%{dist}").noarch.rpm
|
||||||
for i in zfs zfs-latest zfs-legacy zfs-2.2 zfs-2.3 ; do
|
test_install zfs $ALTHOST
|
||||||
test_install $i $ALTHOST
|
|
||||||
done
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
name: smatch
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
smatch:
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout smatch
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: error27/smatch
|
|
||||||
ref: master
|
|
||||||
path: smatch
|
|
||||||
- name: Install smatch dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get install -y llvm gcc make sqlite3 libsqlite3-dev libdbd-sqlite3-perl libssl-dev libtry-tiny-perl
|
|
||||||
- name: Make smatch
|
|
||||||
run: |
|
|
||||||
cd $GITHUB_WORKSPACE/smatch
|
|
||||||
make -j$(nproc)
|
|
||||||
- name: Checkout OpenZFS
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
path: zfs
|
|
||||||
- name: Install OpenZFS dependencies
|
|
||||||
run: |
|
|
||||||
cd $GITHUB_WORKSPACE/zfs
|
|
||||||
sudo apt-get purge -y snapd google-chrome-stable firefox
|
|
||||||
ONLY_DEPS=1 .github/workflows/scripts/qemu-3-deps-vm.sh ubuntu24
|
|
||||||
- name: Autogen.sh OpenZFS
|
|
||||||
run: |
|
|
||||||
cd $GITHUB_WORKSPACE/zfs
|
|
||||||
./autogen.sh
|
|
||||||
- name: Configure OpenZFS
|
|
||||||
run: |
|
|
||||||
cd $GITHUB_WORKSPACE/zfs
|
|
||||||
./configure --enable-debug
|
|
||||||
- name: Make OpenZFS
|
|
||||||
run: |
|
|
||||||
cd $GITHUB_WORKSPACE/zfs
|
|
||||||
make -j$(nproc) CHECK="$GITHUB_WORKSPACE/smatch/smatch" CC=$GITHUB_WORKSPACE/smatch/cgcc | tee $GITHUB_WORKSPACE/smatch.log
|
|
||||||
- name: Smatch results log
|
|
||||||
run: |
|
|
||||||
grep -E 'error:|warn:|warning:' $GITHUB_WORKSPACE/smatch.log
|
|
||||||
@@ -32,11 +32,6 @@ on:
|
|||||||
options:
|
options:
|
||||||
- "Build RPMs"
|
- "Build RPMs"
|
||||||
- "Test repo"
|
- "Test repo"
|
||||||
patch_level:
|
|
||||||
type: string
|
|
||||||
required: false
|
|
||||||
default: ""
|
|
||||||
description: "(optional) patch level number"
|
|
||||||
repo_url:
|
repo_url:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
@@ -52,7 +47,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: ['almalinux8', 'almalinux9', 'almalinux10', 'fedora41', 'fedora42', 'fedora43']
|
os: ['almalinux8', 'almalinux9', 'fedora40', 'fedora41', 'fedora42']
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -60,16 +55,20 @@ jobs:
|
|||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
- name: Setup QEMU
|
- name: Setup QEMU
|
||||||
|
timeout-minutes: 10
|
||||||
run: .github/workflows/scripts/qemu-1-setup.sh
|
run: .github/workflows/scripts/qemu-1-setup.sh
|
||||||
|
|
||||||
- name: Start build machine
|
- name: Start build machine
|
||||||
|
timeout-minutes: 10
|
||||||
run: .github/workflows/scripts/qemu-2-start.sh ${{ matrix.os }}
|
run: .github/workflows/scripts/qemu-2-start.sh ${{ matrix.os }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
timeout-minutes: 20
|
||||||
run: |
|
run: |
|
||||||
.github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }}
|
.github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }}
|
||||||
|
|
||||||
- name: Build modules or Test repo
|
- name: Build modules or Test repo
|
||||||
|
timeout-minutes: 30
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
if [ "${{ github.event.inputs.test_type }}" == "Test repo" ] ; then
|
if [ "${{ github.event.inputs.test_type }}" == "Test repo" ] ; then
|
||||||
@@ -79,17 +78,12 @@ jobs:
|
|||||||
mkdir -p /tmp/repo
|
mkdir -p /tmp/repo
|
||||||
ssh zfs@vm0 '$HOME/zfs/.github/workflows/scripts/qemu-test-repo-vm.sh' ${{ github.event.inputs.repo_url }}
|
ssh zfs@vm0 '$HOME/zfs/.github/workflows/scripts/qemu-test-repo-vm.sh' ${{ github.event.inputs.repo_url }}
|
||||||
else
|
else
|
||||||
EXTRA=""
|
.github/workflows/scripts/qemu-4-build.sh --repo --release --dkms --tarball ${{ matrix.os }}
|
||||||
if [ -n "${{ github.event.inputs.patch_level }}" ] ; then
|
|
||||||
EXTRA="--patch-level ${{ github.event.inputs.patch_level }}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
.github/workflows/scripts/qemu-4-build.sh $EXTRA \
|
|
||||||
--repo --release --dkms --tarball ${{ matrix.os }}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
if: always()
|
if: always()
|
||||||
|
timeout-minutes: 10
|
||||||
run: |
|
run: |
|
||||||
rsync -a zfs@vm0:/tmp/repo /tmp || true
|
rsync -a zfs@vm0:/tmp/repo /tmp || true
|
||||||
.github/workflows/scripts/replace-dupes-with-symlinks.sh /tmp/repo
|
.github/workflows/scripts/replace-dupes-with-symlinks.sh /tmp/repo
|
||||||
|
|||||||
@@ -5,11 +5,16 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
fedora_kernel_ver:
|
include_stream9:
|
||||||
type: string
|
type: boolean
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: false
|
||||||
description: "(optional) Experimental kernel version to install on Fedora (like '6.14' or '6.13.3-0.rc3')"
|
description: 'Test on CentOS 9 stream'
|
||||||
|
include_stream10:
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
description: 'Test on CentOS 10 stream'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
@@ -29,42 +34,33 @@ jobs:
|
|||||||
- name: Generate OS config and CI type
|
- name: Generate OS config and CI type
|
||||||
id: os
|
id: os
|
||||||
run: |
|
run: |
|
||||||
ci_type="default"
|
FULL_OS='["almalinux8", "almalinux9", "debian11", "debian12", "fedora40", "fedora41", "fedora42", "freebsd13-4r", "freebsd14-2r", "freebsd15-0c", "ubuntu20", "ubuntu22", "ubuntu24"]'
|
||||||
|
QUICK_OS='["almalinux8", "almalinux9", "debian12", "fedora42", "freebsd14-2r", "ubuntu24"]'
|
||||||
# determine CI type when running on PR
|
# determine CI type when running on PR
|
||||||
|
ci_type="full"
|
||||||
if ${{ github.event_name == 'pull_request' }}; then
|
if ${{ github.event_name == 'pull_request' }}; then
|
||||||
head=${{ github.event.pull_request.head.sha }}
|
head=${{ github.event.pull_request.head.sha }}
|
||||||
base=${{ github.event.pull_request.base.sha }}
|
base=${{ github.event.pull_request.base.sha }}
|
||||||
ci_type=$(python3 .github/workflows/scripts/generate-ci-type.py $head $base)
|
ci_type=$(python3 .github/workflows/scripts/generate-ci-type.py $head $base)
|
||||||
fi
|
fi
|
||||||
|
if [ "$ci_type" == "quick" ]; then
|
||||||
case "$ci_type" in
|
os_selection="$QUICK_OS"
|
||||||
quick)
|
|
||||||
os_selection='["almalinux8", "almalinux9", "almalinux10", "debian12", "fedora42", "freebsd15-0s", "ubuntu24"]'
|
|
||||||
;;
|
|
||||||
linux)
|
|
||||||
os_selection='["almalinux8", "almalinux9", "almalinux10", "centos-stream9", "centos-stream10", "debian11", "debian12", "debian13", "fedora41", "fedora42", "fedora43", "ubuntu22", "ubuntu24"]'
|
|
||||||
;;
|
|
||||||
freebsd)
|
|
||||||
os_selection='["freebsd13-5r", "freebsd14-2r", "freebsd14-3r", "freebsd13-5s", "freebsd14-3s", "freebsd15-0s", "freebsd16-0c"]'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# default list
|
|
||||||
os_selection='["almalinux8", "almalinux9", "almalinux10", "centos-stream9", "centos-stream10", "debian12", "debian13", "fedora42", "fedora43", "freebsd14-3r", "freebsd15-0s", "freebsd16-0c", "ubuntu22", "ubuntu24"]'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if ${{ github.event.inputs.fedora_kernel_ver != '' }}; then
|
|
||||||
# They specified a custom kernel version for Fedora.
|
|
||||||
# Use only Fedora runners.
|
|
||||||
os_json=$(echo ${os_selection} | jq -c '[.[] | select(startswith("fedora"))]')
|
|
||||||
else
|
else
|
||||||
# Normal case
|
os_selection="$FULL_OS"
|
||||||
os_json=$(echo ${os_selection} | jq -c)
|
fi
|
||||||
|
os_json=$(echo ${os_selection} | jq -c)
|
||||||
|
|
||||||
|
# Add optional runners
|
||||||
|
if [ "${{ github.event.inputs.include_stream9 }}" == 'true' ]; then
|
||||||
|
os_json=$(echo $os_json | jq -c '. += ["centos-stream9"]')
|
||||||
|
fi
|
||||||
|
if [ "${{ github.event.inputs.include_stream10 }}" == 'true' ]; then
|
||||||
|
os_json=$(echo $os_json | jq -c '. += ["centos-stream10"]')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "os=$os_json" | tee -a $GITHUB_OUTPUT
|
echo $os_json
|
||||||
echo "ci_type=$ci_type" | tee -a $GITHUB_OUTPUT
|
echo "os=$os_json" >> $GITHUB_OUTPUT
|
||||||
|
echo "ci_type=$ci_type" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
qemu-vm:
|
qemu-vm:
|
||||||
name: qemu-x86
|
name: qemu-x86
|
||||||
@@ -72,13 +68,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# rhl: almalinux8, almalinux9, centos-streamX, fedora4x
|
# rhl: almalinux8, almalinux9, centos-stream9, fedora40, fedora41
|
||||||
# debian: debian12, debian13, ubuntu22, ubuntu24
|
# debian: debian11, debian12, ubuntu20, ubuntu22, ubuntu24
|
||||||
# misc: archlinux, tumbleweed
|
# misc: archlinux, tumbleweed
|
||||||
# FreeBSD variants of november 2025:
|
# FreeBSD variants of 2024-12:
|
||||||
# FreeBSD Release: freebsd13-5r, freebsd14-2r, freebsd14-3r
|
# FreeBSD Release: freebsd13-4r, freebsd14-2r
|
||||||
# FreeBSD Stable: freebsd13-5s, freebsd14-3s, freebsd15-0s
|
# FreeBSD Stable: freebsd13-4s, freebsd14-2s
|
||||||
# FreeBSD Current: freebsd16-0c
|
# FreeBSD Current: freebsd15-0c
|
||||||
os: ${{ fromJson(needs.test-config.outputs.test_os) }}
|
os: ${{ fromJson(needs.test-config.outputs.test_os) }}
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
@@ -87,7 +83,7 @@ jobs:
|
|||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
- name: Setup QEMU
|
- name: Setup QEMU
|
||||||
timeout-minutes: 60
|
timeout-minutes: 10
|
||||||
run: .github/workflows/scripts/qemu-1-setup.sh
|
run: .github/workflows/scripts/qemu-1-setup.sh
|
||||||
|
|
||||||
- name: Start build machine
|
- name: Start build machine
|
||||||
@@ -95,8 +91,8 @@ jobs:
|
|||||||
run: .github/workflows/scripts/qemu-2-start.sh ${{ matrix.os }}
|
run: .github/workflows/scripts/qemu-2-start.sh ${{ matrix.os }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
timeout-minutes: 60
|
timeout-minutes: 20
|
||||||
run: .github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }} ${{ github.event.inputs.fedora_kernel_ver }}
|
run: .github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }}
|
||||||
|
|
||||||
- name: Build modules
|
- name: Build modules
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
|||||||
+12
-12
@@ -12,8 +12,7 @@ jobs:
|
|||||||
zloop:
|
zloop:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
env:
|
env:
|
||||||
WORK_DIR: /mnt/zloop
|
TEST_DIR: /var/tmp/zloop
|
||||||
CORE_DIR: /mnt/zloop/cores
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -41,37 +40,38 @@ jobs:
|
|||||||
sudo modprobe zfs
|
sudo modprobe zfs
|
||||||
- name: Tests
|
- name: Tests
|
||||||
run: |
|
run: |
|
||||||
sudo truncate -s 256G /mnt/vdev
|
sudo mkdir -p $TEST_DIR
|
||||||
sudo zpool create cipool -m $WORK_DIR -O compression=on -o autotrim=on /mnt/vdev
|
# run for 10 minutes or at most 6 iterations for a maximum runner
|
||||||
sudo /usr/share/zfs/zloop.sh -t 600 -I 6 -l -m 1 -c $CORE_DIR -f $WORK_DIR -- -T 120 -P 60
|
# time of 60 minutes.
|
||||||
|
sudo /usr/share/zfs/zloop.sh -t 600 -I 6 -l -m 1 -- -T 120 -P 60
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
sudo chmod +r -R $WORK_DIR/
|
sudo chmod +r -R $TEST_DIR/
|
||||||
- name: Ztest log
|
- name: Ztest log
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
grep -B10 -A1000 'ASSERT' $CORE_DIR/*/ztest.out || tail -n 1000 $CORE_DIR/*/ztest.out
|
grep -B10 -A1000 'ASSERT' $TEST_DIR/*/ztest.out || tail -n 1000 $TEST_DIR/*/ztest.out
|
||||||
- name: Gdb log
|
- name: Gdb log
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
sed -n '/Backtraces (full)/q;p' $CORE_DIR/*/ztest.gdb
|
sed -n '/Backtraces (full)/q;p' $TEST_DIR/*/ztest.gdb
|
||||||
- name: Zdb log
|
- name: Zdb log
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
cat $CORE_DIR/*/ztest.zdb
|
cat $TEST_DIR/*/ztest.zdb
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: Logs
|
name: Logs
|
||||||
path: |
|
path: |
|
||||||
/mnt/zloop/*/
|
/var/tmp/zloop/*/
|
||||||
!/mnt/zloop/cores/*/vdev/
|
!/var/tmp/zloop/*/vdev/
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: Pool files
|
name: Pool files
|
||||||
path: |
|
path: |
|
||||||
/mnt/zloop/cores/*/vdev/
|
/var/tmp/zloop/*/vdev/
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
# These maps are making names consistent where they have varied but the email
|
# These maps are making names consistent where they have varied but the email
|
||||||
# address has never changed. In most cases, the full name is in the
|
# address has never changed. In most cases, the full name is in the
|
||||||
# Signed-off-by of a commit with a matching author.
|
# Signed-off-by of a commit with a matching author.
|
||||||
Achill Gilgenast <achill@achill.org>
|
|
||||||
Ahelenia Ziemiańska <nabijaczleweli@gmail.com>
|
Ahelenia Ziemiańska <nabijaczleweli@gmail.com>
|
||||||
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
|
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
|
||||||
Alex John <alex@stty.io>
|
Alex John <alex@stty.io>
|
||||||
@@ -38,7 +37,6 @@ Crag Wang <crag0715@gmail.com>
|
|||||||
Damian Szuberski <szuberskidamian@gmail.com>
|
Damian Szuberski <szuberskidamian@gmail.com>
|
||||||
Daniel Kolesa <daniel@octaforge.org>
|
Daniel Kolesa <daniel@octaforge.org>
|
||||||
Debabrata Banerjee <dbavatar@gmail.com>
|
Debabrata Banerjee <dbavatar@gmail.com>
|
||||||
Diwakar Kristappagari <diwakar-k@hpe.com>
|
|
||||||
Finix Yan <yanchongwen@hotmail.com>
|
Finix Yan <yanchongwen@hotmail.com>
|
||||||
Gaurav Kumar <gauravk.18@gmail.com>
|
Gaurav Kumar <gauravk.18@gmail.com>
|
||||||
Gionatan Danti <g.danti@assyoma.it>
|
Gionatan Danti <g.danti@assyoma.it>
|
||||||
@@ -53,7 +51,6 @@ Jason Harmening <jason.harmening@gmail.com>
|
|||||||
Jeremy Faulkner <gldisater@gmail.com>
|
Jeremy Faulkner <gldisater@gmail.com>
|
||||||
Jinshan Xiong <jinshan.xiong@gmail.com>
|
Jinshan Xiong <jinshan.xiong@gmail.com>
|
||||||
John Poduska <jpoduska@datto.com>
|
John Poduska <jpoduska@datto.com>
|
||||||
Jo Zzsi <jozzsicsataban@gmail.com>
|
|
||||||
Justin Scholz <git@justinscholz.de>
|
Justin Scholz <git@justinscholz.de>
|
||||||
Ka Ho Ng <khng300@gmail.com>
|
Ka Ho Ng <khng300@gmail.com>
|
||||||
Kash Pande <github@tripleback.net>
|
Kash Pande <github@tripleback.net>
|
||||||
@@ -68,7 +65,6 @@ Michael Gmelin <grembo@FreeBSD.org>
|
|||||||
Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
|
Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
|
||||||
Piotr Kubaj <pkubaj@anongoth.pl>
|
Piotr Kubaj <pkubaj@anongoth.pl>
|
||||||
Quentin Zdanis <zdanisq@gmail.com>
|
Quentin Zdanis <zdanisq@gmail.com>
|
||||||
Roberto Ricci <io@r-ricci.it>
|
|
||||||
Roberto Ricci <ricci@disroot.org>
|
Roberto Ricci <ricci@disroot.org>
|
||||||
Rob Norris <robn@despairlabs.com>
|
Rob Norris <robn@despairlabs.com>
|
||||||
Rob Norris <rob.norris@klarasystems.com>
|
Rob Norris <rob.norris@klarasystems.com>
|
||||||
@@ -84,16 +80,11 @@ Youzhong Yang <youzhong@gmail.com>
|
|||||||
|
|
||||||
# Signed-off-by: overriding Author:
|
# Signed-off-by: overriding Author:
|
||||||
Alexander Ziaee <ziaee@FreeBSD.org> <concussious@runbox.com>
|
Alexander Ziaee <ziaee@FreeBSD.org> <concussious@runbox.com>
|
||||||
Felix Schmidt <felixschmidt20@aol.com> <f.sch.prototype@gmail.com>
|
Ryan <errornointernet@envs.net> <error.nointernet@gmail.com>
|
||||||
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> <jean-sebastien.pedron@dumbbell.fr>
|
Sietse <sietse@wizdom.nu> <uglymotha@wizdom.nu>
|
||||||
Konstantin Belousov <kib@FreeBSD.org> <kib@kib.kiev.ua>
|
|
||||||
Olivier Certner <olce@FreeBSD.org> <olce.freebsd@certner.fr>
|
|
||||||
Patrick Xia <patrickx@google.com> <octalc0de@aim.com>
|
|
||||||
Phil Sutter <phil@nwl.cc> <p.github@nwl.cc>
|
Phil Sutter <phil@nwl.cc> <p.github@nwl.cc>
|
||||||
poscat <poscat@poscat.moe> <poscat0x04@outlook.com>
|
poscat <poscat@poscat.moe> <poscat0x04@outlook.com>
|
||||||
Qiuhao Chen <chenqiuhao1997@gmail.com> <haohao0924@126.com>
|
Qiuhao Chen <chenqiuhao1997@gmail.com> <haohao0924@126.com>
|
||||||
Ryan <errornointernet@envs.net> <error.nointernet@gmail.com>
|
|
||||||
Sietse <sietse@wizdom.nu> <uglymotha@wizdom.nu>
|
|
||||||
Yuxin Wang <yuxinwang9999@gmail.com> <Bi11gates9999@gmail.com>
|
Yuxin Wang <yuxinwang9999@gmail.com> <Bi11gates9999@gmail.com>
|
||||||
Zhenlei Huang <zlei@FreeBSD.org> <zlei.huang@gmail.com>
|
Zhenlei Huang <zlei@FreeBSD.org> <zlei.huang@gmail.com>
|
||||||
|
|
||||||
@@ -110,7 +101,6 @@ Tulsi Jain <tulsi.jain@delphix.com> <tulsi.jain@Tulsi-Jains-MacBook-Pro.local>
|
|||||||
# Mappings from Github no-reply addresses
|
# Mappings from Github no-reply addresses
|
||||||
ajs124 <git@ajs124.de> <ajs124@users.noreply.github.com>
|
ajs124 <git@ajs124.de> <ajs124@users.noreply.github.com>
|
||||||
Alek Pinchuk <apinchuk@axcient.com> <alek-p@users.noreply.github.com>
|
Alek Pinchuk <apinchuk@axcient.com> <alek-p@users.noreply.github.com>
|
||||||
Aleksandr Liber <aleksandr.liber@perforce.com> <61714074+AleksandrLiber@users.noreply.github.com>
|
|
||||||
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>
|
||||||
@@ -130,7 +120,6 @@ buzzingwires <buzzingwires@outlook.com> <131118055+buzzingwires@users.noreply.gi
|
|||||||
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>
|
Chris Peredun <chris.peredun@ixsystems.com> <126915832+chrisperedun@users.noreply.github.com>
|
||||||
classabbyamp <dev@placeviolette.net> <5366828+classabbyamp@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>
|
||||||
@@ -148,12 +137,10 @@ Fedor Uporov <fuporov.vstack@gmail.com> <60701163+fuporovvStack@users.noreply.gi
|
|||||||
Felix Dörre <felix@dogcraft.de> <felixdoerre@users.noreply.github.com>
|
Felix Dörre <felix@dogcraft.de> <felixdoerre@users.noreply.github.com>
|
||||||
Felix Neumärker <xdch47@posteo.de> <34678034+xdch47@users.noreply.github.com>
|
Felix Neumärker <xdch47@posteo.de> <34678034+xdch47@users.noreply.github.com>
|
||||||
Finix Yan <yancw@info2soft.com> <Finix1979@users.noreply.github.com>
|
Finix Yan <yancw@info2soft.com> <Finix1979@users.noreply.github.com>
|
||||||
Friedrich Weber <f.weber@proxmox.com> <56110206+frwbr@users.noreply.github.com>
|
|
||||||
Gaurav Kumar <gauravk.18@gmail.com> <gaurkuma@users.noreply.github.com>
|
Gaurav Kumar <gauravk.18@gmail.com> <gaurkuma@users.noreply.github.com>
|
||||||
George Gaydarov <git@gg7.io> <gg7@users.noreply.github.com>
|
George Gaydarov <git@gg7.io> <gg7@users.noreply.github.com>
|
||||||
Georgy Yakovlev <gyakovlev@gentoo.org> <168902+gyakovlev@users.noreply.github.com>
|
Georgy Yakovlev <gyakovlev@gentoo.org> <168902+gyakovlev@users.noreply.github.com>
|
||||||
Gerardwx <gerardw@alum.mit.edu> <Gerardwx@users.noreply.github.com>
|
Gerardwx <gerardw@alum.mit.edu> <Gerardwx@users.noreply.github.com>
|
||||||
Germano Massullo <germano.massullo@gmail.com> <Germano0@users.noreply.github.com>
|
|
||||||
Gian-Carlo DeFazio <defazio1@llnl.gov> <defaziogiancarlo@users.noreply.github.com>
|
Gian-Carlo DeFazio <defazio1@llnl.gov> <defaziogiancarlo@users.noreply.github.com>
|
||||||
Giuseppe Di Natale <dinatale2@llnl.gov> <dinatale2@users.noreply.github.com>
|
Giuseppe Di Natale <dinatale2@llnl.gov> <dinatale2@users.noreply.github.com>
|
||||||
Hajo Möller <dasjoe@gmail.com> <dasjoe@users.noreply.github.com>
|
Hajo Möller <dasjoe@gmail.com> <dasjoe@users.noreply.github.com>
|
||||||
@@ -173,7 +160,6 @@ 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>
|
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>
|
||||||
Kaitlin Hoang <kthoang@amazon.com> <khoang98@users.noreply.github.com>
|
|
||||||
Kevin Greene <kevin.greene@delphix.com> <104801862+kxgreene@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>
|
||||||
@@ -191,7 +177,6 @@ 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>
|
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>
|
||||||
nav1s <nav1s@proton.me> <42621369+nav1s@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>
|
||||||
Pablo Correa Gómez <ablocorrea@hotmail.com> <32678034+pablofsf@users.noreply.github.com>
|
Pablo Correa Gómez <ablocorrea@hotmail.com> <32678034+pablofsf@users.noreply.github.com>
|
||||||
@@ -213,7 +198,6 @@ Samuel Wycliffe <samuelwycliffe@gmail.com> <50765275+npc203@users.noreply.github
|
|||||||
Savyasachee Jha <hi@savyasacheejha.com> <savyajha@users.noreply.github.com>
|
Savyasachee Jha <hi@savyasacheejha.com> <savyajha@users.noreply.github.com>
|
||||||
Scott Colby <scott@scolby.com> <scolby33@users.noreply.github.com>
|
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>
|
||||||
Shreshth Srivastava <shreshthsrivastava2@gmail.com> <66148173+Shreshth3@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>
|
Stefan Lendl <s.lendl@proxmox.com> <1321542+stfl@users.noreply.github.com>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ PAST MAINTAINERS:
|
|||||||
CONTRIBUTORS:
|
CONTRIBUTORS:
|
||||||
|
|
||||||
Aaron Fineman <abyxcos@gmail.com>
|
Aaron Fineman <abyxcos@gmail.com>
|
||||||
Achill Gilgenast <achill@achill.org>
|
|
||||||
Adam D. Moss <c@yotes.com>
|
Adam D. Moss <c@yotes.com>
|
||||||
Adam Leventhal <ahl@delphix.com>
|
Adam Leventhal <ahl@delphix.com>
|
||||||
Adam Stevko <adam.stevko@gmail.com>
|
Adam Stevko <adam.stevko@gmail.com>
|
||||||
@@ -30,7 +29,6 @@ CONTRIBUTORS:
|
|||||||
Alejandro Colomar <Colomar.6.4.3@GMail.com>
|
Alejandro Colomar <Colomar.6.4.3@GMail.com>
|
||||||
Alejandro R. Sedeño <asedeno@mit.edu>
|
Alejandro R. Sedeño <asedeno@mit.edu>
|
||||||
Alek Pinchuk <alek@nexenta.com>
|
Alek Pinchuk <alek@nexenta.com>
|
||||||
Aleksandr Liber <aleksandr.liber@perforce.com>
|
|
||||||
Aleksa Sarai <cyphar@cyphar.com>
|
Aleksa Sarai <cyphar@cyphar.com>
|
||||||
Alexander Eremin <a.eremin@nexenta.com>
|
Alexander Eremin <a.eremin@nexenta.com>
|
||||||
Alexander Lobakin <alobakin@pm.me>
|
Alexander Lobakin <alobakin@pm.me>
|
||||||
@@ -60,7 +58,6 @@ CONTRIBUTORS:
|
|||||||
Andreas Buschmann <andreas.buschmann@tech.net.de>
|
Andreas Buschmann <andreas.buschmann@tech.net.de>
|
||||||
Andreas Dilger <adilger@intel.com>
|
Andreas Dilger <adilger@intel.com>
|
||||||
Andreas Vögele <andreas@andreasvoegele.com>
|
Andreas Vögele <andreas@andreasvoegele.com>
|
||||||
Andres <a-d-j-i@users.noreply.github.com>
|
|
||||||
Andrew Barnes <barnes333@gmail.com>
|
Andrew Barnes <barnes333@gmail.com>
|
||||||
Andrew Hamilton <ahamilto@tjhsst.edu>
|
Andrew Hamilton <ahamilto@tjhsst.edu>
|
||||||
Andrew Innes <andrew.c12@gmail.com>
|
Andrew Innes <andrew.c12@gmail.com>
|
||||||
@@ -74,7 +71,6 @@ CONTRIBUTORS:
|
|||||||
Andrey Prokopenko <job@terem.fr>
|
Andrey Prokopenko <job@terem.fr>
|
||||||
Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
|
Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
|
||||||
Andriy Gapon <avg@freebsd.org>
|
Andriy Gapon <avg@freebsd.org>
|
||||||
Andriy Tkachuk <andriy.tkachuk@seagate.com>
|
|
||||||
Andy Bakun <github@thwartedefforts.org>
|
Andy Bakun <github@thwartedefforts.org>
|
||||||
Andy Fiddaman <omnios@citrus-it.co.uk>
|
Andy Fiddaman <omnios@citrus-it.co.uk>
|
||||||
Aniruddha Shankar <k@191a.net>
|
Aniruddha Shankar <k@191a.net>
|
||||||
@@ -85,7 +81,6 @@ CONTRIBUTORS:
|
|||||||
Arne Jansen <arne@die-jansens.de>
|
Arne Jansen <arne@die-jansens.de>
|
||||||
Aron Xu <happyaron.xu@gmail.com>
|
Aron Xu <happyaron.xu@gmail.com>
|
||||||
Arshad Hussain <arshad.hussain@aeoncomputing.com>
|
Arshad Hussain <arshad.hussain@aeoncomputing.com>
|
||||||
Artem <artem.vlasenko@ossrevival.org>
|
|
||||||
Arun KV <arun.kv@datacore.com>
|
Arun KV <arun.kv@datacore.com>
|
||||||
Arvind Sankar <nivedita@alum.mit.edu>
|
Arvind Sankar <nivedita@alum.mit.edu>
|
||||||
Attila Fülöp <attila@fueloep.org>
|
Attila Fülöp <attila@fueloep.org>
|
||||||
@@ -123,7 +118,6 @@ CONTRIBUTORS:
|
|||||||
Caleb James DeLisle <calebdelisle@lavabit.com>
|
Caleb James DeLisle <calebdelisle@lavabit.com>
|
||||||
Cameron Harr <harr1@llnl.gov>
|
Cameron Harr <harr1@llnl.gov>
|
||||||
Cao Xuewen <cao.xuewen@zte.com.cn>
|
Cao Xuewen <cao.xuewen@zte.com.cn>
|
||||||
Carl George <carlwgeorge@gmail.com>
|
|
||||||
Carlo Landmeter <clandmeter@gmail.com>
|
Carlo Landmeter <clandmeter@gmail.com>
|
||||||
Carlos Alberto Lopez Perez <clopez@igalia.com>
|
Carlos Alberto Lopez Perez <clopez@igalia.com>
|
||||||
Cedric Maunoury <cedric.maunoury@gmail.com>
|
Cedric Maunoury <cedric.maunoury@gmail.com>
|
||||||
@@ -154,7 +148,6 @@ CONTRIBUTORS:
|
|||||||
Chris Zubrzycki <github@mid-earth.net>
|
Chris Zubrzycki <github@mid-earth.net>
|
||||||
Chuck Tuffli <ctuffli@gmail.com>
|
Chuck Tuffli <ctuffli@gmail.com>
|
||||||
Chunwei Chen <david.chen@nutanix.com>
|
Chunwei Chen <david.chen@nutanix.com>
|
||||||
classabbyamp <dev@placeviolette.net>
|
|
||||||
Clemens Fruhwirth <clemens@endorphin.org>
|
Clemens Fruhwirth <clemens@endorphin.org>
|
||||||
Clemens Lang <cl@clang.name>
|
Clemens Lang <cl@clang.name>
|
||||||
Clint Armstrong <clint@clintarmstrong.net>
|
Clint Armstrong <clint@clintarmstrong.net>
|
||||||
@@ -162,7 +155,6 @@ CONTRIBUTORS:
|
|||||||
Colin Ian King <colin.king@canonical.com>
|
Colin Ian King <colin.king@canonical.com>
|
||||||
Colin Percival <cperciva@tarsnap.com>
|
Colin Percival <cperciva@tarsnap.com>
|
||||||
Colm Buckley <colm@tuatha.org>
|
Colm Buckley <colm@tuatha.org>
|
||||||
Cong Zhang <congzhangzh@users.noreply.github.com>
|
|
||||||
Crag Wang <crag0715@gmail.com>
|
Crag Wang <crag0715@gmail.com>
|
||||||
Craig Loomis <cloomis@astro.princeton.edu>
|
Craig Loomis <cloomis@astro.princeton.edu>
|
||||||
Craig Sanders <github@taz.net.au>
|
Craig Sanders <github@taz.net.au>
|
||||||
@@ -206,7 +198,6 @@ CONTRIBUTORS:
|
|||||||
Dimitri John Ledkov <xnox@ubuntu.com>
|
Dimitri John Ledkov <xnox@ubuntu.com>
|
||||||
Dimitry Andric <dimitry@andric.com>
|
Dimitry Andric <dimitry@andric.com>
|
||||||
Dirkjan Bussink <d.bussink@gmail.com>
|
Dirkjan Bussink <d.bussink@gmail.com>
|
||||||
Diwakar Kristappagari <diwakar-k@hpe.com>
|
|
||||||
Dmitry Khasanov <pik4ez@gmail.com>
|
Dmitry Khasanov <pik4ez@gmail.com>
|
||||||
Dominic Pearson <dsp@technoanimal.net>
|
Dominic Pearson <dsp@technoanimal.net>
|
||||||
Dominik Hassler <hadfl@omniosce.org>
|
Dominik Hassler <hadfl@omniosce.org>
|
||||||
@@ -219,7 +210,6 @@ CONTRIBUTORS:
|
|||||||
Eitan Adler <lists@eitanadler.com>
|
Eitan Adler <lists@eitanadler.com>
|
||||||
Eli Rosenthal <eli.rosenthal@delphix.com>
|
Eli Rosenthal <eli.rosenthal@delphix.com>
|
||||||
Eli Schwartz <eschwartz93@gmail.com>
|
Eli Schwartz <eschwartz93@gmail.com>
|
||||||
Eric A. Borisch <eborisch@gmail.com>
|
|
||||||
Eric Desrochers <eric.desrochers@canonical.com>
|
Eric Desrochers <eric.desrochers@canonical.com>
|
||||||
Eric Dillmann <eric@jave.fr>
|
Eric Dillmann <eric@jave.fr>
|
||||||
Eric Schrock <Eric.Schrock@delphix.com>
|
Eric Schrock <Eric.Schrock@delphix.com>
|
||||||
@@ -237,12 +227,10 @@ CONTRIBUTORS:
|
|||||||
Fedor Uporov <fuporov.vstack@gmail.com>
|
Fedor Uporov <fuporov.vstack@gmail.com>
|
||||||
Felix Dörre <felix@dogcraft.de>
|
Felix Dörre <felix@dogcraft.de>
|
||||||
Felix Neumärker <xdch47@posteo.de>
|
Felix Neumärker <xdch47@posteo.de>
|
||||||
Felix Schmidt <felixschmidt20@aol.com>
|
|
||||||
Feng Sun <loyou85@gmail.com>
|
Feng Sun <loyou85@gmail.com>
|
||||||
Finix Yan <yancw@info2soft.com>
|
Finix Yan <yancw@info2soft.com>
|
||||||
Francesco Mazzoli <f@mazzo.li>
|
Francesco Mazzoli <f@mazzo.li>
|
||||||
Frederik Wessels <wessels147@gmail.com>
|
Frederik Wessels <wessels147@gmail.com>
|
||||||
Friedrich Weber <f.weber@proxmox.com>
|
|
||||||
Frédéric Vanniere <f.vanniere@planet-work.com>
|
Frédéric Vanniere <f.vanniere@planet-work.com>
|
||||||
Gabriel A. Devenyi <gdevenyi@gmail.com>
|
Gabriel A. Devenyi <gdevenyi@gmail.com>
|
||||||
Garrett D'Amore <garrett@nexenta.com>
|
Garrett D'Amore <garrett@nexenta.com>
|
||||||
@@ -258,7 +246,6 @@ CONTRIBUTORS:
|
|||||||
George Wilson <gwilson@delphix.com>
|
George Wilson <gwilson@delphix.com>
|
||||||
Georgy Yakovlev <ya@sysdump.net>
|
Georgy Yakovlev <ya@sysdump.net>
|
||||||
Gerardwx <gerardw@alum.mit.edu>
|
Gerardwx <gerardw@alum.mit.edu>
|
||||||
Germano Massullo <germano.massullo@gmail.com>
|
|
||||||
Gian-Carlo DeFazio <defazio1@llnl.gov>
|
Gian-Carlo DeFazio <defazio1@llnl.gov>
|
||||||
Gionatan Danti <g.danti@assyoma.it>
|
Gionatan Danti <g.danti@assyoma.it>
|
||||||
Giuseppe Di Natale <guss80@gmail.com>
|
Giuseppe Di Natale <guss80@gmail.com>
|
||||||
@@ -291,20 +278,17 @@ CONTRIBUTORS:
|
|||||||
Henrik Riomar <henrik.riomar@gmail.com>
|
Henrik Riomar <henrik.riomar@gmail.com>
|
||||||
Herb Wartens <wartens2@llnl.gov>
|
Herb Wartens <wartens2@llnl.gov>
|
||||||
Hiếu Lê <leorize+oss@disroot.org>
|
Hiếu Lê <leorize+oss@disroot.org>
|
||||||
hoshinomori <hoshinomorimorimo@gmail.com>
|
|
||||||
Huang Liu <liu.huang@zte.com.cn>
|
Huang Liu <liu.huang@zte.com.cn>
|
||||||
Håkan Johansson <f96hajo@chalmers.se>
|
Håkan Johansson <f96hajo@chalmers.se>
|
||||||
Igor K <igor@dilos.org>
|
Igor K <igor@dilos.org>
|
||||||
Igor Kozhukhov <ikozhukhov@gmail.com>
|
Igor Kozhukhov <ikozhukhov@gmail.com>
|
||||||
Igor Lvovsky <ilvovsky@gmail.com>
|
Igor Lvovsky <ilvovsky@gmail.com>
|
||||||
Igor Ostapenko <pm@igoro.pro>
|
|
||||||
ilbsmart <wgqimut@gmail.com>
|
ilbsmart <wgqimut@gmail.com>
|
||||||
Ilkka Sovanto <github@ilkka.kapsi.fi>
|
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>
|
||||||
Isaac Huang <he.huang@intel.com>
|
Isaac Huang <he.huang@intel.com>
|
||||||
Ivan Shapovalov <intelfx@intelfx.name>
|
|
||||||
Ivan Volosyuk <Ivan.Volosyuk@gmail.com>
|
Ivan Volosyuk <Ivan.Volosyuk@gmail.com>
|
||||||
Jacek Fefliński <feflik@gmail.com>
|
Jacek Fefliński <feflik@gmail.com>
|
||||||
Jacob Adams <tookmund@gmail.com>
|
Jacob Adams <tookmund@gmail.com>
|
||||||
@@ -327,7 +311,6 @@ CONTRIBUTORS:
|
|||||||
Javen Wu <wu.javen@gmail.com>
|
Javen Wu <wu.javen@gmail.com>
|
||||||
Jaydeep Kshirsagar <jkshirsagar@maxlinear.com>
|
Jaydeep Kshirsagar <jkshirsagar@maxlinear.com>
|
||||||
Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
|
Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
|
||||||
Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
|
|
||||||
Jeff Dike <jdike@akamai.com>
|
Jeff Dike <jdike@akamai.com>
|
||||||
Jeremy Faulkner <gldisater@gmail.com>
|
Jeremy Faulkner <gldisater@gmail.com>
|
||||||
Jeremy Gill <jgill@parallax-innovations.com>
|
Jeremy Gill <jgill@parallax-innovations.com>
|
||||||
@@ -339,7 +322,6 @@ CONTRIBUTORS:
|
|||||||
Jinshan Xiong <jinshan.xiong@intel.com>
|
Jinshan Xiong <jinshan.xiong@intel.com>
|
||||||
Jitendra Patidar <jitendra.patidar@nutanix.com>
|
Jitendra Patidar <jitendra.patidar@nutanix.com>
|
||||||
JK Dingwall <james@dingwall.me.uk>
|
JK Dingwall <james@dingwall.me.uk>
|
||||||
Joel Low <joel@joelsplace.sg>
|
|
||||||
Joe Stein <joe.stein@delphix.com>
|
Joe Stein <joe.stein@delphix.com>
|
||||||
John-Mark Gurney <jmg@funkthat.com>
|
John-Mark Gurney <jmg@funkthat.com>
|
||||||
John Albietz <inthecloud247@gmail.com>
|
John Albietz <inthecloud247@gmail.com>
|
||||||
@@ -361,9 +343,7 @@ CONTRIBUTORS:
|
|||||||
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>
|
||||||
Jo Zzsi <jozzsicsataban@gmail.com>
|
|
||||||
João Carlos Mendes Luís <jonny@jonny.eng.br>
|
João Carlos Mendes Luís <jonny@jonny.eng.br>
|
||||||
JT Pennington <jt.pennington@klarasystems.com>
|
|
||||||
Julian Brunner <julian.brunner@gmail.com>
|
Julian Brunner <julian.brunner@gmail.com>
|
||||||
Julian Heuking <JulianH@beckhoff.com>
|
Julian Heuking <JulianH@beckhoff.com>
|
||||||
jumbi77 <jumbi77@users.noreply.github.com>
|
jumbi77 <jumbi77@users.noreply.github.com>
|
||||||
@@ -390,13 +370,11 @@ CONTRIBUTORS:
|
|||||||
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>
|
||||||
khoang98 <khoang98@users.noreply.github.com>
|
|
||||||
KireinaHoro <i@jsteward.moe>
|
KireinaHoro <i@jsteward.moe>
|
||||||
Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
|
Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
|
||||||
Kleber Tarcísio <klebertarcisio@yahoo.com.br>
|
Kleber Tarcísio <klebertarcisio@yahoo.com.br>
|
||||||
Kody A Kantor <kody.kantor@gmail.com>
|
Kody A Kantor <kody.kantor@gmail.com>
|
||||||
Kohsuke Kawaguchi <kk@kohsuke.org>
|
Kohsuke Kawaguchi <kk@kohsuke.org>
|
||||||
Konstantin Belousov <kib@FreeBSD.org>
|
|
||||||
Konstantin Khorenko <khorenko@virtuozzo.com>
|
Konstantin Khorenko <khorenko@virtuozzo.com>
|
||||||
KORN Andras <korn@elan.rulez.org>
|
KORN Andras <korn@elan.rulez.org>
|
||||||
kotauskas <v.toncharov@gmail.com>
|
kotauskas <v.toncharov@gmail.com>
|
||||||
@@ -425,7 +403,6 @@ CONTRIBUTORS:
|
|||||||
luozhengzheng <luo.zhengzheng@zte.com.cn>
|
luozhengzheng <luo.zhengzheng@zte.com.cn>
|
||||||
Luís Henriques <henrix@camandro.org>
|
Luís Henriques <henrix@camandro.org>
|
||||||
Madhav Suresh <madhav.suresh@delphix.com>
|
Madhav Suresh <madhav.suresh@delphix.com>
|
||||||
Maksym Shkolnyi <maksym.shkolnyi@workato.com>
|
|
||||||
manfromafar <jonsonb10@gmail.com>
|
manfromafar <jonsonb10@gmail.com>
|
||||||
Manoj Joseph <manoj.joseph@delphix.com>
|
Manoj Joseph <manoj.joseph@delphix.com>
|
||||||
Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
|
Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
|
||||||
@@ -466,7 +443,6 @@ CONTRIBUTORS:
|
|||||||
Max Zettlmeißl <max@zettlmeissl.de>
|
Max Zettlmeißl <max@zettlmeissl.de>
|
||||||
Md Islam <mdnahian@outlook.com>
|
Md Islam <mdnahian@outlook.com>
|
||||||
megari <megari@iki.fi>
|
megari <megari@iki.fi>
|
||||||
Meriel Luna Mittelbach <lunarlambda@gmail.com>
|
|
||||||
Michael D Labriola <michael.d.labriola@gmail.com>
|
Michael D Labriola <michael.d.labriola@gmail.com>
|
||||||
Michael Franzl <michael@franzl.name>
|
Michael Franzl <michael@franzl.name>
|
||||||
Michael Gebetsroither <michael@mgeb.org>
|
Michael Gebetsroither <michael@mgeb.org>
|
||||||
@@ -492,7 +468,6 @@ CONTRIBUTORS:
|
|||||||
Nathaniel Clark <Nathaniel.Clark@misrule.us>
|
Nathaniel Clark <Nathaniel.Clark@misrule.us>
|
||||||
Nathaniel Wesley Filardo <nwf@cs.jhu.edu>
|
Nathaniel Wesley Filardo <nwf@cs.jhu.edu>
|
||||||
Nathan Lewis <linux.robotdude@gmail.com>
|
Nathan Lewis <linux.robotdude@gmail.com>
|
||||||
nav1s <nav1s@proton.me>
|
|
||||||
Nav Ravindranath <nav@delphix.com>
|
Nav Ravindranath <nav@delphix.com>
|
||||||
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
|
Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
|
||||||
Ned Bass <bass6@llnl.gov>
|
Ned Bass <bass6@llnl.gov>
|
||||||
@@ -509,15 +484,13 @@ 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.org>
|
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>
|
||||||
Pablo Correa Gómez <ablocorrea@hotmail.com>
|
Pablo Correa Gómez <ablocorrea@hotmail.com>
|
||||||
Palash Gandhi <pbg4930@rit.edu>
|
Palash Gandhi <pbg4930@rit.edu>
|
||||||
Patrick Fasano <patrick@patrickfasano.com>
|
|
||||||
Patrick Mooney <pmooney@pfmooney.com>
|
Patrick Mooney <pmooney@pfmooney.com>
|
||||||
Patrick Xia <patrickx@google.com>
|
|
||||||
Patrik Greco <sikevux@sikevux.se>
|
Patrik Greco <sikevux@sikevux.se>
|
||||||
Paul B. Henson <henson@acm.org>
|
Paul B. Henson <henson@acm.org>
|
||||||
Paul Dagnelie <pcd@delphix.com>
|
Paul Dagnelie <pcd@delphix.com>
|
||||||
@@ -549,7 +522,6 @@ CONTRIBUTORS:
|
|||||||
P.SCH <p88@yahoo.com>
|
P.SCH <p88@yahoo.com>
|
||||||
Qiuhao Chen <chenqiuhao1997@gmail.com>
|
Qiuhao Chen <chenqiuhao1997@gmail.com>
|
||||||
Quartz <yyhran@163.com>
|
Quartz <yyhran@163.com>
|
||||||
Quentin Thébault <quentin.thebault@defenso.fr>
|
|
||||||
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>
|
||||||
@@ -558,7 +530,6 @@ CONTRIBUTORS:
|
|||||||
Remy Blank <remy.blank@pobox.com>
|
Remy Blank <remy.blank@pobox.com>
|
||||||
renelson <bnelson@nelsonbe.com>
|
renelson <bnelson@nelsonbe.com>
|
||||||
Reno Reckling <e-github@wthack.de>
|
Reno Reckling <e-github@wthack.de>
|
||||||
René Wirnata <rene.wirnata@pandascience.net>
|
|
||||||
Ricardo M. Correia <ricardo.correia@oracle.com>
|
Ricardo M. Correia <ricardo.correia@oracle.com>
|
||||||
Riccardo Schirone <rschirone91@gmail.com>
|
Riccardo Schirone <rschirone91@gmail.com>
|
||||||
Richard Allen <belperite@gmail.com>
|
Richard Allen <belperite@gmail.com>
|
||||||
@@ -602,7 +573,6 @@ CONTRIBUTORS:
|
|||||||
Scot W. Stevenson <scot.stevenson@gmail.com>
|
Scot W. Stevenson <scot.stevenson@gmail.com>
|
||||||
Sean Eric Fagan <sef@ixsystems.com>
|
Sean Eric Fagan <sef@ixsystems.com>
|
||||||
Sebastian Gottschall <s.gottschall@dd-wrt.com>
|
Sebastian Gottschall <s.gottschall@dd-wrt.com>
|
||||||
Sebastian Pauka <me@spauka.se>
|
|
||||||
Sebastian Wuerl <s.wuerl@mailbox.org>
|
Sebastian Wuerl <s.wuerl@mailbox.org>
|
||||||
Sebastien Roy <seb@delphix.com>
|
Sebastien Roy <seb@delphix.com>
|
||||||
Sen Haerens <sen@senhaerens.be>
|
Sen Haerens <sen@senhaerens.be>
|
||||||
@@ -617,10 +587,8 @@ CONTRIBUTORS:
|
|||||||
Shengqi Chen <harry-chen@outlook.com>
|
Shengqi Chen <harry-chen@outlook.com>
|
||||||
SHENGYI HONG <aokblast@FreeBSD.org>
|
SHENGYI HONG <aokblast@FreeBSD.org>
|
||||||
Shen Yan <shenyanxxxy@qq.com>
|
Shen Yan <shenyanxxxy@qq.com>
|
||||||
Shreshth Srivastava <shreshthsrivastava2@gmail.com>
|
|
||||||
Sietse <sietse@wizdom.nu>
|
Sietse <sietse@wizdom.nu>
|
||||||
Simon Guest <simon.guest@tesujimath.org>
|
Simon Guest <simon.guest@tesujimath.org>
|
||||||
Simon Howard <fraggle@soulsphere.org>
|
|
||||||
Simon Klinkert <simon.klinkert@gmail.com>
|
Simon Klinkert <simon.klinkert@gmail.com>
|
||||||
Sowrabha Gopal <sowrabha.gopal@delphix.com>
|
Sowrabha Gopal <sowrabha.gopal@delphix.com>
|
||||||
Spencer Kinny <spencerkinny1995@gmail.com>
|
Spencer Kinny <spencerkinny1995@gmail.com>
|
||||||
@@ -642,7 +610,6 @@ CONTRIBUTORS:
|
|||||||
Stéphane Lesimple <speed47_github@speed47.net>
|
Stéphane Lesimple <speed47_github@speed47.net>
|
||||||
Suman Chakravartula <schakrava@gmail.com>
|
Suman Chakravartula <schakrava@gmail.com>
|
||||||
Sydney Vanda <sydney.m.vanda@intel.com>
|
Sydney Vanda <sydney.m.vanda@intel.com>
|
||||||
Syed Shahrukh Hussain <syed.shahrukh@ossrevival.org>
|
|
||||||
Sören Tempel <soeren+git@soeren-tempel.net>
|
Sören Tempel <soeren+git@soeren-tempel.net>
|
||||||
Tamas TEVESZ <ice@extreme.hu>
|
Tamas TEVESZ <ice@extreme.hu>
|
||||||
Teodor Spæren <teodor_spaeren@riseup.net>
|
Teodor Spæren <teodor_spaeren@riseup.net>
|
||||||
@@ -665,7 +632,6 @@ CONTRIBUTORS:
|
|||||||
tleydxdy <shironeko.github@tesaguri.club>
|
tleydxdy <shironeko.github@tesaguri.club>
|
||||||
Tobin Harding <me@tobin.cc>
|
Tobin Harding <me@tobin.cc>
|
||||||
Todd Seidelmann <seidelma@users.noreply.github.com>
|
Todd Seidelmann <seidelma@users.noreply.github.com>
|
||||||
Todd Zullinger <tmz@pobox.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>
|
||||||
@@ -678,7 +644,6 @@ CONTRIBUTORS:
|
|||||||
Toyam Cox <aviator45003@gmail.com>
|
Toyam Cox <aviator45003@gmail.com>
|
||||||
Trevor Bautista <trevrb@trevrb.net>
|
Trevor Bautista <trevrb@trevrb.net>
|
||||||
Trey Dockendorf <treydock@gmail.com>
|
Trey Dockendorf <treydock@gmail.com>
|
||||||
trick2011 <trick2011@users.noreply.github.com>
|
|
||||||
Troels Nørgaard <tnn@tradeshift.com>
|
Troels Nørgaard <tnn@tradeshift.com>
|
||||||
tstabrawa <tstabrawa@users.noreply.github.com>
|
tstabrawa <tstabrawa@users.noreply.github.com>
|
||||||
Tulsi Jain <tulsi.jain@delphix.com>
|
Tulsi Jain <tulsi.jain@delphix.com>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
Meta: 1
|
Meta: 1
|
||||||
Name: zfs
|
Name: zfs
|
||||||
Branch: 1.0
|
Branch: 1.0
|
||||||
Version: 2.4.0
|
Version: 2.3.2
|
||||||
Release: 1
|
Release: 1
|
||||||
Release-Tags: relext
|
Release-Tags: relext
|
||||||
License: CDDL
|
License: CDDL
|
||||||
Author: OpenZFS
|
Author: OpenZFS
|
||||||
Linux-Maximum: 6.18
|
Linux-Maximum: 6.14
|
||||||
Linux-Minimum: 4.18
|
Linux-Minimum: 4.18
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
CLEANFILES =
|
CLEANFILES =
|
||||||
dist_noinst_DATA =
|
dist_noinst_DATA =
|
||||||
INSTALL_DATA_HOOKS =
|
INSTALL_DATA_HOOKS =
|
||||||
INSTALL_EXEC_HOOKS =
|
|
||||||
ALL_LOCAL =
|
ALL_LOCAL =
|
||||||
CLEAN_LOCAL =
|
CLEAN_LOCAL =
|
||||||
CHECKS = shellcheck checkbashisms
|
CHECKS = shellcheck checkbashisms
|
||||||
@@ -72,9 +71,6 @@ all: gitrev
|
|||||||
PHONY += install-data-hook $(INSTALL_DATA_HOOKS)
|
PHONY += install-data-hook $(INSTALL_DATA_HOOKS)
|
||||||
install-data-hook: $(INSTALL_DATA_HOOKS)
|
install-data-hook: $(INSTALL_DATA_HOOKS)
|
||||||
|
|
||||||
PHONY += install-exec-hook $(INSTALL_EXEC_HOOKS)
|
|
||||||
install-exec-hook: $(INSTALL_EXEC_HOOKS)
|
|
||||||
|
|
||||||
PHONY += maintainer-clean-local
|
PHONY += maintainer-clean-local
|
||||||
maintainer-clean-local:
|
maintainer-clean-local:
|
||||||
-$(RM) $(GITREV)
|
-$(RM) $(GITREV)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ This repository contains the code for running OpenZFS on Linux and FreeBSD.
|
|||||||
# Official Resources
|
# Official Resources
|
||||||
|
|
||||||
* [Documentation](https://openzfs.github.io/openzfs-docs/) - for using and developing this repo
|
* [Documentation](https://openzfs.github.io/openzfs-docs/) - for using and developing this repo
|
||||||
* [ZoL site](https://zfsonlinux.org) - Linux release info & links
|
* [ZoL Site](https://zfsonlinux.org) - Linux release info & links
|
||||||
* [Mailing lists](https://openzfs.github.io/openzfs-docs/Project%20and%20Community/Mailing%20Lists.html)
|
* [Mailing lists](https://openzfs.github.io/openzfs-docs/Project%20and%20Community/Mailing%20Lists.html)
|
||||||
* [OpenZFS site](https://openzfs.org/) - for conference videos and info on other platforms (illumos, OSX, Windows, etc)
|
* [OpenZFS site](https://openzfs.org/) - for conference videos and info on other platforms (illumos, OSX, Windows, etc)
|
||||||
|
|
||||||
|
|||||||
+60
-1
@@ -1,3 +1,62 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
[ "${0%/*}" = "$0" ] || cd "${0%/*}" || exit
|
||||||
|
|
||||||
autoreconf -fiv "$(dirname "$0")" && rm -rf "$(dirname "$0")"/autom4te.cache
|
# %reldir%/%canon_reldir% (%D%/%C%) only appeared in automake 1.14, but RHEL/CentOS 7 has 1.13.4
|
||||||
|
# This is an (overly) simplistic preprocessor that papers around this for the duration of the generation step,
|
||||||
|
# and can be removed once support for CentOS 7 is dropped
|
||||||
|
automake --version | awk '{print $NF; exit}' | (
|
||||||
|
IFS=. read -r AM_MAJ AM_MIN _
|
||||||
|
[ "$AM_MAJ" -gt 1 ] || [ "$AM_MIN" -ge 14 ]
|
||||||
|
) || {
|
||||||
|
process_root() {
|
||||||
|
root="$1"; shift
|
||||||
|
|
||||||
|
grep -q '%[CD]%' "$root/Makefile.am" || return
|
||||||
|
find "$root" -name Makefile.am "$@" | while read -r dir; do
|
||||||
|
dir="${dir%/Makefile.am}"
|
||||||
|
grep -q '%[CD]%' "$dir/Makefile.am" || continue
|
||||||
|
|
||||||
|
reldir="${dir#"$root"}"
|
||||||
|
reldir="${reldir#/}"
|
||||||
|
|
||||||
|
canon_reldir="$(printf '%s' "$reldir" | tr -C 'a-zA-Z0-9@_' '_')"
|
||||||
|
|
||||||
|
reldir_slash="$reldir/"
|
||||||
|
canon_reldir_slash="${canon_reldir}_"
|
||||||
|
[ -z "$reldir" ] && reldir_slash=
|
||||||
|
[ -z "$reldir" ] && canon_reldir_slash=
|
||||||
|
|
||||||
|
echo "$dir/Makefile.am" >&3
|
||||||
|
sed -i~ -e "s:%D%/:$reldir_slash:g" -e "s:%D%:$reldir:g" \
|
||||||
|
-e "s:%C%_:$canon_reldir_slash:g" -e "s:%C%:$canon_reldir:g" "$dir/Makefile.am"
|
||||||
|
done 3>>"$substituted_files"
|
||||||
|
}
|
||||||
|
|
||||||
|
rollback() {
|
||||||
|
while read -r f; do
|
||||||
|
mv "$f~" "$f"
|
||||||
|
done < "$substituted_files"
|
||||||
|
rm -f "$substituted_files"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
echo "Automake <1.14; papering over missing %reldir%/%canon_reldir% support" >&2
|
||||||
|
|
||||||
|
substituted_files="$(mktemp)"
|
||||||
|
trap rollback EXIT
|
||||||
|
|
||||||
|
roots="$(sed '/Makefile$/!d;/module/d;s:^\s*:./:;s:/Makefile::;/^\.$/d' configure.ac)"
|
||||||
|
|
||||||
|
IFS="
|
||||||
|
"
|
||||||
|
for root in $roots; do
|
||||||
|
root="${root#./}"
|
||||||
|
process_root "$root"
|
||||||
|
done
|
||||||
|
|
||||||
|
set -f
|
||||||
|
# shellcheck disable=SC2086,SC2046
|
||||||
|
process_root . $(printf '!\n-path\n%s/*\n' $roots)
|
||||||
|
}
|
||||||
|
|
||||||
|
autoreconf -fiv && rm -rf autom4te.cache
|
||||||
|
|||||||
+6
-5
@@ -98,16 +98,17 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
if USING_PYTHON
|
if USING_PYTHON
|
||||||
bin_SCRIPTS += zarcsummary zarcstat dbufstat zilstat
|
bin_SCRIPTS += arc_summary arcstat dbufstat zilstat
|
||||||
CLEANFILES += zarcsummary zarcstat dbufstat zilstat
|
CLEANFILES += arc_summary arcstat dbufstat zilstat
|
||||||
dist_noinst_DATA += %D%/zarcsummary %D%/zarcstat.in %D%/dbufstat.in %D%/zilstat.in
|
dist_noinst_DATA += %D%/arc_summary %D%/arcstat.in %D%/dbufstat.in %D%/zilstat.in
|
||||||
|
|
||||||
$(call SUBST,zarcstat,%D%/)
|
$(call SUBST,arcstat,%D%/)
|
||||||
$(call SUBST,dbufstat,%D%/)
|
$(call SUBST,dbufstat,%D%/)
|
||||||
$(call SUBST,zilstat,%D%/)
|
$(call SUBST,zilstat,%D%/)
|
||||||
zarcsummary: %D%/zarcsummary
|
arc_summary: %D%/arc_summary
|
||||||
$(AM_V_at)cp $< $@
|
$(AM_V_at)cp $< $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
PHONY += cmd
|
PHONY += cmd
|
||||||
cmd: $(bin_SCRIPTS) $(bin_PROGRAMS) $(sbin_SCRIPTS) $(sbin_PROGRAMS) $(dist_bin_SCRIPTS) $(zfsexec_PROGRAMS) $(mounthelper_PROGRAMS)
|
cmd: $(bin_SCRIPTS) $(bin_PROGRAMS) $(sbin_SCRIPTS) $(sbin_PROGRAMS) $(dist_bin_SCRIPTS) $(zfsexec_PROGRAMS) $(mounthelper_PROGRAMS)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Provides basic information on the ARC, its efficiency, the L2ARC (if present),
|
|||||||
the Data Management Unit (DMU), Virtual Devices (VDEVs), and tunables. See
|
the Data Management Unit (DMU), Virtual Devices (VDEVs), and tunables. See
|
||||||
the in-source documentation and code at
|
the in-source documentation and code at
|
||||||
https://github.com/openzfs/zfs/blob/master/module/zfs/arc.c for details.
|
https://github.com/openzfs/zfs/blob/master/module/zfs/arc.c for details.
|
||||||
The original introduction to zarcsummary can be found at
|
The original introduction to arc_summary can be found at
|
||||||
http://cuddletech.com/?p=454
|
http://cuddletech.com/?p=454
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ elif sys.platform.startswith('linux'):
|
|||||||
return get_params(TUNABLES_PATH)
|
return get_params(TUNABLES_PATH)
|
||||||
|
|
||||||
def get_version_impl(request):
|
def get_version_impl(request):
|
||||||
# The original zarcsummary called /sbin/modinfo/{spl,zfs} to get
|
# The original arc_summary called /sbin/modinfo/{spl,zfs} to get
|
||||||
# the version information. We switch to /sys/module/{spl,zfs}/version
|
# the version information. We switch to /sys/module/{spl,zfs}/version
|
||||||
# to make sure we get what is really loaded in the kernel
|
# to make sure we get what is really loaded in the kernel
|
||||||
try:
|
try:
|
||||||
@@ -439,7 +439,7 @@ def print_header():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# datetime is now recommended over time but we keep the exact formatting
|
# datetime is now recommended over time but we keep the exact formatting
|
||||||
# from the older version of zarcsummary in case there are scripts
|
# from the older version of arc_summary in case there are scripts
|
||||||
# that expect it in this way
|
# that expect it in this way
|
||||||
daydate = time.strftime(DATE_FORMAT)
|
daydate = time.strftime(DATE_FORMAT)
|
||||||
spc_date = LINE_LENGTH-len(daydate)
|
spc_date = LINE_LENGTH-len(daydate)
|
||||||
@@ -559,7 +559,6 @@ def section_arc(kstats_dict):
|
|||||||
print()
|
print()
|
||||||
|
|
||||||
compressed_size = arc_stats['compressed_size']
|
compressed_size = arc_stats['compressed_size']
|
||||||
uncompressed_size = arc_stats['uncompressed_size']
|
|
||||||
overhead_size = arc_stats['overhead_size']
|
overhead_size = arc_stats['overhead_size']
|
||||||
bonus_size = arc_stats['bonus_size']
|
bonus_size = arc_stats['bonus_size']
|
||||||
dnode_size = arc_stats['dnode_size']
|
dnode_size = arc_stats['dnode_size']
|
||||||
@@ -672,8 +671,6 @@ def section_arc(kstats_dict):
|
|||||||
print()
|
print()
|
||||||
|
|
||||||
print('ARC misc:')
|
print('ARC misc:')
|
||||||
prt_i2('Uncompressed size:', f_perc(uncompressed_size, compressed_size),
|
|
||||||
f_bytes(uncompressed_size))
|
|
||||||
prt_i1('Memory throttles:', arc_stats['memory_throttle_count'])
|
prt_i1('Memory throttles:', arc_stats['memory_throttle_count'])
|
||||||
prt_i1('Memory direct reclaims:', arc_stats['memory_direct_count'])
|
prt_i1('Memory direct reclaims:', arc_stats['memory_direct_count'])
|
||||||
prt_i1('Memory indirect reclaims:', arc_stats['memory_indirect_count'])
|
prt_i1('Memory indirect reclaims:', arc_stats['memory_indirect_count'])
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# SPDX-License-Identifier: CDDL-1.0
|
# SPDX-License-Identifier: CDDL-1.0
|
||||||
#
|
#
|
||||||
# Print out ZFS ARC Statistics exported via kstat(1)
|
# Print out ZFS ARC Statistics exported via kstat(1)
|
||||||
# For a definition of fields, or usage, use zarcstat -v
|
# For a definition of fields, or usage, use arcstat -v
|
||||||
#
|
#
|
||||||
# This script was originally a fork of the original arcstat.pl (0.1)
|
# This script was originally a fork of the original arcstat.pl (0.1)
|
||||||
# by Neelakanth Nadgir, originally published on his Sun blog on
|
# by Neelakanth Nadgir, originally published on his Sun blog on
|
||||||
@@ -56,7 +56,6 @@ import time
|
|||||||
import getopt
|
import getopt
|
||||||
import re
|
import re
|
||||||
import copy
|
import copy
|
||||||
import os
|
|
||||||
|
|
||||||
from signal import signal, SIGINT, SIGWINCH, SIG_DFL
|
from signal import signal, SIGINT, SIGWINCH, SIG_DFL
|
||||||
|
|
||||||
@@ -172,7 +171,7 @@ cols = {
|
|||||||
"zactive": [7, 1000, "zfetch prefetches active per second"],
|
"zactive": [7, 1000, "zfetch prefetches active per second"],
|
||||||
}
|
}
|
||||||
|
|
||||||
# ARC structural breakdown from zarcsummary
|
# ARC structural breakdown from arc_summary
|
||||||
structfields = {
|
structfields = {
|
||||||
"cmp": ["compressed", "Compressed"],
|
"cmp": ["compressed", "Compressed"],
|
||||||
"ovh": ["overhead", "Overhead"],
|
"ovh": ["overhead", "Overhead"],
|
||||||
@@ -188,7 +187,7 @@ structstats = { # size stats
|
|||||||
"sz": ["_size", "size"],
|
"sz": ["_size", "size"],
|
||||||
}
|
}
|
||||||
|
|
||||||
# ARC types breakdown from zarcsummary
|
# ARC types breakdown from arc_summary
|
||||||
typefields = {
|
typefields = {
|
||||||
"data": ["data", "ARC data"],
|
"data": ["data", "ARC data"],
|
||||||
"meta": ["metadata", "ARC metadata"],
|
"meta": ["metadata", "ARC metadata"],
|
||||||
@@ -199,7 +198,7 @@ typestats = { # size stats
|
|||||||
"sz": ["_size", "size"],
|
"sz": ["_size", "size"],
|
||||||
}
|
}
|
||||||
|
|
||||||
# ARC states breakdown from zarcsummary
|
# ARC states breakdown from arc_summary
|
||||||
statefields = {
|
statefields = {
|
||||||
"ano": ["anon", "Anonymous"],
|
"ano": ["anon", "Anonymous"],
|
||||||
"mfu": ["mfu", "MFU"],
|
"mfu": ["mfu", "MFU"],
|
||||||
@@ -262,7 +261,7 @@ hdr_intr = 20 # Print header every 20 lines of output
|
|||||||
opfile = None
|
opfile = None
|
||||||
sep = " " # Default separator is 2 spaces
|
sep = " " # Default separator is 2 spaces
|
||||||
l2exist = False
|
l2exist = False
|
||||||
cmd = ("Usage: zarcstat [-havxp] [-f fields] [-o file] [-s string] [interval "
|
cmd = ("Usage: arcstat [-havxp] [-f fields] [-o file] [-s string] [interval "
|
||||||
"[count]]\n")
|
"[count]]\n")
|
||||||
cur = {}
|
cur = {}
|
||||||
d = {}
|
d = {}
|
||||||
@@ -349,10 +348,10 @@ def usage():
|
|||||||
"character or string\n")
|
"character or string\n")
|
||||||
sys.stderr.write("\t -p : Disable auto-scaling of numerical fields\n")
|
sys.stderr.write("\t -p : Disable auto-scaling of numerical fields\n")
|
||||||
sys.stderr.write("\nExamples:\n")
|
sys.stderr.write("\nExamples:\n")
|
||||||
sys.stderr.write("\tzarcstat -o /tmp/a.log 2 10\n")
|
sys.stderr.write("\tarcstat -o /tmp/a.log 2 10\n")
|
||||||
sys.stderr.write("\tzarcstat -s \",\" -o /tmp/a.log 2 10\n")
|
sys.stderr.write("\tarcstat -s \",\" -o /tmp/a.log 2 10\n")
|
||||||
sys.stderr.write("\tzarcstat -v\n")
|
sys.stderr.write("\tarcstat -v\n")
|
||||||
sys.stderr.write("\tzarcstat -f time,hit%,dh%,ph%,mh% 1\n")
|
sys.stderr.write("\tarcstat -f time,hit%,dh%,ph%,mh% 1\n")
|
||||||
sys.stderr.write("\n")
|
sys.stderr.write("\n")
|
||||||
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@@ -367,7 +366,7 @@ def snap_stats():
|
|||||||
|
|
||||||
cur = kstat
|
cur = kstat
|
||||||
|
|
||||||
# fill in additional values from zarcsummary
|
# fill in additional values from arc_summary
|
||||||
cur["caches_size"] = caches_size = cur["anon_data"]+cur["anon_metadata"]+\
|
cur["caches_size"] = caches_size = cur["anon_data"]+cur["anon_metadata"]+\
|
||||||
cur["mfu_data"]+cur["mfu_metadata"]+cur["mru_data"]+cur["mru_metadata"]+\
|
cur["mfu_data"]+cur["mfu_metadata"]+cur["mru_data"]+cur["mru_metadata"]+\
|
||||||
cur["uncached_data"]+cur["uncached_metadata"]
|
cur["uncached_data"]+cur["uncached_metadata"]
|
||||||
@@ -736,14 +735,13 @@ def calculate():
|
|||||||
v[group["percent"]] if v[group["percent"]] > 0 else 0
|
v[group["percent"]] if v[group["percent"]] > 0 else 0
|
||||||
|
|
||||||
if l2exist:
|
if l2exist:
|
||||||
l2asize = cur["l2_asize"]
|
|
||||||
v["l2hits"] = d["l2_hits"] / sint
|
v["l2hits"] = d["l2_hits"] / sint
|
||||||
v["l2miss"] = d["l2_misses"] / sint
|
v["l2miss"] = d["l2_misses"] / sint
|
||||||
v["l2read"] = v["l2hits"] + v["l2miss"]
|
v["l2read"] = v["l2hits"] + v["l2miss"]
|
||||||
v["l2hit%"] = 100 * v["l2hits"] / v["l2read"] if v["l2read"] > 0 else 0
|
v["l2hit%"] = 100 * v["l2hits"] / v["l2read"] if v["l2read"] > 0 else 0
|
||||||
|
|
||||||
v["l2miss%"] = 100 - v["l2hit%"] if v["l2read"] > 0 else 0
|
v["l2miss%"] = 100 - v["l2hit%"] if v["l2read"] > 0 else 0
|
||||||
v["l2asize"] = l2asize
|
v["l2asize"] = cur["l2_asize"]
|
||||||
v["l2size"] = cur["l2_size"]
|
v["l2size"] = cur["l2_size"]
|
||||||
v["l2bytes"] = d["l2_read_bytes"] / sint
|
v["l2bytes"] = d["l2_read_bytes"] / sint
|
||||||
v["l2wbytes"] = d["l2_write_bytes"] / sint
|
v["l2wbytes"] = d["l2_write_bytes"] / sint
|
||||||
@@ -753,11 +751,11 @@ def calculate():
|
|||||||
v["l2mru"] = cur["l2_mru_asize"]
|
v["l2mru"] = cur["l2_mru_asize"]
|
||||||
v["l2data"] = cur["l2_bufc_data_asize"]
|
v["l2data"] = cur["l2_bufc_data_asize"]
|
||||||
v["l2meta"] = cur["l2_bufc_metadata_asize"]
|
v["l2meta"] = cur["l2_bufc_metadata_asize"]
|
||||||
v["l2pref%"] = 100 * v["l2pref"] / l2asize if l2asize > 0 else 0
|
v["l2pref%"] = 100 * v["l2pref"] / v["l2asize"]
|
||||||
v["l2mfu%"] = 100 * v["l2mfu"] / l2asize if l2asize > 0 else 0
|
v["l2mfu%"] = 100 * v["l2mfu"] / v["l2asize"]
|
||||||
v["l2mru%"] = 100 * v["l2mru"] / l2asize if l2asize > 0 else 0
|
v["l2mru%"] = 100 * v["l2mru"] / v["l2asize"]
|
||||||
v["l2data%"] = 100 * v["l2data"] / l2asize if l2asize > 0 else 0
|
v["l2data%"] = 100 * v["l2data"] / v["l2asize"]
|
||||||
v["l2meta%"] = 100 * v["l2meta"] / l2asize if l2asize > 0 else 0
|
v["l2meta%"] = 100 * v["l2meta"] / v["l2asize"]
|
||||||
|
|
||||||
v["grow"] = 0 if cur["arc_no_grow"] else 1
|
v["grow"] = 0 if cur["arc_no_grow"] else 1
|
||||||
v["need"] = cur["arc_need_free"]
|
v["need"] = cur["arc_need_free"]
|
||||||
@@ -767,7 +765,6 @@ def calculate():
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
global sint
|
global sint
|
||||||
global count
|
global count
|
||||||
global hdr_intr
|
global hdr_intr
|
||||||
@@ -264,21 +264,9 @@ cmp_data(raidz_test_opts_t *opts, raidz_map_t *rm)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
init_rand(void *data, size_t size, void *private)
|
init_rand(void *data, size_t size, void *private)
|
||||||
{
|
|
||||||
size_t *offsetp = (size_t *)private;
|
|
||||||
size_t offset = *offsetp;
|
|
||||||
|
|
||||||
VERIFY3U(offset + size, <=, SPA_MAXBLOCKSIZE);
|
|
||||||
memcpy(data, (char *)rand_data + offset, size);
|
|
||||||
*offsetp = offset + size;
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
corrupt_rand_fill(void *data, size_t size, void *private)
|
|
||||||
{
|
{
|
||||||
(void) private;
|
(void) private;
|
||||||
memset(data, 0xAA, size);
|
memcpy(data, rand_data, size);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,7 +278,7 @@ corrupt_colums(raidz_map_t *rm, const int *tgts, const int cnt)
|
|||||||
for (int i = 0; i < cnt; i++) {
|
for (int i = 0; i < cnt; i++) {
|
||||||
raidz_col_t *col = &rr->rr_col[tgts[i]];
|
raidz_col_t *col = &rr->rr_col[tgts[i]];
|
||||||
abd_iterate_func(col->rc_abd, 0, col->rc_size,
|
abd_iterate_func(col->rc_abd, 0, col->rc_size,
|
||||||
corrupt_rand_fill, NULL);
|
init_rand, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -298,8 +286,7 @@ corrupt_colums(raidz_map_t *rm, const int *tgts, const int cnt)
|
|||||||
void
|
void
|
||||||
init_zio_abd(zio_t *zio)
|
init_zio_abd(zio_t *zio)
|
||||||
{
|
{
|
||||||
size_t offset = 0;
|
abd_iterate_func(zio->io_abd, 0, zio->io_size, init_rand, NULL);
|
||||||
abd_iterate_func(zio->io_abd, 0, zio->io_size, init_rand, &offset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -386,7 +373,7 @@ init_raidz_map(raidz_test_opts_t *opts, zio_t **zio, const int parity)
|
|||||||
|
|
||||||
*zio = umem_zalloc(sizeof (zio_t), UMEM_NOFAIL);
|
*zio = umem_zalloc(sizeof (zio_t), UMEM_NOFAIL);
|
||||||
|
|
||||||
(*zio)->io_offset = opts->rto_offset;
|
(*zio)->io_offset = 0;
|
||||||
(*zio)->io_size = alloc_dsize;
|
(*zio)->io_size = alloc_dsize;
|
||||||
(*zio)->io_abd = raidz_alloc(alloc_dsize);
|
(*zio)->io_abd = raidz_alloc(alloc_dsize);
|
||||||
init_zio_abd(*zio);
|
init_zio_abd(*zio);
|
||||||
@@ -847,8 +834,6 @@ main(int argc, char **argv)
|
|||||||
err = run_test(NULL);
|
err = run_test(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
mprotect(rand_data, SPA_MAXBLOCKSIZE, PROT_READ | PROT_WRITE);
|
|
||||||
|
|
||||||
umem_free(rand_data, SPA_MAXBLOCKSIZE);
|
umem_free(rand_data, SPA_MAXBLOCKSIZE);
|
||||||
kernel_fini();
|
kernel_fini();
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ typedef struct raidz_test_opts {
|
|||||||
|
|
||||||
static const raidz_test_opts_t rto_opts_defaults = {
|
static const raidz_test_opts_t rto_opts_defaults = {
|
||||||
.rto_ashift = 9,
|
.rto_ashift = 9,
|
||||||
.rto_offset = 0,
|
.rto_offset = 1ULL << 0,
|
||||||
.rto_dcols = 8,
|
.rto_dcols = 8,
|
||||||
.rto_dsize = 1<<19,
|
.rto_dsize = 1<<19,
|
||||||
.rto_v = D_ALL,
|
.rto_v = D_ALL,
|
||||||
|
|||||||
+101
-394
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -29,6 +29,6 @@
|
|||||||
#define _ZDB_H
|
#define _ZDB_H
|
||||||
|
|
||||||
void dump_intent_log(zilog_t *);
|
void dump_intent_log(zilog_t *);
|
||||||
extern uint8_t dump_opt[512];
|
extern uint8_t dump_opt[256];
|
||||||
|
|
||||||
#endif /* _ZDB_H */
|
#endif /* _ZDB_H */
|
||||||
|
|||||||
+6
-4
@@ -48,6 +48,8 @@
|
|||||||
|
|
||||||
#include "zdb.h"
|
#include "zdb.h"
|
||||||
|
|
||||||
|
extern uint8_t dump_opt[256];
|
||||||
|
|
||||||
static char tab_prefix[4] = "\t\t\t";
|
static char tab_prefix[4] = "\t\t\t";
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -174,7 +176,7 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
|
|||||||
|
|
||||||
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
|
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
|
||||||
(void) printf("%shas blkptr, %s\n", tab_prefix,
|
(void) printf("%shas blkptr, %s\n", tab_prefix,
|
||||||
!BP_IS_HOLE(bp) && BP_GET_BIRTH(bp) >=
|
!BP_IS_HOLE(bp) && BP_GET_LOGICAL_BIRTH(bp) >=
|
||||||
spa_min_claim_txg(zilog->zl_spa) ?
|
spa_min_claim_txg(zilog->zl_spa) ?
|
||||||
"will claim" : "won't claim");
|
"will claim" : "won't claim");
|
||||||
print_log_bp(bp, tab_prefix);
|
print_log_bp(bp, tab_prefix);
|
||||||
@@ -187,7 +189,7 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
|
|||||||
(void) printf("%s<hole>\n", tab_prefix);
|
(void) printf("%s<hole>\n", tab_prefix);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (BP_GET_BIRTH(bp) < zilog->zl_header->zh_claim_txg) {
|
if (BP_GET_LOGICAL_BIRTH(bp) < zilog->zl_header->zh_claim_txg) {
|
||||||
(void) printf("%s<block already committed>\n",
|
(void) printf("%s<block already committed>\n",
|
||||||
tab_prefix);
|
tab_prefix);
|
||||||
return;
|
return;
|
||||||
@@ -238,7 +240,7 @@ zil_prt_rec_write_enc(zilog_t *zilog, int txtype, const void *arg)
|
|||||||
|
|
||||||
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
|
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
|
||||||
(void) printf("%shas blkptr, %s\n", tab_prefix,
|
(void) printf("%shas blkptr, %s\n", tab_prefix,
|
||||||
!BP_IS_HOLE(bp) && BP_GET_BIRTH(bp) >=
|
!BP_IS_HOLE(bp) && BP_GET_LOGICAL_BIRTH(bp) >=
|
||||||
spa_min_claim_txg(zilog->zl_spa) ?
|
spa_min_claim_txg(zilog->zl_spa) ?
|
||||||
"will claim" : "won't claim");
|
"will claim" : "won't claim");
|
||||||
print_log_bp(bp, tab_prefix);
|
print_log_bp(bp, tab_prefix);
|
||||||
@@ -474,7 +476,7 @@ print_log_block(zilog_t *zilog, const blkptr_t *bp, void *arg,
|
|||||||
|
|
||||||
if (claim_txg != 0)
|
if (claim_txg != 0)
|
||||||
claim = "already claimed";
|
claim = "already claimed";
|
||||||
else if (BP_GET_BIRTH(bp) >= spa_min_claim_txg(zilog->zl_spa))
|
else if (BP_GET_LOGICAL_BIRTH(bp) >= spa_min_claim_txg(zilog->zl_spa))
|
||||||
claim = "will claim";
|
claim = "will claim";
|
||||||
else
|
else
|
||||||
claim = "won't claim";
|
claim = "won't claim";
|
||||||
|
|||||||
+31
-36
@@ -134,13 +134,11 @@ zfs_agent_iter_vdev(zpool_handle_t *zhp, nvlist_t *nvl, void *arg)
|
|||||||
* of blkid cache and L2ARC VDEV does not contain pool guid in its
|
* of blkid cache and L2ARC VDEV does not contain pool guid in its
|
||||||
* blkid, so this is a special case for L2ARC VDEV.
|
* blkid, so this is a special case for L2ARC VDEV.
|
||||||
*/
|
*/
|
||||||
else if (gsp->gs_vdev_guid != 0 &&
|
else if (gsp->gs_vdev_guid != 0 && gsp->gs_devid == NULL &&
|
||||||
nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_GUID, &vdev_guid) == 0 &&
|
nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_GUID, &vdev_guid) == 0 &&
|
||||||
gsp->gs_vdev_guid == vdev_guid) {
|
gsp->gs_vdev_guid == vdev_guid) {
|
||||||
if (gsp->gs_devid == NULL) {
|
(void) nvlist_lookup_string(nvl, ZPOOL_CONFIG_DEVID,
|
||||||
(void) nvlist_lookup_string(nvl, ZPOOL_CONFIG_DEVID,
|
&gsp->gs_devid);
|
||||||
&gsp->gs_devid);
|
|
||||||
}
|
|
||||||
(void) nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_EXPANSION_TIME,
|
(void) nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_EXPANSION_TIME,
|
||||||
&gsp->gs_vdev_expandtime);
|
&gsp->gs_vdev_expandtime);
|
||||||
return (B_TRUE);
|
return (B_TRUE);
|
||||||
@@ -158,28 +156,22 @@ zfs_agent_iter_pool(zpool_handle_t *zhp, void *arg)
|
|||||||
/*
|
/*
|
||||||
* For each vdev in this pool, look for a match by devid
|
* For each vdev in this pool, look for a match by devid
|
||||||
*/
|
*/
|
||||||
boolean_t found = B_FALSE;
|
if ((config = zpool_get_config(zhp, NULL)) != NULL) {
|
||||||
uint64_t pool_guid;
|
if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
|
||||||
|
&nvl) == 0) {
|
||||||
|
(void) zfs_agent_iter_vdev(zhp, nvl, gsp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* if a match was found then grab the pool guid
|
||||||
|
*/
|
||||||
|
if (gsp->gs_vdev_guid && gsp->gs_devid) {
|
||||||
|
(void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
|
||||||
|
&gsp->gs_pool_guid);
|
||||||
|
}
|
||||||
|
|
||||||
/* Get pool configuration and extract pool GUID */
|
|
||||||
if ((config = zpool_get_config(zhp, NULL)) == NULL ||
|
|
||||||
nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
|
|
||||||
&pool_guid) != 0)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
/* Skip this pool if we're looking for a specific pool */
|
|
||||||
if (gsp->gs_pool_guid != 0 && pool_guid != gsp->gs_pool_guid)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvl) == 0)
|
|
||||||
found = zfs_agent_iter_vdev(zhp, nvl, gsp);
|
|
||||||
|
|
||||||
if (found && gsp->gs_pool_guid == 0)
|
|
||||||
gsp->gs_pool_guid = pool_guid;
|
|
||||||
|
|
||||||
out:
|
|
||||||
zpool_close(zhp);
|
zpool_close(zhp);
|
||||||
return (found);
|
return (gsp->gs_devid != NULL && gsp->gs_vdev_guid != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -241,17 +233,20 @@ zfs_agent_post_event(const char *class, const char *subclass, nvlist_t *nvl)
|
|||||||
* For multipath, spare and l2arc devices ZFS_EV_VDEV_GUID or
|
* For multipath, spare and l2arc devices ZFS_EV_VDEV_GUID or
|
||||||
* ZFS_EV_POOL_GUID may be missing so find them.
|
* ZFS_EV_POOL_GUID may be missing so find them.
|
||||||
*/
|
*/
|
||||||
search.gs_devid = devid;
|
if (devid == NULL || pool_guid == 0 || vdev_guid == 0) {
|
||||||
search.gs_vdev_guid = vdev_guid;
|
if (devid == NULL)
|
||||||
search.gs_pool_guid = pool_guid;
|
search.gs_vdev_guid = vdev_guid;
|
||||||
zpool_iter(g_zfs_hdl, zfs_agent_iter_pool, &search);
|
else
|
||||||
if (devid == NULL)
|
search.gs_devid = devid;
|
||||||
devid = search.gs_devid;
|
zpool_iter(g_zfs_hdl, zfs_agent_iter_pool, &search);
|
||||||
if (pool_guid == 0)
|
if (devid == NULL)
|
||||||
pool_guid = search.gs_pool_guid;
|
devid = search.gs_devid;
|
||||||
if (vdev_guid == 0)
|
if (pool_guid == 0)
|
||||||
vdev_guid = search.gs_vdev_guid;
|
pool_guid = search.gs_pool_guid;
|
||||||
devtype = search.gs_vdev_type;
|
if (vdev_guid == 0)
|
||||||
|
vdev_guid = search.gs_vdev_guid;
|
||||||
|
devtype = search.gs_vdev_type;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We want to avoid reporting "remove" events coming from
|
* We want to avoid reporting "remove" events coming from
|
||||||
|
|||||||
+12
-12
@@ -9,18 +9,18 @@ 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-sync-slot_off.sh \
|
%D%/deadman-slot_off.sh \
|
||||||
%D%/generic-notify.sh \
|
%D%/generic-notify.sh \
|
||||||
%D%/pool_import-sync-led.sh \
|
%D%/pool_import-led.sh \
|
||||||
%D%/resilver_finish-notify.sh \
|
%D%/resilver_finish-notify.sh \
|
||||||
%D%/resilver_finish-start-scrub.sh \
|
%D%/resilver_finish-start-scrub.sh \
|
||||||
%D%/scrub_finish-notify.sh \
|
%D%/scrub_finish-notify.sh \
|
||||||
%D%/statechange-sync-led.sh \
|
%D%/statechange-led.sh \
|
||||||
%D%/statechange-notify.sh \
|
%D%/statechange-notify.sh \
|
||||||
%D%/statechange-sync-slot_off.sh \
|
%D%/statechange-slot_off.sh \
|
||||||
%D%/trim_finish-notify.sh \
|
%D%/trim_finish-notify.sh \
|
||||||
%D%/vdev_attach-sync-led.sh \
|
%D%/vdev_attach-led.sh \
|
||||||
%D%/vdev_clear-sync-led.sh
|
%D%/vdev_clear-led.sh
|
||||||
|
|
||||||
nodist_zedexec_SCRIPTS = \
|
nodist_zedexec_SCRIPTS = \
|
||||||
%D%/history_event-zfs-list-cacher.sh
|
%D%/history_event-zfs-list-cacher.sh
|
||||||
@@ -30,17 +30,17 @@ SUBSTFILES += $(nodist_zedexec_SCRIPTS)
|
|||||||
zedconfdefaults = \
|
zedconfdefaults = \
|
||||||
all-syslog.sh \
|
all-syslog.sh \
|
||||||
data-notify.sh \
|
data-notify.sh \
|
||||||
deadman-sync-slot_off.sh \
|
deadman-slot_off.sh \
|
||||||
history_event-zfs-list-cacher.sh \
|
history_event-zfs-list-cacher.sh \
|
||||||
pool_import-sync-led.sh \
|
pool_import-led.sh \
|
||||||
resilver_finish-notify.sh \
|
resilver_finish-notify.sh \
|
||||||
resilver_finish-start-scrub.sh \
|
resilver_finish-start-scrub.sh \
|
||||||
scrub_finish-notify.sh \
|
scrub_finish-notify.sh \
|
||||||
statechange-sync-led.sh \
|
statechange-led.sh \
|
||||||
statechange-notify.sh \
|
statechange-notify.sh \
|
||||||
statechange-sync-slot_off.sh \
|
statechange-slot_off.sh \
|
||||||
vdev_attach-sync-led.sh \
|
vdev_attach-led.sh \
|
||||||
vdev_clear-sync-led.sh
|
vdev_clear-led.sh
|
||||||
|
|
||||||
dist_noinst_DATA += %D%/README
|
dist_noinst_DATA += %D%/README
|
||||||
|
|
||||||
|
|||||||
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
statechange-led.sh
|
||||||
@@ -1 +0,0 @@
|
|||||||
statechange-sync-led.sh
|
|
||||||
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
statechange-led.sh
|
||||||
@@ -1 +0,0 @@
|
|||||||
statechange-sync-led.sh
|
|
||||||
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
statechange-led.sh
|
||||||
@@ -1 +0,0 @@
|
|||||||
statechange-sync-led.sh
|
|
||||||
@@ -441,9 +441,8 @@ zed_notify_slack_webhook()
|
|||||||
"${pathname}")"
|
"${pathname}")"
|
||||||
|
|
||||||
# Construct the JSON message for posting.
|
# Construct the JSON message for posting.
|
||||||
# shellcheck disable=SC2016
|
|
||||||
#
|
#
|
||||||
msg_json="$(printf '{"text": "*%s*\\n```%s```"}' "${subject}" "${msg_body}" )"
|
msg_json="$(printf '{"text": "*%s*\\n%s"}' "${subject}" "${msg_body}" )"
|
||||||
|
|
||||||
# Send the POST request and check for errors.
|
# Send the POST request and check for errors.
|
||||||
#
|
#
|
||||||
|
|||||||
+1
-1
@@ -110,7 +110,7 @@ zed_event_fini(struct zed_conf *zcp)
|
|||||||
static void
|
static void
|
||||||
_bump_event_queue_length(void)
|
_bump_event_queue_length(void)
|
||||||
{
|
{
|
||||||
int zzlm, wr;
|
int zzlm = -1, wr;
|
||||||
char qlen_buf[12] = {0}; /* parameter is int => max "-2147483647\n" */
|
char qlen_buf[12] = {0}; /* parameter is int => max "-2147483647\n" */
|
||||||
long int qlen, orig_qlen;
|
long int qlen, orig_qlen;
|
||||||
|
|
||||||
|
|||||||
+22
-91
@@ -196,29 +196,37 @@ _nop(int sig)
|
|||||||
(void) sig;
|
(void) sig;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void *
|
||||||
wait_for_children(boolean_t do_pause, boolean_t wait)
|
_reap_children(void *arg)
|
||||||
{
|
{
|
||||||
pid_t pid;
|
(void) arg;
|
||||||
struct rusage usage;
|
|
||||||
int status;
|
|
||||||
struct launched_process_node node, *pnode;
|
struct launched_process_node node, *pnode;
|
||||||
|
pid_t pid;
|
||||||
|
int status;
|
||||||
|
struct rusage usage;
|
||||||
|
struct sigaction sa = {};
|
||||||
|
|
||||||
|
(void) sigfillset(&sa.sa_mask);
|
||||||
|
(void) sigdelset(&sa.sa_mask, SIGCHLD);
|
||||||
|
(void) pthread_sigmask(SIG_SETMASK, &sa.sa_mask, NULL);
|
||||||
|
|
||||||
|
(void) sigemptyset(&sa.sa_mask);
|
||||||
|
sa.sa_handler = _nop;
|
||||||
|
sa.sa_flags = SA_NOCLDSTOP;
|
||||||
|
(void) sigaction(SIGCHLD, &sa, NULL);
|
||||||
|
|
||||||
for (_reap_children_stop = B_FALSE; !_reap_children_stop; ) {
|
for (_reap_children_stop = B_FALSE; !_reap_children_stop; ) {
|
||||||
(void) pthread_mutex_lock(&_launched_processes_lock);
|
(void) pthread_mutex_lock(&_launched_processes_lock);
|
||||||
pid = wait4(0, &status, wait ? 0 : WNOHANG, &usage);
|
pid = wait4(0, &status, WNOHANG, &usage);
|
||||||
|
|
||||||
if (pid == 0 || pid == (pid_t)-1) {
|
if (pid == 0 || pid == (pid_t)-1) {
|
||||||
(void) pthread_mutex_unlock(&_launched_processes_lock);
|
(void) pthread_mutex_unlock(&_launched_processes_lock);
|
||||||
if ((pid == 0) || (errno == ECHILD)) {
|
if (pid == 0 || errno == ECHILD)
|
||||||
if (do_pause)
|
pause();
|
||||||
pause();
|
else if (errno != EINTR)
|
||||||
} else if (errno != EINTR)
|
|
||||||
zed_log_msg(LOG_WARNING,
|
zed_log_msg(LOG_WARNING,
|
||||||
"Failed to wait for children: %s",
|
"Failed to wait for children: %s",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
if (!do_pause)
|
|
||||||
return;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
memset(&node, 0, sizeof (node));
|
memset(&node, 0, sizeof (node));
|
||||||
node.pid = pid;
|
node.pid = pid;
|
||||||
@@ -270,25 +278,6 @@ wait_for_children(boolean_t do_pause, boolean_t wait)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *
|
|
||||||
_reap_children(void *arg)
|
|
||||||
{
|
|
||||||
(void) arg;
|
|
||||||
struct sigaction sa = {};
|
|
||||||
|
|
||||||
(void) sigfillset(&sa.sa_mask);
|
|
||||||
(void) sigdelset(&sa.sa_mask, SIGCHLD);
|
|
||||||
(void) pthread_sigmask(SIG_SETMASK, &sa.sa_mask, NULL);
|
|
||||||
|
|
||||||
(void) sigemptyset(&sa.sa_mask);
|
|
||||||
sa.sa_handler = _nop;
|
|
||||||
sa.sa_flags = SA_NOCLDSTOP;
|
|
||||||
(void) sigaction(SIGCHLD, &sa, NULL);
|
|
||||||
|
|
||||||
wait_for_children(B_TRUE, B_FALSE);
|
|
||||||
|
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -317,45 +306,6 @@ zed_exec_fini(void)
|
|||||||
_reap_children_tid = (pthread_t)-1;
|
_reap_children_tid = (pthread_t)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Check if the zedlet name indicates if it is a synchronous zedlet
|
|
||||||
*
|
|
||||||
* Synchronous zedlets have a "-sync-" immediately following the event name in
|
|
||||||
* their zedlet filename, like:
|
|
||||||
*
|
|
||||||
* EVENT_NAME-sync-ZEDLETNAME.sh
|
|
||||||
*
|
|
||||||
* For example, if you wanted a synchronous statechange script:
|
|
||||||
*
|
|
||||||
* statechange-sync-myzedlet.sh
|
|
||||||
*
|
|
||||||
* Synchronous zedlets are guaranteed to be the only zedlet running. No other
|
|
||||||
* zedlets may run in parallel with a synchronous zedlet. A synchronous
|
|
||||||
* zedlet will wait for all previously spawned zedlets to finish before running.
|
|
||||||
* Users should be careful to only use synchronous zedlets when needed, since
|
|
||||||
* they decrease parallelism.
|
|
||||||
*/
|
|
||||||
static boolean_t
|
|
||||||
zedlet_is_sync(const char *zedlet, const char *event)
|
|
||||||
{
|
|
||||||
const char *sync_str = "-sync-";
|
|
||||||
size_t sync_str_len;
|
|
||||||
size_t zedlet_len;
|
|
||||||
size_t event_len;
|
|
||||||
|
|
||||||
sync_str_len = strlen(sync_str);
|
|
||||||
zedlet_len = strlen(zedlet);
|
|
||||||
event_len = strlen(event);
|
|
||||||
|
|
||||||
if (event_len + sync_str_len >= zedlet_len)
|
|
||||||
return (B_FALSE);
|
|
||||||
|
|
||||||
if (strncmp(&zedlet[event_len], sync_str, sync_str_len) == 0)
|
|
||||||
return (B_TRUE);
|
|
||||||
|
|
||||||
return (B_FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Process the event [eid] by synchronously invoking all zedlets with a
|
* Process the event [eid] by synchronously invoking all zedlets with a
|
||||||
* matching class prefix.
|
* matching class prefix.
|
||||||
@@ -418,28 +368,9 @@ zed_exec_process(uint64_t eid, const char *class, const char *subclass,
|
|||||||
z = zed_strings_next(zcp->zedlets)) {
|
z = zed_strings_next(zcp->zedlets)) {
|
||||||
for (csp = class_strings; *csp; csp++) {
|
for (csp = class_strings; *csp; csp++) {
|
||||||
n = strlen(*csp);
|
n = strlen(*csp);
|
||||||
if ((strncmp(z, *csp, n) == 0) && !isalpha(z[n])) {
|
if ((strncmp(z, *csp, n) == 0) && !isalpha(z[n]))
|
||||||
boolean_t is_sync = zedlet_is_sync(z, *csp);
|
|
||||||
|
|
||||||
if (is_sync) {
|
|
||||||
/*
|
|
||||||
* Wait for previous zedlets to
|
|
||||||
* finish
|
|
||||||
*/
|
|
||||||
wait_for_children(B_FALSE, B_TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
_zed_exec_fork_child(eid, zcp->zedlet_dir,
|
_zed_exec_fork_child(eid, zcp->zedlet_dir,
|
||||||
z, e, zcp->zevent_fd, zcp->do_foreground);
|
z, e, zcp->zevent_fd, zcp->do_foreground);
|
||||||
|
|
||||||
if (is_sync) {
|
|
||||||
/*
|
|
||||||
* Wait for sync zedlet we just launched
|
|
||||||
* to finish.
|
|
||||||
*/
|
|
||||||
wait_for_children(B_FALSE, B_TRUE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(e);
|
free(e);
|
||||||
|
|||||||
+29
-274
@@ -37,7 +37,6 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/debug.h>
|
#include <sys/debug.h>
|
||||||
#include <dirent.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
@@ -122,7 +121,6 @@ static int zfs_do_change_key(int argc, char **argv);
|
|||||||
static int zfs_do_project(int argc, char **argv);
|
static int zfs_do_project(int argc, char **argv);
|
||||||
static int zfs_do_version(int argc, char **argv);
|
static int zfs_do_version(int argc, char **argv);
|
||||||
static int zfs_do_redact(int argc, char **argv);
|
static int zfs_do_redact(int argc, char **argv);
|
||||||
static int zfs_do_rewrite(int argc, char **argv);
|
|
||||||
static int zfs_do_wait(int argc, char **argv);
|
static int zfs_do_wait(int argc, char **argv);
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
@@ -195,7 +193,6 @@ typedef enum {
|
|||||||
HELP_CHANGE_KEY,
|
HELP_CHANGE_KEY,
|
||||||
HELP_VERSION,
|
HELP_VERSION,
|
||||||
HELP_REDACT,
|
HELP_REDACT,
|
||||||
HELP_REWRITE,
|
|
||||||
HELP_JAIL,
|
HELP_JAIL,
|
||||||
HELP_UNJAIL,
|
HELP_UNJAIL,
|
||||||
HELP_WAIT,
|
HELP_WAIT,
|
||||||
@@ -230,7 +227,7 @@ static zfs_command_t command_table[] = {
|
|||||||
{ "promote", zfs_do_promote, HELP_PROMOTE },
|
{ "promote", zfs_do_promote, HELP_PROMOTE },
|
||||||
{ "rename", zfs_do_rename, HELP_RENAME },
|
{ "rename", zfs_do_rename, HELP_RENAME },
|
||||||
{ "bookmark", zfs_do_bookmark, HELP_BOOKMARK },
|
{ "bookmark", zfs_do_bookmark, HELP_BOOKMARK },
|
||||||
{ "diff", zfs_do_diff, HELP_DIFF },
|
{ "program", zfs_do_channel_program, HELP_CHANNEL_PROGRAM },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
{ "list", zfs_do_list, HELP_LIST },
|
{ "list", zfs_do_list, HELP_LIST },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
@@ -252,31 +249,27 @@ static zfs_command_t command_table[] = {
|
|||||||
{ NULL },
|
{ NULL },
|
||||||
{ "send", zfs_do_send, HELP_SEND },
|
{ "send", zfs_do_send, HELP_SEND },
|
||||||
{ "receive", zfs_do_receive, HELP_RECEIVE },
|
{ "receive", zfs_do_receive, HELP_RECEIVE },
|
||||||
{ "redact", zfs_do_redact, HELP_REDACT },
|
|
||||||
{ NULL },
|
{ NULL },
|
||||||
{ "allow", zfs_do_allow, HELP_ALLOW },
|
{ "allow", zfs_do_allow, HELP_ALLOW },
|
||||||
|
{ NULL },
|
||||||
{ "unallow", zfs_do_unallow, HELP_UNALLOW },
|
{ "unallow", zfs_do_unallow, HELP_UNALLOW },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
{ "hold", zfs_do_hold, HELP_HOLD },
|
{ "hold", zfs_do_hold, HELP_HOLD },
|
||||||
{ "holds", zfs_do_holds, HELP_HOLDS },
|
{ "holds", zfs_do_holds, HELP_HOLDS },
|
||||||
{ "release", zfs_do_release, HELP_RELEASE },
|
{ "release", zfs_do_release, HELP_RELEASE },
|
||||||
{ NULL },
|
{ "diff", zfs_do_diff, HELP_DIFF },
|
||||||
{ "load-key", zfs_do_load_key, HELP_LOAD_KEY },
|
{ "load-key", zfs_do_load_key, HELP_LOAD_KEY },
|
||||||
{ "unload-key", zfs_do_unload_key, HELP_UNLOAD_KEY },
|
{ "unload-key", zfs_do_unload_key, HELP_UNLOAD_KEY },
|
||||||
{ "change-key", zfs_do_change_key, HELP_CHANGE_KEY },
|
{ "change-key", zfs_do_change_key, HELP_CHANGE_KEY },
|
||||||
{ NULL },
|
{ "redact", zfs_do_redact, HELP_REDACT },
|
||||||
{ "program", zfs_do_channel_program, HELP_CHANNEL_PROGRAM },
|
|
||||||
{ "rewrite", zfs_do_rewrite, HELP_REWRITE },
|
|
||||||
{ "wait", zfs_do_wait, HELP_WAIT },
|
{ "wait", zfs_do_wait, HELP_WAIT },
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
{ NULL },
|
|
||||||
{ "jail", zfs_do_jail, HELP_JAIL },
|
{ "jail", zfs_do_jail, HELP_JAIL },
|
||||||
{ "unjail", zfs_do_unjail, HELP_UNJAIL },
|
{ "unjail", zfs_do_unjail, HELP_UNJAIL },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
{ NULL },
|
|
||||||
{ "zone", zfs_do_zone, HELP_ZONE },
|
{ "zone", zfs_do_zone, HELP_ZONE },
|
||||||
{ "unzone", zfs_do_unzone, HELP_UNZONE },
|
{ "unzone", zfs_do_unzone, HELP_UNZONE },
|
||||||
#endif
|
#endif
|
||||||
@@ -439,9 +432,6 @@ get_usage(zfs_help_t idx)
|
|||||||
case HELP_REDACT:
|
case HELP_REDACT:
|
||||||
return (gettext("\tredact <snapshot> <bookmark> "
|
return (gettext("\tredact <snapshot> <bookmark> "
|
||||||
"<redaction_snapshot> ...\n"));
|
"<redaction_snapshot> ...\n"));
|
||||||
case HELP_REWRITE:
|
|
||||||
return (gettext("\trewrite [-Prvx] [-o <offset>] [-l <length>] "
|
|
||||||
"<directory|file ...>\n"));
|
|
||||||
case HELP_JAIL:
|
case HELP_JAIL:
|
||||||
return (gettext("\tjail <jailid|jailname> <filesystem>\n"));
|
return (gettext("\tjail <jailid|jailname> <filesystem>\n"));
|
||||||
case HELP_UNJAIL:
|
case HELP_UNJAIL:
|
||||||
@@ -914,11 +904,7 @@ zfs_do_clone(int argc, char **argv)
|
|||||||
log_history = B_FALSE;
|
log_history = B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
ret = zfs_mount_and_share(g_zfs, argv[1], ZFS_TYPE_DATASET);
|
||||||
* Dataset cloned successfully, mount/share failures are
|
|
||||||
* non-fatal.
|
|
||||||
*/
|
|
||||||
(void) zfs_mount_and_share(g_zfs, argv[1], ZFS_TYPE_DATASET);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
zfs_close(zhp);
|
zfs_close(zhp);
|
||||||
@@ -927,22 +913,26 @@ zfs_do_clone(int argc, char **argv)
|
|||||||
return (!!ret);
|
return (!!ret);
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
ASSERT0P(zhp);
|
ASSERT3P(zhp, ==, NULL);
|
||||||
nvlist_free(props);
|
nvlist_free(props);
|
||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculate the minimum allocation size based on the top-level vdevs.
|
* Return a default volblocksize for the pool which always uses more than
|
||||||
|
* half of the data sectors. This primarily applies to dRAID which always
|
||||||
|
* writes full stripe widths.
|
||||||
*/
|
*/
|
||||||
static uint64_t
|
static uint64_t
|
||||||
calculate_volblocksize(nvlist_t *config)
|
default_volblocksize(zpool_handle_t *zhp, nvlist_t *props)
|
||||||
{
|
{
|
||||||
uint64_t asize = SPA_MINBLOCKSIZE;
|
uint64_t volblocksize, asize = SPA_MINBLOCKSIZE;
|
||||||
nvlist_t *tree, **vdevs;
|
nvlist_t *tree, **vdevs;
|
||||||
uint_t nvdevs;
|
uint_t nvdevs;
|
||||||
|
|
||||||
|
nvlist_t *config = zpool_get_config(zhp, NULL);
|
||||||
|
|
||||||
if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &tree) != 0 ||
|
if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &tree) != 0 ||
|
||||||
nvlist_lookup_nvlist_array(tree, ZPOOL_CONFIG_CHILDREN,
|
nvlist_lookup_nvlist_array(tree, ZPOOL_CONFIG_CHILDREN,
|
||||||
&vdevs, &nvdevs) != 0) {
|
&vdevs, &nvdevs) != 0) {
|
||||||
@@ -973,24 +963,6 @@ calculate_volblocksize(nvlist_t *config)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (asize);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Return a default volblocksize for the pool which always uses more than
|
|
||||||
* half of the data sectors. This primarily applies to dRAID which always
|
|
||||||
* writes full stripe widths.
|
|
||||||
*/
|
|
||||||
static uint64_t
|
|
||||||
default_volblocksize(zpool_handle_t *zhp, nvlist_t *props)
|
|
||||||
{
|
|
||||||
uint64_t volblocksize, asize = SPA_MINBLOCKSIZE;
|
|
||||||
|
|
||||||
nvlist_t *config = zpool_get_config(zhp, NULL);
|
|
||||||
|
|
||||||
if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_MAX_ALLOC, &asize) != 0)
|
|
||||||
asize = calculate_volblocksize(config);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculate the target volblocksize such that more than half
|
* Calculate the target volblocksize such that more than half
|
||||||
* of the asize is used. The following table is for 4k sectors.
|
* of the asize is used. The following table is for 4k sectors.
|
||||||
@@ -1337,9 +1309,7 @@ zfs_do_create(int argc, char **argv)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dataset created successfully, mount/share failures are non-fatal */
|
ret = zfs_mount_and_share(g_zfs, argv[0], ZFS_TYPE_DATASET);
|
||||||
ret = 0;
|
|
||||||
(void) zfs_mount_and_share(g_zfs, argv[0], ZFS_TYPE_DATASET);
|
|
||||||
error:
|
error:
|
||||||
nvlist_free(props);
|
nvlist_free(props);
|
||||||
return (ret);
|
return (ret);
|
||||||
@@ -1994,8 +1964,9 @@ fill_dataset_info(nvlist_t *list, zfs_handle_t *zhp, boolean_t as_int)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (type == ZFS_TYPE_SNAPSHOT) {
|
if (type == ZFS_TYPE_SNAPSHOT) {
|
||||||
char *snap = strdup(zfs_get_name(zhp));
|
char *ds, *snap;
|
||||||
char *ds = strsep(&snap, "@");
|
ds = snap = strdup(zfs_get_name(zhp));
|
||||||
|
ds = strsep(&snap, "@");
|
||||||
fnvlist_add_string(list, "dataset", ds);
|
fnvlist_add_string(list, "dataset", ds);
|
||||||
fnvlist_add_string(list, "snapshot_name", snap);
|
fnvlist_add_string(list, "snapshot_name", snap);
|
||||||
free(ds);
|
free(ds);
|
||||||
@@ -2038,7 +2009,8 @@ get_callback(zfs_handle_t *zhp, void *data)
|
|||||||
nvlist_t *user_props = zfs_get_user_props(zhp);
|
nvlist_t *user_props = zfs_get_user_props(zhp);
|
||||||
zprop_list_t *pl = cbp->cb_proplist;
|
zprop_list_t *pl = cbp->cb_proplist;
|
||||||
nvlist_t *propval;
|
nvlist_t *propval;
|
||||||
nvlist_t *item, *d = NULL, *props = NULL;
|
nvlist_t *item, *d, *props;
|
||||||
|
item = d = props = NULL;
|
||||||
const char *strval;
|
const char *strval;
|
||||||
const char *sourceval;
|
const char *sourceval;
|
||||||
boolean_t received = is_recvd_column(cbp);
|
boolean_t received = is_recvd_column(cbp);
|
||||||
@@ -3014,8 +2986,7 @@ us_type2str(unsigned field_type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
userspace_cb(void *arg, const char *domain, uid_t rid, uint64_t space,
|
userspace_cb(void *arg, const char *domain, uid_t rid, uint64_t space)
|
||||||
uint64_t default_quota)
|
|
||||||
{
|
{
|
||||||
us_cbdata_t *cb = (us_cbdata_t *)arg;
|
us_cbdata_t *cb = (us_cbdata_t *)arg;
|
||||||
zfs_userquota_prop_t prop = cb->cb_prop;
|
zfs_userquota_prop_t prop = cb->cb_prop;
|
||||||
@@ -3171,7 +3142,7 @@ userspace_cb(void *arg, const char *domain, uid_t rid, uint64_t space,
|
|||||||
prop == ZFS_PROP_PROJECTUSED) {
|
prop == ZFS_PROP_PROJECTUSED) {
|
||||||
propname = "used";
|
propname = "used";
|
||||||
if (!nvlist_exists(props, "quota"))
|
if (!nvlist_exists(props, "quota"))
|
||||||
(void) nvlist_add_uint64(props, "quota", default_quota);
|
(void) nvlist_add_uint64(props, "quota", 0);
|
||||||
} else if (prop == ZFS_PROP_USERQUOTA || prop == ZFS_PROP_GROUPQUOTA ||
|
} else if (prop == ZFS_PROP_USERQUOTA || prop == ZFS_PROP_GROUPQUOTA ||
|
||||||
prop == ZFS_PROP_PROJECTQUOTA) {
|
prop == ZFS_PROP_PROJECTQUOTA) {
|
||||||
propname = "quota";
|
propname = "quota";
|
||||||
@@ -3180,10 +3151,8 @@ userspace_cb(void *arg, const char *domain, uid_t rid, uint64_t space,
|
|||||||
} else if (prop == ZFS_PROP_USEROBJUSED ||
|
} else if (prop == ZFS_PROP_USEROBJUSED ||
|
||||||
prop == ZFS_PROP_GROUPOBJUSED || prop == ZFS_PROP_PROJECTOBJUSED) {
|
prop == ZFS_PROP_GROUPOBJUSED || prop == ZFS_PROP_PROJECTOBJUSED) {
|
||||||
propname = "objused";
|
propname = "objused";
|
||||||
if (!nvlist_exists(props, "objquota")) {
|
if (!nvlist_exists(props, "objquota"))
|
||||||
(void) nvlist_add_uint64(props, "objquota",
|
(void) nvlist_add_uint64(props, "objquota", 0);
|
||||||
default_quota);
|
|
||||||
}
|
|
||||||
} else if (prop == ZFS_PROP_USEROBJQUOTA ||
|
} else if (prop == ZFS_PROP_USEROBJQUOTA ||
|
||||||
prop == ZFS_PROP_GROUPOBJQUOTA ||
|
prop == ZFS_PROP_GROUPOBJQUOTA ||
|
||||||
prop == ZFS_PROP_PROJECTOBJQUOTA) {
|
prop == ZFS_PROP_PROJECTOBJQUOTA) {
|
||||||
@@ -4471,7 +4440,7 @@ zfs_do_rollback(int argc, char **argv)
|
|||||||
if (cb.cb_create > 0)
|
if (cb.cb_create > 0)
|
||||||
min_txg = cb.cb_create;
|
min_txg = cb.cb_create;
|
||||||
|
|
||||||
if ((ret = zfs_iter_snapshots_sorted_v2(zhp, 0, rollback_check, &cb,
|
if ((ret = zfs_iter_snapshots_v2(zhp, 0, rollback_check, &cb,
|
||||||
min_txg, 0)) != 0)
|
min_txg, 0)) != 0)
|
||||||
goto out;
|
goto out;
|
||||||
if ((ret = zfs_iter_bookmarks_v2(zhp, 0, rollback_check, &cb)) != 0)
|
if ((ret = zfs_iter_bookmarks_v2(zhp, 0, rollback_check, &cb)) != 0)
|
||||||
@@ -5323,7 +5292,6 @@ zfs_do_receive(int argc, char **argv)
|
|||||||
#define ZFS_DELEG_PERM_MOUNT "mount"
|
#define ZFS_DELEG_PERM_MOUNT "mount"
|
||||||
#define ZFS_DELEG_PERM_SHARE "share"
|
#define ZFS_DELEG_PERM_SHARE "share"
|
||||||
#define ZFS_DELEG_PERM_SEND "send"
|
#define ZFS_DELEG_PERM_SEND "send"
|
||||||
#define ZFS_DELEG_PERM_SEND_RAW "send:raw"
|
|
||||||
#define ZFS_DELEG_PERM_RECEIVE "receive"
|
#define ZFS_DELEG_PERM_RECEIVE "receive"
|
||||||
#define ZFS_DELEG_PERM_RECEIVE_APPEND "receive:append"
|
#define ZFS_DELEG_PERM_RECEIVE_APPEND "receive:append"
|
||||||
#define ZFS_DELEG_PERM_ALLOW "allow"
|
#define ZFS_DELEG_PERM_ALLOW "allow"
|
||||||
@@ -5366,7 +5334,6 @@ static zfs_deleg_perm_tab_t zfs_deleg_perm_tbl[] = {
|
|||||||
{ ZFS_DELEG_PERM_RENAME, ZFS_DELEG_NOTE_RENAME },
|
{ ZFS_DELEG_PERM_RENAME, ZFS_DELEG_NOTE_RENAME },
|
||||||
{ ZFS_DELEG_PERM_ROLLBACK, ZFS_DELEG_NOTE_ROLLBACK },
|
{ ZFS_DELEG_PERM_ROLLBACK, ZFS_DELEG_NOTE_ROLLBACK },
|
||||||
{ ZFS_DELEG_PERM_SEND, ZFS_DELEG_NOTE_SEND },
|
{ ZFS_DELEG_PERM_SEND, ZFS_DELEG_NOTE_SEND },
|
||||||
{ ZFS_DELEG_PERM_SEND_RAW, ZFS_DELEG_NOTE_SEND_RAW },
|
|
||||||
{ ZFS_DELEG_PERM_SHARE, ZFS_DELEG_NOTE_SHARE },
|
{ ZFS_DELEG_PERM_SHARE, ZFS_DELEG_NOTE_SHARE },
|
||||||
{ ZFS_DELEG_PERM_SNAPSHOT, ZFS_DELEG_NOTE_SNAPSHOT },
|
{ ZFS_DELEG_PERM_SNAPSHOT, ZFS_DELEG_NOTE_SNAPSHOT },
|
||||||
{ ZFS_DELEG_PERM_BOOKMARK, ZFS_DELEG_NOTE_BOOKMARK },
|
{ ZFS_DELEG_PERM_BOOKMARK, ZFS_DELEG_NOTE_BOOKMARK },
|
||||||
@@ -5899,7 +5866,7 @@ parse_fs_perm_set(fs_perm_set_t *fspset, nvlist_t *nvl)
|
|||||||
static inline const char *
|
static inline const char *
|
||||||
deleg_perm_comment(zfs_deleg_note_t note)
|
deleg_perm_comment(zfs_deleg_note_t note)
|
||||||
{
|
{
|
||||||
const char *str;
|
const char *str = "";
|
||||||
|
|
||||||
/* subcommands */
|
/* subcommands */
|
||||||
switch (note) {
|
switch (note) {
|
||||||
@@ -5951,10 +5918,6 @@ deleg_perm_comment(zfs_deleg_note_t note)
|
|||||||
case ZFS_DELEG_NOTE_SEND:
|
case ZFS_DELEG_NOTE_SEND:
|
||||||
str = gettext("");
|
str = gettext("");
|
||||||
break;
|
break;
|
||||||
case ZFS_DELEG_NOTE_SEND_RAW:
|
|
||||||
str = gettext("Allow sending ONLY encrypted (raw) replication"
|
|
||||||
"\n\t\t\t\tstreams");
|
|
||||||
break;
|
|
||||||
case ZFS_DELEG_NOTE_SHARE:
|
case ZFS_DELEG_NOTE_SHARE:
|
||||||
str = gettext("Allows sharing file systems over NFS or SMB"
|
str = gettext("Allows sharing file systems over NFS or SMB"
|
||||||
"\n\t\t\t\tprotocols");
|
"\n\t\t\t\tprotocols");
|
||||||
@@ -6884,17 +6847,17 @@ print_holds(boolean_t scripted, int nwidth, int tagwidth, nvlist_t *nvl,
|
|||||||
|
|
||||||
if (scripted) {
|
if (scripted) {
|
||||||
if (parsable) {
|
if (parsable) {
|
||||||
(void) printf("%s\t%s\t%lld\n", zname,
|
(void) printf("%s\t%s\t%ld\n", zname,
|
||||||
tagname, (long long)time);
|
tagname, time);
|
||||||
} else {
|
} else {
|
||||||
(void) printf("%s\t%s\t%s\n", zname,
|
(void) printf("%s\t%s\t%s\n", zname,
|
||||||
tagname, tsbuf);
|
tagname, tsbuf);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (parsable) {
|
if (parsable) {
|
||||||
(void) printf("%-*s %-*s %lld\n",
|
(void) printf("%-*s %-*s %ld\n",
|
||||||
nwidth, zname, tagwidth,
|
nwidth, zname, tagwidth,
|
||||||
tagname, (long long)time);
|
tagname, time);
|
||||||
} else {
|
} else {
|
||||||
(void) printf("%-*s %-*s %s\n",
|
(void) printf("%-*s %-*s %s\n",
|
||||||
nwidth, zname, tagwidth,
|
nwidth, zname, tagwidth,
|
||||||
@@ -7753,7 +7716,6 @@ unshare_unmount_path(int op, char *path, int flags, boolean_t is_manual)
|
|||||||
struct extmnttab entry;
|
struct extmnttab entry;
|
||||||
const char *cmdname = (op == OP_SHARE) ? "unshare" : "unmount";
|
const char *cmdname = (op == OP_SHARE) ? "unshare" : "unmount";
|
||||||
ino_t path_inode;
|
ino_t path_inode;
|
||||||
char *zfs_mntpnt, *entry_mntpnt;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Search for the given (major,minor) pair in the mount table.
|
* Search for the given (major,minor) pair in the mount table.
|
||||||
@@ -7795,24 +7757,6 @@ unshare_unmount_path(int op, char *path, int flags, boolean_t is_manual)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* If the filesystem is mounted, check that the mountpoint matches
|
|
||||||
* the one in the mnttab entry w.r.t. provided path. If it doesn't,
|
|
||||||
* then we should not proceed further.
|
|
||||||
*/
|
|
||||||
entry_mntpnt = strdup(entry.mnt_mountp);
|
|
||||||
if (zfs_is_mounted(zhp, &zfs_mntpnt)) {
|
|
||||||
if (strcmp(zfs_mntpnt, entry_mntpnt) != 0) {
|
|
||||||
(void) fprintf(stderr, gettext("cannot %s '%s': "
|
|
||||||
"not an original mountpoint\n"), cmdname, path);
|
|
||||||
free(zfs_mntpnt);
|
|
||||||
free(entry_mntpnt);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
free(zfs_mntpnt);
|
|
||||||
}
|
|
||||||
free(entry_mntpnt);
|
|
||||||
|
|
||||||
if (op == OP_SHARE) {
|
if (op == OP_SHARE) {
|
||||||
char nfs_mnt_prop[ZFS_MAXPROPLEN];
|
char nfs_mnt_prop[ZFS_MAXPROPLEN];
|
||||||
char smbshare_prop[ZFS_MAXPROPLEN];
|
char smbshare_prop[ZFS_MAXPROPLEN];
|
||||||
@@ -9069,195 +9013,6 @@ zfs_do_project(int argc, char **argv)
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
zfs_rewrite_file(const char *path, boolean_t verbose, zfs_rewrite_args_t *args)
|
|
||||||
{
|
|
||||||
int fd, ret = 0;
|
|
||||||
|
|
||||||
fd = open(path, O_WRONLY);
|
|
||||||
if (fd < 0) {
|
|
||||||
ret = errno;
|
|
||||||
(void) fprintf(stderr, gettext("failed to open %s: %s\n"),
|
|
||||||
path, strerror(errno));
|
|
||||||
return (ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ioctl(fd, ZFS_IOC_REWRITE, args) < 0) {
|
|
||||||
ret = errno;
|
|
||||||
(void) fprintf(stderr, gettext("failed to rewrite %s: %s\n"),
|
|
||||||
path, strerror(errno));
|
|
||||||
} else if (verbose) {
|
|
||||||
printf("%s\n", path);
|
|
||||||
}
|
|
||||||
|
|
||||||
close(fd);
|
|
||||||
return (ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
zfs_rewrite_dir(const char *path, boolean_t verbose, boolean_t xdev, dev_t dev,
|
|
||||||
zfs_rewrite_args_t *args, nvlist_t *dirs)
|
|
||||||
{
|
|
||||||
struct dirent *ent;
|
|
||||||
DIR *dir;
|
|
||||||
int ret = 0, err;
|
|
||||||
|
|
||||||
dir = opendir(path);
|
|
||||||
if (dir == NULL) {
|
|
||||||
if (errno == ENOENT)
|
|
||||||
return (0);
|
|
||||||
ret = errno;
|
|
||||||
(void) fprintf(stderr, gettext("failed to opendir %s: %s\n"),
|
|
||||||
path, strerror(errno));
|
|
||||||
return (ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t plen = strlen(path) + 1;
|
|
||||||
while ((ent = readdir(dir)) != NULL) {
|
|
||||||
char *fullname;
|
|
||||||
struct stat st;
|
|
||||||
|
|
||||||
if (ent->d_type != DT_REG && ent->d_type != DT_DIR)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (strcmp(ent->d_name, ".") == 0 ||
|
|
||||||
strcmp(ent->d_name, "..") == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (plen + strlen(ent->d_name) >= PATH_MAX) {
|
|
||||||
(void) fprintf(stderr, gettext("path too long %s/%s\n"),
|
|
||||||
path, ent->d_name);
|
|
||||||
ret = ENAMETOOLONG;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (asprintf(&fullname, "%s/%s", path, ent->d_name) == -1) {
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
gettext("failed to allocate memory\n"));
|
|
||||||
ret = ENOMEM;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (xdev) {
|
|
||||||
if (lstat(fullname, &st) < 0) {
|
|
||||||
ret = errno;
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
gettext("failed to stat %s: %s\n"),
|
|
||||||
fullname, strerror(errno));
|
|
||||||
free(fullname);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (st.st_dev != dev) {
|
|
||||||
free(fullname);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ent->d_type == DT_REG) {
|
|
||||||
err = zfs_rewrite_file(fullname, verbose, args);
|
|
||||||
if (err)
|
|
||||||
ret = err;
|
|
||||||
} else { /* DT_DIR */
|
|
||||||
fnvlist_add_uint64(dirs, fullname, dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
free(fullname);
|
|
||||||
}
|
|
||||||
|
|
||||||
closedir(dir);
|
|
||||||
return (ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
zfs_rewrite_path(const char *path, boolean_t verbose, boolean_t recurse,
|
|
||||||
boolean_t xdev, zfs_rewrite_args_t *args, nvlist_t *dirs)
|
|
||||||
{
|
|
||||||
struct stat st;
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
if (lstat(path, &st) < 0) {
|
|
||||||
ret = errno;
|
|
||||||
(void) fprintf(stderr, gettext("failed to stat %s: %s\n"),
|
|
||||||
path, strerror(errno));
|
|
||||||
return (ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (S_ISREG(st.st_mode)) {
|
|
||||||
ret = zfs_rewrite_file(path, verbose, args);
|
|
||||||
} else if (S_ISDIR(st.st_mode) && recurse) {
|
|
||||||
ret = zfs_rewrite_dir(path, verbose, xdev, st.st_dev, args,
|
|
||||||
dirs);
|
|
||||||
}
|
|
||||||
return (ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
zfs_do_rewrite(int argc, char **argv)
|
|
||||||
{
|
|
||||||
int ret = 0, err, c;
|
|
||||||
boolean_t recurse = B_FALSE, verbose = B_FALSE, xdev = B_FALSE;
|
|
||||||
|
|
||||||
if (argc < 2)
|
|
||||||
usage(B_FALSE);
|
|
||||||
|
|
||||||
zfs_rewrite_args_t args;
|
|
||||||
memset(&args, 0, sizeof (args));
|
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "Pl:o:rvx")) != -1) {
|
|
||||||
switch (c) {
|
|
||||||
case 'P':
|
|
||||||
args.flags |= ZFS_REWRITE_PHYSICAL;
|
|
||||||
break;
|
|
||||||
case 'l':
|
|
||||||
args.len = strtoll(optarg, NULL, 0);
|
|
||||||
break;
|
|
||||||
case 'o':
|
|
||||||
args.off = strtoll(optarg, NULL, 0);
|
|
||||||
break;
|
|
||||||
case 'r':
|
|
||||||
recurse = B_TRUE;
|
|
||||||
break;
|
|
||||||
case 'v':
|
|
||||||
verbose = B_TRUE;
|
|
||||||
break;
|
|
||||||
case 'x':
|
|
||||||
xdev = B_TRUE;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
|
||||||
optopt);
|
|
||||||
usage(B_FALSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
argv += optind;
|
|
||||||
argc -= optind;
|
|
||||||
if (argc == 0) {
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
gettext("missing file or directory target(s)\n"));
|
|
||||||
usage(B_FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
nvlist_t *dirs = fnvlist_alloc();
|
|
||||||
for (int i = 0; i < argc; i++) {
|
|
||||||
err = zfs_rewrite_path(argv[i], verbose, recurse, xdev, &args,
|
|
||||||
dirs);
|
|
||||||
if (err)
|
|
||||||
ret = err;
|
|
||||||
}
|
|
||||||
nvpair_t *dir;
|
|
||||||
while ((dir = nvlist_next_nvpair(dirs, NULL)) != NULL) {
|
|
||||||
err = zfs_rewrite_dir(nvpair_name(dir), verbose, xdev,
|
|
||||||
fnvpair_value_uint64(dir), &args, dirs);
|
|
||||||
if (err)
|
|
||||||
ret = err;
|
|
||||||
fnvlist_remove_nvpair(dirs, dir);
|
|
||||||
}
|
|
||||||
fnvlist_free(dirs);
|
|
||||||
|
|
||||||
return (ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
zfs_do_wait(int argc, char **argv)
|
zfs_do_wait(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
|||||||
+8
-28
@@ -145,11 +145,11 @@ zfs_project_handle_one(const char *name, zfs_project_control_t *zpc)
|
|||||||
switch (zpc->zpc_op) {
|
switch (zpc->zpc_op) {
|
||||||
case ZFS_PROJECT_OP_LIST:
|
case ZFS_PROJECT_OP_LIST:
|
||||||
(void) printf("%5u %c %s\n", fsx.fsx_projid,
|
(void) printf("%5u %c %s\n", fsx.fsx_projid,
|
||||||
(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT) ? 'P' : '-', name);
|
(fsx.fsx_xflags & ZFS_PROJINHERIT_FL) ? 'P' : '-', name);
|
||||||
goto out;
|
goto out;
|
||||||
case ZFS_PROJECT_OP_CHECK:
|
case ZFS_PROJECT_OP_CHECK:
|
||||||
if (fsx.fsx_projid == zpc->zpc_expected_projid &&
|
if (fsx.fsx_projid == zpc->zpc_expected_projid &&
|
||||||
fsx.fsx_xflags & FS_XFLAG_PROJINHERIT)
|
fsx.fsx_xflags & ZFS_PROJINHERIT_FL)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!zpc->zpc_newline) {
|
if (!zpc->zpc_newline) {
|
||||||
@@ -164,30 +164,29 @@ zfs_project_handle_one(const char *name, zfs_project_control_t *zpc)
|
|||||||
"(%u/%u)\n", name, fsx.fsx_projid,
|
"(%u/%u)\n", name, fsx.fsx_projid,
|
||||||
(uint32_t)zpc->zpc_expected_projid);
|
(uint32_t)zpc->zpc_expected_projid);
|
||||||
|
|
||||||
if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT))
|
if (!(fsx.fsx_xflags & ZFS_PROJINHERIT_FL))
|
||||||
(void) printf("%s - project inherit flag is not set\n",
|
(void) printf("%s - project inherit flag is not set\n",
|
||||||
name);
|
name);
|
||||||
|
|
||||||
goto out;
|
goto out;
|
||||||
case ZFS_PROJECT_OP_CLEAR:
|
case ZFS_PROJECT_OP_CLEAR:
|
||||||
if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT) &&
|
if (!(fsx.fsx_xflags & ZFS_PROJINHERIT_FL) &&
|
||||||
(zpc->zpc_keep_projid ||
|
(zpc->zpc_keep_projid ||
|
||||||
fsx.fsx_projid == ZFS_DEFAULT_PROJID))
|
fsx.fsx_projid == ZFS_DEFAULT_PROJID))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
fsx.fsx_xflags &= ~FS_XFLAG_PROJINHERIT;
|
fsx.fsx_xflags &= ~ZFS_PROJINHERIT_FL;
|
||||||
if (!zpc->zpc_keep_projid)
|
if (!zpc->zpc_keep_projid)
|
||||||
fsx.fsx_projid = ZFS_DEFAULT_PROJID;
|
fsx.fsx_projid = ZFS_DEFAULT_PROJID;
|
||||||
break;
|
break;
|
||||||
case ZFS_PROJECT_OP_SET:
|
case ZFS_PROJECT_OP_SET:
|
||||||
if (fsx.fsx_projid == zpc->zpc_expected_projid &&
|
if (fsx.fsx_projid == zpc->zpc_expected_projid &&
|
||||||
(!zpc->zpc_set_flag ||
|
(!zpc->zpc_set_flag || fsx.fsx_xflags & ZFS_PROJINHERIT_FL))
|
||||||
fsx.fsx_xflags & FS_XFLAG_PROJINHERIT))
|
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
fsx.fsx_projid = zpc->zpc_expected_projid;
|
fsx.fsx_projid = zpc->zpc_expected_projid;
|
||||||
if (zpc->zpc_set_flag)
|
if (zpc->zpc_set_flag)
|
||||||
fsx.fsx_xflags |= FS_XFLAG_PROJINHERIT;
|
fsx.fsx_xflags |= ZFS_PROJINHERIT_FL;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
@@ -195,30 +194,11 @@ zfs_project_handle_one(const char *name, zfs_project_control_t *zpc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = ioctl(fd, ZFS_IOC_FSSETXATTR, &fsx);
|
ret = ioctl(fd, ZFS_IOC_FSSETXATTR, &fsx);
|
||||||
if (ret) {
|
if (ret)
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
gettext("failed to set xattr for %s: %s\n"),
|
gettext("failed to set xattr for %s: %s\n"),
|
||||||
name, strerror(errno));
|
name, strerror(errno));
|
||||||
|
|
||||||
if (errno == ENOTSUP) {
|
|
||||||
char *kver = zfs_version_kernel();
|
|
||||||
/*
|
|
||||||
* Special case: a module/userspace version mismatch can
|
|
||||||
* return ENOTSUP due to us fixing the XFLAGs bits in
|
|
||||||
* #17884. In that case give a hint to the user that
|
|
||||||
* they should take action to make the versions match.
|
|
||||||
*/
|
|
||||||
if (strcmp(kver, ZFS_META_ALIAS) != 0) {
|
|
||||||
fprintf(stderr,
|
|
||||||
gettext("Warning: The zfs module version "
|
|
||||||
"(%s) and userspace\nversion (%s) do not "
|
|
||||||
"match up. This may be the\ncause of the "
|
|
||||||
"\"Operation not supported\" error.\n"),
|
|
||||||
kver, ZFS_META_ALIAS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
close(fd);
|
close(fd);
|
||||||
return (ret);
|
return (ret);
|
||||||
|
|||||||
+64
-281
@@ -54,7 +54,6 @@
|
|||||||
#include <sys/dmu_tx.h>
|
#include <sys/dmu_tx.h>
|
||||||
#include <zfeature_common.h>
|
#include <zfeature_common.h>
|
||||||
#include <libzutil.h>
|
#include <libzutil.h>
|
||||||
#include <sys/metaslab_impl.h>
|
|
||||||
|
|
||||||
static importargs_t g_importargs;
|
static importargs_t g_importargs;
|
||||||
static char *g_pool;
|
static char *g_pool;
|
||||||
@@ -70,8 +69,7 @@ static __attribute__((noreturn)) void
|
|||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"Usage: zhack [-o tunable] [-c cachefile] [-d dir] <subcommand> "
|
"Usage: zhack [-c cachefile] [-d dir] <subcommand> <args> ...\n"
|
||||||
"<args> ...\n"
|
|
||||||
"where <subcommand> <args> is one of the following:\n"
|
"where <subcommand> <args> is one of the following:\n"
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
@@ -95,10 +93,7 @@ usage(void)
|
|||||||
" -c repair corrupted label checksums\n"
|
" -c repair corrupted label checksums\n"
|
||||||
" -u restore the label on a detached device\n"
|
" -u restore the label on a detached device\n"
|
||||||
"\n"
|
"\n"
|
||||||
" <device> : path to vdev\n"
|
" <device> : path to vdev\n");
|
||||||
"\n"
|
|
||||||
" metaslab leak <pool>\n"
|
|
||||||
" apply allocation map from zdb to specified pool\n");
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,9 +162,9 @@ zhack_import(char *target, boolean_t readonly)
|
|||||||
|
|
||||||
props = NULL;
|
props = NULL;
|
||||||
if (readonly) {
|
if (readonly) {
|
||||||
VERIFY0(nvlist_alloc(&props, NV_UNIQUE_NAME, 0));
|
VERIFY(nvlist_alloc(&props, NV_UNIQUE_NAME, 0) == 0);
|
||||||
VERIFY0(nvlist_add_uint64(props,
|
VERIFY(nvlist_add_uint64(props,
|
||||||
zpool_prop_to_name(ZPOOL_PROP_READONLY), 1));
|
zpool_prop_to_name(ZPOOL_PROP_READONLY), 1) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
zfeature_checks_disable = B_TRUE;
|
zfeature_checks_disable = B_TRUE;
|
||||||
@@ -223,8 +218,8 @@ dump_obj(objset_t *os, uint64_t obj, const char *name)
|
|||||||
} else {
|
} else {
|
||||||
ASSERT(za->za_integer_length == 1);
|
ASSERT(za->za_integer_length == 1);
|
||||||
char val[1024];
|
char val[1024];
|
||||||
VERIFY0(zap_lookup(os, obj, za->za_name,
|
VERIFY(zap_lookup(os, obj, za->za_name,
|
||||||
1, sizeof (val), val));
|
1, sizeof (val), val) == 0);
|
||||||
(void) printf("\t%s = %s\n", za->za_name, val);
|
(void) printf("\t%s = %s\n", za->za_name, val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -368,12 +363,10 @@ feature_incr_sync(void *arg, dmu_tx_t *tx)
|
|||||||
zfeature_info_t *feature = arg;
|
zfeature_info_t *feature = arg;
|
||||||
uint64_t refcount;
|
uint64_t refcount;
|
||||||
|
|
||||||
mutex_enter(&spa->spa_feat_stats_lock);
|
|
||||||
VERIFY0(feature_get_refcount_from_disk(spa, feature, &refcount));
|
VERIFY0(feature_get_refcount_from_disk(spa, feature, &refcount));
|
||||||
feature_sync(spa, feature, refcount + 1, tx);
|
feature_sync(spa, feature, refcount + 1, tx);
|
||||||
spa_history_log_internal(spa, "zhack feature incr", tx,
|
spa_history_log_internal(spa, "zhack feature incr", tx,
|
||||||
"name=%s", feature->fi_guid);
|
"name=%s", feature->fi_guid);
|
||||||
mutex_exit(&spa->spa_feat_stats_lock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -383,12 +376,10 @@ feature_decr_sync(void *arg, dmu_tx_t *tx)
|
|||||||
zfeature_info_t *feature = arg;
|
zfeature_info_t *feature = arg;
|
||||||
uint64_t refcount;
|
uint64_t refcount;
|
||||||
|
|
||||||
mutex_enter(&spa->spa_feat_stats_lock);
|
|
||||||
VERIFY0(feature_get_refcount_from_disk(spa, feature, &refcount));
|
VERIFY0(feature_get_refcount_from_disk(spa, feature, &refcount));
|
||||||
feature_sync(spa, feature, refcount - 1, tx);
|
feature_sync(spa, feature, refcount - 1, tx);
|
||||||
spa_history_log_internal(spa, "zhack feature decr", tx,
|
spa_history_log_internal(spa, "zhack feature decr", tx,
|
||||||
"name=%s", feature->fi_guid);
|
"name=%s", feature->fi_guid);
|
||||||
mutex_exit(&spa->spa_feat_stats_lock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -505,186 +496,6 @@ zhack_do_feature(int argc, char **argv)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean_t
|
|
||||||
strstarts(const char *a, const char *b)
|
|
||||||
{
|
|
||||||
return (strncmp(a, b, strlen(b)) == 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
metaslab_force_alloc(metaslab_t *msp, uint64_t start, uint64_t size,
|
|
||||||
dmu_tx_t *tx)
|
|
||||||
{
|
|
||||||
ASSERT(msp->ms_disabled);
|
|
||||||
ASSERT(MUTEX_HELD(&msp->ms_lock));
|
|
||||||
uint64_t txg = dmu_tx_get_txg(tx);
|
|
||||||
|
|
||||||
uint64_t off = start;
|
|
||||||
while (off < start + size) {
|
|
||||||
uint64_t ostart, osize;
|
|
||||||
boolean_t found = zfs_range_tree_find_in(msp->ms_allocatable,
|
|
||||||
off, start + size - off, &ostart, &osize);
|
|
||||||
if (!found)
|
|
||||||
break;
|
|
||||||
zfs_range_tree_remove(msp->ms_allocatable, ostart, osize);
|
|
||||||
|
|
||||||
if (zfs_range_tree_is_empty(msp->ms_allocating[txg & TXG_MASK]))
|
|
||||||
vdev_dirty(msp->ms_group->mg_vd, VDD_METASLAB, msp,
|
|
||||||
txg);
|
|
||||||
|
|
||||||
zfs_range_tree_add(msp->ms_allocating[txg & TXG_MASK], ostart,
|
|
||||||
osize);
|
|
||||||
msp->ms_allocating_total += osize;
|
|
||||||
off = ostart + osize;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
zhack_do_metaslab_leak(int argc, char **argv)
|
|
||||||
{
|
|
||||||
int c;
|
|
||||||
char *target;
|
|
||||||
spa_t *spa;
|
|
||||||
|
|
||||||
optind = 1;
|
|
||||||
boolean_t force = B_FALSE;
|
|
||||||
while ((c = getopt(argc, argv, "f")) != -1) {
|
|
||||||
switch (c) {
|
|
||||||
case 'f':
|
|
||||||
force = B_TRUE;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
usage();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
argc -= optind;
|
|
||||||
argv += optind;
|
|
||||||
|
|
||||||
if (argc < 1) {
|
|
||||||
(void) fprintf(stderr, "error: missing pool name\n");
|
|
||||||
usage();
|
|
||||||
}
|
|
||||||
target = argv[0];
|
|
||||||
|
|
||||||
zhack_spa_open(target, B_FALSE, FTAG, &spa);
|
|
||||||
spa_config_enter(spa, SCL_VDEV | SCL_ALLOC, FTAG, RW_READER);
|
|
||||||
|
|
||||||
char *line = NULL;
|
|
||||||
size_t cap = 0;
|
|
||||||
|
|
||||||
vdev_t *vd = NULL;
|
|
||||||
metaslab_t *prev = NULL;
|
|
||||||
dmu_tx_t *tx = NULL;
|
|
||||||
while (getline(&line, &cap, stdin) > 0) {
|
|
||||||
if (strstarts(line, "\tvdev ")) {
|
|
||||||
uint64_t vdev_id, ms_shift;
|
|
||||||
if (sscanf(line,
|
|
||||||
"\tvdev %10"PRIu64"\t%*s metaslab shift %4"PRIu64,
|
|
||||||
&vdev_id, &ms_shift) == 1) {
|
|
||||||
VERIFY3U(sscanf(line, "\tvdev %"PRIu64
|
|
||||||
"\t metaslab shift %4"PRIu64,
|
|
||||||
&vdev_id, &ms_shift), ==, 2);
|
|
||||||
}
|
|
||||||
vd = vdev_lookup_top(spa, vdev_id);
|
|
||||||
if (vd == NULL) {
|
|
||||||
fprintf(stderr, "error: no such vdev with "
|
|
||||||
"id %"PRIu64"\n", vdev_id);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (tx) {
|
|
||||||
dmu_tx_commit(tx);
|
|
||||||
mutex_exit(&prev->ms_lock);
|
|
||||||
metaslab_enable(prev, B_FALSE, B_FALSE);
|
|
||||||
tx = NULL;
|
|
||||||
prev = NULL;
|
|
||||||
}
|
|
||||||
if (vd->vdev_ms_shift != ms_shift) {
|
|
||||||
fprintf(stderr, "error: ms_shift mismatch: %"
|
|
||||||
PRIu64" != %"PRIu64"\n", vd->vdev_ms_shift,
|
|
||||||
ms_shift);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else if (strstarts(line, "\tmetaslabs ")) {
|
|
||||||
uint64_t ms_count;
|
|
||||||
VERIFY3U(sscanf(line, "\tmetaslabs %"PRIu64, &ms_count),
|
|
||||||
==, 1);
|
|
||||||
ASSERT(vd);
|
|
||||||
if (!force && vd->vdev_ms_count != ms_count) {
|
|
||||||
fprintf(stderr, "error: ms_count mismatch: %"
|
|
||||||
PRIu64" != %"PRIu64"\n", vd->vdev_ms_count,
|
|
||||||
ms_count);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else if (strstarts(line, "ALLOC:")) {
|
|
||||||
uint64_t start, size;
|
|
||||||
VERIFY3U(sscanf(line, "ALLOC: %"PRIu64" %"PRIu64"\n",
|
|
||||||
&start, &size), ==, 2);
|
|
||||||
|
|
||||||
ASSERT(vd);
|
|
||||||
metaslab_t *cur =
|
|
||||||
vd->vdev_ms[start >> vd->vdev_ms_shift];
|
|
||||||
if (prev != cur) {
|
|
||||||
if (prev) {
|
|
||||||
dmu_tx_commit(tx);
|
|
||||||
mutex_exit(&prev->ms_lock);
|
|
||||||
metaslab_enable(prev, B_FALSE, B_FALSE);
|
|
||||||
}
|
|
||||||
ASSERT(cur);
|
|
||||||
metaslab_disable(cur);
|
|
||||||
mutex_enter(&cur->ms_lock);
|
|
||||||
metaslab_load(cur);
|
|
||||||
prev = cur;
|
|
||||||
tx = dmu_tx_create_dd(
|
|
||||||
spa_get_dsl(vd->vdev_spa)->dp_root_dir);
|
|
||||||
dmu_tx_assign(tx, DMU_TX_WAIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
metaslab_force_alloc(cur, start, size, tx);
|
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (tx) {
|
|
||||||
dmu_tx_commit(tx);
|
|
||||||
mutex_exit(&prev->ms_lock);
|
|
||||||
metaslab_enable(prev, B_FALSE, B_FALSE);
|
|
||||||
tx = NULL;
|
|
||||||
prev = NULL;
|
|
||||||
}
|
|
||||||
if (line)
|
|
||||||
free(line);
|
|
||||||
|
|
||||||
spa_config_exit(spa, SCL_VDEV | SCL_ALLOC, FTAG);
|
|
||||||
spa_close(spa, FTAG);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
zhack_do_metaslab(int argc, char **argv)
|
|
||||||
{
|
|
||||||
char *subcommand;
|
|
||||||
|
|
||||||
argc--;
|
|
||||||
argv++;
|
|
||||||
if (argc == 0) {
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
"error: no metaslab operation specified\n");
|
|
||||||
usage();
|
|
||||||
}
|
|
||||||
|
|
||||||
subcommand = argv[0];
|
|
||||||
if (strcmp(subcommand, "leak") == 0) {
|
|
||||||
zhack_do_metaslab_leak(argc, argv);
|
|
||||||
} else {
|
|
||||||
(void) fprintf(stderr, "error: unknown subcommand: %s\n",
|
|
||||||
subcommand);
|
|
||||||
usage();
|
|
||||||
}
|
|
||||||
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ASHIFT_UBERBLOCK_SHIFT(ashift) \
|
#define ASHIFT_UBERBLOCK_SHIFT(ashift) \
|
||||||
MIN(MAX(ashift, UBERBLOCK_SHIFT), \
|
MIN(MAX(ashift, UBERBLOCK_SHIFT), \
|
||||||
MAX_UBERBLOCK_SHIFT)
|
MAX_UBERBLOCK_SHIFT)
|
||||||
@@ -714,23 +525,6 @@ zhack_repair_read_label(const int fd, vdev_label_t *vl,
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
zhack_repair_get_byteswap(const zio_eck_t *vdev_eck, const int l, int *byteswap)
|
|
||||||
{
|
|
||||||
if (vdev_eck->zec_magic == ZEC_MAGIC) {
|
|
||||||
*byteswap = B_FALSE;
|
|
||||||
} else if (vdev_eck->zec_magic == BSWAP_64((uint64_t)ZEC_MAGIC)) {
|
|
||||||
*byteswap = B_TRUE;
|
|
||||||
} else {
|
|
||||||
(void) fprintf(stderr, "error: label %d: "
|
|
||||||
"Expected the nvlist checksum magic number but instead got "
|
|
||||||
"0x%" PRIx64 "\n",
|
|
||||||
l, vdev_eck->zec_magic);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
zhack_repair_calc_cksum(const int byteswap, void *data, const uint64_t offset,
|
zhack_repair_calc_cksum(const int byteswap, void *data, const uint64_t offset,
|
||||||
const uint64_t abdsize, zio_eck_t *eck, zio_cksum_t *cksum)
|
const uint64_t abdsize, zio_eck_t *eck, zio_cksum_t *cksum)
|
||||||
@@ -757,10 +551,33 @@ zhack_repair_calc_cksum(const int byteswap, void *data, const uint64_t offset,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
zhack_repair_get_ashift(nvlist_t *cfg, const int l, uint64_t *ashift)
|
zhack_repair_check_label(uberblock_t *ub, const int l, const char **cfg_keys,
|
||||||
|
const size_t cfg_keys_len, nvlist_t *cfg, nvlist_t *vdev_tree_cfg,
|
||||||
|
uint64_t *ashift)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
nvlist_t *vdev_tree_cfg;
|
|
||||||
|
if (ub->ub_txg != 0) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
"error: label %d: UB TXG of 0 expected, but got %"
|
||||||
|
PRIu64 "\n",
|
||||||
|
l, ub->ub_txg);
|
||||||
|
(void) fprintf(stderr, "It would appear the device was not "
|
||||||
|
"properly removed.\n");
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < cfg_keys_len; i++) {
|
||||||
|
uint64_t val;
|
||||||
|
err = nvlist_lookup_uint64(cfg, cfg_keys[i], &val);
|
||||||
|
if (err) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
"error: label %d, %d: "
|
||||||
|
"cannot find nvlist key %s\n",
|
||||||
|
l, i, cfg_keys[i]);
|
||||||
|
return (err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
err = nvlist_lookup_nvlist(cfg,
|
err = nvlist_lookup_nvlist(cfg,
|
||||||
ZPOOL_CONFIG_VDEV_TREE, &vdev_tree_cfg);
|
ZPOOL_CONFIG_VDEV_TREE, &vdev_tree_cfg);
|
||||||
@@ -784,7 +601,7 @@ zhack_repair_get_ashift(nvlist_t *cfg, const int l, uint64_t *ashift)
|
|||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"error: label %d: nvlist key %s is zero\n",
|
"error: label %d: nvlist key %s is zero\n",
|
||||||
l, ZPOOL_CONFIG_ASHIFT);
|
l, ZPOOL_CONFIG_ASHIFT);
|
||||||
return (1);
|
return (err);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
@@ -799,35 +616,30 @@ zhack_repair_undetach(uberblock_t *ub, nvlist_t *cfg, const int l)
|
|||||||
*/
|
*/
|
||||||
if (BP_GET_LOGICAL_BIRTH(&ub->ub_rootbp) != 0) {
|
if (BP_GET_LOGICAL_BIRTH(&ub->ub_rootbp) != 0) {
|
||||||
const uint64_t txg = BP_GET_LOGICAL_BIRTH(&ub->ub_rootbp);
|
const uint64_t txg = BP_GET_LOGICAL_BIRTH(&ub->ub_rootbp);
|
||||||
int err;
|
|
||||||
|
|
||||||
ub->ub_txg = txg;
|
ub->ub_txg = txg;
|
||||||
|
|
||||||
err = nvlist_remove_all(cfg, ZPOOL_CONFIG_CREATE_TXG);
|
if (nvlist_remove_all(cfg, ZPOOL_CONFIG_CREATE_TXG) != 0) {
|
||||||
if (err) {
|
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"error: label %d: "
|
"error: label %d: "
|
||||||
"Failed to remove pool creation TXG\n",
|
"Failed to remove pool creation TXG\n",
|
||||||
l);
|
l);
|
||||||
return (err);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
err = nvlist_remove_all(cfg, ZPOOL_CONFIG_POOL_TXG);
|
if (nvlist_remove_all(cfg, ZPOOL_CONFIG_POOL_TXG) != 0) {
|
||||||
if (err) {
|
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"error: label %d: Failed to remove pool TXG to "
|
"error: label %d: Failed to remove pool TXG to "
|
||||||
"be replaced.\n",
|
"be replaced.\n",
|
||||||
l);
|
l);
|
||||||
return (err);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
err = nvlist_add_uint64(cfg, ZPOOL_CONFIG_POOL_TXG, txg);
|
if (nvlist_add_uint64(cfg, ZPOOL_CONFIG_POOL_TXG, txg) != 0) {
|
||||||
if (err) {
|
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"error: label %d: "
|
"error: label %d: "
|
||||||
"Failed to add pool TXG of %" PRIu64 "\n",
|
"Failed to add pool TXG of %" PRIu64 "\n",
|
||||||
l, txg);
|
l, txg);
|
||||||
return (err);
|
return (1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -921,7 +733,6 @@ zhack_repair_test_cksum(const int byteswap, void *vdev_data,
|
|||||||
BSWAP_64(ZEC_MAGIC) : ZEC_MAGIC;
|
BSWAP_64(ZEC_MAGIC) : ZEC_MAGIC;
|
||||||
const uint64_t actual_magic = vdev_eck->zec_magic;
|
const uint64_t actual_magic = vdev_eck->zec_magic;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
if (actual_magic != expected_magic) {
|
if (actual_magic != expected_magic) {
|
||||||
(void) fprintf(stderr, "error: label %d: "
|
(void) fprintf(stderr, "error: label %d: "
|
||||||
"Expected "
|
"Expected "
|
||||||
@@ -943,36 +754,6 @@ zhack_repair_test_cksum(const int byteswap, void *vdev_data,
|
|||||||
return (err);
|
return (err);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
zhack_repair_unpack_cfg(vdev_label_t *vl, const int l, nvlist_t **cfg)
|
|
||||||
{
|
|
||||||
const char *cfg_keys[] = { ZPOOL_CONFIG_VERSION,
|
|
||||||
ZPOOL_CONFIG_POOL_STATE, ZPOOL_CONFIG_GUID };
|
|
||||||
int err;
|
|
||||||
|
|
||||||
err = nvlist_unpack(vl->vl_vdev_phys.vp_nvlist,
|
|
||||||
VDEV_PHYS_SIZE - sizeof (zio_eck_t), cfg, 0);
|
|
||||||
if (err) {
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
"error: cannot unpack nvlist label %d\n", l);
|
|
||||||
return (err);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(cfg_keys); i++) {
|
|
||||||
uint64_t val;
|
|
||||||
err = nvlist_lookup_uint64(*cfg, cfg_keys[i], &val);
|
|
||||||
if (err) {
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
"error: label %d, %d: "
|
|
||||||
"cannot find nvlist key %s\n",
|
|
||||||
l, i, cfg_keys[i]);
|
|
||||||
return (err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
zhack_repair_one_label(const zhack_repair_op_t op, const int fd,
|
zhack_repair_one_label(const zhack_repair_op_t op, const int fd,
|
||||||
vdev_label_t *vl, const uint64_t label_offset, const int l,
|
vdev_label_t *vl, const uint64_t label_offset, const int l,
|
||||||
@@ -986,7 +767,10 @@ zhack_repair_one_label(const zhack_repair_op_t op, const int fd,
|
|||||||
(zio_eck_t *)((char *)(vdev_data) + VDEV_PHYS_SIZE) - 1;
|
(zio_eck_t *)((char *)(vdev_data) + VDEV_PHYS_SIZE) - 1;
|
||||||
const uint64_t vdev_phys_offset =
|
const uint64_t vdev_phys_offset =
|
||||||
label_offset + offsetof(vdev_label_t, vl_vdev_phys);
|
label_offset + offsetof(vdev_label_t, vl_vdev_phys);
|
||||||
|
const char *cfg_keys[] = { ZPOOL_CONFIG_VERSION,
|
||||||
|
ZPOOL_CONFIG_POOL_STATE, ZPOOL_CONFIG_GUID };
|
||||||
nvlist_t *cfg;
|
nvlist_t *cfg;
|
||||||
|
nvlist_t *vdev_tree_cfg = NULL;
|
||||||
uint64_t ashift;
|
uint64_t ashift;
|
||||||
int byteswap;
|
int byteswap;
|
||||||
|
|
||||||
@@ -994,9 +778,18 @@ zhack_repair_one_label(const zhack_repair_op_t op, const int fd,
|
|||||||
if (err)
|
if (err)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
err = zhack_repair_get_byteswap(vdev_eck, l, &byteswap);
|
if (vdev_eck->zec_magic == 0) {
|
||||||
if (err)
|
(void) fprintf(stderr, "error: label %d: "
|
||||||
|
"Expected the nvlist checksum magic number to not be zero"
|
||||||
|
"\n",
|
||||||
|
l);
|
||||||
|
(void) fprintf(stderr, "There should already be a checksum "
|
||||||
|
"for the label.\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
byteswap =
|
||||||
|
(vdev_eck->zec_magic == BSWAP_64((uint64_t)ZEC_MAGIC));
|
||||||
|
|
||||||
if (byteswap) {
|
if (byteswap) {
|
||||||
byteswap_uint64_array(&vdev_eck->zec_cksum,
|
byteswap_uint64_array(&vdev_eck->zec_cksum,
|
||||||
@@ -1012,7 +805,16 @@ zhack_repair_one_label(const zhack_repair_op_t op, const int fd,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = zhack_repair_unpack_cfg(vl, l, &cfg);
|
err = nvlist_unpack(vl->vl_vdev_phys.vp_nvlist,
|
||||||
|
VDEV_PHYS_SIZE - sizeof (zio_eck_t), &cfg, 0);
|
||||||
|
if (err) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
"error: cannot unpack nvlist label %d\n", l);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
err = zhack_repair_check_label(ub,
|
||||||
|
l, cfg_keys, ARRAY_SIZE(cfg_keys), cfg, vdev_tree_cfg, &ashift);
|
||||||
if (err)
|
if (err)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1020,19 +822,6 @@ zhack_repair_one_label(const zhack_repair_op_t op, const int fd,
|
|||||||
char *buf;
|
char *buf;
|
||||||
size_t buflen;
|
size_t buflen;
|
||||||
|
|
||||||
if (ub->ub_txg != 0) {
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
"error: label %d: UB TXG of 0 expected, but got %"
|
|
||||||
PRIu64 "\n", l, ub->ub_txg);
|
|
||||||
(void) fprintf(stderr, "It would appear the device was "
|
|
||||||
"not properly detached.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = zhack_repair_get_ashift(cfg, l, &ashift);
|
|
||||||
if (err)
|
|
||||||
return;
|
|
||||||
|
|
||||||
err = zhack_repair_undetach(ub, cfg, l);
|
err = zhack_repair_undetach(ub, cfg, l);
|
||||||
if (err)
|
if (err)
|
||||||
return;
|
return;
|
||||||
@@ -1192,7 +981,7 @@ main(int argc, char **argv)
|
|||||||
dprintf_setup(&argc, argv);
|
dprintf_setup(&argc, argv);
|
||||||
zfs_prop_init();
|
zfs_prop_init();
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "+c:d:o:")) != -1) {
|
while ((c = getopt(argc, argv, "+c:d:")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'c':
|
case 'c':
|
||||||
g_importargs.cachefile = optarg;
|
g_importargs.cachefile = optarg;
|
||||||
@@ -1201,10 +990,6 @@ main(int argc, char **argv)
|
|||||||
assert(g_importargs.paths < MAX_NUM_PATHS);
|
assert(g_importargs.paths < MAX_NUM_PATHS);
|
||||||
g_importargs.path[g_importargs.paths++] = optarg;
|
g_importargs.path[g_importargs.paths++] = optarg;
|
||||||
break;
|
break;
|
||||||
case 'o':
|
|
||||||
if (handle_tunable_option(optarg, B_FALSE) != 0)
|
|
||||||
exit(1);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
break;
|
break;
|
||||||
@@ -1226,8 +1011,6 @@ main(int argc, char **argv)
|
|||||||
rv = zhack_do_feature(argc, argv);
|
rv = zhack_do_feature(argc, argv);
|
||||||
} else if (strcmp(subcommand, "label") == 0) {
|
} else if (strcmp(subcommand, "label") == 0) {
|
||||||
return (zhack_do_label(argc, argv));
|
return (zhack_do_label(argc, argv));
|
||||||
} else if (strcmp(subcommand, "metaslab") == 0) {
|
|
||||||
rv = zhack_do_metaslab(argc, argv);
|
|
||||||
} else {
|
} else {
|
||||||
(void) fprintf(stderr, "error: unknown subcommand: %s\n",
|
(void) fprintf(stderr, "error: unknown subcommand: %s\n",
|
||||||
subcommand);
|
subcommand);
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ cols = {
|
|||||||
"cec": [5, 1000, "zil_commit_error_count"],
|
"cec": [5, 1000, "zil_commit_error_count"],
|
||||||
"csc": [5, 1000, "zil_commit_stall_count"],
|
"csc": [5, 1000, "zil_commit_stall_count"],
|
||||||
"cSc": [5, 1000, "zil_commit_suspend_count"],
|
"cSc": [5, 1000, "zil_commit_suspend_count"],
|
||||||
"cCc": [5, 1000, "zil_commit_crash_count"],
|
|
||||||
"ic": [5, 1000, "zil_itx_count"],
|
"ic": [5, 1000, "zil_itx_count"],
|
||||||
"iic": [5, 1000, "zil_itx_indirect_count"],
|
"iic": [5, 1000, "zil_itx_indirect_count"],
|
||||||
"iib": [5, 1024, "zil_itx_indirect_bytes"],
|
"iib": [5, 1024, "zil_itx_indirect_bytes"],
|
||||||
|
|||||||
+37
-113
@@ -107,8 +107,6 @@
|
|||||||
* zinject
|
* zinject
|
||||||
* zinject <-a | -u pool>
|
* zinject <-a | -u pool>
|
||||||
* zinject -c <id|all>
|
* zinject -c <id|all>
|
||||||
* zinject -E <delay> [-a] [-m] [-f freq] [-l level] [-r range]
|
|
||||||
* [-T iotype] [-t type object | -b bookmark pool]
|
|
||||||
* zinject [-q] <-t type> [-f freq] [-u] [-a] [-m] [-e errno] [-l level]
|
* zinject [-q] <-t type> [-f freq] [-u] [-a] [-m] [-e errno] [-l level]
|
||||||
* [-r range] <object>
|
* [-r range] <object>
|
||||||
* zinject [-f freq] [-a] [-m] [-u] -b objset:object:level:start:end pool
|
* zinject [-f freq] [-a] [-m] [-u] -b objset:object:level:start:end pool
|
||||||
@@ -134,18 +132,14 @@
|
|||||||
* The '-f' flag controls the frequency of errors injected, expressed as a
|
* The '-f' flag controls the frequency of errors injected, expressed as a
|
||||||
* real number percentage between 0.0001 and 100. The default is 100.
|
* real number percentage between 0.0001 and 100. The default is 100.
|
||||||
*
|
*
|
||||||
* The <object> form is responsible for actually injecting the handler into the
|
* The this form is responsible for actually injecting the handler into the
|
||||||
* framework. It takes the arguments described above, translates them to the
|
* framework. It takes the arguments described above, translates them to the
|
||||||
* internal tuple using libzpool, and then issues an ioctl() to register the
|
* internal tuple using libzpool, and then issues an ioctl() to register the
|
||||||
* handler.
|
* handler.
|
||||||
*
|
*
|
||||||
* The '-b' option can target a specific bookmark, regardless of whether a
|
* The final form can target a specific bookmark, regardless of whether a
|
||||||
* human-readable interface has been designed. It allows developers to specify
|
* human-readable interface has been designed. It allows developers to specify
|
||||||
* a particular block by number.
|
* a particular block by number.
|
||||||
*
|
|
||||||
* The '-E' option injects pipeline ready stage delays for the given object or
|
|
||||||
* bookmark. The delay is specified in milliseconds, and it supports I/O type
|
|
||||||
* and range filters.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -352,13 +346,6 @@ usage(void)
|
|||||||
"\t\tsuch that the operation takes a minimum of supplied seconds\n"
|
"\t\tsuch that the operation takes a minimum of supplied seconds\n"
|
||||||
"\t\tto complete.\n"
|
"\t\tto complete.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"\tzinject -E <delay> [-a] [-m] [-f freq] [-l level] [-r range]\n"
|
|
||||||
"\t\t[-T iotype] [-t type object | -b bookmark pool]\n"
|
|
||||||
"\n"
|
|
||||||
"\t\tInject pipeline ready stage delays for the given object path\n"
|
|
||||||
"\t\t(data or dnode) or raw bookmark. The delay is specified in\n"
|
|
||||||
"\t\tmilliseconds.\n"
|
|
||||||
"\n"
|
|
||||||
"\tzinject -I [-s <seconds> | -g <txgs>] pool\n"
|
"\tzinject -I [-s <seconds> | -g <txgs>] pool\n"
|
||||||
"\t\tCause the pool to stop writing blocks yet not\n"
|
"\t\tCause the pool to stop writing blocks yet not\n"
|
||||||
"\t\treport errors for a duration. Simulates buggy hardware\n"
|
"\t\treport errors for a duration. Simulates buggy hardware\n"
|
||||||
@@ -448,30 +435,26 @@ print_data_handler(int id, const char *pool, zinject_record_t *record,
|
|||||||
|
|
||||||
if (*count == 0) {
|
if (*count == 0) {
|
||||||
(void) printf("%3s %-15s %-6s %-6s %-8s %3s %-4s "
|
(void) printf("%3s %-15s %-6s %-6s %-8s %3s %-4s "
|
||||||
"%-15s %-6s %-15s\n", "ID", "POOL", "OBJSET", "OBJECT",
|
"%-15s\n", "ID", "POOL", "OBJSET", "OBJECT", "TYPE",
|
||||||
"TYPE", "LVL", "DVAs", "RANGE", "MATCH", "INJECT");
|
"LVL", "DVAs", "RANGE");
|
||||||
(void) printf("--- --------------- ------ "
|
(void) printf("--- --------------- ------ "
|
||||||
"------ -------- --- ---- --------------- "
|
"------ -------- --- ---- ---------------\n");
|
||||||
"------ ------\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*count += 1;
|
*count += 1;
|
||||||
|
|
||||||
char rangebuf[32];
|
(void) printf("%3d %-15s %-6llu %-6llu %-8s %-3d 0x%02x ",
|
||||||
if (record->zi_start == 0 && record->zi_end == -1ULL)
|
id, pool, (u_longlong_t)record->zi_objset,
|
||||||
snprintf(rangebuf, sizeof (rangebuf), "all");
|
|
||||||
else
|
|
||||||
snprintf(rangebuf, sizeof (rangebuf), "[%llu, %llu]",
|
|
||||||
(u_longlong_t)record->zi_start,
|
|
||||||
(u_longlong_t)record->zi_end);
|
|
||||||
|
|
||||||
|
|
||||||
(void) printf("%3d %-15s %-6llu %-6llu %-8s %-3d 0x%02x %-15s "
|
|
||||||
"%6" PRIu64 " %6" PRIu64 "\n", id, pool,
|
|
||||||
(u_longlong_t)record->zi_objset,
|
|
||||||
(u_longlong_t)record->zi_object, type_to_name(record->zi_type),
|
(u_longlong_t)record->zi_object, type_to_name(record->zi_type),
|
||||||
record->zi_level, record->zi_dvas, rangebuf,
|
record->zi_level, record->zi_dvas);
|
||||||
record->zi_match_count, record->zi_inject_count);
|
|
||||||
|
|
||||||
|
if (record->zi_start == 0 &&
|
||||||
|
record->zi_end == -1ULL)
|
||||||
|
(void) printf("all\n");
|
||||||
|
else
|
||||||
|
(void) printf("[%llu, %llu]\n", (u_longlong_t)record->zi_start,
|
||||||
|
(u_longlong_t)record->zi_end);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@@ -489,14 +472,11 @@ print_device_handler(int id, const char *pool, zinject_record_t *record,
|
|||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
if (*count == 0) {
|
if (*count == 0) {
|
||||||
(void) printf("%3s %-15s %-16s %-5s %-10s %-9s "
|
(void) printf("%3s %-15s %-16s %-5s %-10s %-9s\n",
|
||||||
"%-6s %-6s\n",
|
"ID", "POOL", "GUID", "TYPE", "ERROR", "FREQ");
|
||||||
"ID", "POOL", "GUID", "TYPE", "ERROR", "FREQ",
|
|
||||||
"MATCH", "INJECT");
|
|
||||||
(void) printf(
|
(void) printf(
|
||||||
"--- --------------- ---------------- "
|
"--- --------------- ---------------- "
|
||||||
"----- ---------- --------- "
|
"----- ---------- ---------\n");
|
||||||
"------ ------\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*count += 1;
|
*count += 1;
|
||||||
@@ -504,11 +484,9 @@ print_device_handler(int id, const char *pool, zinject_record_t *record,
|
|||||||
double freq = record->zi_freq == 0 ? 100.0f :
|
double freq = record->zi_freq == 0 ? 100.0f :
|
||||||
(((double)record->zi_freq) / ZI_PERCENTAGE_MAX) * 100.0f;
|
(((double)record->zi_freq) / ZI_PERCENTAGE_MAX) * 100.0f;
|
||||||
|
|
||||||
(void) printf("%3d %-15s %llx %-5s %-10s %8.4f%% "
|
(void) printf("%3d %-15s %llx %-5s %-10s %8.4f%%\n", id, pool,
|
||||||
"%6" PRIu64 " %6" PRIu64 "\n", id, pool,
|
(u_longlong_t)record->zi_guid, iotype_to_str(record->zi_iotype),
|
||||||
(u_longlong_t)record->zi_guid,
|
err_to_str(record->zi_error), freq);
|
||||||
iotype_to_str(record->zi_iotype), err_to_str(record->zi_error),
|
|
||||||
freq, record->zi_match_count, record->zi_inject_count);
|
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@@ -526,26 +504,18 @@ print_delay_handler(int id, const char *pool, zinject_record_t *record,
|
|||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
if (*count == 0) {
|
if (*count == 0) {
|
||||||
(void) printf("%3s %-15s %-16s %-10s %-5s %-9s "
|
(void) printf("%3s %-15s %-15s %-15s %s\n",
|
||||||
"%-6s %-6s\n",
|
"ID", "POOL", "DELAY (ms)", "LANES", "GUID");
|
||||||
"ID", "POOL", "GUID", "DELAY (ms)", "LANES", "FREQ",
|
(void) printf("--- --------------- --------------- "
|
||||||
"MATCH", "INJECT");
|
"--------------- ----------------\n");
|
||||||
(void) printf("--- --------------- ---------------- "
|
|
||||||
"---------- ----- --------- "
|
|
||||||
"------ ------\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*count += 1;
|
*count += 1;
|
||||||
|
|
||||||
double freq = record->zi_freq == 0 ? 100.0f :
|
(void) printf("%3d %-15s %-15llu %-15llu %llx\n", id, pool,
|
||||||
(((double)record->zi_freq) / ZI_PERCENTAGE_MAX) * 100.0f;
|
|
||||||
|
|
||||||
(void) printf("%3d %-15s %llx %10llu %5llu %8.4f%% "
|
|
||||||
"%6" PRIu64 " %6" PRIu64 "\n", id, pool,
|
|
||||||
(u_longlong_t)record->zi_guid,
|
|
||||||
(u_longlong_t)NSEC2MSEC(record->zi_timer),
|
(u_longlong_t)NSEC2MSEC(record->zi_timer),
|
||||||
(u_longlong_t)record->zi_nlanes,
|
(u_longlong_t)record->zi_nlanes,
|
||||||
freq, record->zi_match_count, record->zi_inject_count);
|
(u_longlong_t)record->zi_guid);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@@ -737,15 +707,12 @@ register_handler(const char *pool, int flags, zinject_record_t *record,
|
|||||||
if (quiet) {
|
if (quiet) {
|
||||||
(void) printf("%llu\n", (u_longlong_t)zc.zc_guid);
|
(void) printf("%llu\n", (u_longlong_t)zc.zc_guid);
|
||||||
} else {
|
} else {
|
||||||
boolean_t show_object = B_FALSE;
|
|
||||||
boolean_t show_iotype = B_FALSE;
|
|
||||||
(void) printf("Added handler %llu with the following "
|
(void) printf("Added handler %llu with the following "
|
||||||
"properties:\n", (u_longlong_t)zc.zc_guid);
|
"properties:\n", (u_longlong_t)zc.zc_guid);
|
||||||
(void) printf(" pool: %s\n", pool);
|
(void) printf(" pool: %s\n", pool);
|
||||||
if (record->zi_guid) {
|
if (record->zi_guid) {
|
||||||
(void) printf(" vdev: %llx\n",
|
(void) printf(" vdev: %llx\n",
|
||||||
(u_longlong_t)record->zi_guid);
|
(u_longlong_t)record->zi_guid);
|
||||||
show_iotype = B_TRUE;
|
|
||||||
} else if (record->zi_func[0] != '\0') {
|
} else if (record->zi_func[0] != '\0') {
|
||||||
(void) printf(" panic function: %s\n",
|
(void) printf(" panic function: %s\n",
|
||||||
record->zi_func);
|
record->zi_func);
|
||||||
@@ -758,18 +725,7 @@ register_handler(const char *pool, int flags, zinject_record_t *record,
|
|||||||
} else if (record->zi_timer > 0) {
|
} else if (record->zi_timer > 0) {
|
||||||
(void) printf(" timer: %lld ms\n",
|
(void) printf(" timer: %lld ms\n",
|
||||||
(u_longlong_t)NSEC2MSEC(record->zi_timer));
|
(u_longlong_t)NSEC2MSEC(record->zi_timer));
|
||||||
if (record->zi_cmd == ZINJECT_DELAY_READY) {
|
|
||||||
show_object = B_TRUE;
|
|
||||||
show_iotype = B_TRUE;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
show_object = B_TRUE;
|
|
||||||
}
|
|
||||||
if (show_iotype) {
|
|
||||||
(void) printf("iotype: %s\n",
|
|
||||||
iotype_to_str(record->zi_iotype));
|
|
||||||
}
|
|
||||||
if (show_object) {
|
|
||||||
(void) printf("objset: %llu\n",
|
(void) printf("objset: %llu\n",
|
||||||
(u_longlong_t)record->zi_objset);
|
(u_longlong_t)record->zi_objset);
|
||||||
(void) printf("object: %llu\n",
|
(void) printf("object: %llu\n",
|
||||||
@@ -937,7 +893,6 @@ main(int argc, char **argv)
|
|||||||
int ret;
|
int ret;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
uint32_t dvas = 0;
|
uint32_t dvas = 0;
|
||||||
hrtime_t ready_delay = -1;
|
|
||||||
|
|
||||||
if ((g_zfs = libzfs_init()) == NULL) {
|
if ((g_zfs = libzfs_init()) == NULL) {
|
||||||
(void) fprintf(stderr, "%s\n", libzfs_error_init(errno));
|
(void) fprintf(stderr, "%s\n", libzfs_error_init(errno));
|
||||||
@@ -968,7 +923,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while ((c = getopt(argc, argv,
|
while ((c = getopt(argc, argv,
|
||||||
":aA:b:C:d:D:E:f:Fg:qhIc:t:T:l:mr:s:e:uL:p:P:")) != -1) {
|
":aA:b:C:d:D:f:Fg:qhIc:t:T:l:mr:s:e:uL:p:P:")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'a':
|
case 'a':
|
||||||
flags |= ZINJECT_FLUSH_ARC;
|
flags |= ZINJECT_FLUSH_ARC;
|
||||||
@@ -1141,18 +1096,6 @@ main(int argc, char **argv)
|
|||||||
case 'u':
|
case 'u':
|
||||||
flags |= ZINJECT_UNLOAD_SPA;
|
flags |= ZINJECT_UNLOAD_SPA;
|
||||||
break;
|
break;
|
||||||
case 'E':
|
|
||||||
ready_delay = MSEC2NSEC(strtol(optarg, &end, 10));
|
|
||||||
if (ready_delay <= 0 || *end != '\0') {
|
|
||||||
(void) fprintf(stderr, "invalid delay '%s': "
|
|
||||||
"must be a positive duration\n", optarg);
|
|
||||||
usage();
|
|
||||||
libzfs_fini(g_zfs);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
record.zi_cmd = ZINJECT_DELAY_READY;
|
|
||||||
record.zi_timer = ready_delay;
|
|
||||||
break;
|
|
||||||
case 'L':
|
case 'L':
|
||||||
if ((label = name_to_type(optarg)) == TYPE_INVAL &&
|
if ((label = name_to_type(optarg)) == TYPE_INVAL &&
|
||||||
!LABEL_TYPE(type)) {
|
!LABEL_TYPE(type)) {
|
||||||
@@ -1190,7 +1133,7 @@ main(int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
||||||
level != 0 || record.zi_cmd != ZINJECT_UNINITIALIZED ||
|
level != 0 || record.zi_cmd != ZINJECT_UNINITIALIZED ||
|
||||||
record.zi_freq > 0 || dvas != 0 || ready_delay >= 0) {
|
record.zi_freq > 0 || dvas != 0) {
|
||||||
(void) fprintf(stderr, "cancel (-c) incompatible with "
|
(void) fprintf(stderr, "cancel (-c) incompatible with "
|
||||||
"any other options\n");
|
"any other options\n");
|
||||||
usage();
|
usage();
|
||||||
@@ -1226,7 +1169,7 @@ main(int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
||||||
level != 0 || record.zi_cmd != ZINJECT_UNINITIALIZED ||
|
level != 0 || record.zi_cmd != ZINJECT_UNINITIALIZED ||
|
||||||
dvas != 0 || ready_delay >= 0) {
|
dvas != 0) {
|
||||||
(void) fprintf(stderr, "device (-d) incompatible with "
|
(void) fprintf(stderr, "device (-d) incompatible with "
|
||||||
"data error injection\n");
|
"data error injection\n");
|
||||||
usage();
|
usage();
|
||||||
@@ -1316,23 +1259,13 @@ main(int argc, char **argv)
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (record.zi_cmd == ZINJECT_UNINITIALIZED) {
|
record.zi_cmd = ZINJECT_DATA_FAULT;
|
||||||
record.zi_cmd = ZINJECT_DATA_FAULT;
|
|
||||||
if (!error)
|
|
||||||
error = EIO;
|
|
||||||
} else if (error != 0) {
|
|
||||||
(void) fprintf(stderr, "error type -e incompatible "
|
|
||||||
"with delay injection\n");
|
|
||||||
libzfs_fini(g_zfs);
|
|
||||||
return (1);
|
|
||||||
} else {
|
|
||||||
record.zi_iotype = io_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (translate_raw(raw, &record) != 0) {
|
if (translate_raw(raw, &record) != 0) {
|
||||||
libzfs_fini(g_zfs);
|
libzfs_fini(g_zfs);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
if (!error)
|
||||||
|
error = EIO;
|
||||||
} else if (record.zi_cmd == ZINJECT_PANIC) {
|
} else if (record.zi_cmd == ZINJECT_PANIC) {
|
||||||
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
||||||
level != 0 || device != NULL || record.zi_freq > 0 ||
|
level != 0 || device != NULL || record.zi_freq > 0 ||
|
||||||
@@ -1460,13 +1393,6 @@ main(int argc, char **argv)
|
|||||||
record.zi_dvas = dvas;
|
record.zi_dvas = dvas;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (record.zi_cmd != ZINJECT_UNINITIALIZED && error != 0) {
|
|
||||||
(void) fprintf(stderr, "error type -e incompatible "
|
|
||||||
"with delay injection\n");
|
|
||||||
libzfs_fini(g_zfs);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error == EACCES) {
|
if (error == EACCES) {
|
||||||
if (type != TYPE_DATA) {
|
if (type != TYPE_DATA) {
|
||||||
(void) fprintf(stderr, "decryption errors "
|
(void) fprintf(stderr, "decryption errors "
|
||||||
@@ -1482,12 +1408,8 @@ main(int argc, char **argv)
|
|||||||
* not found.
|
* not found.
|
||||||
*/
|
*/
|
||||||
error = ECKSUM;
|
error = ECKSUM;
|
||||||
} else if (record.zi_cmd == ZINJECT_UNINITIALIZED) {
|
|
||||||
record.zi_cmd = ZINJECT_DATA_FAULT;
|
|
||||||
if (!error)
|
|
||||||
error = EIO;
|
|
||||||
} else {
|
} else {
|
||||||
record.zi_iotype = io_type;
|
record.zi_cmd = ZINJECT_DATA_FAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (translate_record(type, argv[0], range, level, &record, pool,
|
if (translate_record(type, argv[0], range, level, &record, pool,
|
||||||
@@ -1495,6 +1417,8 @@ main(int argc, char **argv)
|
|||||||
libzfs_fini(g_zfs);
|
libzfs_fini(g_zfs);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
if (!error)
|
||||||
|
error = EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -148,7 +148,6 @@ dist_zpoolcompat_DATA = \
|
|||||||
%D%/compatibility.d/openzfs-2.1-linux \
|
%D%/compatibility.d/openzfs-2.1-linux \
|
||||||
%D%/compatibility.d/openzfs-2.2 \
|
%D%/compatibility.d/openzfs-2.2 \
|
||||||
%D%/compatibility.d/openzfs-2.3 \
|
%D%/compatibility.d/openzfs-2.3 \
|
||||||
%D%/compatibility.d/openzfs-2.4 \
|
|
||||||
%D%/compatibility.d/openzfsonosx-1.7.0 \
|
%D%/compatibility.d/openzfsonosx-1.7.0 \
|
||||||
%D%/compatibility.d/openzfsonosx-1.8.1 \
|
%D%/compatibility.d/openzfsonosx-1.8.1 \
|
||||||
%D%/compatibility.d/openzfsonosx-1.9.3 \
|
%D%/compatibility.d/openzfsonosx-1.9.3 \
|
||||||
@@ -188,9 +187,7 @@ zpoolcompatlinks = \
|
|||||||
"openzfs-2.2 openzfs-2.2-linux" \
|
"openzfs-2.2 openzfs-2.2-linux" \
|
||||||
"openzfs-2.2 openzfs-2.2-freebsd" \
|
"openzfs-2.2 openzfs-2.2-freebsd" \
|
||||||
"openzfs-2.3 openzfs-2.3-linux" \
|
"openzfs-2.3 openzfs-2.3-linux" \
|
||||||
"openzfs-2.3 openzfs-2.3-freebsd" \
|
"openzfs-2.3 openzfs-2.3-freebsd"
|
||||||
"openzfs-2.4 openzfs-2.4-linux" \
|
|
||||||
"openzfs-2.4 openzfs-2.4-freebsd"
|
|
||||||
|
|
||||||
zpoolconfdir = $(sysconfdir)/zfs/zpool.d
|
zpoolconfdir = $(sysconfdir)/zfs/zpool.d
|
||||||
INSTALL_DATA_HOOKS += zpool-install-data-hook
|
INSTALL_DATA_HOOKS += zpool-install-data-hook
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
# Features supported by OpenZFS 2.4 on Linux and FreeBSD
|
|
||||||
allocation_classes
|
|
||||||
async_destroy
|
|
||||||
blake3
|
|
||||||
block_cloning
|
|
||||||
block_cloning_endian
|
|
||||||
bookmark_v2
|
|
||||||
bookmark_written
|
|
||||||
bookmarks
|
|
||||||
device_rebuild
|
|
||||||
device_removal
|
|
||||||
draid
|
|
||||||
dynamic_gang_header
|
|
||||||
edonr
|
|
||||||
embedded_data
|
|
||||||
empty_bpobj
|
|
||||||
enabled_txg
|
|
||||||
encryption
|
|
||||||
extensible_dataset
|
|
||||||
fast_dedup
|
|
||||||
filesystem_limits
|
|
||||||
head_errlog
|
|
||||||
hole_birth
|
|
||||||
large_blocks
|
|
||||||
large_dnode
|
|
||||||
large_microzap
|
|
||||||
livelist
|
|
||||||
log_spacemap
|
|
||||||
longname
|
|
||||||
lz4_compress
|
|
||||||
multi_vdev_crash_dump
|
|
||||||
obsolete_counts
|
|
||||||
physical_rewrite
|
|
||||||
project_quota
|
|
||||||
raidz_expansion
|
|
||||||
redacted_datasets
|
|
||||||
redaction_bookmarks
|
|
||||||
redaction_list_spill
|
|
||||||
resilver_defer
|
|
||||||
sha512
|
|
||||||
skein
|
|
||||||
spacemap_histogram
|
|
||||||
spacemap_v2
|
|
||||||
userobj_accounting
|
|
||||||
vdev_zaps_v2
|
|
||||||
zilsaxattr
|
|
||||||
zpool_checkpoint
|
|
||||||
zstd_compress
|
|
||||||
+37
-86
@@ -26,7 +26,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>.
|
* Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>.
|
||||||
* Copyright (c) 2025, Klara, Inc.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
@@ -53,7 +52,7 @@
|
|||||||
typedef struct zpool_node {
|
typedef struct zpool_node {
|
||||||
zpool_handle_t *zn_handle;
|
zpool_handle_t *zn_handle;
|
||||||
uu_avl_node_t zn_avlnode;
|
uu_avl_node_t zn_avlnode;
|
||||||
hrtime_t zn_last_refresh;
|
int zn_mark;
|
||||||
} zpool_node_t;
|
} zpool_node_t;
|
||||||
|
|
||||||
struct zpool_list {
|
struct zpool_list {
|
||||||
@@ -63,7 +62,6 @@ struct zpool_list {
|
|||||||
uu_avl_pool_t *zl_pool;
|
uu_avl_pool_t *zl_pool;
|
||||||
zprop_list_t **zl_proplist;
|
zprop_list_t **zl_proplist;
|
||||||
zfs_type_t zl_type;
|
zfs_type_t zl_type;
|
||||||
hrtime_t zl_last_refresh;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -83,48 +81,32 @@ zpool_compare(const void *larg, const void *rarg, void *unused)
|
|||||||
* of known pools.
|
* of known pools.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
add_pool(zpool_handle_t *zhp, zpool_list_t *zlp)
|
add_pool(zpool_handle_t *zhp, void *data)
|
||||||
{
|
{
|
||||||
zpool_node_t *node, *new = safe_malloc(sizeof (zpool_node_t));
|
zpool_list_t *zlp = data;
|
||||||
|
zpool_node_t *node = safe_malloc(sizeof (zpool_node_t));
|
||||||
uu_avl_index_t idx;
|
uu_avl_index_t idx;
|
||||||
|
|
||||||
new->zn_handle = zhp;
|
node->zn_handle = zhp;
|
||||||
uu_avl_node_init(new, &new->zn_avlnode, zlp->zl_pool);
|
uu_avl_node_init(node, &node->zn_avlnode, zlp->zl_pool);
|
||||||
|
if (uu_avl_find(zlp->zl_avl, node, NULL, &idx) == NULL) {
|
||||||
node = uu_avl_find(zlp->zl_avl, new, NULL, &idx);
|
|
||||||
if (node == NULL) {
|
|
||||||
if (zlp->zl_proplist &&
|
if (zlp->zl_proplist &&
|
||||||
zpool_expand_proplist(zhp, zlp->zl_proplist,
|
zpool_expand_proplist(zhp, zlp->zl_proplist,
|
||||||
zlp->zl_type, zlp->zl_literal) != 0) {
|
zlp->zl_type, zlp->zl_literal) != 0) {
|
||||||
zpool_close(zhp);
|
zpool_close(zhp);
|
||||||
free(new);
|
free(node);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
new->zn_last_refresh = zlp->zl_last_refresh;
|
uu_avl_insert(zlp->zl_avl, node, idx);
|
||||||
uu_avl_insert(zlp->zl_avl, new, idx);
|
|
||||||
} else {
|
} else {
|
||||||
zpool_refresh_stats_from_handle(node->zn_handle, zhp);
|
|
||||||
node->zn_last_refresh = zlp->zl_last_refresh;
|
|
||||||
zpool_close(zhp);
|
zpool_close(zhp);
|
||||||
free(new);
|
free(node);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* add_pool(), but always returns 0. This allows zpool_iter() to continue
|
|
||||||
* even if a pool exists in the tree, or we fail to get the properties for
|
|
||||||
* a new one.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
add_pool_cb(zpool_handle_t *zhp, void *data)
|
|
||||||
{
|
|
||||||
(void) add_pool(zhp, data);
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a list of pools based on the given arguments. If we're given no
|
* Create a list of pools based on the given arguments. If we're given no
|
||||||
* arguments, then iterate over all pools in the system and add them to the AVL
|
* arguments, then iterate over all pools in the system and add them to the AVL
|
||||||
@@ -153,10 +135,9 @@ pool_list_get(int argc, char **argv, zprop_list_t **proplist, zfs_type_t type,
|
|||||||
zlp->zl_type = type;
|
zlp->zl_type = type;
|
||||||
|
|
||||||
zlp->zl_literal = literal;
|
zlp->zl_literal = literal;
|
||||||
zlp->zl_last_refresh = gethrtime();
|
|
||||||
|
|
||||||
if (argc == 0) {
|
if (argc == 0) {
|
||||||
(void) zpool_iter(g_zfs, add_pool_cb, zlp);
|
(void) zpool_iter(g_zfs, add_pool, zlp);
|
||||||
zlp->zl_findall = B_TRUE;
|
zlp->zl_findall = B_TRUE;
|
||||||
} else {
|
} else {
|
||||||
int i;
|
int i;
|
||||||
@@ -178,61 +159,15 @@ pool_list_get(int argc, char **argv, zprop_list_t **proplist, zfs_type_t type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Refresh the state of all pools on the list. Additionally, if no options were
|
* Search for any new pools, adding them to the list. We only add pools when no
|
||||||
* given on the command line, add any new pools and remove any that are no
|
* options were given on the command line. Otherwise, we keep the list fixed as
|
||||||
* longer available.
|
* those that were explicitly specified.
|
||||||
*/
|
*/
|
||||||
int
|
void
|
||||||
pool_list_refresh(zpool_list_t *zlp)
|
pool_list_update(zpool_list_t *zlp)
|
||||||
{
|
{
|
||||||
zlp->zl_last_refresh = gethrtime();
|
if (zlp->zl_findall)
|
||||||
|
(void) zpool_iter(g_zfs, add_pool, zlp);
|
||||||
if (!zlp->zl_findall) {
|
|
||||||
/*
|
|
||||||
* This list is a fixed list of pools, so we must not add
|
|
||||||
* or remove any. Just walk over them and refresh their
|
|
||||||
* state.
|
|
||||||
*/
|
|
||||||
int navail = 0;
|
|
||||||
for (zpool_node_t *node = uu_avl_first(zlp->zl_avl);
|
|
||||||
node != NULL; node = uu_avl_next(zlp->zl_avl, node)) {
|
|
||||||
boolean_t missing;
|
|
||||||
zpool_refresh_stats(node->zn_handle, &missing);
|
|
||||||
navail += !missing;
|
|
||||||
node->zn_last_refresh = zlp->zl_last_refresh;
|
|
||||||
}
|
|
||||||
return (navail);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Search for any new pools and add them to the list. */
|
|
||||||
(void) zpool_iter(g_zfs, add_pool_cb, zlp);
|
|
||||||
|
|
||||||
/* Walk the list of existing pools, and update or remove them. */
|
|
||||||
zpool_node_t *node, *next;
|
|
||||||
for (node = uu_avl_first(zlp->zl_avl); node != NULL; node = next) {
|
|
||||||
next = uu_avl_next(zlp->zl_avl, node);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Skip any that were refreshed and are online; they were added
|
|
||||||
* by zpool_iter() and are already up to date.
|
|
||||||
*/
|
|
||||||
if (node->zn_last_refresh == zlp->zl_last_refresh &&
|
|
||||||
zpool_get_state(node->zn_handle) != POOL_STATE_UNAVAIL)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* Refresh and remove if necessary. */
|
|
||||||
boolean_t missing;
|
|
||||||
zpool_refresh_stats(node->zn_handle, &missing);
|
|
||||||
if (missing) {
|
|
||||||
uu_avl_remove(zlp->zl_avl, node);
|
|
||||||
zpool_close(node->zn_handle);
|
|
||||||
free(node);
|
|
||||||
} else {
|
|
||||||
node->zn_last_refresh = zlp->zl_last_refresh;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (uu_avl_numnodes(zlp->zl_avl));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -255,6 +190,23 @@ pool_list_iter(zpool_list_t *zlp, int unavail, zpool_iter_f func,
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove the given pool from the list. When running iostat, we want to remove
|
||||||
|
* those pools that no longer exist.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
pool_list_remove(zpool_list_t *zlp, zpool_handle_t *zhp)
|
||||||
|
{
|
||||||
|
zpool_node_t search, *node;
|
||||||
|
|
||||||
|
search.zn_handle = zhp;
|
||||||
|
if ((node = uu_avl_find(zlp->zl_avl, &search, NULL, NULL)) != NULL) {
|
||||||
|
uu_avl_remove(zlp->zl_avl, node);
|
||||||
|
zpool_close(node->zn_handle);
|
||||||
|
free(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Free all the handles associated with this list.
|
* Free all the handles associated with this list.
|
||||||
*/
|
*/
|
||||||
@@ -427,8 +379,8 @@ process_unique_cmd_columns(vdev_cmd_data_list_t *vcdl)
|
|||||||
static int
|
static int
|
||||||
vdev_process_cmd_output(vdev_cmd_data_t *data, char *line)
|
vdev_process_cmd_output(vdev_cmd_data_t *data, char *line)
|
||||||
{
|
{
|
||||||
char *col;
|
char *col = NULL;
|
||||||
char *val;
|
char *val = line;
|
||||||
char *equals;
|
char *equals;
|
||||||
char **tmp;
|
char **tmp;
|
||||||
|
|
||||||
@@ -445,7 +397,6 @@ vdev_process_cmd_output(vdev_cmd_data_t *data, char *line)
|
|||||||
col = line;
|
col = line;
|
||||||
val = equals + 1;
|
val = equals + 1;
|
||||||
} else {
|
} else {
|
||||||
col = NULL;
|
|
||||||
val = line;
|
val = line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+382
-514
File diff suppressed because it is too large
Load Diff
@@ -76,10 +76,11 @@ typedef struct zpool_list zpool_list_t;
|
|||||||
|
|
||||||
zpool_list_t *pool_list_get(int, char **, zprop_list_t **, zfs_type_t,
|
zpool_list_t *pool_list_get(int, char **, zprop_list_t **, zfs_type_t,
|
||||||
boolean_t, int *);
|
boolean_t, int *);
|
||||||
int pool_list_refresh(zpool_list_t *);
|
void pool_list_update(zpool_list_t *);
|
||||||
int pool_list_iter(zpool_list_t *, int unavail, zpool_iter_f, void *);
|
int pool_list_iter(zpool_list_t *, int unavail, zpool_iter_f, void *);
|
||||||
void pool_list_free(zpool_list_t *);
|
void pool_list_free(zpool_list_t *);
|
||||||
int pool_list_count(zpool_list_t *);
|
int pool_list_count(zpool_list_t *);
|
||||||
|
void pool_list_remove(zpool_list_t *, zpool_handle_t *);
|
||||||
|
|
||||||
extern libzfs_handle_t *g_zfs;
|
extern libzfs_handle_t *g_zfs;
|
||||||
|
|
||||||
|
|||||||
+52
-70
@@ -195,7 +195,7 @@ is_shorthand_path(const char *arg, char *path, size_t path_size,
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) strlcpy(path, arg, path_size);
|
strlcpy(path, arg, path_size);
|
||||||
memset(statbuf, 0, sizeof (*statbuf));
|
memset(statbuf, 0, sizeof (*statbuf));
|
||||||
*wholedisk = B_FALSE;
|
*wholedisk = B_FALSE;
|
||||||
|
|
||||||
@@ -270,13 +270,14 @@ is_spare(nvlist_t *config, const char *path)
|
|||||||
* draid* Virtual dRAID spare
|
* draid* Virtual dRAID spare
|
||||||
*/
|
*/
|
||||||
static nvlist_t *
|
static nvlist_t *
|
||||||
make_leaf_vdev(const char *arg, boolean_t is_primary, uint64_t ashift)
|
make_leaf_vdev(nvlist_t *props, const char *arg, boolean_t is_primary)
|
||||||
{
|
{
|
||||||
char path[MAXPATHLEN];
|
char path[MAXPATHLEN];
|
||||||
struct stat64 statbuf;
|
struct stat64 statbuf;
|
||||||
nvlist_t *vdev = NULL;
|
nvlist_t *vdev = NULL;
|
||||||
const char *type = NULL;
|
const char *type = NULL;
|
||||||
boolean_t wholedisk = B_FALSE;
|
boolean_t wholedisk = B_FALSE;
|
||||||
|
uint64_t ashift = 0;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -308,7 +309,7 @@ make_leaf_vdev(const char *arg, boolean_t is_primary, uint64_t ashift)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* After whole disk check restore original passed path */
|
/* After whole disk check restore original passed path */
|
||||||
(void) strlcpy(path, arg, sizeof (path));
|
strlcpy(path, arg, sizeof (path));
|
||||||
} else if (zpool_is_draid_spare(arg)) {
|
} else if (zpool_is_draid_spare(arg)) {
|
||||||
if (!is_primary) {
|
if (!is_primary) {
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
@@ -318,7 +319,7 @@ make_leaf_vdev(const char *arg, boolean_t is_primary, uint64_t ashift)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wholedisk = B_TRUE;
|
wholedisk = B_TRUE;
|
||||||
(void) strlcpy(path, arg, sizeof (path));
|
strlcpy(path, arg, sizeof (path));
|
||||||
type = VDEV_TYPE_DRAID_SPARE;
|
type = VDEV_TYPE_DRAID_SPARE;
|
||||||
} else {
|
} else {
|
||||||
err = is_shorthand_path(arg, path, sizeof (path),
|
err = is_shorthand_path(arg, path, sizeof (path),
|
||||||
@@ -380,6 +381,31 @@ make_leaf_vdev(const char *arg, boolean_t is_primary, uint64_t ashift)
|
|||||||
verify(nvlist_add_uint64(vdev, ZPOOL_CONFIG_WHOLE_DISK,
|
verify(nvlist_add_uint64(vdev, ZPOOL_CONFIG_WHOLE_DISK,
|
||||||
(uint64_t)wholedisk) == 0);
|
(uint64_t)wholedisk) == 0);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Override defaults if custom properties are provided.
|
||||||
|
*/
|
||||||
|
if (props != NULL) {
|
||||||
|
const char *value = NULL;
|
||||||
|
|
||||||
|
if (nvlist_lookup_string(props,
|
||||||
|
zpool_prop_to_name(ZPOOL_PROP_ASHIFT), &value) == 0) {
|
||||||
|
if (zfs_nicestrtonum(NULL, value, &ashift) != 0) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
gettext("ashift must be a number.\n"));
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
if (ashift != 0 &&
|
||||||
|
(ashift < ASHIFT_MIN || ashift > ASHIFT_MAX)) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
gettext("invalid 'ashift=%" PRIu64 "' "
|
||||||
|
"property: only values between %" PRId32 " "
|
||||||
|
"and %" PRId32 " are allowed.\n"),
|
||||||
|
ashift, ASHIFT_MIN, ASHIFT_MAX);
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the device is known to incorrectly report its physical sector
|
* If the device is known to incorrectly report its physical sector
|
||||||
* size explicitly provide the known correct value.
|
* size explicitly provide the known correct value.
|
||||||
@@ -548,6 +574,7 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
|
|||||||
nvlist_t *cnv = child[c];
|
nvlist_t *cnv = child[c];
|
||||||
const char *path;
|
const char *path;
|
||||||
struct stat64 statbuf;
|
struct stat64 statbuf;
|
||||||
|
int64_t size = -1LL;
|
||||||
const char *childtype;
|
const char *childtype;
|
||||||
int fd, err;
|
int fd, err;
|
||||||
|
|
||||||
@@ -582,29 +609,23 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
|
|||||||
verify(nvlist_lookup_string(cnv,
|
verify(nvlist_lookup_string(cnv,
|
||||||
ZPOOL_CONFIG_PATH, &path) == 0);
|
ZPOOL_CONFIG_PATH, &path) == 0);
|
||||||
|
|
||||||
/*
|
|
||||||
* Skip active spares they should never cause
|
|
||||||
* the pool to be evaluated as inconsistent.
|
|
||||||
*/
|
|
||||||
if (is_spare(NULL, path))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we have a raidz/mirror that combines disks
|
* If we have a raidz/mirror that combines disks
|
||||||
* with files, only report it as an error when
|
* with files, report it as an error.
|
||||||
* fatal is set to ensure all the replication
|
|
||||||
* checks aren't skipped in check_replication().
|
|
||||||
*/
|
*/
|
||||||
if (fatal && !dontreport && type != NULL &&
|
if (!dontreport && type != NULL &&
|
||||||
strcmp(type, childtype) != 0) {
|
strcmp(type, childtype) != 0) {
|
||||||
if (ret != NULL)
|
if (ret != NULL)
|
||||||
free(ret);
|
free(ret);
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
vdev_error(gettext(
|
if (fatal)
|
||||||
"mismatched replication "
|
vdev_error(gettext(
|
||||||
"level: %s contains both "
|
"mismatched replication "
|
||||||
"files and devices\n"),
|
"level: %s contains both "
|
||||||
rep.zprl_type);
|
"files and devices\n"),
|
||||||
|
rep.zprl_type);
|
||||||
|
else
|
||||||
|
return (NULL);
|
||||||
dontreport = B_TRUE;
|
dontreport = B_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -635,7 +656,7 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
|
|||||||
statbuf.st_size == MAXOFFSET_T)
|
statbuf.st_size == MAXOFFSET_T)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int64_t size = statbuf.st_size;
|
size = statbuf.st_size;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Also make sure that devices and
|
* Also make sure that devices and
|
||||||
@@ -855,18 +876,6 @@ check_replication(nvlist_t *config, nvlist_t *newroot)
|
|||||||
(u_longlong_t)mirror->zprl_children);
|
(u_longlong_t)mirror->zprl_children);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
} else if (is_raidz_draid(current, new)) {
|
|
||||||
if (current->zprl_parity != new->zprl_parity) {
|
|
||||||
vdev_error(gettext(
|
|
||||||
"mismatched replication level: pool and "
|
|
||||||
"new vdev with different redundancy, %s "
|
|
||||||
"and %s vdevs, %llu vs. %llu\n"),
|
|
||||||
current->zprl_type,
|
|
||||||
new->zprl_type,
|
|
||||||
(u_longlong_t)current->zprl_parity,
|
|
||||||
(u_longlong_t)new->zprl_parity);
|
|
||||||
ret = -1;
|
|
||||||
}
|
|
||||||
} else if (strcmp(current->zprl_type, new->zprl_type) != 0) {
|
} else if (strcmp(current->zprl_type, new->zprl_type) != 0) {
|
||||||
vdev_error(gettext(
|
vdev_error(gettext(
|
||||||
"mismatched replication level: pool uses %s "
|
"mismatched replication level: pool uses %s "
|
||||||
@@ -1010,7 +1019,7 @@ make_disks(zpool_handle_t *zhp, nvlist_t *nv, boolean_t replacing)
|
|||||||
* window between when udev deletes and recreates the link
|
* window between when udev deletes and recreates the link
|
||||||
* during which access attempts will fail with ENOENT.
|
* during which access attempts will fail with ENOENT.
|
||||||
*/
|
*/
|
||||||
(void) strlcpy(udevpath, path, MAXPATHLEN);
|
strlcpy(udevpath, path, MAXPATHLEN);
|
||||||
(void) zfs_append_partition(udevpath, MAXPATHLEN);
|
(void) zfs_append_partition(udevpath, MAXPATHLEN);
|
||||||
|
|
||||||
fd = open(devpath, O_RDWR|O_EXCL);
|
fd = open(devpath, O_RDWR|O_EXCL);
|
||||||
@@ -1344,7 +1353,7 @@ is_grouping(const char *type, int *mindev, int *maxdev)
|
|||||||
static int
|
static int
|
||||||
draid_config_by_type(nvlist_t *nv, const char *type, uint64_t children)
|
draid_config_by_type(nvlist_t *nv, const char *type, uint64_t children)
|
||||||
{
|
{
|
||||||
uint64_t nparity;
|
uint64_t nparity = 1;
|
||||||
uint64_t nspares = 0;
|
uint64_t nspares = 0;
|
||||||
uint64_t ndata = UINT64_MAX;
|
uint64_t ndata = UINT64_MAX;
|
||||||
uint64_t ngroups = 1;
|
uint64_t ngroups = 1;
|
||||||
@@ -1487,29 +1496,6 @@ construct_spec(nvlist_t *props, int argc, char **argv)
|
|||||||
const char *type, *fulltype;
|
const char *type, *fulltype;
|
||||||
boolean_t is_log, is_special, is_dedup, is_spare;
|
boolean_t is_log, is_special, is_dedup, is_spare;
|
||||||
boolean_t seen_logs;
|
boolean_t seen_logs;
|
||||||
uint64_t ashift = 0;
|
|
||||||
|
|
||||||
if (props != NULL) {
|
|
||||||
const char *value = NULL;
|
|
||||||
|
|
||||||
if (nvlist_lookup_string(props,
|
|
||||||
zpool_prop_to_name(ZPOOL_PROP_ASHIFT), &value) == 0) {
|
|
||||||
if (zfs_nicestrtonum(NULL, value, &ashift) != 0) {
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
gettext("ashift must be a number.\n"));
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
if (ashift != 0 &&
|
|
||||||
(ashift < ASHIFT_MIN || ashift > ASHIFT_MAX)) {
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
gettext("invalid 'ashift=%" PRIu64 "' "
|
|
||||||
"property: only values between %" PRId32 " "
|
|
||||||
"and %" PRId32 " are allowed.\n"),
|
|
||||||
ashift, ASHIFT_MIN, ASHIFT_MAX);
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
top = NULL;
|
top = NULL;
|
||||||
toplevels = 0;
|
toplevels = 0;
|
||||||
@@ -1595,12 +1581,13 @@ construct_spec(nvlist_t *props, int argc, char **argv)
|
|||||||
is_dedup = is_spare = B_FALSE;
|
is_dedup = is_spare = B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_log) {
|
if (is_log || is_special || is_dedup) {
|
||||||
if (strcmp(type, VDEV_TYPE_MIRROR) != 0) {
|
if (strcmp(type, VDEV_TYPE_MIRROR) != 0) {
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
gettext("invalid vdev "
|
gettext("invalid vdev "
|
||||||
"specification: unsupported 'log' "
|
"specification: unsupported '%s' "
|
||||||
"device: %s\n"), type);
|
"device: %s\n"), is_log ? "log" :
|
||||||
|
"special", type);
|
||||||
goto spec_out;
|
goto spec_out;
|
||||||
}
|
}
|
||||||
nlogs++;
|
nlogs++;
|
||||||
@@ -1615,9 +1602,9 @@ construct_spec(nvlist_t *props, int argc, char **argv)
|
|||||||
children * sizeof (nvlist_t *));
|
children * sizeof (nvlist_t *));
|
||||||
if (child == NULL)
|
if (child == NULL)
|
||||||
zpool_no_memory();
|
zpool_no_memory();
|
||||||
if ((nv = make_leaf_vdev(argv[c],
|
if ((nv = make_leaf_vdev(props, argv[c],
|
||||||
!(is_log || is_special || is_dedup ||
|
!(is_log || is_special || is_dedup ||
|
||||||
is_spare), ashift)) == NULL) {
|
is_spare))) == NULL) {
|
||||||
for (c = 0; c < children - 1; c++)
|
for (c = 0; c < children - 1; c++)
|
||||||
nvlist_free(child[c]);
|
nvlist_free(child[c]);
|
||||||
free(child);
|
free(child);
|
||||||
@@ -1681,10 +1668,6 @@ construct_spec(nvlist_t *props, int argc, char **argv)
|
|||||||
ZPOOL_CONFIG_ALLOCATION_BIAS,
|
ZPOOL_CONFIG_ALLOCATION_BIAS,
|
||||||
VDEV_ALLOC_BIAS_DEDUP) == 0);
|
VDEV_ALLOC_BIAS_DEDUP) == 0);
|
||||||
}
|
}
|
||||||
if (ashift > 0) {
|
|
||||||
fnvlist_add_uint64(nv,
|
|
||||||
ZPOOL_CONFIG_ASHIFT, ashift);
|
|
||||||
}
|
|
||||||
if (strcmp(type, VDEV_TYPE_RAIDZ) == 0) {
|
if (strcmp(type, VDEV_TYPE_RAIDZ) == 0) {
|
||||||
verify(nvlist_add_uint64(nv,
|
verify(nvlist_add_uint64(nv,
|
||||||
ZPOOL_CONFIG_NPARITY,
|
ZPOOL_CONFIG_NPARITY,
|
||||||
@@ -1712,9 +1695,8 @@ construct_spec(nvlist_t *props, int argc, char **argv)
|
|||||||
* We have a device. Pass off to make_leaf_vdev() to
|
* We have a device. Pass off to make_leaf_vdev() to
|
||||||
* construct the appropriate nvlist describing the vdev.
|
* construct the appropriate nvlist describing the vdev.
|
||||||
*/
|
*/
|
||||||
if ((nv = make_leaf_vdev(argv[0], !(is_log ||
|
if ((nv = make_leaf_vdev(props, argv[0], !(is_log ||
|
||||||
is_special || is_dedup || is_spare),
|
is_special || is_dedup || is_spare))) == NULL)
|
||||||
ashift)) == NULL)
|
|
||||||
goto spec_out;
|
goto spec_out;
|
||||||
|
|
||||||
verify(nvlist_add_uint64(nv,
|
verify(nvlist_add_uint64(nv,
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ zstream_LDADD = \
|
|||||||
libzpool.la \
|
libzpool.la \
|
||||||
libnvpair.la
|
libnvpair.la
|
||||||
|
|
||||||
cmd-zstream-install-exec-hook:
|
PHONY += install-exec-hook
|
||||||
|
install-exec-hook:
|
||||||
cd $(DESTDIR)$(sbindir) && $(LN_S) -f zstream zstreamdump
|
cd $(DESTDIR)$(sbindir) && $(LN_S) -f zstream zstreamdump
|
||||||
|
|
||||||
INSTALL_EXEC_HOOKS += cmd-zstream-install-exec-hook
|
|
||||||
|
|||||||
+73
-85
@@ -273,6 +273,7 @@ extern int zfs_compressed_arc_enabled;
|
|||||||
extern int zfs_abd_scatter_enabled;
|
extern int zfs_abd_scatter_enabled;
|
||||||
extern uint_t dmu_object_alloc_chunk_shift;
|
extern uint_t dmu_object_alloc_chunk_shift;
|
||||||
extern boolean_t zfs_force_some_double_word_sm_entries;
|
extern boolean_t zfs_force_some_double_word_sm_entries;
|
||||||
|
extern unsigned long zio_decompress_fail_fraction;
|
||||||
extern unsigned long zfs_reconstruct_indirect_damage_fraction;
|
extern unsigned long zfs_reconstruct_indirect_damage_fraction;
|
||||||
extern uint64_t raidz_expand_max_reflow_bytes;
|
extern uint64_t raidz_expand_max_reflow_bytes;
|
||||||
extern uint_t raidz_expand_pause_point;
|
extern uint_t raidz_expand_pause_point;
|
||||||
@@ -808,8 +809,8 @@ static ztest_option_t option_table[] = {
|
|||||||
{ 'X', "raidz-expansion", NULL,
|
{ 'X', "raidz-expansion", NULL,
|
||||||
"Perform a dedicated raidz expansion test",
|
"Perform a dedicated raidz expansion test",
|
||||||
NO_DEFAULT, NULL},
|
NO_DEFAULT, NULL},
|
||||||
{ 'o', "option", "\"NAME=VALUE\"",
|
{ 'o', "option", "\"OPTION=INTEGER\"",
|
||||||
"Set the named tunable to the given value",
|
"Set global variable to an unsigned 32-bit integer value",
|
||||||
NO_DEFAULT, NULL},
|
NO_DEFAULT, NULL},
|
||||||
{ 'G', "dump-debug-msg", NULL,
|
{ 'G', "dump-debug-msg", NULL,
|
||||||
"Dump zfs_dbgmsg buffer before exiting due to an error",
|
"Dump zfs_dbgmsg buffer before exiting due to an error",
|
||||||
@@ -828,8 +829,8 @@ static char *short_opts = NULL;
|
|||||||
static void
|
static void
|
||||||
init_options(void)
|
init_options(void)
|
||||||
{
|
{
|
||||||
ASSERT0P(long_opts);
|
ASSERT3P(long_opts, ==, NULL);
|
||||||
ASSERT0P(short_opts);
|
ASSERT3P(short_opts, ==, NULL);
|
||||||
|
|
||||||
int count = sizeof (option_table) / sizeof (option_table[0]);
|
int count = sizeof (option_table) / sizeof (option_table[0]);
|
||||||
long_opts = umem_alloc(sizeof (struct option) * count, UMEM_NOFAIL);
|
long_opts = umem_alloc(sizeof (struct option) * count, UMEM_NOFAIL);
|
||||||
@@ -918,7 +919,7 @@ ztest_parse_name_value(const char *input, ztest_shared_opts_t *zo)
|
|||||||
{
|
{
|
||||||
char name[32];
|
char name[32];
|
||||||
char *value;
|
char *value;
|
||||||
int state;
|
int state = ZTEST_VDEV_CLASS_RND;
|
||||||
|
|
||||||
(void) strlcpy(name, input, sizeof (name));
|
(void) strlcpy(name, input, sizeof (name));
|
||||||
|
|
||||||
@@ -1228,10 +1229,10 @@ ztest_kill(ztest_shared_t *zs)
|
|||||||
* See comment above spa_write_cachefile().
|
* See comment above spa_write_cachefile().
|
||||||
*/
|
*/
|
||||||
if (raidz_expand_pause_point != RAIDZ_EXPAND_PAUSE_NONE) {
|
if (raidz_expand_pause_point != RAIDZ_EXPAND_PAUSE_NONE) {
|
||||||
if (spa_namespace_tryenter(FTAG)) {
|
if (mutex_tryenter(&spa_namespace_lock)) {
|
||||||
spa_write_cachefile(ztest_spa, B_FALSE, B_FALSE,
|
spa_write_cachefile(ztest_spa, B_FALSE, B_FALSE,
|
||||||
B_FALSE);
|
B_FALSE);
|
||||||
spa_namespace_exit(FTAG);
|
mutex_exit(&spa_namespace_lock);
|
||||||
|
|
||||||
ztest_scratch_state->zs_raidz_scratch_verify_pause =
|
ztest_scratch_state->zs_raidz_scratch_verify_pause =
|
||||||
raidz_expand_pause_point;
|
raidz_expand_pause_point;
|
||||||
@@ -1246,9 +1247,9 @@ ztest_kill(ztest_shared_t *zs)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
spa_namespace_enter(FTAG);
|
mutex_enter(&spa_namespace_lock);
|
||||||
spa_write_cachefile(ztest_spa, B_FALSE, B_FALSE, B_FALSE);
|
spa_write_cachefile(ztest_spa, B_FALSE, B_FALSE, B_FALSE);
|
||||||
spa_namespace_exit(FTAG);
|
mutex_exit(&spa_namespace_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) raise(SIGKILL);
|
(void) raise(SIGKILL);
|
||||||
@@ -1685,7 +1686,7 @@ ztest_rll_init(rll_t *rll)
|
|||||||
static void
|
static void
|
||||||
ztest_rll_destroy(rll_t *rll)
|
ztest_rll_destroy(rll_t *rll)
|
||||||
{
|
{
|
||||||
ASSERT0P(rll->rll_writer);
|
ASSERT3P(rll->rll_writer, ==, NULL);
|
||||||
ASSERT0(rll->rll_readers);
|
ASSERT0(rll->rll_readers);
|
||||||
mutex_destroy(&rll->rll_lock);
|
mutex_destroy(&rll->rll_lock);
|
||||||
cv_destroy(&rll->rll_cv);
|
cv_destroy(&rll->rll_cv);
|
||||||
@@ -1719,7 +1720,7 @@ ztest_rll_unlock(rll_t *rll)
|
|||||||
rll->rll_writer = NULL;
|
rll->rll_writer = NULL;
|
||||||
} else {
|
} else {
|
||||||
ASSERT3S(rll->rll_readers, >, 0);
|
ASSERT3S(rll->rll_readers, >, 0);
|
||||||
ASSERT0P(rll->rll_writer);
|
ASSERT3P(rll->rll_writer, ==, NULL);
|
||||||
rll->rll_readers--;
|
rll->rll_readers--;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1815,7 +1816,7 @@ ztest_zd_fini(ztest_ds_t *zd)
|
|||||||
(ztest_random(10) == 0 ? DMU_TX_NOWAIT : DMU_TX_WAIT)
|
(ztest_random(10) == 0 ? DMU_TX_NOWAIT : DMU_TX_WAIT)
|
||||||
|
|
||||||
static uint64_t
|
static uint64_t
|
||||||
ztest_tx_assign(dmu_tx_t *tx, dmu_tx_flag_t txg_how, const char *tag)
|
ztest_tx_assign(dmu_tx_t *tx, uint64_t txg_how, const char *tag)
|
||||||
{
|
{
|
||||||
uint64_t txg;
|
uint64_t txg;
|
||||||
int error;
|
int error;
|
||||||
@@ -1828,10 +1829,9 @@ ztest_tx_assign(dmu_tx_t *tx, dmu_tx_flag_t txg_how, const char *tag)
|
|||||||
if (error == ERESTART) {
|
if (error == ERESTART) {
|
||||||
ASSERT3U(txg_how, ==, DMU_TX_NOWAIT);
|
ASSERT3U(txg_how, ==, DMU_TX_NOWAIT);
|
||||||
dmu_tx_wait(tx);
|
dmu_tx_wait(tx);
|
||||||
} else if (error == ENOSPC) {
|
|
||||||
ztest_record_enospc(tag);
|
|
||||||
} else {
|
} else {
|
||||||
ASSERT(error == EDQUOT || error == EIO);
|
ASSERT3U(error, ==, ENOSPC);
|
||||||
|
ztest_record_enospc(tag);
|
||||||
}
|
}
|
||||||
dmu_tx_abort(tx);
|
dmu_tx_abort(tx);
|
||||||
return (0);
|
return (0);
|
||||||
@@ -1993,9 +1993,8 @@ ztest_log_write(ztest_ds_t *zd, dmu_tx_t *tx, lr_write_t *lr)
|
|||||||
|
|
||||||
if (write_state == WR_COPIED &&
|
if (write_state == WR_COPIED &&
|
||||||
dmu_read(zd->zd_os, lr->lr_foid, lr->lr_offset, lr->lr_length,
|
dmu_read(zd->zd_os, lr->lr_foid, lr->lr_offset, lr->lr_length,
|
||||||
((lr_write_t *)&itx->itx_lr) + 1, DMU_READ_NO_PREFETCH |
|
((lr_write_t *)&itx->itx_lr) + 1, DMU_READ_NO_PREFETCH) != 0) {
|
||||||
DMU_KEEP_CACHING) != 0) {
|
zil_itx_destroy(itx);
|
||||||
zil_itx_destroy(itx, 0);
|
|
||||||
itx = zil_itx_create(TX_WRITE, sizeof (*lr));
|
itx = zil_itx_create(TX_WRITE, sizeof (*lr));
|
||||||
write_state = WR_NEED_COPY;
|
write_state = WR_NEED_COPY;
|
||||||
}
|
}
|
||||||
@@ -2266,19 +2265,19 @@ ztest_replay_write(void *arg1, void *arg2, boolean_t byteswap)
|
|||||||
ASSERT(doi.doi_data_block_size);
|
ASSERT(doi.doi_data_block_size);
|
||||||
ASSERT0(offset % doi.doi_data_block_size);
|
ASSERT0(offset % doi.doi_data_block_size);
|
||||||
if (ztest_random(4) != 0) {
|
if (ztest_random(4) != 0) {
|
||||||
dmu_flags_t flags = ztest_random(2) ?
|
int prefetch = ztest_random(2) ?
|
||||||
DMU_READ_PREFETCH : DMU_READ_NO_PREFETCH;
|
DMU_READ_PREFETCH : DMU_READ_NO_PREFETCH;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We will randomly set when to do O_DIRECT on a read.
|
* We will randomly set when to do O_DIRECT on a read.
|
||||||
*/
|
*/
|
||||||
if (ztest_random(4) == 0)
|
if (ztest_random(4) == 0)
|
||||||
flags |= DMU_DIRECTIO;
|
prefetch |= DMU_DIRECTIO;
|
||||||
|
|
||||||
ztest_block_tag_t rbt;
|
ztest_block_tag_t rbt;
|
||||||
|
|
||||||
VERIFY0(dmu_read(os, lr->lr_foid, offset,
|
VERIFY(dmu_read(os, lr->lr_foid, offset,
|
||||||
sizeof (rbt), &rbt, flags));
|
sizeof (rbt), &rbt, prefetch) == 0);
|
||||||
if (rbt.bt_magic == BT_MAGIC) {
|
if (rbt.bt_magic == BT_MAGIC) {
|
||||||
ztest_bt_verify(&rbt, os, lr->lr_foid, 0,
|
ztest_bt_verify(&rbt, os, lr->lr_foid, 0,
|
||||||
offset, gen, txg, crtxg);
|
offset, gen, txg, crtxg);
|
||||||
@@ -2306,11 +2305,10 @@ ztest_replay_write(void *arg1, void *arg2, boolean_t byteswap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (abuf == NULL) {
|
if (abuf == NULL) {
|
||||||
dmu_write(os, lr->lr_foid, offset, length, data, tx,
|
dmu_write(os, lr->lr_foid, offset, length, data, tx);
|
||||||
DMU_READ_PREFETCH);
|
|
||||||
} else {
|
} else {
|
||||||
memcpy(abuf->b_data, data, length);
|
memcpy(abuf->b_data, data, length);
|
||||||
VERIFY0(dmu_assign_arcbuf_by_dbuf(db, offset, abuf, tx, 0));
|
VERIFY0(dmu_assign_arcbuf_by_dbuf(db, offset, abuf, tx));
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) ztest_log_write(zd, tx, lr);
|
(void) ztest_log_write(zd, tx, lr);
|
||||||
@@ -2535,7 +2533,7 @@ ztest_get_data(void *arg, uint64_t arg2, lr_write_t *lr, char *buf,
|
|||||||
object, offset, size, ZTRL_READER);
|
object, offset, size, ZTRL_READER);
|
||||||
|
|
||||||
error = dmu_read(os, object, offset, size, buf,
|
error = dmu_read(os, object, offset, size, buf,
|
||||||
DMU_READ_NO_PREFETCH | DMU_KEEP_CACHING);
|
DMU_READ_NO_PREFETCH);
|
||||||
ASSERT0(error);
|
ASSERT0(error);
|
||||||
} else {
|
} else {
|
||||||
ASSERT3P(zio, !=, NULL);
|
ASSERT3P(zio, !=, NULL);
|
||||||
@@ -2551,6 +2549,7 @@ ztest_get_data(void *arg, uint64_t arg2, lr_write_t *lr, char *buf,
|
|||||||
object, offset, size, ZTRL_READER);
|
object, offset, size, ZTRL_READER);
|
||||||
|
|
||||||
error = dmu_buf_hold_noread(os, object, offset, zgd, &db);
|
error = dmu_buf_hold_noread(os, object, offset, zgd, &db);
|
||||||
|
|
||||||
if (error == 0) {
|
if (error == 0) {
|
||||||
blkptr_t *bp = &lr->lr_blkptr;
|
blkptr_t *bp = &lr->lr_blkptr;
|
||||||
|
|
||||||
@@ -2827,7 +2826,7 @@ ztest_io(ztest_ds_t *zd, uint64_t object, uint64_t offset)
|
|||||||
enum ztest_io_type io_type;
|
enum ztest_io_type io_type;
|
||||||
uint64_t blocksize;
|
uint64_t blocksize;
|
||||||
void *data;
|
void *data;
|
||||||
dmu_flags_t dmu_read_flags = DMU_READ_NO_PREFETCH;
|
uint32_t dmu_read_flags = DMU_READ_NO_PREFETCH;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We will randomly set when to do O_DIRECT on a read.
|
* We will randomly set when to do O_DIRECT on a read.
|
||||||
@@ -2966,7 +2965,7 @@ ztest_zil_commit(ztest_ds_t *zd, uint64_t id)
|
|||||||
|
|
||||||
(void) pthread_rwlock_rdlock(&zd->zd_zilog_lock);
|
(void) pthread_rwlock_rdlock(&zd->zd_zilog_lock);
|
||||||
|
|
||||||
VERIFY0(zil_commit(zilog, ztest_random(ZTEST_OBJECTS)));
|
zil_commit(zilog, ztest_random(ZTEST_OBJECTS));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remember the committed values in zd, which is in parent/child
|
* Remember the committed values in zd, which is in parent/child
|
||||||
@@ -3689,10 +3688,10 @@ ztest_split_pool(ztest_ds_t *zd, uint64_t id)
|
|||||||
|
|
||||||
if (error == 0) {
|
if (error == 0) {
|
||||||
(void) printf("successful split - results:\n");
|
(void) printf("successful split - results:\n");
|
||||||
spa_namespace_enter(FTAG);
|
mutex_enter(&spa_namespace_lock);
|
||||||
show_pool_stats(spa);
|
show_pool_stats(spa);
|
||||||
show_pool_stats(spa_lookup("splitp"));
|
show_pool_stats(spa_lookup("splitp"));
|
||||||
spa_namespace_exit(FTAG);
|
mutex_exit(&spa_namespace_lock);
|
||||||
++zs->zs_splits;
|
++zs->zs_splits;
|
||||||
--zs->zs_mirrors;
|
--zs->zs_mirrors;
|
||||||
}
|
}
|
||||||
@@ -3882,7 +3881,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id)
|
|||||||
* If newvd is too small, it should fail with EOVERFLOW.
|
* If newvd is too small, it should fail with EOVERFLOW.
|
||||||
*
|
*
|
||||||
* If newvd is a distributed spare and it's being attached to a
|
* If newvd is a distributed spare and it's being attached to a
|
||||||
* dRAID which is not its parent it should fail with ENOTSUP.
|
* dRAID which is not its parent it should fail with EINVAL.
|
||||||
*/
|
*/
|
||||||
if (pvd->vdev_ops != &vdev_mirror_ops &&
|
if (pvd->vdev_ops != &vdev_mirror_ops &&
|
||||||
pvd->vdev_ops != &vdev_root_ops && (!replacing ||
|
pvd->vdev_ops != &vdev_root_ops && (!replacing ||
|
||||||
@@ -3901,7 +3900,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id)
|
|||||||
else if (ashift > oldvd->vdev_top->vdev_ashift)
|
else if (ashift > oldvd->vdev_top->vdev_ashift)
|
||||||
expected_error = EDOM;
|
expected_error = EDOM;
|
||||||
else if (newvd_is_dspare && pvd != vdev_draid_spare_get_parent(newvd))
|
else if (newvd_is_dspare && pvd != vdev_draid_spare_get_parent(newvd))
|
||||||
expected_error = ENOTSUP;
|
expected_error = EINVAL;
|
||||||
else
|
else
|
||||||
expected_error = 0;
|
expected_error = 0;
|
||||||
|
|
||||||
@@ -3976,11 +3975,11 @@ raidz_scratch_verify(void)
|
|||||||
|
|
||||||
kernel_init(SPA_MODE_READ);
|
kernel_init(SPA_MODE_READ);
|
||||||
|
|
||||||
spa_namespace_enter(FTAG);
|
mutex_enter(&spa_namespace_lock);
|
||||||
spa = spa_lookup(ztest_opts.zo_pool);
|
spa = spa_lookup(ztest_opts.zo_pool);
|
||||||
ASSERT(spa);
|
ASSERT(spa);
|
||||||
spa->spa_import_flags |= ZFS_IMPORT_SKIP_MMP;
|
spa->spa_import_flags |= ZFS_IMPORT_SKIP_MMP;
|
||||||
spa_namespace_exit(FTAG);
|
mutex_exit(&spa_namespace_lock);
|
||||||
|
|
||||||
VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG));
|
VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG));
|
||||||
|
|
||||||
@@ -4007,7 +4006,7 @@ raidz_scratch_verify(void)
|
|||||||
* requested by user, but scratch object was not created.
|
* requested by user, but scratch object was not created.
|
||||||
*/
|
*/
|
||||||
case RRSS_SCRATCH_NOT_IN_USE:
|
case RRSS_SCRATCH_NOT_IN_USE:
|
||||||
ASSERT0(offset);
|
ASSERT3U(offset, ==, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -4917,7 +4916,7 @@ ztest_dsl_dataset_promote_busy(ztest_ds_t *zd, uint64_t id)
|
|||||||
fatal(B_FALSE, "dmu_take_snapshot(%s) = %d", snap1name, error);
|
fatal(B_FALSE, "dmu_take_snapshot(%s) = %d", snap1name, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = dsl_dataset_clone(clone1name, snap1name);
|
error = dmu_objset_clone(clone1name, snap1name);
|
||||||
if (error) {
|
if (error) {
|
||||||
if (error == ENOSPC) {
|
if (error == ENOSPC) {
|
||||||
ztest_record_enospc(FTAG);
|
ztest_record_enospc(FTAG);
|
||||||
@@ -4944,7 +4943,7 @@ ztest_dsl_dataset_promote_busy(ztest_ds_t *zd, uint64_t id)
|
|||||||
fatal(B_FALSE, "dmu_open_snapshot(%s) = %d", snap3name, error);
|
fatal(B_FALSE, "dmu_open_snapshot(%s) = %d", snap3name, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = dsl_dataset_clone(clone2name, snap3name);
|
error = dmu_objset_clone(clone2name, snap3name);
|
||||||
if (error) {
|
if (error) {
|
||||||
if (error == ENOSPC) {
|
if (error == ENOSPC) {
|
||||||
ztest_record_enospc(FTAG);
|
ztest_record_enospc(FTAG);
|
||||||
@@ -5066,7 +5065,7 @@ ztest_dmu_read_write(ztest_ds_t *zd, uint64_t id)
|
|||||||
uint64_t stride = 123456789ULL;
|
uint64_t stride = 123456789ULL;
|
||||||
uint64_t width = 40;
|
uint64_t width = 40;
|
||||||
int free_percent = 5;
|
int free_percent = 5;
|
||||||
dmu_flags_t dmu_read_flags = DMU_READ_PREFETCH;
|
uint32_t dmu_read_flags = DMU_READ_PREFETCH;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We will randomly set when to do O_DIRECT on a read.
|
* We will randomly set when to do O_DIRECT on a read.
|
||||||
@@ -5244,8 +5243,7 @@ ztest_dmu_read_write(ztest_ds_t *zd, uint64_t id)
|
|||||||
* We've verified all the old bufwads, and made new ones.
|
* We've verified all the old bufwads, and made new ones.
|
||||||
* Now write them out.
|
* Now write them out.
|
||||||
*/
|
*/
|
||||||
dmu_write(os, packobj, packoff, packsize, packbuf, tx,
|
dmu_write(os, packobj, packoff, packsize, packbuf, tx);
|
||||||
DMU_READ_PREFETCH);
|
|
||||||
|
|
||||||
if (freeit) {
|
if (freeit) {
|
||||||
if (ztest_opts.zo_verbose >= 7) {
|
if (ztest_opts.zo_verbose >= 7) {
|
||||||
@@ -5260,8 +5258,7 @@ ztest_dmu_read_write(ztest_ds_t *zd, uint64_t id)
|
|||||||
" txg %"PRIx64"\n",
|
" txg %"PRIx64"\n",
|
||||||
bigoff, bigsize, txg);
|
bigoff, bigsize, txg);
|
||||||
}
|
}
|
||||||
dmu_write(os, bigobj, bigoff, bigsize, bigbuf, tx,
|
dmu_write(os, bigobj, bigoff, bigsize, bigbuf, tx);
|
||||||
DMU_READ_PREFETCH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dmu_tx_commit(tx);
|
dmu_tx_commit(tx);
|
||||||
@@ -5516,8 +5513,7 @@ ztest_dmu_read_write_zcopy(ztest_ds_t *zd, uint64_t id)
|
|||||||
* We've verified all the old bufwads, and made new ones.
|
* We've verified all the old bufwads, and made new ones.
|
||||||
* Now write them out.
|
* Now write them out.
|
||||||
*/
|
*/
|
||||||
dmu_write(os, packobj, packoff, packsize, packbuf, tx,
|
dmu_write(os, packobj, packoff, packsize, packbuf, tx);
|
||||||
DMU_READ_PREFETCH);
|
|
||||||
if (ztest_opts.zo_verbose >= 7) {
|
if (ztest_opts.zo_verbose >= 7) {
|
||||||
(void) printf("writing offset %"PRIx64" size %"PRIx64""
|
(void) printf("writing offset %"PRIx64" size %"PRIx64""
|
||||||
" txg %"PRIx64"\n",
|
" txg %"PRIx64"\n",
|
||||||
@@ -5540,18 +5536,18 @@ ztest_dmu_read_write_zcopy(ztest_ds_t *zd, uint64_t id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
VERIFY0(dmu_buf_hold(os, bigobj, off,
|
VERIFY(dmu_buf_hold(os, bigobj, off,
|
||||||
FTAG, &dbt, DMU_READ_NO_PREFETCH));
|
FTAG, &dbt, DMU_READ_NO_PREFETCH) == 0);
|
||||||
}
|
}
|
||||||
if (i != 5 || chunksize < (SPA_MINBLOCKSIZE * 2)) {
|
if (i != 5 || chunksize < (SPA_MINBLOCKSIZE * 2)) {
|
||||||
VERIFY0(dmu_assign_arcbuf_by_dbuf(bonus_db,
|
VERIFY0(dmu_assign_arcbuf_by_dbuf(bonus_db,
|
||||||
off, bigbuf_arcbufs[j], tx, 0));
|
off, bigbuf_arcbufs[j], tx));
|
||||||
} else {
|
} else {
|
||||||
VERIFY0(dmu_assign_arcbuf_by_dbuf(bonus_db,
|
VERIFY0(dmu_assign_arcbuf_by_dbuf(bonus_db,
|
||||||
off, bigbuf_arcbufs[2 * j], tx, 0));
|
off, bigbuf_arcbufs[2 * j], tx));
|
||||||
VERIFY0(dmu_assign_arcbuf_by_dbuf(bonus_db,
|
VERIFY0(dmu_assign_arcbuf_by_dbuf(bonus_db,
|
||||||
off + chunksize / 2,
|
off + chunksize / 2,
|
||||||
bigbuf_arcbufs[2 * j + 1], tx, 0));
|
bigbuf_arcbufs[2 * j + 1], tx));
|
||||||
}
|
}
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
dmu_buf_rele(dbt, FTAG);
|
dmu_buf_rele(dbt, FTAG);
|
||||||
@@ -6123,8 +6119,7 @@ ztest_dmu_commit_callbacks(ztest_ds_t *zd, uint64_t id)
|
|||||||
"future leak: got %"PRIu64", open txg is %"PRIu64"",
|
"future leak: got %"PRIu64", open txg is %"PRIu64"",
|
||||||
old_txg, txg);
|
old_txg, txg);
|
||||||
|
|
||||||
dmu_write(os, od->od_object, 0, sizeof (uint64_t), &txg, tx,
|
dmu_write(os, od->od_object, 0, sizeof (uint64_t), &txg, tx);
|
||||||
DMU_READ_PREFETCH);
|
|
||||||
|
|
||||||
(void) mutex_enter(&zcl.zcl_callbacks_lock);
|
(void) mutex_enter(&zcl.zcl_callbacks_lock);
|
||||||
|
|
||||||
@@ -6339,13 +6334,13 @@ ztest_dmu_snapshot_hold(ztest_ds_t *zd, uint64_t id)
|
|||||||
fatal(B_FALSE, "dmu_objset_snapshot(%s) = %d", fullname, error);
|
fatal(B_FALSE, "dmu_objset_snapshot(%s) = %d", fullname, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = dsl_dataset_clone(clonename, fullname);
|
error = dmu_objset_clone(clonename, fullname);
|
||||||
if (error) {
|
if (error) {
|
||||||
if (error == ENOSPC) {
|
if (error == ENOSPC) {
|
||||||
ztest_record_enospc("dsl_dataset_clone");
|
ztest_record_enospc("dmu_objset_clone");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
fatal(B_FALSE, "dsl_dataset_clone(%s) = %d", clonename, error);
|
fatal(B_FALSE, "dmu_objset_clone(%s) = %d", clonename, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = dsl_destroy_snapshot(fullname, B_TRUE);
|
error = dsl_destroy_snapshot(fullname, B_TRUE);
|
||||||
@@ -7073,7 +7068,7 @@ ztest_set_global_vars(void)
|
|||||||
char *kv = ztest_opts.zo_gvars[i];
|
char *kv = ztest_opts.zo_gvars[i];
|
||||||
VERIFY3U(strlen(kv), <=, ZO_GVARS_MAX_ARGLEN);
|
VERIFY3U(strlen(kv), <=, ZO_GVARS_MAX_ARGLEN);
|
||||||
VERIFY3U(strlen(kv), >, 0);
|
VERIFY3U(strlen(kv), >, 0);
|
||||||
int err = handle_tunable_option(kv, B_TRUE);
|
int err = set_global_var(kv);
|
||||||
if (ztest_opts.zo_verbose > 0) {
|
if (ztest_opts.zo_verbose > 0) {
|
||||||
(void) printf("setting global var %s ... %s\n", kv,
|
(void) printf("setting global var %s ... %s\n", kv,
|
||||||
err ? "failed" : "ok");
|
err ? "failed" : "ok");
|
||||||
@@ -7427,11 +7422,11 @@ ztest_walk_pool_directory(const char *header)
|
|||||||
if (ztest_opts.zo_verbose >= 6)
|
if (ztest_opts.zo_verbose >= 6)
|
||||||
(void) puts(header);
|
(void) puts(header);
|
||||||
|
|
||||||
spa_namespace_enter(FTAG);
|
mutex_enter(&spa_namespace_lock);
|
||||||
while ((spa = spa_next(spa)) != NULL)
|
while ((spa = spa_next(spa)) != NULL)
|
||||||
if (ztest_opts.zo_verbose >= 6)
|
if (ztest_opts.zo_verbose >= 6)
|
||||||
(void) printf("\t%s\n", spa_name(spa));
|
(void) printf("\t%s\n", spa_name(spa));
|
||||||
spa_namespace_exit(FTAG);
|
mutex_exit(&spa_namespace_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -7817,9 +7812,6 @@ ztest_dataset_open(int d)
|
|||||||
|
|
||||||
ztest_dataset_name(name, ztest_opts.zo_pool, d);
|
ztest_dataset_name(name, ztest_opts.zo_pool, d);
|
||||||
|
|
||||||
if (ztest_opts.zo_verbose >= 6)
|
|
||||||
(void) printf("Opening %s\n", name);
|
|
||||||
|
|
||||||
(void) pthread_rwlock_rdlock(&ztest_name_lock);
|
(void) pthread_rwlock_rdlock(&ztest_name_lock);
|
||||||
|
|
||||||
error = ztest_dataset_create(name);
|
error = ztest_dataset_create(name);
|
||||||
@@ -7941,7 +7933,7 @@ ztest_freeze(void)
|
|||||||
*/
|
*/
|
||||||
while (BP_IS_HOLE(&zd->zd_zilog->zl_header->zh_log)) {
|
while (BP_IS_HOLE(&zd->zd_zilog->zl_header->zh_log)) {
|
||||||
ztest_dmu_object_alloc_free(zd, 0);
|
ztest_dmu_object_alloc_free(zd, 0);
|
||||||
VERIFY0(zil_commit(zd->zd_zilog, 0));
|
zil_commit(zd->zd_zilog, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
txg_wait_synced(spa_get_dsl(spa), 0);
|
txg_wait_synced(spa_get_dsl(spa), 0);
|
||||||
@@ -7983,7 +7975,7 @@ ztest_freeze(void)
|
|||||||
/*
|
/*
|
||||||
* Commit all of the changes we just generated.
|
* Commit all of the changes we just generated.
|
||||||
*/
|
*/
|
||||||
VERIFY0(zil_commit(zd->zd_zilog, 0));
|
zil_commit(zd->zd_zilog, 0);
|
||||||
txg_wait_synced(spa_get_dsl(spa), 0);
|
txg_wait_synced(spa_get_dsl(spa), 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -8315,44 +8307,41 @@ static void
|
|||||||
ztest_generic_run(ztest_shared_t *zs, spa_t *spa)
|
ztest_generic_run(ztest_shared_t *zs, spa_t *spa)
|
||||||
{
|
{
|
||||||
kthread_t **run_threads;
|
kthread_t **run_threads;
|
||||||
int i, ndatasets;
|
int t;
|
||||||
|
|
||||||
run_threads = umem_zalloc(ztest_opts.zo_threads * sizeof (kthread_t *),
|
run_threads = umem_zalloc(ztest_opts.zo_threads * sizeof (kthread_t *),
|
||||||
UMEM_NOFAIL);
|
UMEM_NOFAIL);
|
||||||
|
|
||||||
/*
|
|
||||||
* Actual number of datasets to be used.
|
|
||||||
*/
|
|
||||||
ndatasets = MIN(ztest_opts.zo_datasets, ztest_opts.zo_threads);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Prepare the datasets first.
|
|
||||||
*/
|
|
||||||
for (i = 0; i < ndatasets; i++)
|
|
||||||
VERIFY0(ztest_dataset_open(i));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Kick off all the tests that run in parallel.
|
* Kick off all the tests that run in parallel.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < ztest_opts.zo_threads; i++) {
|
for (t = 0; t < ztest_opts.zo_threads; t++) {
|
||||||
run_threads[i] = thread_create(NULL, 0, ztest_thread,
|
if (t < ztest_opts.zo_datasets && ztest_dataset_open(t) != 0) {
|
||||||
(void *)(uintptr_t)i, 0, NULL, TS_RUN | TS_JOINABLE,
|
umem_free(run_threads, ztest_opts.zo_threads *
|
||||||
|
sizeof (kthread_t *));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
run_threads[t] = thread_create(NULL, 0, ztest_thread,
|
||||||
|
(void *)(uintptr_t)t, 0, NULL, TS_RUN | TS_JOINABLE,
|
||||||
defclsyspri);
|
defclsyspri);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wait for all of the tests to complete.
|
* Wait for all of the tests to complete.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < ztest_opts.zo_threads; i++)
|
for (t = 0; t < ztest_opts.zo_threads; t++)
|
||||||
VERIFY0(thread_join(run_threads[i]));
|
VERIFY0(thread_join(run_threads[t]));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Close all datasets. This must be done after all the threads
|
* Close all datasets. This must be done after all the threads
|
||||||
* are joined so we can be sure none of the datasets are in-use
|
* are joined so we can be sure none of the datasets are in-use
|
||||||
* by any of the threads.
|
* by any of the threads.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < ndatasets; i++)
|
for (t = 0; t < ztest_opts.zo_threads; t++) {
|
||||||
ztest_dataset_close(i);
|
if (t < ztest_opts.zo_datasets)
|
||||||
|
ztest_dataset_close(t);
|
||||||
|
}
|
||||||
|
|
||||||
txg_wait_synced(spa_get_dsl(spa), 0);
|
txg_wait_synced(spa_get_dsl(spa), 0);
|
||||||
|
|
||||||
@@ -8475,7 +8464,6 @@ ztest_run(ztest_shared_t *zs)
|
|||||||
|
|
||||||
int d = ztest_random(ztest_opts.zo_datasets);
|
int d = ztest_random(ztest_opts.zo_datasets);
|
||||||
ztest_dataset_destroy(d);
|
ztest_dataset_destroy(d);
|
||||||
txg_wait_synced(spa_get_dsl(spa), 0);
|
|
||||||
}
|
}
|
||||||
zs->zs_enospc_count = 0;
|
zs->zs_enospc_count = 0;
|
||||||
|
|
||||||
@@ -8546,11 +8534,11 @@ ztest_run(ztest_shared_t *zs)
|
|||||||
/*
|
/*
|
||||||
* Verify that we can loop over all pools.
|
* Verify that we can loop over all pools.
|
||||||
*/
|
*/
|
||||||
spa_namespace_enter(FTAG);
|
mutex_enter(&spa_namespace_lock);
|
||||||
for (spa = spa_next(NULL); spa != NULL; spa = spa_next(spa))
|
for (spa = spa_next(NULL); spa != NULL; spa = spa_next(spa))
|
||||||
if (ztest_opts.zo_verbose > 3)
|
if (ztest_opts.zo_verbose > 3)
|
||||||
(void) printf("spa_next: found %s\n", spa_name(spa));
|
(void) printf("spa_next: found %s\n", spa_name(spa));
|
||||||
spa_namespace_exit(FTAG);
|
mutex_exit(&spa_namespace_lock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Verify that we can export the pool and reimport it under a
|
* Verify that we can export the pool and reimport it under a
|
||||||
@@ -8983,7 +8971,7 @@ main(int argc, char **argv)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
} else {
|
} else {
|
||||||
/* children should not be spawned if setting gvars fails */
|
/* children should not be spawned if setting gvars fails */
|
||||||
VERIFY0(err);
|
VERIFY3S(err, ==, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Override location of zpool.cache */
|
/* Override location of zpool.cache */
|
||||||
|
|||||||
+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
|
||||||
|
|
||||||
|
|||||||
+2
-10
@@ -16,14 +16,10 @@ SHELLCHECK_OPTS = $(call JUST_SHELLCHECK_OPTS,$(1)) $(call JUST_CHECKBAS
|
|||||||
|
|
||||||
PHONY += shellcheck
|
PHONY += shellcheck
|
||||||
|
|
||||||
shellcheck_verbose = $(shellcheck_verbose_@AM_V@)
|
|
||||||
shellcheck_verbose_ = $(shellcheck_verbose_@AM_DEFAULT_V@)
|
|
||||||
shellcheck_verbose_0 = @echo SHELLCHECK $(_STGT);
|
|
||||||
|
|
||||||
_STGT = $(subst ^,/,$(subst shellcheck-here-,,$@))
|
_STGT = $(subst ^,/,$(subst shellcheck-here-,,$@))
|
||||||
shellcheck-here-%:
|
shellcheck-here-%:
|
||||||
if HAVE_SHELLCHECK
|
if HAVE_SHELLCHECK
|
||||||
$(shellcheck_verbose)shellcheck --format=gcc --enable=all --exclude=SC1090,SC1091,SC2039,SC2250,SC2312,SC2317,SC3043 $$([ -n "$(SHELLCHECK_SHELL)" ] && echo "--shell=$(SHELLCHECK_SHELL)") "$$([ -e "$(_STGT)" ] || echo "$(srcdir)/")$(_STGT)"
|
shellcheck --format=gcc --enable=all --exclude=SC1090,SC1091,SC2039,SC2250,SC2312,SC2317,SC3043 $$([ -n "$(SHELLCHECK_SHELL)" ] && echo "--shell=$(SHELLCHECK_SHELL)") "$$([ -e "$(_STGT)" ] || echo "$(srcdir)/")$(_STGT)"
|
||||||
else
|
else
|
||||||
@echo "skipping shellcheck of" $(_STGT) "because shellcheck is not installed"
|
@echo "skipping shellcheck of" $(_STGT) "because shellcheck is not installed"
|
||||||
endif
|
endif
|
||||||
@@ -33,15 +29,11 @@ shellcheck: $(SHELLCHECKSCRIPTS) $(call JUST_SHELLCHECK_OPTS,$(SHELLCHECKSCRIPTS
|
|||||||
|
|
||||||
PHONY += checkbashisms
|
PHONY += checkbashisms
|
||||||
|
|
||||||
checkbashisms_verbose = $(checkbashisms_verbose_@AM_V@)
|
|
||||||
checkbashisms_verbose_ = $(checkbashisms_verbose_@AM_DEFAULT_V@)
|
|
||||||
checkbashisms_verbose_0 = @echo CHECKBASHISMS $(_BTGT);
|
|
||||||
|
|
||||||
# command -v *is* specified by POSIX and every shell in existence supports it
|
# command -v *is* specified by POSIX and every shell in existence supports it
|
||||||
_BTGT = $(subst ^,/,$(subst checkbashisms-here-,,$@))
|
_BTGT = $(subst ^,/,$(subst checkbashisms-here-,,$@))
|
||||||
checkbashisms-here-%:
|
checkbashisms-here-%:
|
||||||
if HAVE_CHECKBASHISMS
|
if HAVE_CHECKBASHISMS
|
||||||
$(checkbashisms_verbose)! { [ -n "$(SHELLCHECK_SHELL)" ] && echo '#!/bin/$(SHELLCHECK_SHELL)'; cat "$$([ -e "$(_BTGT)" ] || echo "$(srcdir)/")$(_BTGT)"; } | \
|
! { [ -n "$(SHELLCHECK_SHELL)" ] && echo '#!/bin/$(SHELLCHECK_SHELL)'; cat "$$([ -e "$(_BTGT)" ] || echo "$(srcdir)/")$(_BTGT)"; } | \
|
||||||
checkbashisms -npx 2>&1 | grep -vFe "'command' with option other than -p" -e 'command -v' -e 'any possible bashisms' $(CHECKBASHISMS_IGNORE) >&2
|
checkbashisms -npx 2>&1 | grep -vFe "'command' with option other than -p" -e 'command -v' -e 'any possible bashisms' $(CHECKBASHISMS_IGNORE) >&2
|
||||||
else
|
else
|
||||||
@echo "skipping checkbashisms of" $(_BTGT) "because checkbashisms is not installed"
|
@echo "skipping checkbashisms of" $(_BTGT) "because checkbashisms is not installed"
|
||||||
|
|||||||
@@ -34,26 +34,8 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_ARCH], [
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
AM_CONDITIONAL([TARGET_CPU_AARCH64], test $TARGET_CPU = aarch64)
|
AM_CONDITIONAL([TARGET_CPU_AARCH64], test $TARGET_CPU = aarch64)
|
||||||
AM_CONDITIONAL([TARGET_CPU_I386], test $TARGET_CPU = i386)
|
|
||||||
AM_CONDITIONAL([TARGET_CPU_X86_64], test $TARGET_CPU = x86_64)
|
AM_CONDITIONAL([TARGET_CPU_X86_64], test $TARGET_CPU = x86_64)
|
||||||
AM_CONDITIONAL([TARGET_CPU_POWERPC], test $TARGET_CPU = powerpc)
|
AM_CONDITIONAL([TARGET_CPU_POWERPC], test $TARGET_CPU = powerpc)
|
||||||
AM_CONDITIONAL([TARGET_CPU_SPARC64], test $TARGET_CPU = sparc64)
|
AM_CONDITIONAL([TARGET_CPU_SPARC64], test $TARGET_CPU = sparc64)
|
||||||
AM_CONDITIONAL([TARGET_CPU_ARM], test $TARGET_CPU = arm)
|
AM_CONDITIONAL([TARGET_CPU_ARM], test $TARGET_CPU = arm)
|
||||||
])
|
])
|
||||||
dnl #
|
|
||||||
dnl # Check for conflicting environment variables
|
|
||||||
dnl #
|
|
||||||
dnl # If ARCH env variable is set up, then kernel Makefile in the /usr/src/kernel
|
|
||||||
dnl # can misbehave during the zfs ./configure test of the module compilation.
|
|
||||||
AC_DEFUN([ZFS_AC_CONFIG_CHECK_ARCH_VAR], [
|
|
||||||
AC_MSG_CHECKING([for conflicting environment variables])
|
|
||||||
if test -n "$ARCH"; then
|
|
||||||
AC_MSG_RESULT([warning])
|
|
||||||
AC_MSG_WARN(m4_normalize([ARCH environment variable is set to "$ARCH".
|
|
||||||
This can cause build kernel modules support check failure.
|
|
||||||
Please unset it.]))
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([done])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|||||||
@@ -155,34 +155,6 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH], [
|
|||||||
AC_SUBST([NO_FORMAT_ZERO_LENGTH])
|
AC_SUBST([NO_FORMAT_ZERO_LENGTH])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # Check if kernel cc supports -Wno-format-zero-length option.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_NO_FORMAT_ZERO_LENGTH], [
|
|
||||||
saved_cc="$CC"
|
|
||||||
AS_IF(
|
|
||||||
[ test -n "$KERNEL_CC" ], [ CC="$KERNEL_CC" ],
|
|
||||||
[ test -n "$KERNEL_LLVM" ], [ CC="clang" ],
|
|
||||||
[ CC="gcc" ]
|
|
||||||
)
|
|
||||||
AC_MSG_CHECKING([whether $CC supports -Wno-format-zero-length])
|
|
||||||
|
|
||||||
saved_flags="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS -Werror -Wno-format-zero-length"
|
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
|
||||||
KERNEL_NO_FORMAT_ZERO_LENGTH=-Wno-format-zero-length
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
], [
|
|
||||||
KERNEL_NO_FORMAT_ZERO_LENGTH=
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
|
|
||||||
CC="$saved_cc"
|
|
||||||
CFLAGS="$saved_flags"
|
|
||||||
AC_SUBST([KERNEL_NO_FORMAT_ZERO_LENGTH])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # Check if cc supports -Wno-clobbered option.
|
dnl # Check if cc supports -Wno-clobbered option.
|
||||||
dnl #
|
dnl #
|
||||||
@@ -209,27 +181,6 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED], [
|
|||||||
AC_SUBST([NO_CLOBBERED])
|
AC_SUBST([NO_CLOBBERED])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # Check if cc supports -Wno-atomic-alignment option.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_ATOMIC_ALIGNMENT], [
|
|
||||||
AC_MSG_CHECKING([whether $CC supports -Wno-atomic-alignment])
|
|
||||||
|
|
||||||
saved_flags="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS -Werror -Wno-atomic-alignment"
|
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
|
||||||
NO_ATOMIC_ALIGNMENT=-Wno-atomic-alignment
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
], [
|
|
||||||
NO_ATOMIC_ALIGNMENT=
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
|
|
||||||
CFLAGS="$saved_flags"
|
|
||||||
AC_SUBST([NO_ATOMIC_ALIGNMENT])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # Check if cc supports -Wimplicit-fallthrough option.
|
dnl # Check if cc supports -Wimplicit-fallthrough option.
|
||||||
dnl #
|
dnl #
|
||||||
@@ -280,17 +231,20 @@ dnl #
|
|||||||
dnl # Check if kernel cc supports -Winfinite-recursion option.
|
dnl # Check if kernel cc supports -Winfinite-recursion option.
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION], [
|
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION], [
|
||||||
saved_cc="$CC"
|
AC_MSG_CHECKING([whether $KERNEL_CC supports -Winfinite-recursion])
|
||||||
AS_IF(
|
|
||||||
[ test -n "$KERNEL_CC" ], [ CC="$KERNEL_CC" ],
|
|
||||||
[ test -n "$KERNEL_LLVM" ], [ CC="clang" ],
|
|
||||||
[ CC="gcc" ]
|
|
||||||
)
|
|
||||||
AC_MSG_CHECKING([whether $CC supports -Winfinite-recursion])
|
|
||||||
|
|
||||||
|
saved_cc="$CC"
|
||||||
saved_flags="$CFLAGS"
|
saved_flags="$CFLAGS"
|
||||||
|
CC="gcc"
|
||||||
CFLAGS="$CFLAGS -Werror -Winfinite-recursion"
|
CFLAGS="$CFLAGS -Werror -Winfinite-recursion"
|
||||||
|
|
||||||
|
AS_IF([ test -n "$KERNEL_CC" ], [
|
||||||
|
CC="$KERNEL_CC"
|
||||||
|
])
|
||||||
|
AS_IF([ test -n "$KERNEL_LLVM" ], [
|
||||||
|
CC="clang"
|
||||||
|
])
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||||
KERNEL_INFINITE_RECURSION=-Winfinite-recursion
|
KERNEL_INFINITE_RECURSION=-Winfinite-recursion
|
||||||
AC_DEFINE([HAVE_KERNEL_INFINITE_RECURSION], 1,
|
AC_DEFINE([HAVE_KERNEL_INFINITE_RECURSION], 1,
|
||||||
@@ -375,17 +329,20 @@ dnl #
|
|||||||
dnl # Check if kernel cc supports -fno-ipa-sra option.
|
dnl # Check if kernel cc supports -fno-ipa-sra option.
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_NO_IPA_SRA], [
|
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_NO_IPA_SRA], [
|
||||||
saved_cc="$CC"
|
AC_MSG_CHECKING([whether $KERNEL_CC supports -fno-ipa-sra])
|
||||||
AS_IF(
|
|
||||||
[ test -n "$KERNEL_CC" ], [ CC="$KERNEL_CC" ],
|
|
||||||
[ test -n "$KERNEL_LLVM" ], [ CC="clang" ],
|
|
||||||
[ CC="gcc" ]
|
|
||||||
)
|
|
||||||
AC_MSG_CHECKING([whether $CC supports -fno-ipa-sra])
|
|
||||||
|
|
||||||
|
saved_cc="$CC"
|
||||||
saved_flags="$CFLAGS"
|
saved_flags="$CFLAGS"
|
||||||
|
CC="gcc"
|
||||||
CFLAGS="$CFLAGS -Werror -fno-ipa-sra"
|
CFLAGS="$CFLAGS -Werror -fno-ipa-sra"
|
||||||
|
|
||||||
|
AS_IF([ test -n "$KERNEL_CC" ], [
|
||||||
|
CC="$KERNEL_CC"
|
||||||
|
])
|
||||||
|
AS_IF([ test -n "$KERNEL_LLVM" ], [
|
||||||
|
CC="clang"
|
||||||
|
])
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||||
KERNEL_NO_IPA_SRA=-fno-ipa-sra
|
KERNEL_NO_IPA_SRA=-fno-ipa-sra
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
# 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 37
|
#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],[
|
||||||
@@ -316,7 +316,7 @@ EOD`
|
|||||||
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
|
||||||
AC_MSG_WARN([
|
AC_MSG_WARN([
|
||||||
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.
|
||||||
|
|||||||
+4
-4
@@ -58,9 +58,9 @@ deb-utils: deb-local rpm-utils-initramfs
|
|||||||
pkg1=$${name}-$${version}.$${arch}.rpm; \
|
pkg1=$${name}-$${version}.$${arch}.rpm; \
|
||||||
pkg2=libnvpair3-$${version}.$${arch}.rpm; \
|
pkg2=libnvpair3-$${version}.$${arch}.rpm; \
|
||||||
pkg3=libuutil3-$${version}.$${arch}.rpm; \
|
pkg3=libuutil3-$${version}.$${arch}.rpm; \
|
||||||
pkg4=libzfs7-$${version}.$${arch}.rpm; \
|
pkg4=libzfs6-$${version}.$${arch}.rpm; \
|
||||||
pkg5=libzpool7-$${version}.$${arch}.rpm; \
|
pkg5=libzpool6-$${version}.$${arch}.rpm; \
|
||||||
pkg6=libzfs7-devel-$${version}.$${arch}.rpm; \
|
pkg6=libzfs6-devel-$${version}.$${arch}.rpm; \
|
||||||
pkg7=$${name}-test-$${version}.$${arch}.rpm; \
|
pkg7=$${name}-test-$${version}.$${arch}.rpm; \
|
||||||
pkg8=$${name}-dracut-$${version}.noarch.rpm; \
|
pkg8=$${name}-dracut-$${version}.noarch.rpm; \
|
||||||
pkg9=$${name}-initramfs-$${version}.$${arch}.rpm; \
|
pkg9=$${name}-initramfs-$${version}.$${arch}.rpm; \
|
||||||
@@ -72,7 +72,7 @@ deb-utils: deb-local rpm-utils-initramfs
|
|||||||
path_prepend=`mktemp -d /tmp/intercept.XXXXXX`; \
|
path_prepend=`mktemp -d /tmp/intercept.XXXXXX`; \
|
||||||
echo "#!$(SHELL)" > $${path_prepend}/dh_shlibdeps; \
|
echo "#!$(SHELL)" > $${path_prepend}/dh_shlibdeps; \
|
||||||
echo "`which dh_shlibdeps` -- \
|
echo "`which dh_shlibdeps` -- \
|
||||||
-xlibuutil3linux -xlibnvpair3linux -xlibzfs7linux -xlibzpool7linux" \
|
-xlibuutil3linux -xlibnvpair3linux -xlibzfs6linux -xlibzpool6linux" \
|
||||||
>> $${path_prepend}/dh_shlibdeps; \
|
>> $${path_prepend}/dh_shlibdeps; \
|
||||||
## These -x arguments are passed to dpkg-shlibdeps, which exclude the
|
## These -x arguments are passed to dpkg-shlibdeps, which exclude the
|
||||||
## Debianized packages from the auto-generated dependencies of the new debs,
|
## Debianized packages from the auto-generated dependencies of the new debs,
|
||||||
|
|||||||
@@ -29,8 +29,9 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG], [
|
|||||||
const char *path = "path";
|
const char *path = "path";
|
||||||
fmode_t mode = 0;
|
fmode_t mode = 0;
|
||||||
void *holder = NULL;
|
void *holder = NULL;
|
||||||
|
struct blk_holder_ops h;
|
||||||
|
|
||||||
bdev = blkdev_get_by_path(path, mode, holder, NULL);
|
bdev = blkdev_get_by_path(path, mode, holder, &h);
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -47,8 +48,9 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_OPEN_BY_PATH], [
|
|||||||
const char *path = "path";
|
const char *path = "path";
|
||||||
fmode_t mode = 0;
|
fmode_t mode = 0;
|
||||||
void *holder = NULL;
|
void *holder = NULL;
|
||||||
|
struct blk_holder_ops h;
|
||||||
|
|
||||||
bdh = bdev_open_by_path(path, mode, holder, NULL);
|
bdh = bdev_open_by_path(path, mode, holder, &h);
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -66,8 +68,9 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BDEV_FILE_OPEN_BY_PATH], [
|
|||||||
const char *path = "path";
|
const char *path = "path";
|
||||||
fmode_t mode = 0;
|
fmode_t mode = 0;
|
||||||
void *holder = NULL;
|
void *holder = NULL;
|
||||||
|
struct blk_holder_ops h;
|
||||||
|
|
||||||
file = bdev_file_open_by_path(path, mode, holder, NULL);
|
file = bdev_file_open_by_path(path, mode, holder, &h);
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -119,49 +119,15 @@ AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 6.18 API change
|
|
||||||
dnl # block_device_operation->getgeo takes struct gendisk* as first arg
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK], [
|
|
||||||
ZFS_LINUX_TEST_SRC([block_device_operations_getgeo_gendisk], [
|
|
||||||
#include <linux/blkdev.h>
|
|
||||||
|
|
||||||
static int blk_getgeo(struct gendisk *disk, struct hd_geometry *geo)
|
|
||||||
{
|
|
||||||
(void) disk, (void) geo;
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct block_device_operations
|
|
||||||
bops __attribute__ ((unused)) = {
|
|
||||||
.getgeo = blk_getgeo,
|
|
||||||
};
|
|
||||||
], [], [])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK], [
|
|
||||||
AC_MSG_CHECKING([whether bops->getgeo() takes gendisk as first arg])
|
|
||||||
ZFS_LINUX_TEST_RESULT([block_device_operations_getgeo_gendisk], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE([HAVE_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK], [1],
|
|
||||||
[Define if getgeo() in block_device_operations takes struct gendisk * as its first arg])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS], [
|
||||||
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS
|
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS
|
||||||
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
|
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
|
||||||
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG
|
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG
|
||||||
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK
|
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK
|
||||||
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS], [
|
AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS], [
|
||||||
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS
|
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS
|
||||||
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
|
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
|
||||||
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK
|
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK
|
||||||
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK
|
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -24,9 +24,6 @@ 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.
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 6.17 API change
|
|
||||||
dnl # d_set_d_op() removed. No direct replacement.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_D_SET_D_OP], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_D_SET_D_OP], [
|
||||||
ZFS_LINUX_TEST_SRC([d_set_d_op], [
|
ZFS_LINUX_TEST_SRC([d_set_d_op], [
|
||||||
#include <linux/dcache.h>
|
#include <linux/dcache.h>
|
||||||
@@ -37,46 +34,22 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_D_SET_D_OP], [
|
|||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_D_SET_D_OP], [
|
AC_DEFUN([ZFS_AC_KERNEL_D_SET_D_OP], [
|
||||||
AC_MSG_CHECKING([whether d_set_d_op() is available])
|
AC_MSG_CHECKING([whether d_set_d_op() is available])
|
||||||
ZFS_LINUX_TEST_RESULT([d_set_d_op], [
|
ZFS_LINUX_TEST_RESULT_SYMBOL([d_set_d_op],
|
||||||
|
[d_set_d_op], [fs/dcache.c], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_D_SET_D_OP, 1,
|
|
||||||
[Define if d_set_d_op() is available])
|
|
||||||
], [
|
], [
|
||||||
AC_MSG_RESULT(no)
|
ZFS_LINUX_TEST_ERROR([d_set_d_op])
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 6.17 API change
|
|
||||||
dnl # sb->s_d_op removed; set_default_d_op(sb, dop) added
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SET_DEFAULT_D_OP], [
|
|
||||||
ZFS_LINUX_TEST_SRC([set_default_d_op], [
|
|
||||||
#include <linux/dcache.h>
|
|
||||||
], [
|
|
||||||
set_default_d_op(NULL, NULL);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SET_DEFAULT_D_OP], [
|
|
||||||
AC_MSG_CHECKING([whether set_default_d_op() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([set_default_d_op], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_SET_DEFAULT_D_OP, 1,
|
|
||||||
[Define if set_default_d_op() is available])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY], [
|
||||||
ZFS_AC_KERNEL_SRC_D_OBTAIN_ALIAS
|
ZFS_AC_KERNEL_SRC_D_OBTAIN_ALIAS
|
||||||
ZFS_AC_KERNEL_SRC_D_SET_D_OP
|
ZFS_AC_KERNEL_SRC_D_SET_D_OP
|
||||||
ZFS_AC_KERNEL_SRC_SET_DEFAULT_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_OBTAIN_ALIAS
|
ZFS_AC_KERNEL_D_OBTAIN_ALIAS
|
||||||
ZFS_AC_KERNEL_D_SET_D_OP
|
ZFS_AC_KERNEL_D_SET_D_OP
|
||||||
ZFS_AC_KERNEL_SET_DEFAULT_D_OP
|
ZFS_AC_KERNEL_S_D_OP
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 6.18 API change
|
|
||||||
dnl # - generic_drop_inode() renamed to inode_generic_drop()
|
|
||||||
dnl # - generic_delete_inode() renamed to inode_just_drop()
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GENERIC_DROP], [
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_generic_drop], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
],[
|
|
||||||
struct inode *ip = NULL;
|
|
||||||
inode_generic_drop(ip);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_INODE_GENERIC_DROP], [
|
|
||||||
AC_MSG_CHECKING([whether inode_generic_drop() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([inode_generic_drop], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_INODE_GENERIC_DROP, 1,
|
|
||||||
[inode_generic_drop() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # Linux 5.2 API change
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SOPS_FREE_INODE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([super_operations_free_inode], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
static void free_inode(struct inode *) { }
|
|
||||||
|
|
||||||
static struct super_operations sops __attribute__ ((unused)) = {
|
|
||||||
.free_inode = free_inode,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SOPS_FREE_INODE], [
|
|
||||||
AC_MSG_CHECKING([whether sops->free_inode() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([super_operations_free_inode], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_SOPS_FREE_INODE, 1, [sops->free_inode() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 6.18: some architectures and config option causes the kasan_ inline
|
|
||||||
dnl # functions to reference the GPL-only symbol 'kasan_flag_enabled',
|
|
||||||
dnl # breaking the build. Detect this and work
|
|
||||||
dnl # around it.
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_KASAN_ENABLED], [
|
|
||||||
ZFS_LINUX_TEST_SRC([kasan_enabled], [
|
|
||||||
#include <linux/kasan.h>
|
|
||||||
], [
|
|
||||||
kasan_enabled();
|
|
||||||
], [], [ZFS_META_LICENSE])
|
|
||||||
])
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_KASAN_ENABLED], [
|
|
||||||
AC_MSG_CHECKING([whether kasan_enabled() is GPL-only])
|
|
||||||
ZFS_LINUX_TEST_RESULT([kasan_enabled_license], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_KASAN_ENABLED_GPL_ONLY, 1,
|
|
||||||
[kasan_enabled() is GPL-only])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_KMAP_ATOMIC_ARGS], [
|
|||||||
ZFS_LINUX_TEST_SRC([kmap_atomic], [
|
ZFS_LINUX_TEST_SRC([kmap_atomic], [
|
||||||
#include <linux/pagemap.h>
|
#include <linux/pagemap.h>
|
||||||
],[
|
],[
|
||||||
struct page page = {};
|
struct page page;
|
||||||
kmap_atomic(&page);
|
kmap_atomic(&page);
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|||||||
+13
-42
@@ -2,22 +2,6 @@ dnl #
|
|||||||
dnl # Supported mkdir() interfaces checked newest to oldest.
|
dnl # Supported mkdir() interfaces checked newest to oldest.
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
|
||||||
dnl #
|
|
||||||
dnl # 6.15 API change
|
|
||||||
dnl # mkdir() returns struct dentry *
|
|
||||||
dnl #
|
|
||||||
ZFS_LINUX_TEST_SRC([mkdir_return_dentry], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
static struct dentry *mkdir(struct mnt_idmap *idmap,
|
|
||||||
struct inode *inode, struct dentry *dentry,
|
|
||||||
umode_t umode) { return dentry; }
|
|
||||||
static const struct inode_operations
|
|
||||||
iops __attribute__ ((unused)) = {
|
|
||||||
.mkdir = mkdir,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 6.3 API change
|
dnl # 6.3 API change
|
||||||
dnl # mkdir() takes struct mnt_idmap * as the first arg
|
dnl # mkdir() takes struct mnt_idmap * as the first arg
|
||||||
@@ -75,42 +59,29 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
|
|||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_MKDIR], [
|
AC_DEFUN([ZFS_AC_KERNEL_MKDIR], [
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 6.15 API change
|
dnl # 6.3 API change
|
||||||
dnl # mkdir() returns struct dentry *
|
dnl # mkdir() takes struct mnt_idmap * as the first arg
|
||||||
dnl #
|
dnl #
|
||||||
AC_MSG_CHECKING([whether iops->mkdir() returns struct dentry*])
|
AC_MSG_CHECKING([whether iops->mkdir() takes struct mnt_idmap*])
|
||||||
ZFS_LINUX_TEST_RESULT([mkdir_return_dentry], [
|
ZFS_LINUX_TEST_RESULT([mkdir_mnt_idmap], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_IOPS_MKDIR_DENTRY, 1,
|
AC_DEFINE(HAVE_IOPS_MKDIR_IDMAP, 1,
|
||||||
[iops->mkdir() returns struct dentry*])
|
[iops->mkdir() takes struct mnt_idmap*])
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 6.3 API change
|
dnl # 5.12 API change
|
||||||
dnl # mkdir() takes struct mnt_idmap * as the first arg
|
dnl # The struct user_namespace arg was added as the first argument to
|
||||||
|
dnl # mkdir() of the iops structure.
|
||||||
dnl #
|
dnl #
|
||||||
AC_MSG_CHECKING([whether iops->mkdir() takes struct mnt_idmap*])
|
AC_MSG_CHECKING([whether iops->mkdir() takes struct user_namespace*])
|
||||||
ZFS_LINUX_TEST_RESULT([mkdir_mnt_idmap], [
|
ZFS_LINUX_TEST_RESULT([mkdir_user_namespace], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_IOPS_MKDIR_IDMAP, 1,
|
AC_DEFINE(HAVE_IOPS_MKDIR_USERNS, 1,
|
||||||
[iops->mkdir() takes struct mnt_idmap*])
|
[iops->mkdir() takes struct user_namespace*])
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 5.12 API change
|
|
||||||
dnl # The struct user_namespace arg was added as the first argument to
|
|
||||||
dnl # mkdir() of the iops structure.
|
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING([whether iops->mkdir() takes struct user_namespace*])
|
|
||||||
ZFS_LINUX_TEST_RESULT([mkdir_user_namespace], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_IOPS_MKDIR_USERNS, 1,
|
|
||||||
[iops->mkdir() takes struct user_namespace*])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 6.18 API change
|
|
||||||
dnl # ns->ops->type was moved to ns->ns.ns_type (struct ns_common)
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_NS_COMMON_TYPE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([ns_common_type], [
|
|
||||||
#include <linux/user_namespace.h>
|
|
||||||
],[
|
|
||||||
struct user_namespace ns;
|
|
||||||
ns.ns.ns_type = 0;
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_NS_COMMON_TYPE], [
|
|
||||||
AC_MSG_CHECKING([whether ns_type is accessible through ns_common])
|
|
||||||
ZFS_LINUX_TEST_RESULT([ns_common_type], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE([HAVE_NS_COMMON_TYPE], 1,
|
|
||||||
[Define if ns_type is accessible through ns_common])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_NAMESPACE], [
|
|
||||||
ZFS_AC_KERNEL_SRC_NS_COMMON_TYPE
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_NAMESPACE], [
|
|
||||||
ZFS_AC_KERNEL_NS_COMMON_TYPE
|
|
||||||
])
|
|
||||||
@@ -11,12 +11,10 @@ AC_DEFUN([ZFS_AC_KERNEL_OBJTOOL_HEADER], [
|
|||||||
#include <linux/objtool.h>
|
#include <linux/objtool.h>
|
||||||
],[
|
],[
|
||||||
],[
|
],[
|
||||||
objtool_header=$LINUX/include/linux/objtool.h
|
|
||||||
AC_DEFINE(HAVE_KERNEL_OBJTOOL_HEADER, 1,
|
AC_DEFINE(HAVE_KERNEL_OBJTOOL_HEADER, 1,
|
||||||
[kernel has linux/objtool.h])
|
[kernel has linux/objtool.h])
|
||||||
AC_MSG_RESULT(linux/objtool.h)
|
AC_MSG_RESULT(linux/objtool.h)
|
||||||
],[
|
],[
|
||||||
objtool_header=$LINUX/include/linux/frame.h
|
|
||||||
AC_MSG_RESULT(linux/frame.h)
|
AC_MSG_RESULT(linux/frame.h)
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@@ -49,15 +47,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_OBJTOOL], [
|
|||||||
#error "STACK_FRAME_NON_STANDARD is not defined."
|
#error "STACK_FRAME_NON_STANDARD is not defined."
|
||||||
#endif
|
#endif
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl # 6.15 made CONFIG_OBJTOOL_WERROR=y the default. We need to handle
|
|
||||||
dnl # this or our build will fail.
|
|
||||||
ZFS_LINUX_TEST_SRC([config_objtool_werror], [
|
|
||||||
#if !defined(CONFIG_OBJTOOL_WERROR)
|
|
||||||
#error "CONFIG_OBJTOOL_WERROR is not defined."
|
|
||||||
#endif
|
|
||||||
])
|
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_OBJTOOL], [
|
AC_DEFUN([ZFS_AC_KERNEL_OBJTOOL], [
|
||||||
@@ -73,31 +62,6 @@ AC_DEFUN([ZFS_AC_KERNEL_OBJTOOL], [
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_STACK_FRAME_NON_STANDARD, 1,
|
AC_DEFINE(HAVE_STACK_FRAME_NON_STANDARD, 1,
|
||||||
[STACK_FRAME_NON_STANDARD is defined])
|
[STACK_FRAME_NON_STANDARD is defined])
|
||||||
|
|
||||||
dnl # Needed for kernels missing the asm macro. We grep
|
|
||||||
dnl # for it in the header file since there is currently
|
|
||||||
dnl # no test to check the result of assembling a file.
|
|
||||||
AC_MSG_CHECKING(
|
|
||||||
[whether STACK_FRAME_NON_STANDARD asm macro is defined])
|
|
||||||
dnl # Escape square brackets.
|
|
||||||
sp='@<:@@<:@:space:@:>@@:>@'
|
|
||||||
dotmacro='@<:@.@:>@macro'
|
|
||||||
regexp="^$sp*$dotmacro$sp+STACK_FRAME_NON_STANDARD$sp"
|
|
||||||
AS_IF([$EGREP -s -q "$regexp" $objtool_header],[
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_STACK_FRAME_NON_STANDARD_ASM, 1,
|
|
||||||
[STACK_FRAME_NON_STANDARD asm macro is defined])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether CONFIG_OBJTOOL_WERROR is defined])
|
|
||||||
ZFS_LINUX_TEST_RESULT([config_objtool_werror],[
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
CONFIG_OBJTOOL_WERROR_DEFINED=yes
|
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # Linux 6.16 removed readahead_page
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_PAGEMAP_READAHEAD_PAGE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([pagemap_has_readahead_page], [
|
|
||||||
#include <linux/pagemap.h>
|
|
||||||
], [
|
|
||||||
struct page *p __attribute__ ((unused)) = NULL;
|
|
||||||
struct readahead_control *ractl __attribute__ ((unused)) = NULL;
|
|
||||||
p = readahead_page(ractl);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_PAGEMAP_READAHEAD_PAGE], [
|
|
||||||
AC_MSG_CHECKING([whether readahead_page() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([pagemap_has_readahead_page], [
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE(HAVE_PAGEMAP_READAHEAD_PAGE, 1,
|
|
||||||
[readahead_page() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# dnl
|
|
||||||
# dnl 5.8 (735e4ae5ba28) introduced a superblock scoped errseq_t to use to
|
|
||||||
# dnl record writeback errors for syncfs() to return. Up until 5.17, when
|
|
||||||
# dnl sync_fs errors were returned directly, this is the only way for us to
|
|
||||||
# dnl report an error from syncfs().
|
|
||||||
# dnl
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_WB_ERR], [
|
|
||||||
ZFS_LINUX_TEST_SRC([super_block_s_wb_err], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
static const struct super_block
|
|
||||||
sb __attribute__ ((unused)) = {
|
|
||||||
.s_wb_err = 0,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SUPER_BLOCK_S_WB_ERR], [
|
|
||||||
AC_MSG_CHECKING([whether super_block has s_wb_err])
|
|
||||||
ZFS_LINUX_TEST_RESULT([super_block_s_wb_err], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_SUPER_BLOCK_S_WB_ERR, 1,
|
|
||||||
[have super_block s_wb_err])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # 6.2: timer_delete_sync introduced, del_timer_sync deprecated and made
|
|
||||||
dnl # into a simple wrapper
|
|
||||||
dnl # 6.15: del_timer_sync removed
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER_DELETE_SYNC], [
|
|
||||||
ZFS_LINUX_TEST_SRC([timer_delete_sync], [
|
|
||||||
#include <linux/timer.h>
|
|
||||||
],[
|
|
||||||
struct timer_list *timer __attribute__((unused)) = NULL;
|
|
||||||
timer_delete_sync(timer);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_TIMER_DELETE_SYNC], [
|
|
||||||
AC_MSG_CHECKING([whether timer_delete_sync() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([timer_delete_sync], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_TIMER_DELETE_SYNC, 1,
|
|
||||||
[timer_delete_sync is available])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER], [
|
|
||||||
ZFS_AC_KERNEL_SRC_TIMER_DELETE_SYNC
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_TIMER], [
|
|
||||||
ZFS_AC_KERNEL_TIMER_DELETE_SYNC
|
|
||||||
])
|
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # 2.6.38 API change
|
||||||
|
dnl # ns_capable() was introduced
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_NS_CAPABLE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([ns_capable], [
|
||||||
|
#include <linux/capability.h>
|
||||||
|
],[
|
||||||
|
ns_capable((struct user_namespace *)NULL, CAP_SYS_ADMIN);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_NS_CAPABLE], [
|
||||||
|
AC_MSG_CHECKING([whether ns_capable exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([ns_capable], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
],[
|
||||||
|
ZFS_LINUX_TEST_ERROR([ns_capable()])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 2.6.39 API change
|
||||||
|
dnl # struct user_namespace was added to struct cred_t as cred->user_ns member
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_CRED_USER_NS], [
|
||||||
|
ZFS_LINUX_TEST_SRC([cred_user_ns], [
|
||||||
|
#include <linux/cred.h>
|
||||||
|
],[
|
||||||
|
struct cred cr;
|
||||||
|
cr.user_ns = (struct user_namespace *)NULL;
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_CRED_USER_NS], [
|
||||||
|
AC_MSG_CHECKING([whether cred_t->user_ns exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([cred_user_ns], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
],[
|
||||||
|
ZFS_LINUX_TEST_ERROR([cred_t->user_ns()])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 3.4 API change
|
||||||
|
dnl # kuid_has_mapping() and kgid_has_mapping() were added to distinguish
|
||||||
|
dnl # between internal kernel uids/gids and user namespace uids/gids.
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_KUID_HAS_MAPPING], [
|
||||||
|
ZFS_LINUX_TEST_SRC([kuid_has_mapping], [
|
||||||
|
#include <linux/uidgid.h>
|
||||||
|
],[
|
||||||
|
kuid_has_mapping((struct user_namespace *)NULL, KUIDT_INIT(0));
|
||||||
|
kgid_has_mapping((struct user_namespace *)NULL, KGIDT_INIT(0));
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_KUID_HAS_MAPPING], [
|
||||||
|
AC_MSG_CHECKING([whether kuid_has_mapping/kgid_has_mapping exist])
|
||||||
|
ZFS_LINUX_TEST_RESULT([kuid_has_mapping], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
],[
|
||||||
|
ZFS_LINUX_TEST_ERROR([kuid_has_mapping()])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_USERNS_CAPABILITIES], [
|
||||||
|
ZFS_AC_KERNEL_SRC_NS_CAPABLE
|
||||||
|
ZFS_AC_KERNEL_SRC_HAS_CAPABILITY
|
||||||
|
ZFS_AC_KERNEL_SRC_CRED_USER_NS
|
||||||
|
ZFS_AC_KERNEL_SRC_KUID_HAS_MAPPING
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_USERNS_CAPABILITIES], [
|
||||||
|
ZFS_AC_KERNEL_NS_CAPABLE
|
||||||
|
ZFS_AC_KERNEL_HAS_CAPABILITY
|
||||||
|
ZFS_AC_KERNEL_CRED_USER_NS
|
||||||
|
ZFS_AC_KERNEL_KUID_HAS_MAPPING
|
||||||
|
])
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # Linux 6.16 removes address_space_operations ->writepage
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_WRITEPAGE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([vfs_has_writepage], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
static const struct address_space_operations
|
|
||||||
aops __attribute__ ((unused)) = {
|
|
||||||
.writepage = NULL,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_VFS_WRITEPAGE], [
|
|
||||||
AC_MSG_CHECKING([whether aops->writepage exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([vfs_has_writepage], [
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE(HAVE_VFS_WRITEPAGE, 1,
|
|
||||||
[address_space_operations->writepage exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITEPAGE_T], [
|
|
||||||
dnl #
|
|
||||||
dnl # 6.3 API change
|
|
||||||
dnl # The writepage_t function type now has its first argument as
|
|
||||||
dnl # struct folio* instead of struct page*
|
|
||||||
dnl #
|
|
||||||
ZFS_LINUX_TEST_SRC([writepage_t_folio], [
|
|
||||||
#include <linux/writeback.h>
|
|
||||||
static int putpage(struct folio *folio,
|
|
||||||
struct writeback_control *wbc, void *data)
|
|
||||||
{ return 0; }
|
|
||||||
writepage_t func = putpage;
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_WRITEPAGE_T], [
|
|
||||||
AC_MSG_CHECKING([whether int (*writepage_t)() takes struct folio*])
|
|
||||||
ZFS_LINUX_TEST_RESULT([writepage_t_folio], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_WRITEPAGE_T_FOLIO, 1,
|
|
||||||
[int (*writepage_t)() takes struct folio*])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITE_CACHE_PAGES], [
|
|
||||||
dnl #
|
|
||||||
dnl # 6.18 API change
|
|
||||||
dnl # write_cache_pages() has been removed.
|
|
||||||
dnl #
|
|
||||||
ZFS_LINUX_TEST_SRC([write_cache_pages], [
|
|
||||||
#include <linux/writeback.h>
|
|
||||||
], [
|
|
||||||
(void) write_cache_pages(NULL, NULL, NULL, NULL);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_WRITE_CACHE_PAGES], [
|
|
||||||
AC_MSG_CHECKING([whether write_cache_pages() is available])
|
|
||||||
ZFS_LINUX_TEST_RESULT([write_cache_pages], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_WRITE_CACHE_PAGES, 1,
|
|
||||||
[write_cache_pages() is available])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITEBACK], [
|
|
||||||
ZFS_AC_KERNEL_SRC_WRITEPAGE_T
|
|
||||||
ZFS_AC_KERNEL_SRC_WRITE_CACHE_PAGES
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_WRITEBACK], [
|
|
||||||
ZFS_AC_KERNEL_WRITEPAGE_T
|
|
||||||
ZFS_AC_KERNEL_WRITE_CACHE_PAGES
|
|
||||||
])
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITEPAGE_T], [
|
||||||
|
dnl #
|
||||||
|
dnl # 6.3 API change
|
||||||
|
dnl # The writepage_t function type now has its first argument as
|
||||||
|
dnl # struct folio* instead of struct page*
|
||||||
|
dnl #
|
||||||
|
ZFS_LINUX_TEST_SRC([writepage_t_folio], [
|
||||||
|
#include <linux/writeback.h>
|
||||||
|
static int putpage(struct folio *folio,
|
||||||
|
struct writeback_control *wbc, void *data)
|
||||||
|
{ return 0; }
|
||||||
|
writepage_t func = putpage;
|
||||||
|
],[])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_WRITEPAGE_T], [
|
||||||
|
AC_MSG_CHECKING([whether int (*writepage_t)() takes struct folio*])
|
||||||
|
ZFS_LINUX_TEST_RESULT([writepage_t_folio], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_WRITEPAGE_T_FOLIO, 1,
|
||||||
|
[int (*writepage_t)() takes struct folio*])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
+2
-20
@@ -70,7 +70,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_COMMIT_METADATA
|
ZFS_AC_KERNEL_SRC_COMMIT_METADATA
|
||||||
ZFS_AC_KERNEL_SRC_SETATTR_PREPARE
|
ZFS_AC_KERNEL_SRC_SETATTR_PREPARE
|
||||||
ZFS_AC_KERNEL_SRC_INSERT_INODE_LOCKED
|
ZFS_AC_KERNEL_SRC_INSERT_INODE_LOCKED
|
||||||
ZFS_AC_KERNEL_SRC_DENTRY
|
|
||||||
ZFS_AC_KERNEL_SRC_TRUNCATE_SETSIZE
|
ZFS_AC_KERNEL_SRC_TRUNCATE_SETSIZE
|
||||||
ZFS_AC_KERNEL_SRC_SECURITY_INODE
|
ZFS_AC_KERNEL_SRC_SECURITY_INODE
|
||||||
ZFS_AC_KERNEL_SRC_FST_MOUNT
|
ZFS_AC_KERNEL_SRC_FST_MOUNT
|
||||||
@@ -83,7 +82,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_VFS_MIGRATEPAGE
|
ZFS_AC_KERNEL_SRC_VFS_MIGRATEPAGE
|
||||||
ZFS_AC_KERNEL_SRC_VFS_FSYNC_2ARGS
|
ZFS_AC_KERNEL_SRC_VFS_FSYNC_2ARGS
|
||||||
ZFS_AC_KERNEL_SRC_VFS_READPAGES
|
ZFS_AC_KERNEL_SRC_VFS_READPAGES
|
||||||
ZFS_AC_KERNEL_SRC_VFS_WRITEPAGE
|
|
||||||
ZFS_AC_KERNEL_SRC_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
ZFS_AC_KERNEL_SRC_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
||||||
ZFS_AC_KERNEL_SRC_VFS_IOV_ITER
|
ZFS_AC_KERNEL_SRC_VFS_IOV_ITER
|
||||||
ZFS_AC_KERNEL_SRC_VFS_GENERIC_COPY_FILE_RANGE
|
ZFS_AC_KERNEL_SRC_VFS_GENERIC_COPY_FILE_RANGE
|
||||||
@@ -113,7 +111,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_STANDALONE_LINUX_STDARG
|
ZFS_AC_KERNEL_SRC_STANDALONE_LINUX_STDARG
|
||||||
ZFS_AC_KERNEL_SRC_STRLCPY
|
ZFS_AC_KERNEL_SRC_STRLCPY
|
||||||
ZFS_AC_KERNEL_SRC_PAGEMAP_FOLIO_WAIT_BIT
|
ZFS_AC_KERNEL_SRC_PAGEMAP_FOLIO_WAIT_BIT
|
||||||
ZFS_AC_KERNEL_SRC_PAGEMAP_READAHEAD_PAGE
|
|
||||||
ZFS_AC_KERNEL_SRC_ADD_DISK
|
ZFS_AC_KERNEL_SRC_ADD_DISK
|
||||||
ZFS_AC_KERNEL_SRC_KTHREAD
|
ZFS_AC_KERNEL_SRC_KTHREAD
|
||||||
ZFS_AC_KERNEL_SRC_ZERO_PAGE
|
ZFS_AC_KERNEL_SRC_ZERO_PAGE
|
||||||
@@ -121,7 +118,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_IDMAP_MNT_API
|
ZFS_AC_KERNEL_SRC_IDMAP_MNT_API
|
||||||
ZFS_AC_KERNEL_SRC_IDMAP_NO_USERNS
|
ZFS_AC_KERNEL_SRC_IDMAP_NO_USERNS
|
||||||
ZFS_AC_KERNEL_SRC_IATTR_VFSID
|
ZFS_AC_KERNEL_SRC_IATTR_VFSID
|
||||||
ZFS_AC_KERNEL_SRC_WRITEBACK
|
ZFS_AC_KERNEL_SRC_WRITEPAGE_T
|
||||||
ZFS_AC_KERNEL_SRC_RECLAIMED
|
ZFS_AC_KERNEL_SRC_RECLAIMED
|
||||||
ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_TABLE
|
ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_TABLE
|
||||||
ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_SZ
|
ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_SZ
|
||||||
@@ -133,12 +130,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_MM_PAGE_MAPPING
|
ZFS_AC_KERNEL_SRC_MM_PAGE_MAPPING
|
||||||
ZFS_AC_KERNEL_SRC_FILE
|
ZFS_AC_KERNEL_SRC_FILE
|
||||||
ZFS_AC_KERNEL_SRC_PIN_USER_PAGES
|
ZFS_AC_KERNEL_SRC_PIN_USER_PAGES
|
||||||
ZFS_AC_KERNEL_SRC_TIMER
|
|
||||||
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_WB_ERR
|
|
||||||
ZFS_AC_KERNEL_SRC_SOPS_FREE_INODE
|
|
||||||
ZFS_AC_KERNEL_SRC_NAMESPACE
|
|
||||||
ZFS_AC_KERNEL_SRC_INODE_GENERIC_DROP
|
|
||||||
ZFS_AC_KERNEL_SRC_KASAN_ENABLED
|
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
powerpc*)
|
powerpc*)
|
||||||
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
|
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
|
||||||
@@ -192,7 +183,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_COMMIT_METADATA
|
ZFS_AC_KERNEL_COMMIT_METADATA
|
||||||
ZFS_AC_KERNEL_SETATTR_PREPARE
|
ZFS_AC_KERNEL_SETATTR_PREPARE
|
||||||
ZFS_AC_KERNEL_INSERT_INODE_LOCKED
|
ZFS_AC_KERNEL_INSERT_INODE_LOCKED
|
||||||
ZFS_AC_KERNEL_DENTRY
|
|
||||||
ZFS_AC_KERNEL_TRUNCATE_SETSIZE
|
ZFS_AC_KERNEL_TRUNCATE_SETSIZE
|
||||||
ZFS_AC_KERNEL_SECURITY_INODE
|
ZFS_AC_KERNEL_SECURITY_INODE
|
||||||
ZFS_AC_KERNEL_FST_MOUNT
|
ZFS_AC_KERNEL_FST_MOUNT
|
||||||
@@ -205,7 +195,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_VFS_MIGRATEPAGE
|
ZFS_AC_KERNEL_VFS_MIGRATEPAGE
|
||||||
ZFS_AC_KERNEL_VFS_FSYNC_2ARGS
|
ZFS_AC_KERNEL_VFS_FSYNC_2ARGS
|
||||||
ZFS_AC_KERNEL_VFS_READPAGES
|
ZFS_AC_KERNEL_VFS_READPAGES
|
||||||
ZFS_AC_KERNEL_VFS_WRITEPAGE
|
|
||||||
ZFS_AC_KERNEL_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
ZFS_AC_KERNEL_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
||||||
ZFS_AC_KERNEL_VFS_IOV_ITER
|
ZFS_AC_KERNEL_VFS_IOV_ITER
|
||||||
ZFS_AC_KERNEL_VFS_GENERIC_COPY_FILE_RANGE
|
ZFS_AC_KERNEL_VFS_GENERIC_COPY_FILE_RANGE
|
||||||
@@ -235,7 +224,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_STANDALONE_LINUX_STDARG
|
ZFS_AC_KERNEL_STANDALONE_LINUX_STDARG
|
||||||
ZFS_AC_KERNEL_STRLCPY
|
ZFS_AC_KERNEL_STRLCPY
|
||||||
ZFS_AC_KERNEL_PAGEMAP_FOLIO_WAIT_BIT
|
ZFS_AC_KERNEL_PAGEMAP_FOLIO_WAIT_BIT
|
||||||
ZFS_AC_KERNEL_PAGEMAP_READAHEAD_PAGE
|
|
||||||
ZFS_AC_KERNEL_ADD_DISK
|
ZFS_AC_KERNEL_ADD_DISK
|
||||||
ZFS_AC_KERNEL_KTHREAD
|
ZFS_AC_KERNEL_KTHREAD
|
||||||
ZFS_AC_KERNEL_ZERO_PAGE
|
ZFS_AC_KERNEL_ZERO_PAGE
|
||||||
@@ -243,7 +231,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_IDMAP_MNT_API
|
ZFS_AC_KERNEL_IDMAP_MNT_API
|
||||||
ZFS_AC_KERNEL_IDMAP_NO_USERNS
|
ZFS_AC_KERNEL_IDMAP_NO_USERNS
|
||||||
ZFS_AC_KERNEL_IATTR_VFSID
|
ZFS_AC_KERNEL_IATTR_VFSID
|
||||||
ZFS_AC_KERNEL_WRITEBACK
|
ZFS_AC_KERNEL_WRITEPAGE_T
|
||||||
ZFS_AC_KERNEL_RECLAIMED
|
ZFS_AC_KERNEL_RECLAIMED
|
||||||
ZFS_AC_KERNEL_REGISTER_SYSCTL_TABLE
|
ZFS_AC_KERNEL_REGISTER_SYSCTL_TABLE
|
||||||
ZFS_AC_KERNEL_REGISTER_SYSCTL_SZ
|
ZFS_AC_KERNEL_REGISTER_SYSCTL_SZ
|
||||||
@@ -256,12 +244,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_1ARG_ASSIGN_STR
|
ZFS_AC_KERNEL_1ARG_ASSIGN_STR
|
||||||
ZFS_AC_KERNEL_FILE
|
ZFS_AC_KERNEL_FILE
|
||||||
ZFS_AC_KERNEL_PIN_USER_PAGES
|
ZFS_AC_KERNEL_PIN_USER_PAGES
|
||||||
ZFS_AC_KERNEL_TIMER
|
|
||||||
ZFS_AC_KERNEL_SUPER_BLOCK_S_WB_ERR
|
|
||||||
ZFS_AC_KERNEL_SOPS_FREE_INODE
|
|
||||||
ZFS_AC_KERNEL_NAMESPACE
|
|
||||||
ZFS_AC_KERNEL_INODE_GENERIC_DROP
|
|
||||||
ZFS_AC_KERNEL_KASAN_ENABLED
|
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
powerpc*)
|
powerpc*)
|
||||||
ZFS_AC_KERNEL_CPU_HAS_FEATURE
|
ZFS_AC_KERNEL_CPU_HAS_FEATURE
|
||||||
|
|||||||
+23
-90
@@ -24,8 +24,6 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_SIMD], [
|
|||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AES
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AES
|
||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_PCLMULQDQ
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_PCLMULQDQ
|
||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_MOVBE
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_MOVBE
|
||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VAES
|
|
||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VPCLMULQDQ
|
|
||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE
|
||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVEOPT
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVEOPT
|
||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVES
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVES
|
||||||
@@ -40,10 +38,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_SSE], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports SSE])
|
AC_MSG_CHECKING([whether host toolchain supports SSE])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("xorps %xmm0, %xmm1");
|
__asm__ __volatile__("xorps %xmm0, %xmm1");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_DEFINE([HAVE_SSE], 1, [Define if host toolchain supports SSE])
|
AC_DEFINE([HAVE_SSE], 1, [Define if host toolchain supports SSE])
|
||||||
@@ -60,10 +57,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_SSE2], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports SSE2])
|
AC_MSG_CHECKING([whether host toolchain supports SSE2])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("pxor %xmm0, %xmm1");
|
__asm__ __volatile__("pxor %xmm0, %xmm1");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_DEFINE([HAVE_SSE2], 1, [Define if host toolchain supports SSE2])
|
AC_DEFINE([HAVE_SSE2], 1, [Define if host toolchain supports SSE2])
|
||||||
@@ -80,11 +76,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_SSE3], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports SSE3])
|
AC_MSG_CHECKING([whether host toolchain supports SSE3])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
char v[16];
|
char v[16];
|
||||||
__asm__ __volatile__("lddqu %0,%%xmm0" :: "m"(v[0]));
|
__asm__ __volatile__("lddqu %0,%%xmm0" :: "m"(v[0]));
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_DEFINE([HAVE_SSE3], 1, [Define if host toolchain supports SSE3])
|
AC_DEFINE([HAVE_SSE3], 1, [Define if host toolchain supports SSE3])
|
||||||
@@ -101,10 +96,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_SSSE3], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports SSSE3])
|
AC_MSG_CHECKING([whether host toolchain supports SSSE3])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("pshufb %xmm0,%xmm1");
|
__asm__ __volatile__("pshufb %xmm0,%xmm1");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_DEFINE([HAVE_SSSE3], 1, [Define if host toolchain supports SSSE3])
|
AC_DEFINE([HAVE_SSSE3], 1, [Define if host toolchain supports SSSE3])
|
||||||
@@ -121,10 +115,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_SSE4_1], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports SSE4.1])
|
AC_MSG_CHECKING([whether host toolchain supports SSE4.1])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("pmaxsb %xmm0,%xmm1");
|
__asm__ __volatile__("pmaxsb %xmm0,%xmm1");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_DEFINE([HAVE_SSE4_1], 1, [Define if host toolchain supports SSE4.1])
|
AC_DEFINE([HAVE_SSE4_1], 1, [Define if host toolchain supports SSE4.1])
|
||||||
@@ -141,10 +134,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_SSE4_2], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports SSE4.2])
|
AC_MSG_CHECKING([whether host toolchain supports SSE4.2])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("pcmpgtq %xmm0, %xmm1");
|
__asm__ __volatile__("pcmpgtq %xmm0, %xmm1");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_DEFINE([HAVE_SSE4_2], 1, [Define if host toolchain supports SSE4.2])
|
AC_DEFINE([HAVE_SSE4_2], 1, [Define if host toolchain supports SSE4.2])
|
||||||
@@ -161,11 +153,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports AVX])
|
AC_MSG_CHECKING([whether host toolchain supports AVX])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
char v[32];
|
char v[32];
|
||||||
__asm__ __volatile__("vmovdqa %0,%%ymm0" :: "m"(v[0]));
|
__asm__ __volatile__("vmovdqa %0,%%ymm0" :: "m"(v[0]));
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -183,10 +174,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX2], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vpshufb %ymm0,%ymm1,%ymm2");
|
__asm__ __volatile__("vpshufb %ymm0,%ymm1,%ymm2");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -204,10 +194,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512F], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vpandd %zmm0,%zmm1,%zmm2");
|
__asm__ __volatile__("vpandd %zmm0,%zmm1,%zmm2");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -225,10 +214,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512CD], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vplzcntd %zmm0,%zmm1");
|
__asm__ __volatile__("vplzcntd %zmm0,%zmm1");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -246,10 +234,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512DQ], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vandpd %zmm0,%zmm1,%zmm2");
|
__asm__ __volatile__("vandpd %zmm0,%zmm1,%zmm2");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -267,10 +254,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512BW], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vpshufb %zmm0,%zmm1,%zmm2");
|
__asm__ __volatile__("vpshufb %zmm0,%zmm1,%zmm2");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -288,10 +274,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512IFMA], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vpmadd52luq %zmm0,%zmm1,%zmm2");
|
__asm__ __volatile__("vpmadd52luq %zmm0,%zmm1,%zmm2");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -309,10 +294,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512VBMI], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vpermb %zmm0,%zmm1,%zmm2");
|
__asm__ __volatile__("vpermb %zmm0,%zmm1,%zmm2");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -330,10 +314,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512PF], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vgatherpf0dps (%rsi,%zmm0,4){%k1}");
|
__asm__ __volatile__("vgatherpf0dps (%rsi,%zmm0,4){%k1}");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -351,10 +334,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512ER], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vexp2pd %zmm0,%zmm1");
|
__asm__ __volatile__("vexp2pd %zmm0,%zmm1");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -372,10 +354,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512VL], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vpabsq %zmm0,%zmm1");
|
__asm__ __volatile__("vpabsq %zmm0,%zmm1");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -393,10 +374,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AES], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("aesenc %xmm0, %xmm1");
|
__asm__ __volatile__("aesenc %xmm0, %xmm1");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -414,10 +394,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_PCLMULQDQ], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("pclmulqdq %0, %%xmm0, %%xmm1" :: "i"(0));
|
__asm__ __volatile__("pclmulqdq %0, %%xmm0, %%xmm1" :: "i"(0));
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -435,10 +414,9 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_MOVBE], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("movbe 0(%eax), %eax");
|
__asm__ __volatile__("movbe 0(%eax), %eax");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -448,48 +426,6 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_MOVBE], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VAES
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VAES], [
|
|
||||||
AC_MSG_CHECKING([whether host toolchain supports VAES])
|
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
|
||||||
[
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
__asm__ __volatile__("vaesenc %ymm0, %ymm1, %ymm0");
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
]])], [
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE([HAVE_VAES], 1, [Define if host toolchain supports VAES])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VPCLMULQDQ
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VPCLMULQDQ], [
|
|
||||||
AC_MSG_CHECKING([whether host toolchain supports VPCLMULQDQ])
|
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
|
||||||
[
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
__asm__ __volatile__("vpclmulqdq %0, %%ymm4, %%ymm3, %%ymm5" :: "i"(0));
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
]])], [
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE([HAVE_VPCLMULQDQ], 1, [Define if host toolchain supports VPCLMULQDQ])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE
|
dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE
|
||||||
dnl #
|
dnl #
|
||||||
@@ -498,11 +434,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
char b[4096] __attribute__ ((aligned (64)));
|
char b[4096] __attribute__ ((aligned (64)));
|
||||||
__asm__ __volatile__("xsave %[b]\n" : : [b] "m" (*b) : "memory");
|
__asm__ __volatile__("xsave %[b]\n" : : [b] "m" (*b) : "memory");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -520,11 +455,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVEOPT], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
char b[4096] __attribute__ ((aligned (64)));
|
char b[4096] __attribute__ ((aligned (64)));
|
||||||
__asm__ __volatile__("xsaveopt %[b]\n" : : [b] "m" (*b) : "memory");
|
__asm__ __volatile__("xsaveopt %[b]\n" : : [b] "m" (*b) : "memory");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -542,11 +476,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVES], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
int main()
|
void main()
|
||||||
{
|
{
|
||||||
char b[4096] __attribute__ ((aligned (64)));
|
char b[4096] __attribute__ ((aligned (64)));
|
||||||
__asm__ __volatile__("xsaves %[b]\n" : : [b] "m" (*b) : "memory");
|
__asm__ __volatile__("xsaves %[b]\n" : : [b] "m" (*b) : "memory");
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
|
|||||||
@@ -34,22 +34,6 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_LIBUNWIND], [
|
|||||||
], [
|
], [
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
])
|
])
|
||||||
dnl LLVM includes it's own libunwind library, which
|
|
||||||
dnl defines the highest numbered register in a different
|
|
||||||
dnl way, and has an incompatible unw_resname function.
|
|
||||||
AC_MSG_CHECKING([whether libunwind is llvm libunwind])
|
|
||||||
AC_COMPILE_IFELSE([
|
|
||||||
AC_LANG_PROGRAM([
|
|
||||||
#include <libunwind.h>
|
|
||||||
#if !defined(_LIBUNWIND_HIGHEST_DWARF_REGISTER)
|
|
||||||
#error "_LIBUNWIND_HIGHEST_DWARF_REGISTER is not defined"
|
|
||||||
#endif
|
|
||||||
], [])], [
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE(IS_LIBUNWIND_LLVM, 1, [libunwind is llvm libunwind])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
AX_RESTORE_FLAGS
|
AX_RESTORE_FLAGS
|
||||||
], [
|
], [
|
||||||
AS_IF([test "x$with_libunwind" = "xyes"], [
|
AS_IF([test "x$with_libunwind" = "xyes"], [
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
dnl #
|
|
||||||
dnl # Check for statx() function and STATX_MNT_ID availability
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_CONFIG_USER_STATX], [
|
|
||||||
AC_CHECK_HEADERS([sys/stat.h],
|
|
||||||
[have_stat_headers=yes],
|
|
||||||
[have_stat_headers=no])
|
|
||||||
|
|
||||||
AS_IF([test "x$have_stat_headers" = "xyes"], [
|
|
||||||
AC_CHECK_FUNC([statx], [
|
|
||||||
AC_DEFINE([HAVE_STATX], [1], [statx() is available])
|
|
||||||
|
|
||||||
dnl Check for STATX_MNT_ID availability
|
|
||||||
AC_MSG_CHECKING([for STATX_MNT_ID])
|
|
||||||
AC_COMPILE_IFELSE([
|
|
||||||
AC_LANG_PROGRAM([[
|
|
||||||
#include <sys/stat.h>
|
|
||||||
]], [[
|
|
||||||
struct statx stx;
|
|
||||||
int mask = STATX_MNT_ID;
|
|
||||||
(void)mask;
|
|
||||||
(void)stx.stx_mnt_id;
|
|
||||||
]])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
AC_DEFINE([HAVE_STATX_MNT_ID], [1], [STATX_MNT_ID is available])
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
], [
|
|
||||||
AC_MSG_WARN([sys/stat.h not found; skipping statx support])
|
|
||||||
])
|
|
||||||
]) dnl end AC_DEFUN
|
|
||||||
@@ -17,7 +17,6 @@ AC_DEFUN([ZFS_AC_CONFIG_USER], [
|
|||||||
ZFS_AC_CONFIG_USER_LIBUDEV
|
ZFS_AC_CONFIG_USER_LIBUDEV
|
||||||
ZFS_AC_CONFIG_USER_LIBUUID
|
ZFS_AC_CONFIG_USER_LIBUUID
|
||||||
ZFS_AC_CONFIG_USER_LIBBLKID
|
ZFS_AC_CONFIG_USER_LIBBLKID
|
||||||
ZFS_AC_CONFIG_USER_STATX
|
|
||||||
])
|
])
|
||||||
ZFS_AC_CONFIG_USER_LIBTIRPC
|
ZFS_AC_CONFIG_USER_LIBTIRPC
|
||||||
ZFS_AC_CONFIG_USER_LIBCRYPTO
|
ZFS_AC_CONFIG_USER_LIBCRYPTO
|
||||||
|
|||||||
@@ -205,46 +205,6 @@ AC_DEFUN([ZFS_AC_DEBUG_INVARIANTS], [
|
|||||||
AC_MSG_RESULT([$enable_invariants])
|
AC_MSG_RESULT([$enable_invariants])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl # Disabled by default. If enabled allows a configured "turn objtools
|
|
||||||
dnl # warnings into errors" (CONFIG_OBJTOOL_WERROR) behavior to take effect.
|
|
||||||
dnl # If disabled, objtool warnings are never turned into errors. It can't
|
|
||||||
dnl # be enabled if the kernel wasn't compiled with CONFIG_OBJTOOL_WERROR=y.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_OBJTOOL_WERROR], [
|
|
||||||
AC_MSG_CHECKING([whether objtool error on warning behavior is enabled])
|
|
||||||
AC_ARG_ENABLE([objtool-werror],
|
|
||||||
[AS_HELP_STRING([--enable-objtool-werror],
|
|
||||||
[Enable objtool's error on warning behaviour if present @<:@default=no@:>@])],
|
|
||||||
[enable_objtool_werror=$enableval],
|
|
||||||
[enable_objtool_werror=no])
|
|
||||||
AC_MSG_RESULT([$enable_objtool_werror])
|
|
||||||
|
|
||||||
AS_IF([test x$CONFIG_OBJTOOL_WERROR_DEFINED = xyes],[
|
|
||||||
AS_IF([test x$enable_objtool_werror = xyes],[
|
|
||||||
AC_MSG_NOTICE([enable-objtool-werror defined, keeping -Werror ])
|
|
||||||
],[
|
|
||||||
AC_MSG_NOTICE([enable-objtool-werror undefined, disabling -Werror ])
|
|
||||||
OBJTOOL_DISABLE_WERROR=y
|
|
||||||
abs_objtool_binary=$kernelsrc/tools/objtool/objtool
|
|
||||||
AS_IF([test -x $abs_objtool_binary],[],[
|
|
||||||
AC_MSG_ERROR([*** objtool binary $abs_objtool_binary not found])
|
|
||||||
])
|
|
||||||
dnl # The path to the wrapper is defined in modules/Makefile.in.
|
|
||||||
])
|
|
||||||
],[
|
|
||||||
dnl # We can't enable --Werror if it's not there.
|
|
||||||
AS_IF([test x$enable_objtool_werror = xyes],[
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** Cannot enable objtool-werror,
|
|
||||||
*** a kernel built with CONFIG_OBJTOOL_WERROR=y is required.
|
|
||||||
])
|
|
||||||
],[])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_SUBST(OBJTOOL_DISABLE_WERROR)
|
|
||||||
AC_SUBST(abs_objtool_binary)
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
||||||
AX_COUNT_CPUS([])
|
AX_COUNT_CPUS([])
|
||||||
AC_SUBST(CPU_COUNT)
|
AC_SUBST(CPU_COUNT)
|
||||||
@@ -252,12 +212,10 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
|||||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION
|
ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION
|
||||||
ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION
|
ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_ATOMIC_ALIGNMENT
|
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH
|
ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN
|
ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH
|
||||||
ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_NO_FORMAT_ZERO_LENGTH
|
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_FORMAT_OVERFLOW
|
ZFS_AC_CONFIG_ALWAYS_CC_FORMAT_OVERFLOW
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_IPA_SRA
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_IPA_SRA
|
||||||
@@ -267,7 +225,6 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
|||||||
ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_SIMD
|
ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_SIMD
|
||||||
ZFS_AC_CONFIG_ALWAYS_SYSTEM
|
ZFS_AC_CONFIG_ALWAYS_SYSTEM
|
||||||
ZFS_AC_CONFIG_ALWAYS_ARCH
|
ZFS_AC_CONFIG_ALWAYS_ARCH
|
||||||
ZFS_AC_CONFIG_CHECK_ARCH_VAR
|
|
||||||
ZFS_AC_CONFIG_ALWAYS_PYTHON
|
ZFS_AC_CONFIG_ALWAYS_PYTHON
|
||||||
ZFS_AC_CONFIG_ALWAYS_PYZFS
|
ZFS_AC_CONFIG_ALWAYS_PYZFS
|
||||||
ZFS_AC_CONFIG_ALWAYS_SED
|
ZFS_AC_CONFIG_ALWAYS_SED
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ ZFS_AC_DEBUGINFO
|
|||||||
ZFS_AC_DEBUG_KMEM
|
ZFS_AC_DEBUG_KMEM
|
||||||
ZFS_AC_DEBUG_KMEM_TRACKING
|
ZFS_AC_DEBUG_KMEM_TRACKING
|
||||||
ZFS_AC_DEBUG_INVARIANTS
|
ZFS_AC_DEBUG_INVARIANTS
|
||||||
ZFS_AC_OBJTOOL_WERROR
|
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
contrib/debian/rules
|
contrib/debian/rules
|
||||||
@@ -87,7 +86,6 @@ AC_CONFIG_FILES([
|
|||||||
zfs.release
|
zfs.release
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_CONFIG_FILES([scripts/objtool-wrapper], [chmod +x scripts/objtool-wrapper])
|
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
|
|||||||
@@ -12,14 +12,14 @@ dist_noinst_DATA += %D%/openzfs-libpam-zfs.postinst
|
|||||||
dist_noinst_DATA += %D%/openzfs-libpam-zfs.prerm
|
dist_noinst_DATA += %D%/openzfs-libpam-zfs.prerm
|
||||||
dist_noinst_DATA += %D%/openzfs-libuutil3.docs
|
dist_noinst_DATA += %D%/openzfs-libuutil3.docs
|
||||||
dist_noinst_DATA += %D%/openzfs-libuutil3.install.in
|
dist_noinst_DATA += %D%/openzfs-libuutil3.install.in
|
||||||
dist_noinst_DATA += %D%/openzfs-libzfs7.docs
|
dist_noinst_DATA += %D%/openzfs-libzfs6.docs
|
||||||
dist_noinst_DATA += %D%/openzfs-libzfs7.install.in
|
dist_noinst_DATA += %D%/openzfs-libzfs6.install.in
|
||||||
dist_noinst_DATA += %D%/openzfs-libzfsbootenv1.docs
|
dist_noinst_DATA += %D%/openzfs-libzfsbootenv1.docs
|
||||||
dist_noinst_DATA += %D%/openzfs-libzfsbootenv1.install.in
|
dist_noinst_DATA += %D%/openzfs-libzfsbootenv1.install.in
|
||||||
dist_noinst_DATA += %D%/openzfs-libzfs-dev.docs
|
dist_noinst_DATA += %D%/openzfs-libzfs-dev.docs
|
||||||
dist_noinst_DATA += %D%/openzfs-libzfs-dev.install.in
|
dist_noinst_DATA += %D%/openzfs-libzfs-dev.install.in
|
||||||
dist_noinst_DATA += %D%/openzfs-libzpool7.docs
|
dist_noinst_DATA += %D%/openzfs-libzpool6.docs
|
||||||
dist_noinst_DATA += %D%/openzfs-libzpool7.install.in
|
dist_noinst_DATA += %D%/openzfs-libzpool6.install.in
|
||||||
dist_noinst_DATA += %D%/openzfs-python3-pyzfs.install
|
dist_noinst_DATA += %D%/openzfs-python3-pyzfs.install
|
||||||
dist_noinst_DATA += %D%/openzfs-zfs-dkms.config
|
dist_noinst_DATA += %D%/openzfs-zfs-dkms.config
|
||||||
dist_noinst_DATA += %D%/openzfs-zfs-dkms.dkms
|
dist_noinst_DATA += %D%/openzfs-zfs-dkms.dkms
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ contrib/pyzfs/libzfs_core/bindings/__pycache__/
|
|||||||
contrib/pyzfs/pyzfs.egg-info/
|
contrib/pyzfs/pyzfs.egg-info/
|
||||||
debian/openzfs-libnvpair3.install
|
debian/openzfs-libnvpair3.install
|
||||||
debian/openzfs-libuutil3.install
|
debian/openzfs-libuutil3.install
|
||||||
debian/openzfs-libzfs7.install
|
debian/openzfs-libzfs6.install
|
||||||
debian/openzfs-libzfs-dev.install
|
debian/openzfs-libzfs-dev.install
|
||||||
debian/openzfs-libzpool7.install
|
debian/openzfs-libzpool6.install
|
||||||
|
|||||||
+13
-13
@@ -79,9 +79,9 @@ Architecture: linux-any
|
|||||||
Depends: libssl-dev | libssl1.0-dev,
|
Depends: libssl-dev | libssl1.0-dev,
|
||||||
openzfs-libnvpair3 (= ${binary:Version}),
|
openzfs-libnvpair3 (= ${binary:Version}),
|
||||||
openzfs-libuutil3 (= ${binary:Version}),
|
openzfs-libuutil3 (= ${binary:Version}),
|
||||||
openzfs-libzfs7 (= ${binary:Version}),
|
openzfs-libzfs6 (= ${binary:Version}),
|
||||||
openzfs-libzfsbootenv1 (= ${binary:Version}),
|
openzfs-libzfsbootenv1 (= ${binary:Version}),
|
||||||
openzfs-libzpool7 (= ${binary:Version}),
|
openzfs-libzpool6 (= ${binary:Version}),
|
||||||
${misc:Depends}
|
${misc:Depends}
|
||||||
Replaces: libzfslinux-dev
|
Replaces: libzfslinux-dev
|
||||||
Conflicts: libzfslinux-dev
|
Conflicts: libzfslinux-dev
|
||||||
@@ -91,18 +91,18 @@ Description: OpenZFS filesystem development files for Linux
|
|||||||
libraries of OpenZFS filesystem.
|
libraries of OpenZFS filesystem.
|
||||||
.
|
.
|
||||||
This package includes the development files of libnvpair3, libuutil3,
|
This package includes the development files of libnvpair3, libuutil3,
|
||||||
libzpool7 and libzfs7.
|
libzpool6 and libzfs6.
|
||||||
|
|
||||||
Package: openzfs-libzfs7
|
Package: openzfs-libzfs6
|
||||||
Section: contrib/libs
|
Section: contrib/libs
|
||||||
Architecture: linux-any
|
Architecture: linux-any
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
# The libcurl4 is loaded through dlopen("libcurl.so.4").
|
# The libcurl4 is loaded through dlopen("libcurl.so.4").
|
||||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988521
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988521
|
||||||
Recommends: libcurl4
|
Recommends: libcurl4
|
||||||
Breaks: libzfs2, libzfs4, libzfs4linux, libzfs6linux, libzfs7linux, openzfs-libzfs4, openzfs-libzfs6
|
Breaks: libzfs2, libzfs4, libzfs4linux, libzfs6linux
|
||||||
Replaces: libzfs2, libzfs4, libzfs4linux, libzfs6linux, libzfs7linux, openzfs-libzfs4, openzfs-libzfs6
|
Replaces: libzfs2, libzfs4, libzfs4linux, libzfs6linux
|
||||||
Conflicts: libzfs7linux
|
Conflicts: libzfs6linux
|
||||||
Description: OpenZFS filesystem library for Linux - general support
|
Description: OpenZFS filesystem library for Linux - general support
|
||||||
OpenZFS is a storage platform that encompasses the functionality of
|
OpenZFS is a storage platform that encompasses the functionality of
|
||||||
traditional filesystems and volume managers. It supports data checksums,
|
traditional filesystems and volume managers. It supports data checksums,
|
||||||
@@ -124,13 +124,13 @@ Description: OpenZFS filesystem library for Linux - label info support
|
|||||||
.
|
.
|
||||||
The zfsbootenv library provides support for modifying ZFS label information.
|
The zfsbootenv library provides support for modifying ZFS label information.
|
||||||
|
|
||||||
Package: openzfs-libzpool7
|
Package: openzfs-libzpool6
|
||||||
Section: contrib/libs
|
Section: contrib/libs
|
||||||
Architecture: linux-any
|
Architecture: linux-any
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
Breaks: libzpool2, libzpool5, libzpool6linux, libzpool7linux
|
Breaks: libzpool2, libzpool5, libzpool5linux, libzpool6linux
|
||||||
Replaces: libzpool2, libzpool5, libzpool6linux, libzpool7linux
|
Replaces: libzpool2, libzpool5, libzpool5linux, libzpool6linux
|
||||||
Conflicts: libzpool7linux
|
Conflicts: libzpool6linux
|
||||||
Description: OpenZFS pool library for Linux
|
Description: OpenZFS pool library for Linux
|
||||||
OpenZFS is a storage platform that encompasses the functionality of
|
OpenZFS is a storage platform that encompasses the functionality of
|
||||||
traditional filesystems and volume managers. It supports data checksums,
|
traditional filesystems and volume managers. It supports data checksums,
|
||||||
@@ -247,8 +247,8 @@ Architecture: linux-any
|
|||||||
Pre-Depends: ${misc:Pre-Depends}
|
Pre-Depends: ${misc:Pre-Depends}
|
||||||
Depends: openzfs-libnvpair3 (= ${binary:Version}),
|
Depends: openzfs-libnvpair3 (= ${binary:Version}),
|
||||||
openzfs-libuutil3 (= ${binary:Version}),
|
openzfs-libuutil3 (= ${binary:Version}),
|
||||||
openzfs-libzfs7 (= ${binary:Version}),
|
openzfs-libzfs6 (= ${binary:Version}),
|
||||||
openzfs-libzpool7 (= ${binary:Version}),
|
openzfs-libzpool6 (= ${binary:Version}),
|
||||||
python3,
|
python3,
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
${shlibs:Depends}
|
${shlibs:Depends}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ The detailed contributor information can be found in [2][3].
|
|||||||
|
|
||||||
Files: contrib/debian/*
|
Files: contrib/debian/*
|
||||||
Copyright:
|
Copyright:
|
||||||
2013-2025, Aron Xu <aron@debian.org>
|
2013-2016, Aron Xu <aron@debian.org>
|
||||||
2016, Petter Reinholdtsen <pere@hungry.com>
|
2016, Petter Reinholdtsen <pere@hungry.com>
|
||||||
2013, Carlos Alberto Lopez Perez <clopez@igalia.com>
|
2013, Carlos Alberto Lopez Perez <clopez@igalia.com>
|
||||||
2013, Turbo Fredriksson <turbo@bayour.com>
|
2013, Turbo Fredriksson <turbo@bayour.com>
|
||||||
@@ -12,8 +12,6 @@ Copyright:
|
|||||||
2011-2013, Darik Horn <dajhorn@vanadac.com>
|
2011-2013, Darik Horn <dajhorn@vanadac.com>
|
||||||
2018-2019, Mo Zhou <cdluminate@gmail.com>
|
2018-2019, Mo Zhou <cdluminate@gmail.com>
|
||||||
2018-2020, Mo Zhou <lumin@debian.org>
|
2018-2020, Mo Zhou <lumin@debian.org>
|
||||||
2023-2024, Shengqi Chen <harry-chen@outlook.com>
|
|
||||||
2024-2025, Shengqi Chen <harry@debian.org>
|
|
||||||
License: GPL-2+
|
License: GPL-2+
|
||||||
|
|
||||||
[1] https://tracker.debian.org/pkg/zfs-linux
|
[1] https://tracker.debian.org/pkg/zfs-linux
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
usr/bin/zarcsummary.py
|
usr/bin/arc_summary.py
|
||||||
usr/share/zfs/zfs-helpers.sh
|
usr/share/zfs/zfs-helpers.sh
|
||||||
etc/default/zfs
|
etc/default/zfs
|
||||||
etc/init.d
|
etc/init.d
|
||||||
@@ -9,4 +9,4 @@ etc/zfs/vdev_id.conf.sas_direct.example
|
|||||||
etc/zfs/vdev_id.conf.sas_switch.example
|
etc/zfs/vdev_id.conf.sas_switch.example
|
||||||
etc/zfs/vdev_id.conf.scsi.example
|
etc/zfs/vdev_id.conf.scsi.example
|
||||||
etc/zfs/zfs-functions
|
etc/zfs/zfs-functions
|
||||||
usr/lib/systemd/system/zfs-import.service
|
lib/systemd/system/zfs-import.service
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
usr/lib/@DEB_HOST_MULTIARCH@/libnvpair.so.*
|
lib/@DEB_HOST_MULTIARCH@/libnvpair.so.*
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
usr/lib/*/security/pam_zfs_key.so
|
lib/*/security/pam_zfs_key.so
|
||||||
usr/share/pam-configs/zfs_key
|
usr/share/pam-configs/zfs_key
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user