mirror of
https://github.com/openzfs/zfs.git
synced 2025-10-01 11:26:49 +00:00
Compare commits
290 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c883088df8 | ||
![]() |
c0c4866f8a | ||
![]() |
b62fd2cef9 | ||
![]() |
d92fbe2150 | ||
![]() |
a4978d2605 | ||
![]() |
a6f6c881ff | ||
![]() |
fc3d34bd08 | ||
![]() |
36116b4612 | ||
![]() |
b699dacb4a | ||
![]() |
d22bf6a9bd | ||
![]() |
40e20d808c | ||
![]() |
9bb8d26bd5 | ||
![]() |
08fd5ccc38 | ||
![]() |
00d85a98ea | ||
![]() |
9ef15845f5 | ||
![]() |
69142125d7 | ||
![]() |
59112ca27d | ||
![]() |
992d8871eb | ||
![]() |
e6ca28c970 | ||
![]() |
cbd51c5f24 | ||
![]() |
09e6724e1e | ||
![]() |
7466e09a49 | ||
![]() |
ce782d0804 | ||
![]() |
64afc4e66e | ||
![]() |
621dfaff5c | ||
![]() |
ab653603f8 | ||
![]() |
acc7cd8e99 | ||
![]() |
dd0874cf7e | ||
![]() |
7cd666d54b | ||
![]() |
0606ce2055 | ||
![]() |
dd3a0a2715 | ||
![]() |
9ad150446f | ||
![]() |
9da745f5de | ||
![]() |
cfa29b9945 | ||
![]() |
09a7961364 | ||
![]() |
276be5357c | ||
![]() |
424d06a298 | ||
![]() |
6b64acc157 | ||
![]() |
a2e71db664 | ||
![]() |
eb4a36bcef | ||
![]() |
52cee9a3eb | ||
![]() |
2006ac1f4a | ||
![]() |
509526ad21 | ||
![]() |
4db88c37cc | ||
![]() |
8b1c6db3d2 | ||
![]() |
22e4f08c30 | ||
![]() |
7bccf98a73 | ||
![]() |
4d4972ed98 | ||
![]() |
3425484eb9 | ||
![]() |
9e0304c363 | ||
![]() |
c1161e2851 | ||
![]() |
ef527958c6 | ||
![]() |
d2f7b2e557 | ||
![]() |
83c0ccc7cf | ||
![]() |
c16d103422 | ||
![]() |
f94a77951d | ||
![]() |
d8b0b6032b | ||
![]() |
387f003be3 | ||
![]() |
07cf973fe9 | ||
![]() |
2ecc2dfe42 | ||
![]() |
9ecd112dc1 | ||
![]() |
a00231a3fc | ||
![]() |
9181e94f0b | ||
![]() |
3bd23fd78d | ||
![]() |
ac592318b8 | ||
![]() |
152a775eac | ||
![]() |
976bf9b6a6 | ||
![]() |
f71c16a661 | ||
![]() |
9c40ae0219 | ||
![]() |
a701548eb4 | ||
![]() |
b13c91bb29 | ||
![]() |
e09356fa05 | ||
![]() |
1e1d748cae | ||
![]() |
dea2d3c6cd | ||
![]() |
121924575e | ||
![]() |
e11b3eb1c6 | ||
![]() |
3b8f227362 | ||
![]() |
e48195c816 | ||
![]() |
ad47eca195 | ||
![]() |
2e259c6f00 | ||
![]() |
a8c29a79df | ||
![]() |
f13593619b | ||
![]() |
c34fe8dcbc | ||
![]() |
2a59b6bfa9 | ||
![]() |
db2db50e37 | ||
![]() |
d530d5d8a5 | ||
![]() |
3c502e376b | ||
![]() |
03b84099d9 | ||
![]() |
18a9185165 | ||
![]() |
3c13601a12 | ||
![]() |
b3626f0a35 | ||
![]() |
494aaaed89 | ||
![]() |
522414da3b | ||
![]() |
a8c256046b | ||
![]() |
eb34de04d7 | ||
![]() |
d813aa8530 | ||
![]() |
3b267e72de | ||
![]() |
349fb77f11 | ||
![]() |
2a953e0ac9 | ||
![]() |
e4985bf5a1 | ||
![]() |
e96675a7b1 | ||
![]() |
d702f86eaf | ||
![]() |
41c4599cba | ||
![]() |
56a2a0981e | ||
![]() |
9b9b09f452 | ||
![]() |
89fcb8c6f9 | ||
![]() |
55dd24c4cc | ||
![]() |
78287023ce | ||
![]() |
479dca51c6 | ||
![]() |
87e9e82865 | ||
![]() |
0733fe2aa5 | ||
![]() |
fd836dfe24 | ||
![]() |
e92a680c70 | ||
![]() |
f1659cc782 | ||
![]() |
f863ac3d0f | ||
![]() |
f6d2e5c075 | ||
![]() |
f2fe4d51a8 | ||
![]() |
76663fe372 | ||
![]() |
44c8ff9b0c | ||
![]() |
f0ffcc3adc | ||
![]() |
e534ba5ce7 | ||
![]() |
1c7048357d | ||
![]() |
3ec4ea68d4 | ||
![]() |
bd7a02c251 | ||
![]() |
e82e68400a | ||
![]() |
3f67e012e4 | ||
![]() |
21875dd090 | ||
![]() |
fe9d409e90 | ||
![]() |
7aef672b77 | ||
![]() |
f9a9aea126 | ||
![]() |
8ba748d414 | ||
![]() |
e860cb0200 | ||
![]() |
86c3ed40e1 | ||
![]() |
6e41aca519 | ||
![]() |
79f7de5752 | ||
![]() |
0ef1964c79 | ||
![]() |
eaa62d9951 | ||
![]() |
8ca95d78c5 | ||
![]() |
edebca5dfc | ||
![]() |
1cc1bf4fa7 | ||
![]() |
0bcd1151f0 | ||
![]() |
78fd79eacd | ||
![]() |
6d693e20a2 | ||
![]() |
b76724ae47 | ||
![]() |
459c99ff23 | ||
![]() |
95785196f2 | ||
![]() |
2bba9fd479 | ||
![]() |
30ee2ee8ec | ||
![]() |
d7b6e470ff | ||
![]() |
04186d33be | ||
![]() |
810fc49a3e | ||
![]() |
75a7740574 | ||
![]() |
a80e1f1c90 | ||
![]() |
111ae3364c | ||
![]() |
3990273ffe | ||
![]() |
da93b72c91 | ||
![]() |
9fa06c5574 | ||
![]() |
8d47d2d579 | ||
![]() |
f6e6e77ed8 | ||
![]() |
120d1787d7 | ||
![]() |
2407f30bda | ||
![]() |
9be8ddfb3c | ||
![]() |
3755cde22a | ||
![]() |
33d7c2d165 | ||
![]() |
2919784be2 | ||
![]() |
8495536f7f | ||
![]() |
bcd010d3a5 | ||
![]() |
c27277daac | ||
![]() |
bf54da84fb | ||
![]() |
3158b5d718 | ||
![]() |
ba7797c8db | ||
![]() |
bc77a0c85e | ||
![]() |
1611b8e56e | ||
![]() |
8015e2ea66 | ||
![]() |
c53bc3837c | ||
![]() |
e9dc31c74e | ||
![]() |
b04b13ae79 | ||
![]() |
7b1d421adf | ||
![]() |
db5c3b4c76 | ||
![]() |
0d870a1775 | ||
![]() |
608741d062 | ||
![]() |
3079bf2e6c | ||
![]() |
b34bf2d5f6 | ||
![]() |
229ca7d738 | ||
![]() |
9e36c5769f | ||
![]() |
d38f4664a6 | ||
![]() |
99dc1fc340 | ||
![]() |
ba4dbbdae7 | ||
![]() |
8526b12f3d | ||
![]() |
0ce1b2ca19 | ||
![]() |
0aabd6b482 | ||
![]() |
5f30698670 | ||
![]() |
a199cac6cd | ||
![]() |
729507d309 | ||
![]() |
3af63683fe | ||
![]() |
9aa1a2878e | ||
![]() |
cc75c816c5 | ||
![]() |
1c2aee7a52 | ||
![]() |
62677576a7 | ||
![]() |
f7a07d76ee | ||
![]() |
54c6fbd378 | ||
![]() |
0ce7a068e9 | ||
![]() |
228b064d1b | ||
![]() |
b9b9cdcdb1 | ||
![]() |
11943656f9 | ||
![]() |
c011ef8c91 | ||
![]() |
cacc599aa2 | ||
![]() |
c7ee59a160 | ||
![]() |
58a707375f | ||
![]() |
5a22de144a | ||
![]() |
31a4673c05 | ||
![]() |
3a68f3c50f | ||
![]() |
8be6308e85 | ||
![]() |
0bf2c5365e | ||
![]() |
d76de9fb17 | ||
![]() |
c0f075c06b | ||
![]() |
6c2fc56916 | ||
![]() |
e96fbdba34 | ||
![]() |
739db06ce7 | ||
![]() |
4da8c7d11e | ||
![]() |
32949f2560 | ||
![]() |
79ac1b29d5 | ||
![]() |
7dc2baaa1f | ||
![]() |
5a7cb0b065 | ||
![]() |
400f56e3f8 | ||
![]() |
63159e5bda | ||
![]() |
7eabb0af37 | ||
![]() |
c65aaa8387 | ||
![]() |
e99e684b33 | ||
![]() |
1b696429c1 | ||
![]() |
084ff4abd2 | ||
![]() |
ab999406fe | ||
![]() |
d19304ffee | ||
![]() |
92f095a903 | ||
![]() |
645a7e4d95 | ||
![]() |
95649854ba | ||
![]() |
895cb689d3 | ||
![]() |
6bdc7259d1 | ||
![]() |
1e488eec60 | ||
![]() |
c418edf1d3 | ||
![]() |
df8c9f351d | ||
![]() |
bb31ded68b | ||
![]() |
c1801cbe59 | ||
![]() |
ffaedf0a44 | ||
![]() |
02ce9030e6 | ||
![]() |
0ae7bfc0a4 | ||
![]() |
bd1eab16eb | ||
![]() |
b3c1807d77 | ||
![]() |
b5e2456333 | ||
![]() |
c47f0f4417 | ||
![]() |
12f2b1f65e | ||
![]() |
4a104ac047 | ||
![]() |
c24a480631 | ||
![]() |
36d1a3ef4e | ||
![]() |
2768dc04cc | ||
![]() |
3366ceaf3a | ||
![]() |
5d12545da8 | ||
![]() |
a3ea8c8ee6 | ||
![]() |
0426e13271 | ||
![]() |
8aa4f0f0fc | ||
![]() |
7698503dca | ||
![]() |
b9aa32ff39 | ||
![]() |
571762b290 | ||
![]() |
991834f5dc | ||
![]() |
41a0f66279 | ||
![]() |
c79d1bae75 | ||
![]() |
70232483b4 | ||
![]() |
c5273e0c31 | ||
![]() |
685ae4429f | ||
![]() |
81be809a25 | ||
![]() |
8a6fde8213 | ||
![]() |
b6f618f8ff | ||
![]() |
51a2b59767 | ||
![]() |
8c81c0b05d | ||
![]() |
b221f43943 | ||
![]() |
e037327bfe | ||
![]() |
1a2e486d25 | ||
![]() |
d8011707cc | ||
![]() |
f5f5a2db95 | ||
![]() |
83b0967c1f | ||
![]() |
73ba5df31a | ||
![]() |
1bc244ae93 | ||
![]() |
931dc70550 | ||
![]() |
5299f4f289 | ||
![]() |
f917cf1c03 | ||
![]() |
56ed389a57 | ||
![]() |
e613e4bbe3 | ||
![]() |
b4e630b00c | ||
![]() |
bf6cd30796 | ||
![]() |
1266cebf87 |
21
.cirrus.yml
Normal file
21
.cirrus.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
env:
|
||||||
|
CIRRUS_CLONE_DEPTH: 1
|
||||||
|
ARCH: amd64
|
||||||
|
|
||||||
|
build_task:
|
||||||
|
matrix:
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-12-4
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-13-2
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-14-0-snap
|
||||||
|
prepare_script:
|
||||||
|
- pkg install -y autoconf automake libtool gettext-runtime gmake ksh93 py39-packaging py39-cffi py39-sysctl
|
||||||
|
configure_script:
|
||||||
|
- env MAKE=gmake ./autogen.sh
|
||||||
|
- env MAKE=gmake ./configure --with-config="user" --with-python=3.9
|
||||||
|
build_script:
|
||||||
|
- gmake -j `sysctl -n kern.smp.cpus`
|
||||||
|
install_script:
|
||||||
|
- gmake install
|
4
.github/codeql-cpp.yml
vendored
Normal file
4
.github/codeql-cpp.yml
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
name: "Custom CodeQL Analysis"
|
||||||
|
|
||||||
|
queries:
|
||||||
|
- uses: ./.github/codeql/custom-queries/cpp/deprecatedFunctionUsage.ql
|
4
.github/codeql-python.yml
vendored
Normal file
4
.github/codeql-python.yml
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
name: "Custom CodeQL Analysis"
|
||||||
|
|
||||||
|
paths-ignore:
|
||||||
|
- tests
|
59
.github/codeql/custom-queries/cpp/deprecatedFunctionUsage.ql
vendored
Normal file
59
.github/codeql/custom-queries/cpp/deprecatedFunctionUsage.ql
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/**
|
||||||
|
* @name Deprecated function usage detection
|
||||||
|
* @description Detects functions whose usage is banned from the OpenZFS
|
||||||
|
* codebase due to QA concerns.
|
||||||
|
* @kind problem
|
||||||
|
* @severity error
|
||||||
|
* @id cpp/deprecated-function-usage
|
||||||
|
*/
|
||||||
|
|
||||||
|
import cpp
|
||||||
|
|
||||||
|
predicate isDeprecatedFunction(Function f) {
|
||||||
|
f.getName() = "strtok" or
|
||||||
|
f.getName() = "__xpg_basename" or
|
||||||
|
f.getName() = "basename" or
|
||||||
|
f.getName() = "dirname" or
|
||||||
|
f.getName() = "bcopy" or
|
||||||
|
f.getName() = "bcmp" or
|
||||||
|
f.getName() = "bzero" or
|
||||||
|
f.getName() = "asctime" or
|
||||||
|
f.getName() = "asctime_r" or
|
||||||
|
f.getName() = "gmtime" or
|
||||||
|
f.getName() = "localtime" or
|
||||||
|
f.getName() = "strncpy"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
string getReplacementMessage(Function f) {
|
||||||
|
if f.getName() = "strtok" then
|
||||||
|
result = "Use strtok_r(3) instead!"
|
||||||
|
else if f.getName() = "__xpg_basename" then
|
||||||
|
result = "basename(3) is underspecified. Use zfs_basename() instead!"
|
||||||
|
else if f.getName() = "basename" then
|
||||||
|
result = "basename(3) is underspecified. Use zfs_basename() instead!"
|
||||||
|
else if f.getName() = "dirname" then
|
||||||
|
result = "dirname(3) is underspecified. Use zfs_dirnamelen() instead!"
|
||||||
|
else if f.getName() = "bcopy" then
|
||||||
|
result = "bcopy(3) is deprecated. Use memcpy(3)/memmove(3) instead!"
|
||||||
|
else if f.getName() = "bcmp" then
|
||||||
|
result = "bcmp(3) is deprecated. Use memcmp(3) instead!"
|
||||||
|
else if f.getName() = "bzero" then
|
||||||
|
result = "bzero(3) is deprecated. Use memset(3) instead!"
|
||||||
|
else if f.getName() = "asctime" then
|
||||||
|
result = "Use strftime(3) instead!"
|
||||||
|
else if f.getName() = "asctime_r" then
|
||||||
|
result = "Use strftime(3) instead!"
|
||||||
|
else if f.getName() = "gmtime" then
|
||||||
|
result = "gmtime(3) isn't thread-safe. Use gmtime_r(3) instead!"
|
||||||
|
else if f.getName() = "localtime" then
|
||||||
|
result = "localtime(3) isn't thread-safe. Use localtime_r(3) instead!"
|
||||||
|
else
|
||||||
|
result = "strncpy(3) is deprecated. Use strlcpy(3) instead!"
|
||||||
|
}
|
||||||
|
|
||||||
|
from FunctionCall fc, Function f
|
||||||
|
where
|
||||||
|
fc.getTarget() = f and
|
||||||
|
isDeprecatedFunction(f)
|
||||||
|
select fc, getReplacementMessage(f)
|
4
.github/codeql/custom-queries/cpp/qlpack.yml
vendored
Normal file
4
.github/codeql/custom-queries/cpp/qlpack.yml
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
name: openzfs-cpp-queries
|
||||||
|
version: 0.0.0
|
||||||
|
libraryPathDependencies: codeql-cpp
|
||||||
|
suites: openzfs-cpp-suite
|
50
.github/workflows/README.md
vendored
50
.github/workflows/README.md
vendored
@ -4,44 +4,54 @@
|
|||||||
```mermaid
|
```mermaid
|
||||||
flowchart TB
|
flowchart TB
|
||||||
subgraph CleanUp and Summary
|
subgraph CleanUp and Summary
|
||||||
Part1-20.04-->CleanUp+nice+Summary
|
CleanUp+Summary
|
||||||
Part2-20.04-->CleanUp+nice+Summary
|
|
||||||
PartN-20.04-->CleanUp+nice+Summary
|
|
||||||
Part1-22.04-->CleanUp+nice+Summary
|
|
||||||
Part2-22.04-->CleanUp+nice+Summary
|
|
||||||
PartN-22.04-->CleanUp+nice+Summary
|
|
||||||
end
|
end
|
||||||
|
|
||||||
subgraph Functional Testings
|
subgraph Functional Testings
|
||||||
|
sanity-checks-20.04
|
||||||
|
zloop-checks-20.04
|
||||||
functional-testing-20.04-->Part1-20.04
|
functional-testing-20.04-->Part1-20.04
|
||||||
functional-testing-20.04-->Part2-20.04
|
functional-testing-20.04-->Part2-20.04
|
||||||
functional-testing-20.04-->PartN-20.04
|
functional-testing-20.04-->Part3-20.04
|
||||||
|
functional-testing-20.04-->Part4-20.04
|
||||||
functional-testing-22.04-->Part1-22.04
|
functional-testing-22.04-->Part1-22.04
|
||||||
functional-testing-22.04-->Part2-22.04
|
functional-testing-22.04-->Part2-22.04
|
||||||
functional-testing-22.04-->PartN-22.04
|
functional-testing-22.04-->Part3-22.04
|
||||||
end
|
functional-testing-22.04-->Part4-22.04
|
||||||
|
sanity-checks-22.04
|
||||||
subgraph Sanity and zloop Testings
|
zloop-checks-22.04
|
||||||
sanity-checks-20.04-->functional-testing-20.04
|
|
||||||
sanity-checks-22.04-->functional-testing-22.04
|
|
||||||
zloop-checks-20.04-->functional
|
|
||||||
zloop-checks-22.04-->functional
|
|
||||||
end
|
end
|
||||||
|
|
||||||
subgraph Code Checking + Building
|
subgraph Code Checking + Building
|
||||||
|
Build-Ubuntu-20.04
|
||||||
codeql.yml
|
codeql.yml
|
||||||
checkstyle.yml
|
checkstyle.yml
|
||||||
Build-Ubuntu-20.04-->sanity-checks-20.04
|
Build-Ubuntu-22.04
|
||||||
Build-Ubuntu-22.04-->sanity-checks-22.04
|
|
||||||
Build-Ubuntu-20.04-->zloop-checks-20.04
|
|
||||||
Build-Ubuntu-22.04-->zloop-checks-22.04
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Build-Ubuntu-20.04-->sanity-checks-20.04
|
||||||
|
Build-Ubuntu-20.04-->zloop-checks-20.04
|
||||||
|
Build-Ubuntu-20.04-->functional-testing-20.04
|
||||||
|
Build-Ubuntu-22.04-->sanity-checks-22.04
|
||||||
|
Build-Ubuntu-22.04-->zloop-checks-22.04
|
||||||
|
Build-Ubuntu-22.04-->functional-testing-22.04
|
||||||
|
|
||||||
|
sanity-checks-20.04-->CleanUp+Summary
|
||||||
|
Part1-20.04-->CleanUp+Summary
|
||||||
|
Part2-20.04-->CleanUp+Summary
|
||||||
|
Part3-20.04-->CleanUp+Summary
|
||||||
|
Part4-20.04-->CleanUp+Summary
|
||||||
|
Part1-22.04-->CleanUp+Summary
|
||||||
|
Part2-22.04-->CleanUp+Summary
|
||||||
|
Part3-22.04-->CleanUp+Summary
|
||||||
|
Part4-22.04-->CleanUp+Summary
|
||||||
|
sanity-checks-22.04-->CleanUp+Summary
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
1) build zfs modules for Ubuntu 20.04 and 22.04 (~15m)
|
1) build zfs modules for Ubuntu 20.04 and 22.04 (~15m)
|
||||||
2) 2x zloop test (~10m) + 2x sanity test (~25m)
|
2) 2x zloop test (~10m) + 2x sanity test (~25m)
|
||||||
3) functional testings in parts 1..5 (each ~1h)
|
3) 4x functional testings in parts 1..4 (each ~1h)
|
||||||
4) cleanup and create summary
|
4) cleanup and create summary
|
||||||
- content of summary depends on the results of the steps
|
- content of summary depends on the results of the steps
|
||||||
|
|
||||||
|
4
.github/workflows/checkstyle.yaml
vendored
4
.github/workflows/checkstyle.yaml
vendored
@ -8,7 +8,7 @@ jobs:
|
|||||||
checkstyle:
|
checkstyle:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@ -52,7 +52,7 @@ jobs:
|
|||||||
if: failure() && steps.CheckABI.outcome == 'failure'
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
||||||
run: |
|
run: |
|
||||||
find -name *.abi | tar -cf abi_files.tar -T -
|
find -name *.abi | tar -cf abi_files.tar -T -
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure() && steps.CheckABI.outcome == 'failure'
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
||||||
with:
|
with:
|
||||||
name: New ABI files (use only if you're sure about interface changes)
|
name: New ABI files (use only if you're sure about interface changes)
|
||||||
|
3
.github/workflows/codeql.yml
vendored
3
.github/workflows/codeql.yml
vendored
@ -24,11 +24,12 @@ jobs:
|
|||||||
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
|
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v2
|
||||||
with:
|
with:
|
||||||
|
config-file: .github/codeql-${{ matrix.language }}.yml
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
|
@ -87,7 +87,7 @@ function summarize_f() {
|
|||||||
output "\n## $headline\n"
|
output "\n## $headline\n"
|
||||||
rm -rf testfiles
|
rm -rf testfiles
|
||||||
for i in $(seq 1 $FUNCTIONAL_PARTS); do
|
for i in $(seq 1 $FUNCTIONAL_PARTS); do
|
||||||
tarfile="$2/part$i.tar"
|
tarfile="$2-part$i/part$i.tar"
|
||||||
check_tarfile "$tarfile"
|
check_tarfile "$tarfile"
|
||||||
check_logfile "testfiles/log"
|
check_logfile "testfiles/log"
|
||||||
done
|
done
|
||||||
|
35
.github/workflows/scripts/setup-dependencies.sh
vendored
35
.github/workflows/scripts/setup-dependencies.sh
vendored
@ -55,29 +55,24 @@ function mod_install() {
|
|||||||
cat /proc/spl/kstat/zfs/chksum_bench
|
cat /proc/spl/kstat/zfs/chksum_bench
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
echo "::group::Reclaim and report disk space"
|
echo "::group::Optimize storage for ZFS testings"
|
||||||
# remove 4GiB of images
|
# remove swap and umount fast storage
|
||||||
sudo systemd-run docker system prune --force --all --volumes
|
# 89GiB -> rootfs + bootfs with ~80MB/s -> don't care
|
||||||
|
# 64GiB -> /mnt with 420MB/s -> new testing ssd
|
||||||
|
sudo swapoff -a
|
||||||
|
|
||||||
# remove unused software
|
# this one is fast and mounted @ /mnt
|
||||||
sudo systemd-run --wait rm -rf \
|
# -> we reformat with ext4 + move it to /var/tmp
|
||||||
"$AGENT_TOOLSDIRECTORY" \
|
DEV="/dev/disk/azure/resource-part1"
|
||||||
/opt/* \
|
sudo umount /mnt
|
||||||
/usr/local/* \
|
sudo mkfs.ext4 -O ^has_journal -F $DEV
|
||||||
/usr/share/az* \
|
sudo mount -o noatime,barrier=0 $DEV /var/tmp
|
||||||
/usr/share/dotnet \
|
sudo chmod 1777 /var/tmp
|
||||||
/usr/share/gradle* \
|
|
||||||
/usr/share/miniconda \
|
|
||||||
/usr/share/swift \
|
|
||||||
/var/lib/gems \
|
|
||||||
/var/lib/mysql \
|
|
||||||
/var/lib/snapd
|
|
||||||
|
|
||||||
# trim the cleaned space
|
|
||||||
sudo fstrim /
|
|
||||||
|
|
||||||
# disk usage afterwards
|
# disk usage afterwards
|
||||||
df -h /
|
sudo df -h /
|
||||||
|
sudo df -h /var/tmp
|
||||||
|
sudo fstrim -a
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
22
.github/workflows/zfs-linux-tests.yml
vendored
22
.github/workflows/zfs-linux-tests.yml
vendored
@ -13,10 +13,10 @@ jobs:
|
|||||||
zloop:
|
zloop:
|
||||||
runs-on: ubuntu-${{ inputs.os }}
|
runs-on: ubuntu-${{ inputs.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: modules-${{ inputs.os }}
|
name: modules-${{ inputs.os }}
|
||||||
- name: Install modules
|
- name: Install modules
|
||||||
@ -34,7 +34,7 @@ jobs:
|
|||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
sudo chmod +r -R /var/tmp/zloop/
|
sudo chmod +r -R /var/tmp/zloop/
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: Zpool-logs-${{ inputs.os }}
|
name: Zpool-logs-${{ inputs.os }}
|
||||||
@ -43,7 +43,7 @@ jobs:
|
|||||||
!/var/tmp/zloop/*/vdev/
|
!/var/tmp/zloop/*/vdev/
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: Zpool-files-${{ inputs.os }}
|
name: Zpool-files-${{ inputs.os }}
|
||||||
@ -55,10 +55,10 @@ jobs:
|
|||||||
sanity:
|
sanity:
|
||||||
runs-on: ubuntu-${{ inputs.os }}
|
runs-on: ubuntu-${{ inputs.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: modules-${{ inputs.os }}
|
name: modules-${{ inputs.os }}
|
||||||
- name: Install modules
|
- name: Install modules
|
||||||
@ -77,7 +77,7 @@ jobs:
|
|||||||
RESPATH="/var/tmp/test_results"
|
RESPATH="/var/tmp/test_results"
|
||||||
mv -f $RESPATH/current $RESPATH/testfiles
|
mv -f $RESPATH/current $RESPATH/testfiles
|
||||||
tar cf $RESPATH/sanity.tar -h -C $RESPATH testfiles
|
tar cf $RESPATH/sanity.tar -h -C $RESPATH testfiles
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
with:
|
with:
|
||||||
name: Logs-${{ inputs.os }}-sanity
|
name: Logs-${{ inputs.os }}-sanity
|
||||||
@ -91,10 +91,10 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
tests: [ part1, part2, part3, part4 ]
|
tests: [ part1, part2, part3, part4 ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: modules-${{ inputs.os }}
|
name: modules-${{ inputs.os }}
|
||||||
- name: Install modules
|
- name: Install modules
|
||||||
@ -116,9 +116,9 @@ jobs:
|
|||||||
RESPATH="/var/tmp/test_results"
|
RESPATH="/var/tmp/test_results"
|
||||||
mv -f $RESPATH/current $RESPATH/testfiles
|
mv -f $RESPATH/current $RESPATH/testfiles
|
||||||
tar cf $RESPATH/${{ matrix.tests }}.tar -h -C $RESPATH testfiles
|
tar cf $RESPATH/${{ matrix.tests }}.tar -h -C $RESPATH testfiles
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
with:
|
with:
|
||||||
name: Logs-${{ inputs.os }}-functional
|
name: Logs-${{ inputs.os }}-functional-${{ matrix.tests }}
|
||||||
path: /var/tmp/test_results/${{ matrix.tests }}.tar
|
path: /var/tmp/test_results/${{ matrix.tests }}.tar
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
8
.github/workflows/zfs-linux.yml
vendored
8
.github/workflows/zfs-linux.yml
vendored
@ -14,14 +14,14 @@ jobs:
|
|||||||
os: [20.04, 22.04]
|
os: [20.04, 22.04]
|
||||||
runs-on: ubuntu-${{ matrix.os }}
|
runs-on: ubuntu-${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Build modules
|
- name: Build modules
|
||||||
run: .github/workflows/scripts/setup-dependencies.sh build
|
run: .github/workflows/scripts/setup-dependencies.sh build
|
||||||
- name: Prepare modules upload
|
- name: Prepare modules upload
|
||||||
run: tar czf modules-${{ matrix.os }}.tgz *.deb .github tests/test-runner tests/ImageOS.txt
|
run: tar czf modules-${{ matrix.os }}.tgz *.deb .github tests/test-runner tests/ImageOS.txt
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: modules-${{ matrix.os }}
|
name: modules-${{ matrix.os }}
|
||||||
path: modules-${{ matrix.os }}.tgz
|
path: modules-${{ matrix.os }}.tgz
|
||||||
@ -44,7 +44,7 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: testings
|
needs: testings
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
- name: Generating summary
|
- name: Generating summary
|
||||||
run: |
|
run: |
|
||||||
tar xzf modules-22.04/modules-22.04.tgz .github tests
|
tar xzf modules-22.04/modules-22.04.tgz .github tests
|
||||||
@ -58,7 +58,7 @@ jobs:
|
|||||||
run: .github/workflows/scripts/generate-summary.sh 3
|
run: .github/workflows/scripts/generate-summary.sh 3
|
||||||
- name: Summary for errors #4
|
- name: Summary for errors #4
|
||||||
run: .github/workflows/scripts/generate-summary.sh 4
|
run: .github/workflows/scripts/generate-summary.sh 4
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Summary Files
|
name: Summary Files
|
||||||
path: Summary/
|
path: Summary/
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -42,8 +42,10 @@
|
|||||||
!udev/**
|
!udev/**
|
||||||
|
|
||||||
!.editorconfig
|
!.editorconfig
|
||||||
|
!.cirrus.yml
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!.gitmodules
|
!.gitmodules
|
||||||
|
!.mailmap
|
||||||
!AUTHORS
|
!AUTHORS
|
||||||
!autogen.sh
|
!autogen.sh
|
||||||
!CODE_OF_CONDUCT.md
|
!CODE_OF_CONDUCT.md
|
||||||
@ -60,7 +62,6 @@
|
|||||||
!TEST
|
!TEST
|
||||||
!zfs.release.in
|
!zfs.release.in
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Normal rules
|
# Normal rules
|
||||||
#
|
#
|
||||||
@ -82,6 +83,7 @@
|
|||||||
modules.order
|
modules.order
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
|
changelog
|
||||||
*.patch
|
*.patch
|
||||||
*.orig
|
*.orig
|
||||||
*.tmp
|
*.tmp
|
||||||
|
189
.mailmap
Normal file
189
.mailmap
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
# This file maps the name+email seen in a commit back to a canonical
|
||||||
|
# name+email. Git will replace the commit name/email with the canonical version
|
||||||
|
# wherever it sees it.
|
||||||
|
#
|
||||||
|
# If there is a commit in the history with a "wrong" name or email, list it
|
||||||
|
# here. If you regularly commit with an alternate name or email address and
|
||||||
|
# would like to ensure that you are always listed consistently in the repo, add
|
||||||
|
# mapping here.
|
||||||
|
#
|
||||||
|
# On the other hand, if you use multiple names or email addresses legitimately
|
||||||
|
# (eg you use a company email address for your paid OpenZFS work, and a
|
||||||
|
# personal address for your evening side projects), then don't map one to the
|
||||||
|
# other here.
|
||||||
|
#
|
||||||
|
# The most common formats are:
|
||||||
|
#
|
||||||
|
# Canonical Name <canonical-email>
|
||||||
|
# Canonical Name <canonical-email> <commit-email>
|
||||||
|
# Canonical Name <canonical-email> Commit Name <commit-email>
|
||||||
|
#
|
||||||
|
# See https://git-scm.com/docs/gitmailmap for more info.
|
||||||
|
|
||||||
|
# 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
|
||||||
|
# Signed-off-by of a commit with a matching author.
|
||||||
|
Ahelenia Ziemiańska <nabijaczleweli@gmail.com>
|
||||||
|
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
|
||||||
|
Alex John <alex@stty.io>
|
||||||
|
Andreas Dilger <adilger@dilger.ca>
|
||||||
|
Andrew Walker <awalker@ixsystems.com>
|
||||||
|
Benedikt Neuffer <github@itfriend.de>
|
||||||
|
Chengfei Zhu <chengfeix.zhu@intel.com>
|
||||||
|
Chris Lindee <chris.lindee+github@gmail.com>
|
||||||
|
Colm Buckley <colm@tuatha.org>
|
||||||
|
Crag Wang <crag0715@gmail.com>
|
||||||
|
Damian Szuberski <szuberskidamian@gmail.com>
|
||||||
|
Daniel Kolesa <daniel@octaforge.org>
|
||||||
|
Debabrata Banerjee <dbavatar@gmail.com>
|
||||||
|
Finix Yan <yanchongwen@hotmail.com>
|
||||||
|
Gaurav Kumar <gauravk.18@gmail.com>
|
||||||
|
Gionatan Danti <g.danti@assyoma.it>
|
||||||
|
Glenn Washburn <development@efficientek.com>
|
||||||
|
Gordan Bobic <gordan.bobic@gmail.com>
|
||||||
|
Gregory Bartholomew <gregory.lee.bartholomew@gmail.com>
|
||||||
|
hedong zhang <h_d_zhang@163.com>
|
||||||
|
InsanePrawn <Insane.Prawny@gmail.com>
|
||||||
|
Jason Cohen <jwittlincohen@gmail.com>
|
||||||
|
Jason Harmening <jason.harmening@gmail.com>
|
||||||
|
Jeremy Faulkner <gldisater@gmail.com>
|
||||||
|
Jinshan Xiong <jinshan.xiong@gmail.com>
|
||||||
|
John Poduska <jpoduska@datto.com>
|
||||||
|
Justin Scholz <git@justinscholz.de>
|
||||||
|
Ka Ho Ng <khng300@gmail.com>
|
||||||
|
Kash Pande <github@tripleback.net>
|
||||||
|
Kay Pedersen <christianpe96@gmail.com>
|
||||||
|
KernelOfTruth <kerneloftruth@gmail.com>
|
||||||
|
Liu Hua <liu.hua130@zte.com.cn>
|
||||||
|
Liu Qing <winglq@gmail.com>
|
||||||
|
loli10K <ezomori.nozomu@gmail.com>
|
||||||
|
Matthias Blankertz <matthias@blankertz.org>
|
||||||
|
Michael Gmelin <grembo@FreeBSD.org>
|
||||||
|
Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
|
||||||
|
Piotr Kubaj <pkubaj@anongoth.pl>
|
||||||
|
Quentin Zdanis <zdanisq@gmail.com>
|
||||||
|
Roberto Ricci <ricci@disroot.org>
|
||||||
|
Rob Norris <robn@despairlabs.com>
|
||||||
|
Rob Norris <rob.norris@klarasystems.com>
|
||||||
|
Sam Lunt <samuel.j.lunt@gmail.com>
|
||||||
|
Sanjeev Bagewadi <sanjeev.bagewadi@gmail.com>
|
||||||
|
Stoiko Ivanov <github@nomore.at>
|
||||||
|
Tamas TEVESZ <ice@extreme.hu>
|
||||||
|
WHR <msl0000023508@gmail.com>
|
||||||
|
Yanping Gao <yanping.gao@xtaotech.com>
|
||||||
|
Youzhong Yang <youzhong@gmail.com>
|
||||||
|
|
||||||
|
# Commits from strange places, long ago
|
||||||
|
Brian Behlendorf <behlendorf1@llnl.gov> <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
|
||||||
|
Brian Behlendorf <behlendorf1@llnl.gov> <behlendo@fedora-17-amd64.(none)>
|
||||||
|
Brian Behlendorf <behlendorf1@llnl.gov> <behlendo@myhost.(none)>
|
||||||
|
Brian Behlendorf <behlendorf1@llnl.gov> <ubuntu@ip-172-31-16-145.us-west-1.compute.internal>
|
||||||
|
Brian Behlendorf <behlendorf1@llnl.gov> <ubuntu@ip-172-31-20-6.us-west-1.compute.internal>
|
||||||
|
Herb Wartens <wartens2@llnl.gov> <wartens2@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
|
||||||
|
Ned Bass <bass6@llnl.gov> <bass6@zeno1.(none)>
|
||||||
|
Tulsi Jain <tulsi.jain@delphix.com> <tulsi.jain@Tulsi-Jains-MacBook-Pro.local>
|
||||||
|
|
||||||
|
# Mappings from Github no-reply addresses
|
||||||
|
ajs124 <git@ajs124.de> <ajs124@users.noreply.github.com>
|
||||||
|
Alek Pinchuk <apinchuk@axcient.com> <alek-p@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>
|
||||||
|
Allen Holl <allen.m.holl@gmail.com> <65494904+allen-4@users.noreply.github.com>
|
||||||
|
Ameer Hamza <ahamza@ixsystems.com> <106930537+ixhamza@users.noreply.github.com>
|
||||||
|
Andrew J. Hesford <ajh@sideband.org> <48421688+ahesford@users.noreply.github.com>>
|
||||||
|
Andrew Sun <me@andrewsun.com> <as-com@users.noreply.github.com>
|
||||||
|
Aron Xu <happyaron.xu@gmail.com> <happyaron@users.noreply.github.com>
|
||||||
|
Arun KV <arun.kv@datacore.com> <65647132+arun-kv@users.noreply.github.com>
|
||||||
|
Ben Wolsieffer <benwolsieffer@gmail.com> <lopsided98@users.noreply.github.com>
|
||||||
|
bernie1995 <bernie.pikes@gmail.com> <42413912+bernie1995@users.noreply.github.com>
|
||||||
|
Boris Protopopov <boris.protopopov@actifio.com> <bprotopopov@users.noreply.github.com>
|
||||||
|
Brad Forschinger <github@bnjf.id.au> <bnjf@users.noreply.github.com>
|
||||||
|
Brandon Thetford <brandon@dodecatec.com> <dodexahedron@users.noreply.github.com>
|
||||||
|
buzzingwires <buzzingwires@outlook.com> <131118055+buzzingwires@users.noreply.github.com>
|
||||||
|
Cedric Maunoury <cedric.maunoury@gmail.com> <38213715+cedricmaunoury@users.noreply.github.com>
|
||||||
|
Charles Suh <charles.suh@gmail.com> <charlessuh@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>
|
||||||
|
Daniel Hiepler <d-git@coderdu.de> <32984777+heeplr@users.noreply.github.com>
|
||||||
|
Daniel Kobras <d.kobras@science-computing.de> <sckobras@users.noreply.github.com>
|
||||||
|
Daniel Reichelt <hacking@nachtgeist.net> <nachtgeist@users.noreply.github.com>
|
||||||
|
David Quigley <david.quigley@intel.com> <dpquigl@users.noreply.github.com>
|
||||||
|
DHE <git@dehacked.net> <DeHackEd@users.noreply.github.com>
|
||||||
|
Dmitri John Ledkov <dimitri.ledkov@canonical.com> <19779+xnox@users.noreply.github.com>
|
||||||
|
Dries Michiels <driesm.michiels@gmail.com> <32487486+driesmp@users.noreply.github.com>
|
||||||
|
Edmund Nadolski <edmund.nadolski@ixsystems.com> <137826107+ednadolski-ix@users.noreply.github.com>
|
||||||
|
Érico Nogueira <erico.erc@gmail.com> <34201958+ericonr@users.noreply.github.com>
|
||||||
|
Fedor Uporov <fuporov.vstack@gmail.com> <60701163+fuporovvStack@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>
|
||||||
|
Finix Yan <yancw@info2soft.com> <Finix1979@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>
|
||||||
|
Georgy Yakovlev <gyakovlev@gentoo.org> <168902+gyakovlev@users.noreply.github.com>
|
||||||
|
Gerardwx <gerardw@alum.mit.edu> <Gerardwx@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>
|
||||||
|
Hajo Möller <dasjoe@gmail.com> <dasjoe@users.noreply.github.com>
|
||||||
|
Harry Mallon <hjmallon@gmail.com> <1816667+hjmallon@users.noreply.github.com>
|
||||||
|
Hiếu Lê <leorize+oss@disroot.org> <alaviss@users.noreply.github.com>
|
||||||
|
Jake Howard <git@theorangeone.net> <RealOrangeOne@users.noreply.github.com>
|
||||||
|
James Cowgill <james.cowgill@mips.com> <jcowgill@users.noreply.github.com>
|
||||||
|
Jason King <jason.king@joyent.com> <jasonbking@users.noreply.github.com>
|
||||||
|
Jeff Dike <jdike@akamai.com> <52420226+jdike@users.noreply.github.com>
|
||||||
|
Jitendra Patidar <jitendra.patidar@nutanix.com> <53164267+jsai20@users.noreply.github.com>
|
||||||
|
João Carlos Mendes Luís <jonny@jonny.eng.br> <dioni21@users.noreply.github.com>
|
||||||
|
John Eismeier <john.eismeier@gmail.com> <32205350+jeis2497052@users.noreply.github.com>
|
||||||
|
John L. Hammond <john.hammond@intel.com> <35266395+jhammond-intel@users.noreply.github.com>
|
||||||
|
John-Mark Gurney <jmg@funkthat.com> <jmgurney@users.noreply.github.com>
|
||||||
|
John Ramsden <johnramsden@riseup.net> <johnramsden@users.noreply.github.com>
|
||||||
|
Jonathon Fernyhough <jonathon@m2x.dev> <559369+jonathonf@users.noreply.github.com>
|
||||||
|
Justin Hibbits <chmeeedalf@gmail.com> <chmeeedalf@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>
|
||||||
|
Krzysztof Piecuch <piecuch@kpiecuch.pl> <3964215+pikrzysztof@users.noreply.github.com>
|
||||||
|
Kyle Evans <kevans@FreeBSD.org> <kevans91@users.noreply.github.com>
|
||||||
|
Laurențiu Nicola <lnicola@dend.ro> <lnicola@users.noreply.github.com>
|
||||||
|
loli10K <ezomori.nozomu@gmail.com> <loli10K@users.noreply.github.com>
|
||||||
|
Lorenz Hüdepohl <dev@stellardeath.org> <lhuedepohl@users.noreply.github.com>
|
||||||
|
Luís Henriques <henrix@camandro.org> <73643340+lumigch@users.noreply.github.com>
|
||||||
|
Marcin Skarbek <git@skarbek.name> <mskarbek@users.noreply.github.com>
|
||||||
|
Matt Fiddaman <github@m.fiddaman.uk> <81489167+matt-fidd@users.noreply.github.com>
|
||||||
|
Max Zettlmeißl <max@zettlmeissl.de> <6818198+maxz@users.noreply.github.com>
|
||||||
|
Michael Niewöhner <foss@mniewoehner.de> <c0d3z3r0@users.noreply.github.com>
|
||||||
|
Michael Zhivich <mzhivich@akamai.com> <33133421+mzhivich@users.noreply.github.com>
|
||||||
|
Mo Zhou <cdluminate@gmail.com> <5723047+cdluminate@users.noreply.github.com>
|
||||||
|
Nick Mattis <nickm970@gmail.com> <nmattis@users.noreply.github.com>
|
||||||
|
omni <omni+vagant@hack.org> <79493359+omnivagant@users.noreply.github.com>
|
||||||
|
Pablo Correa Gómez <ablocorrea@hotmail.com> <32678034+pablofsf@users.noreply.github.com>
|
||||||
|
Paul Zuchowski <pzuchowski@datto.com> <31706010+PaulZ-98@users.noreply.github.com>
|
||||||
|
Peter Ashford <ashford@accs.com> <pashford@users.noreply.github.com>
|
||||||
|
Peter Dave Hello <hsu@peterdavehello.org> <PeterDaveHello@users.noreply.github.com>
|
||||||
|
Peter Wirdemo <peter.wirdemo@gmail.com> <4224155+pewo@users.noreply.github.com>
|
||||||
|
Petros Koutoupis <petros@petroskoutoupis.com> <pkoutoupis@users.noreply.github.com>
|
||||||
|
Ping Huang <huangping@smartx.com> <101400146+hpingfs@users.noreply.github.com>
|
||||||
|
Piotr P. Stefaniak <pstef@freebsd.org> <pstef@users.noreply.github.com>
|
||||||
|
Richard Allen <belperite@gmail.com> <33836503+belperite@users.noreply.github.com>
|
||||||
|
Rich Ercolani <rincebrain@gmail.com> <214141+rincebrain@users.noreply.github.com>
|
||||||
|
Rob Wing <rob.wing@klarasystems.com> <98866084+rob-wing@users.noreply.github.com>
|
||||||
|
Roman Strashkin <roman.strashkin@nexenta.com> <Ramzec@users.noreply.github.com>
|
||||||
|
Ryan Hirasaki <ryanhirasaki@gmail.com> <4690732+RyanHir@users.noreply.github.com>
|
||||||
|
Samuel Wycliffe J <samwyc@hpe.com> <115969550+samwyc@users.noreply.github.com>
|
||||||
|
Samuel Wycliffe <samuelwycliffe@gmail.com> <50765275+npc203@users.noreply.github.com>
|
||||||
|
Savyasachee Jha <hi@savyasacheejha.com> <savyajha@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>
|
||||||
|
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>
|
||||||
|
Thomas Geppert <geppi@digitx.de> <geppi@users.noreply.github.com>
|
||||||
|
Tim Crawford <tcrawford@datto.com> <crawfxrd@users.noreply.github.com>
|
||||||
|
Tom Matthews <tom@axiom-partners.com> <tomtastic@users.noreply.github.com>
|
||||||
|
Tony Perkins <tperkins@datto.com> <62951051+tony-zfs@users.noreply.github.com>
|
||||||
|
Torsten Wörtwein <twoertwein@gmail.com> <twoertwein@users.noreply.github.com>
|
||||||
|
Tulsi Jain <tulsi.jain@delphix.com> <TulsiJain@users.noreply.github.com>
|
||||||
|
Václav Skála <skala@vshosting.cz> <33496485+vaclavskala@users.noreply.github.com>
|
||||||
|
Violet Purcell <vimproved@inventati.org> <66446404+vimproved@users.noreply.github.com>
|
||||||
|
Vipin Kumar Verma <vipin.verma@hpe.com> <75025470+vermavipinkumar@users.noreply.github.com>
|
||||||
|
Wolfgang Bumiller <w.bumiller@proxmox.com> <Blub@users.noreply.github.com>
|
||||||
|
xtouqh <xtouqh@hotmail.com> <72357159+xtouqh@users.noreply.github.com>
|
||||||
|
Yuri Pankov <yuripv@FreeBSD.org> <113725409+yuripv@users.noreply.github.com>
|
||||||
|
Yuri Pankov <yuripv@FreeBSD.org> <82001006+yuripv@users.noreply.github.com>
|
365
AUTHORS
365
AUTHORS
@ -10,228 +10,450 @@ PAST MAINTAINERS:
|
|||||||
CONTRIBUTORS:
|
CONTRIBUTORS:
|
||||||
|
|
||||||
Aaron Fineman <abyxcos@gmail.com>
|
Aaron Fineman <abyxcos@gmail.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>
|
||||||
|
adisbladis <adis@blad.is>
|
||||||
|
Adrian Chadd <adrian@freebsd.org>
|
||||||
|
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
|
||||||
Ahmed G <ahmedg@delphix.com>
|
Ahmed G <ahmedg@delphix.com>
|
||||||
|
Aidan Harris <me@aidanharr.is>
|
||||||
|
AJ Jordan <alex@strugee.net>
|
||||||
|
ajs124 <git@ajs124.de>
|
||||||
Akash Ayare <aayare@delphix.com>
|
Akash Ayare <aayare@delphix.com>
|
||||||
|
Akash B <akash-b@hpe.com>
|
||||||
Alan Somers <asomers@gmail.com>
|
Alan Somers <asomers@gmail.com>
|
||||||
Alar Aun <spamtoaun@gmail.com>
|
Alar Aun <spamtoaun@gmail.com>
|
||||||
Albert Lee <trisk@nexenta.com>
|
Albert Lee <trisk@nexenta.com>
|
||||||
Alec Salazar <alec.j.salazar@gmail.com>
|
Alec Salazar <alec.j.salazar@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>
|
||||||
Aleksa Sarai <cyphar@cyphar.com>
|
Aleksa Sarai <cyphar@cyphar.com>
|
||||||
|
Alexander Eremin <a.eremin@nexenta.com>
|
||||||
|
Alexander Lobakin <alobakin@pm.me>
|
||||||
|
Alexander Motin <mav@freebsd.org>
|
||||||
|
Alexander Pyhalov <apyhalov@gmail.com>
|
||||||
|
Alexander Richardson <Alexander.Richardson@cl.cam.ac.uk>
|
||||||
|
Alexander Stetsenko <ams@nexenta.com>
|
||||||
Alex Braunegg <alex.braunegg@gmail.com>
|
Alex Braunegg <alex.braunegg@gmail.com>
|
||||||
|
Alexey Shvetsov <alexxy@gentoo.org>
|
||||||
|
Alexey Smirnoff <fling@member.fsf.org>
|
||||||
|
Alex John <alex@stty.io>
|
||||||
Alex McWhirter <alexmcwhirter@triadic.us>
|
Alex McWhirter <alexmcwhirter@triadic.us>
|
||||||
Alex Reece <alex@delphix.com>
|
Alex Reece <alex@delphix.com>
|
||||||
Alex Wilson <alex.wilson@joyent.com>
|
Alex Wilson <alex.wilson@joyent.com>
|
||||||
Alex Zhuravlev <alexey.zhuravlev@intel.com>
|
Alex Zhuravlev <alexey.zhuravlev@intel.com>
|
||||||
Alexander Eremin <a.eremin@nexenta.com>
|
|
||||||
Alexander Motin <mav@freebsd.org>
|
|
||||||
Alexander Pyhalov <apyhalov@gmail.com>
|
|
||||||
Alexander Stetsenko <ams@nexenta.com>
|
|
||||||
Alexey Shvetsov <alexxy@gentoo.org>
|
|
||||||
Alexey Smirnoff <fling@member.fsf.org>
|
|
||||||
Allan Jude <allanjude@freebsd.org>
|
Allan Jude <allanjude@freebsd.org>
|
||||||
|
Allen Holl <allen.m.holl@gmail.com>
|
||||||
|
alteriks <alteriks@gmail.com>
|
||||||
|
Alyssa Ross <hi@alyssa.is>
|
||||||
|
Ameer Hamza <ahamza@ixsystems.com>
|
||||||
|
Anatoly Borodin <anatoly.borodin@gmail.com>
|
||||||
AndCycle <andcycle@andcycle.idv.tw>
|
AndCycle <andcycle@andcycle.idv.tw>
|
||||||
|
Andrea Gelmini <andrea.gelmini@gelma.net>
|
||||||
|
Andrea Righi <andrea.righi@canonical.com>
|
||||||
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>
|
||||||
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 J. Hesford <ajh@sideband.org>
|
||||||
Andrew Reid <ColdCanuck@nailedtotheperch.com>
|
Andrew Reid <ColdCanuck@nailedtotheperch.com>
|
||||||
Andrew Stormont <andrew.stormont@nexenta.com>
|
Andrew Stormont <andrew.stormont@nexenta.com>
|
||||||
|
Andrew Sun <me@andrewsun.com>
|
||||||
Andrew Tselischev <andrewtselischev@gmail.com>
|
Andrew Tselischev <andrewtselischev@gmail.com>
|
||||||
|
Andrew Turner <andrew@fubar.geek.nz>
|
||||||
|
Andrew Walker <awalker@ixsystems.com>
|
||||||
|
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>
|
||||||
Andy Bakun <github@thwartedefforts.org>
|
Andy Bakun <github@thwartedefforts.org>
|
||||||
|
Andy Fiddaman <omnios@citrus-it.co.uk>
|
||||||
Aniruddha Shankar <k@191a.net>
|
Aniruddha Shankar <k@191a.net>
|
||||||
|
Anton Gubarkov <anton.gubarkov@gmail.com>
|
||||||
Antonio Russo <antonio.e.russo@gmail.com>
|
Antonio Russo <antonio.e.russo@gmail.com>
|
||||||
Arkadiusz Bubała <arkadiusz.bubala@open-e.com>
|
Arkadiusz Bubała <arkadiusz.bubala@open-e.com>
|
||||||
|
Armin Wehrfritz <dkxls23@gmail.com>
|
||||||
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>
|
||||||
|
Arun KV <arun.kv@datacore.com>
|
||||||
|
Arvind Sankar <nivedita@alum.mit.edu>
|
||||||
|
Attila Fülöp <attila@fueloep.org>
|
||||||
|
Avatat <kontakt@avatat.pl>
|
||||||
Bart Coddens <bart.coddens@gmail.com>
|
Bart Coddens <bart.coddens@gmail.com>
|
||||||
Basil Crow <basil.crow@delphix.com>
|
Basil Crow <basil.crow@delphix.com>
|
||||||
Huang Liu <liu.huang@zte.com.cn>
|
Bassu <bassu@phi9.com>
|
||||||
Ben Allen <bsallen@alcf.anl.gov>
|
Ben Allen <bsallen@alcf.anl.gov>
|
||||||
Ben Rubson <ben.rubson@gmail.com>
|
Ben Cordero <bencord0@condi.me>
|
||||||
|
Benedikt Neuffer <github@itfriend.de>
|
||||||
Benjamin Albrecht <git@albrecht.io>
|
Benjamin Albrecht <git@albrecht.io>
|
||||||
|
Benjamin Gentil <benjgentil.pro@gmail.com>
|
||||||
|
Ben McGough <bmcgough@fredhutch.org>
|
||||||
|
Ben Rubson <ben.rubson@gmail.com>
|
||||||
|
Ben Wolsieffer <benwolsieffer@gmail.com>
|
||||||
|
bernie1995 <bernie.pikes@gmail.com>
|
||||||
Bill McGonigle <bill-github.com-public1@bfccomputing.com>
|
Bill McGonigle <bill-github.com-public1@bfccomputing.com>
|
||||||
Bill Pijewski <wdp@joyent.com>
|
Bill Pijewski <wdp@joyent.com>
|
||||||
Boris Protopopov <boris.protopopov@nexenta.com>
|
Boris Protopopov <boris.protopopov@nexenta.com>
|
||||||
|
Brad Forschinger <github@bnjf.id.au>
|
||||||
Brad Lewis <brad.lewis@delphix.com>
|
Brad Lewis <brad.lewis@delphix.com>
|
||||||
|
Brandon Thetford <brandon@dodecatec.com>
|
||||||
|
Brian Atkinson <bwa@g.clemson.edu>
|
||||||
Brian Behlendorf <behlendorf1@llnl.gov>
|
Brian Behlendorf <behlendorf1@llnl.gov>
|
||||||
Brian J. Murrell <brian@sun.com>
|
Brian J. Murrell <brian@sun.com>
|
||||||
|
Brooks Davis <brooks@one-eyed-alien.net>
|
||||||
|
BtbN <btbn@btbn.de>
|
||||||
|
bunder2015 <omfgbunder@gmail.com>
|
||||||
|
buzzingwires <buzzingwires@outlook.com>
|
||||||
|
bzzz77 <bzzz.tomas@gmail.com>
|
||||||
|
cable2999 <cable2999@users.noreply.github.com>
|
||||||
Caleb James DeLisle <calebdelisle@lavabit.com>
|
Caleb James DeLisle <calebdelisle@lavabit.com>
|
||||||
Cao Xuewen <cao.xuewen@zte.com.cn>
|
Cao Xuewen <cao.xuewen@zte.com.cn>
|
||||||
Carlo Landmeter <clandmeter@gmail.com>
|
Carlo Landmeter <clandmeter@gmail.com>
|
||||||
Carlos Alberto Lopez Perez <clopez@igalia.com>
|
Carlos Alberto Lopez Perez <clopez@igalia.com>
|
||||||
|
Cedric Maunoury <cedric.maunoury@gmail.com>
|
||||||
Chaoyu Zhang <zhang.chaoyu@zte.com.cn>
|
Chaoyu Zhang <zhang.chaoyu@zte.com.cn>
|
||||||
|
Charles Suh <charles.suh@gmail.com>
|
||||||
Chen Can <chen.can2@zte.com.cn>
|
Chen Can <chen.can2@zte.com.cn>
|
||||||
|
Chengfei Zhu <chengfeix.zhu@intel.com>
|
||||||
Chen Haiquan <oc@yunify.com>
|
Chen Haiquan <oc@yunify.com>
|
||||||
Chip Parker <aparker@enthought.com>
|
Chip Parker <aparker@enthought.com>
|
||||||
Chris Burroughs <chris.burroughs@gmail.com>
|
Chris Burroughs <chris.burroughs@gmail.com>
|
||||||
Chris Dunlap <cdunlap@llnl.gov>
|
Chris Dunlap <cdunlap@llnl.gov>
|
||||||
Chris Dunlop <chris@onthe.net.au>
|
Chris Dunlop <chris@onthe.net.au>
|
||||||
|
Chris Lindee <chris.lindee+github@gmail.com>
|
||||||
|
Chris McDonough <chrism@plope.com>
|
||||||
Chris Siden <chris.siden@delphix.com>
|
Chris Siden <chris.siden@delphix.com>
|
||||||
Chris Wedgwood <cw@f00f.org>
|
Chris Siebenmann <cks.github@cs.toronto.edu>
|
||||||
Chris Williamson <chris.williamson@delphix.com>
|
|
||||||
Chris Zubrzycki <github@mid-earth.net>
|
|
||||||
Christ Schlacta <aarcane@aarcane.info>
|
|
||||||
Christer Ekholm <che@chrekh.se>
|
Christer Ekholm <che@chrekh.se>
|
||||||
Christian Kohlschütter <christian@kohlschutter.com>
|
Christian Kohlschütter <christian@kohlschutter.com>
|
||||||
Christian Neukirchen <chneukirchen@gmail.com>
|
Christian Neukirchen <chneukirchen@gmail.com>
|
||||||
Christian Schwarz <me@cschwarz.com>
|
Christian Schwarz <me@cschwarz.com>
|
||||||
Christopher Voltz <cjunk@voltz.ws>
|
Christopher Voltz <cjunk@voltz.ws>
|
||||||
|
Christ Schlacta <aarcane@aarcane.info>
|
||||||
|
Chris Wedgwood <cw@f00f.org>
|
||||||
|
Chris Williamson <chris.williamson@delphix.com>
|
||||||
|
Chris Zubrzycki <github@mid-earth.net>
|
||||||
|
Chuck Tuffli <ctuffli@gmail.com>
|
||||||
Chunwei Chen <david.chen@nutanix.com>
|
Chunwei Chen <david.chen@nutanix.com>
|
||||||
Clemens Fruhwirth <clemens@endorphin.org>
|
Clemens Fruhwirth <clemens@endorphin.org>
|
||||||
|
Clemens Lang <cl@clang.name>
|
||||||
|
Clint Armstrong <clint@clintarmstrong.net>
|
||||||
Coleman Kane <ckane@colemankane.org>
|
Coleman Kane <ckane@colemankane.org>
|
||||||
Colin Ian King <colin.king@canonical.com>
|
Colin Ian King <colin.king@canonical.com>
|
||||||
|
Colm Buckley <colm@tuatha.org>
|
||||||
|
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>
|
||||||
Cyril Plisko <cyril.plisko@infinidat.com>
|
Cyril Plisko <cyril.plisko@infinidat.com>
|
||||||
DHE <git@dehacked.net>
|
Cy Schubert <cy@FreeBSD.org>
|
||||||
|
Cédric Berger <cedric@precidata.com>
|
||||||
|
Dacian Reece-Stremtan <dacianstremtan@gmail.com>
|
||||||
|
Dag-Erling Smørgrav <des@FreeBSD.org>
|
||||||
|
Damiano Albani <damiano.albani@gmail.com>
|
||||||
|
Damian Szuberski <szuberskidamian@gmail.com>
|
||||||
Damian Wojsław <damian@wojslaw.pl>
|
Damian Wojsław <damian@wojslaw.pl>
|
||||||
|
Daniel Hiepler <d-git@coderdu.de>
|
||||||
|
Daniel Hoffman <dj.hoffman@delphix.com>
|
||||||
|
Daniel Kobras <d.kobras@science-computing.de>
|
||||||
|
Daniel Kolesa <daniel@octaforge.org>
|
||||||
|
Daniel Reichelt <hacking@nachtgeist.net>
|
||||||
|
Daniel Stevenson <bot@dstev.net>
|
||||||
|
Daniel Verite <daniel@verite.pro>
|
||||||
|
Daniil Lunev <d.lunev.mail@gmail.com>
|
||||||
Dan Kimmel <dan.kimmel@delphix.com>
|
Dan Kimmel <dan.kimmel@delphix.com>
|
||||||
Dan McDonald <danmcd@nexenta.com>
|
Dan McDonald <danmcd@nexenta.com>
|
||||||
Dan Swartzendruber <dswartz@druber.com>
|
Dan Swartzendruber <dswartz@druber.com>
|
||||||
Dan Vatca <dan.vatca@gmail.com>
|
Dan Vatca <dan.vatca@gmail.com>
|
||||||
Daniel Hoffman <dj.hoffman@delphix.com>
|
|
||||||
Daniel Verite <daniel@verite.pro>
|
|
||||||
Daniil Lunev <d.lunev.mail@gmail.com>
|
|
||||||
Darik Horn <dajhorn@vanadac.com>
|
Darik Horn <dajhorn@vanadac.com>
|
||||||
Dave Eddy <dave@daveeddy.com>
|
Dave Eddy <dave@daveeddy.com>
|
||||||
|
David Hedberg <david@qzx.se>
|
||||||
David Lamparter <equinox@diac24.net>
|
David Lamparter <equinox@diac24.net>
|
||||||
David Qian <david.qian@intel.com>
|
David Qian <david.qian@intel.com>
|
||||||
David Quigley <david.quigley@intel.com>
|
David Quigley <david.quigley@intel.com>
|
||||||
Debabrata Banerjee <dbanerje@akamai.com>
|
Debabrata Banerjee <dbanerje@akamai.com>
|
||||||
|
D. Ebdrup <debdrup@freebsd.org>
|
||||||
Denys Rtveliashvili <denys@rtveliashvili.name>
|
Denys Rtveliashvili <denys@rtveliashvili.name>
|
||||||
Derek Dai <daiderek@gmail.com>
|
Derek Dai <daiderek@gmail.com>
|
||||||
|
DHE <git@dehacked.net>
|
||||||
|
Didier Roche <didrocks@ubuntu.com>
|
||||||
Dimitri John Ledkov <xnox@ubuntu.com>
|
Dimitri John Ledkov <xnox@ubuntu.com>
|
||||||
|
Dimitry Andric <dimitry@andric.com>
|
||||||
|
Dirkjan Bussink <d.bussink@gmail.com>
|
||||||
Dmitry Khasanov <pik4ez@gmail.com>
|
Dmitry Khasanov <pik4ez@gmail.com>
|
||||||
|
Dominic Pearson <dsp@technoanimal.net>
|
||||||
Dominik Hassler <hadfl@omniosce.org>
|
Dominik Hassler <hadfl@omniosce.org>
|
||||||
Dominik Honnef <dominikh@fork-bomb.org>
|
Dominik Honnef <dominikh@fork-bomb.org>
|
||||||
Don Brady <don.brady@delphix.com>
|
Don Brady <don.brady@delphix.com>
|
||||||
|
Doug Rabson <dfr@rabson.org>
|
||||||
Dr. András Korn <korn-github.com@elan.rulez.org>
|
Dr. András Korn <korn-github.com@elan.rulez.org>
|
||||||
|
Dries Michiels <driesm.michiels@gmail.com>
|
||||||
|
Edmund Nadolski <edmund.nadolski@ixsystems.com>
|
||||||
|
Eitan Adler <lists@eitanadler.com>
|
||||||
Eli Rosenthal <eli.rosenthal@delphix.com>
|
Eli Rosenthal <eli.rosenthal@delphix.com>
|
||||||
|
Eli Schwartz <eschwartz93@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>
|
||||||
|
Ethan Coe-Renner <coerenner1@llnl.gov>
|
||||||
Etienne Dechamps <etienne@edechamps.fr>
|
Etienne Dechamps <etienne@edechamps.fr>
|
||||||
|
Evan Allrich <eallrich@gmail.com>
|
||||||
|
Evan Harris <eharris@puremagic.com>
|
||||||
Evan Susarret <evansus@gmail.com>
|
Evan Susarret <evansus@gmail.com>
|
||||||
Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||||
|
Fabio Buso <dev.siroibaf@gmail.com>
|
||||||
|
Fabio Scaccabarozzi <fsvm88@gmail.com>
|
||||||
Fajar A. Nugraha <github@fajar.net>
|
Fajar A. Nugraha <github@fajar.net>
|
||||||
Fan Yong <fan.yong@intel.com>
|
Fan Yong <fan.yong@intel.com>
|
||||||
|
fbynite <fbynite@users.noreply.github.com>
|
||||||
|
Fedor Uporov <fuporov.vstack@gmail.com>
|
||||||
|
Felix Dörre <felix@dogcraft.de>
|
||||||
|
Felix Neumärker <xdch47@posteo.de>
|
||||||
Feng Sun <loyou85@gmail.com>
|
Feng Sun <loyou85@gmail.com>
|
||||||
|
Finix Yan <yancw@info2soft.com>
|
||||||
|
Francesco Mazzoli <f@mazzo.li>
|
||||||
Frederik Wessels <wessels147@gmail.com>
|
Frederik Wessels <wessels147@gmail.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>
|
||||||
Garrett D'Amore <garrett@nexenta.com>
|
Garrett D'Amore <garrett@nexenta.com>
|
||||||
|
Garrett Fields <ghfields@gmail.com>
|
||||||
Garrison Jensen <garrison.jensen@gmail.com>
|
Garrison Jensen <garrison.jensen@gmail.com>
|
||||||
Gary Mills <gary_mills@fastmail.fm>
|
Gary Mills <gary_mills@fastmail.fm>
|
||||||
Gaurav Kumar <gauravk.18@gmail.com>
|
Gaurav Kumar <gauravk.18@gmail.com>
|
||||||
GeLiXin <ge.lixin@zte.com.cn>
|
GeLiXin <ge.lixin@zte.com.cn>
|
||||||
George Amanakis <g_amanakis@yahoo.com>
|
George Amanakis <g_amanakis@yahoo.com>
|
||||||
|
George Diamantopoulos <georgediam@gmail.com>
|
||||||
|
George Gaydarov <git@gg7.io>
|
||||||
George Melikov <mail@gmelikov.ru>
|
George Melikov <mail@gmelikov.ru>
|
||||||
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>
|
||||||
|
Gian-Carlo DeFazio <defazio1@llnl.gov>
|
||||||
|
Gionatan Danti <g.danti@assyoma.it>
|
||||||
Giuseppe Di Natale <guss80@gmail.com>
|
Giuseppe Di Natale <guss80@gmail.com>
|
||||||
|
Glenn Washburn <development@efficientek.com>
|
||||||
Gordan Bobic <gordan@redsleeve.org>
|
Gordan Bobic <gordan@redsleeve.org>
|
||||||
|
Gordon Bergling <gbergling@googlemail.com>
|
||||||
Gordon Ross <gwr@nexenta.com>
|
Gordon Ross <gwr@nexenta.com>
|
||||||
|
Graham Christensen <graham@grahamc.com>
|
||||||
|
Graham Perrin <grahamperrin@gmail.com>
|
||||||
Gregor Kopka <gregor@kopka.net>
|
Gregor Kopka <gregor@kopka.net>
|
||||||
|
Gregory Bartholomew <gregory.lee.bartholomew@gmail.com>
|
||||||
|
grembo <freebsd@grem.de>
|
||||||
Grischa Zengel <github.zfsonlinux@zengel.info>
|
Grischa Zengel <github.zfsonlinux@zengel.info>
|
||||||
|
grodik <pat@litke.dev>
|
||||||
Gunnar Beutner <gunnar@beutner.name>
|
Gunnar Beutner <gunnar@beutner.name>
|
||||||
Gvozden Neskovic <neskovic@gmail.com>
|
Gvozden Neskovic <neskovic@gmail.com>
|
||||||
Hajo Möller <dasjoe@gmail.com>
|
Hajo Möller <dasjoe@gmail.com>
|
||||||
|
Han Gao <rabenda.cn@gmail.com>
|
||||||
Hans Rosenfeld <hans.rosenfeld@nexenta.com>
|
Hans Rosenfeld <hans.rosenfeld@nexenta.com>
|
||||||
|
Harald van Dijk <harald@gigawatt.nl>
|
||||||
|
Harry Mallon <hjmallon@gmail.com>
|
||||||
|
Harry Sintonen <github-piru@kyber.fi>
|
||||||
|
HC <mmttdebbcc@yahoo.com>
|
||||||
|
hedong zhang <h_d_zhang@163.com>
|
||||||
|
Heitor Alves de Siqueira <halves@canonical.com>
|
||||||
|
Henrik Riomar <henrik.riomar@gmail.com>
|
||||||
|
Herb Wartens <wartens2@llnl.gov>
|
||||||
|
Hiếu Lê <leorize+oss@disroot.org>
|
||||||
|
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 Kozhukhov <ikozhukhov@gmail.com>
|
Igor Kozhukhov <ikozhukhov@gmail.com>
|
||||||
Igor Lvovsky <ilvovsky@gmail.com>
|
Igor Lvovsky <ilvovsky@gmail.com>
|
||||||
|
ilbsmart <wgqimut@gmail.com>
|
||||||
|
illiliti <illiliti@protonmail.com>
|
||||||
|
ilovezfs <ilovezfs@icloud.com>
|
||||||
|
InsanePrawn <Insane.Prawny@gmail.com>
|
||||||
Isaac Huang <he.huang@intel.com>
|
Isaac Huang <he.huang@intel.com>
|
||||||
JK Dingwall <james@dingwall.me.uk>
|
|
||||||
Jacek Fefliński <feflik@gmail.com>
|
Jacek Fefliński <feflik@gmail.com>
|
||||||
|
Jacob Adams <tookmund@gmail.com>
|
||||||
|
Jake Howard <git@theorangeone.net>
|
||||||
James Cowgill <james.cowgill@mips.com>
|
James Cowgill <james.cowgill@mips.com>
|
||||||
|
James H <james@kagisoft.co.uk>
|
||||||
James Lee <jlee@thestaticvoid.com>
|
James Lee <jlee@thestaticvoid.com>
|
||||||
James Pan <jiaming.pan@yahoo.com>
|
James Pan <jiaming.pan@yahoo.com>
|
||||||
|
James Wah <james@laird-wah.net>
|
||||||
Jan Engelhardt <jengelh@inai.de>
|
Jan Engelhardt <jengelh@inai.de>
|
||||||
Jan Kryl <jan.kryl@nexenta.com>
|
Jan Kryl <jan.kryl@nexenta.com>
|
||||||
Jan Sanislo <oystr@cs.washington.edu>
|
Jan Sanislo <oystr@cs.washington.edu>
|
||||||
|
Jason Cohen <jwittlincohen@gmail.com>
|
||||||
|
Jason Harmening <jason.harmening@gmail.com>
|
||||||
Jason King <jason.brian.king@gmail.com>
|
Jason King <jason.brian.king@gmail.com>
|
||||||
Jason Zaman <jasonzaman@gmail.com>
|
Jason Zaman <jasonzaman@gmail.com>
|
||||||
Javen Wu <wu.javen@gmail.com>
|
Javen Wu <wu.javen@gmail.com>
|
||||||
|
Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
|
||||||
|
Jeff Dike <jdike@akamai.com>
|
||||||
|
Jeremy Faulkner <gldisater@gmail.com>
|
||||||
Jeremy Gill <jgill@parallax-innovations.com>
|
Jeremy Gill <jgill@parallax-innovations.com>
|
||||||
Jeremy Jones <jeremy@delphix.com>
|
Jeremy Jones <jeremy@delphix.com>
|
||||||
|
Jeremy Visser <jeremy.visser@gmail.com>
|
||||||
Jerry Jelinek <jerry.jelinek@joyent.com>
|
Jerry Jelinek <jerry.jelinek@joyent.com>
|
||||||
|
Jessica Clarke <jrtc27@jrtc27.com>
|
||||||
Jinshan Xiong <jinshan.xiong@intel.com>
|
Jinshan Xiong <jinshan.xiong@intel.com>
|
||||||
|
Jitendra Patidar <jitendra.patidar@nutanix.com>
|
||||||
|
JK Dingwall <james@dingwall.me.uk>
|
||||||
Joe Stein <joe.stein@delphix.com>
|
Joe Stein <joe.stein@delphix.com>
|
||||||
|
John-Mark Gurney <jmg@funkthat.com>
|
||||||
John Albietz <inthecloud247@gmail.com>
|
John Albietz <inthecloud247@gmail.com>
|
||||||
John Eismeier <john.eismeier@gmail.com>
|
John Eismeier <john.eismeier@gmail.com>
|
||||||
John L. Hammond <john.hammond@intel.com>
|
John Gallagher <john.gallagher@delphix.com>
|
||||||
John Layman <jlayman@sagecloud.com>
|
John Layman <jlayman@sagecloud.com>
|
||||||
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
|
John L. Hammond <john.hammond@intel.com>
|
||||||
John Wren Kennedy <john.kennedy@delphix.com>
|
John M. Layman <jml@frijid.net>
|
||||||
Johnny Stenback <github@jstenback.com>
|
Johnny Stenback <github@jstenback.com>
|
||||||
|
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
|
||||||
|
John Poduska <jpoduska@datto.com>
|
||||||
|
John Ramsden <johnramsden@riseup.net>
|
||||||
|
John Wren Kennedy <john.kennedy@delphix.com>
|
||||||
|
jokersus <lolivampireslave@gmail.com>
|
||||||
|
Jonathon Fernyhough <jonathon@m2x.dev>
|
||||||
Jorgen Lundman <lundman@lundman.net>
|
Jorgen Lundman <lundman@lundman.net>
|
||||||
Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
|
Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
|
||||||
|
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>
|
||||||
|
João Carlos Mendes Luís <jonny@jonny.eng.br>
|
||||||
|
Julian Brunner <julian.brunner@gmail.com>
|
||||||
|
Julian Heuking <JulianH@beckhoff.com>
|
||||||
|
jumbi77 <jumbi77@users.noreply.github.com>
|
||||||
Justin Bedő <cu@cua0.org>
|
Justin Bedő <cu@cua0.org>
|
||||||
|
Justin Gottula <justin@jgottula.com>
|
||||||
|
Justin Hibbits <chmeeedalf@gmail.com>
|
||||||
|
Justin Keogh <github.com@v6y.net>
|
||||||
Justin Lecher <jlec@gentoo.org>
|
Justin Lecher <jlec@gentoo.org>
|
||||||
|
Justin Scholz <git@justinscholz.de>
|
||||||
Justin T. Gibbs <gibbs@FreeBSD.org>
|
Justin T. Gibbs <gibbs@FreeBSD.org>
|
||||||
|
jyxent <jordanp@gmail.com>
|
||||||
Jörg Thalheim <joerg@higgsboson.tk>
|
Jörg Thalheim <joerg@higgsboson.tk>
|
||||||
KORN Andras <korn@elan.rulez.org>
|
ka7 <ka7@la-evento.com>
|
||||||
|
Ka Ho Ng <khng@FreeBSD.org>
|
||||||
Kamil Domański <kamil@domanski.co>
|
Kamil Domański <kamil@domanski.co>
|
||||||
Karsten Kretschmer <kkretschmer@gmail.com>
|
Karsten Kretschmer <kkretschmer@gmail.com>
|
||||||
Kash Pande <kash@tripleback.net>
|
Kash Pande <kash@tripleback.net>
|
||||||
|
Kay Pedersen <christianpe96@gmail.com>
|
||||||
Keith M Wesolowski <wesolows@foobazco.org>
|
Keith M Wesolowski <wesolows@foobazco.org>
|
||||||
|
KernelOfTruth <kerneloftruth@gmail.com>
|
||||||
|
Kevin Bowling <kevin.bowling@kev009.com>
|
||||||
|
Kevin Jin <lostking2008@hotmail.com>
|
||||||
|
Kevin P. Fleming <kevin@km6g.us>
|
||||||
Kevin Tanguy <kevin.tanguy@ovh.net>
|
Kevin Tanguy <kevin.tanguy@ovh.net>
|
||||||
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>
|
||||||
|
Kody A Kantor <kody.kantor@gmail.com>
|
||||||
Kohsuke Kawaguchi <kk@kohsuke.org>
|
Kohsuke Kawaguchi <kk@kohsuke.org>
|
||||||
|
Konstantin Khorenko <khorenko@virtuozzo.com>
|
||||||
|
KORN Andras <korn@elan.rulez.org>
|
||||||
|
Kristof Provost <github@sigsegv.be>
|
||||||
|
Krzysztof Piecuch <piecuch@kpiecuch.pl>
|
||||||
Kyle Blatter <kyleblatter@llnl.gov>
|
Kyle Blatter <kyleblatter@llnl.gov>
|
||||||
|
Kyle Evans <kevans@FreeBSD.org>
|
||||||
Kyle Fuller <inbox@kylefuller.co.uk>
|
Kyle Fuller <inbox@kylefuller.co.uk>
|
||||||
Loli <ezomori.nozomu@gmail.com>
|
Laevos <Laevos@users.noreply.github.com>
|
||||||
|
Lalufu <Lalufu@users.noreply.github.com>
|
||||||
Lars Johannsen <laj@it.dk>
|
Lars Johannsen <laj@it.dk>
|
||||||
|
Laura Hild <lsh@jlab.org>
|
||||||
|
Laurențiu Nicola <lnicola@dend.ro>
|
||||||
|
Lauri Tirkkonen <lauri@hacktheplanet.fi>
|
||||||
|
liaoyuxiangqin <guo.yong33@zte.com.cn>
|
||||||
Li Dongyang <dongyang.li@anu.edu.au>
|
Li Dongyang <dongyang.li@anu.edu.au>
|
||||||
|
Liu Hua <liu.hua130@zte.com.cn>
|
||||||
|
Liu Qing <winglq@gmail.com>
|
||||||
Li Wei <W.Li@Sun.COM>
|
Li Wei <W.Li@Sun.COM>
|
||||||
|
Loli <ezomori.nozomu@gmail.com>
|
||||||
|
lorddoskias <lorddoskias@gmail.com>
|
||||||
|
Lorenz Brun <lorenz@dolansoft.org>
|
||||||
|
Lorenz Hüdepohl <dev@stellardeath.org>
|
||||||
|
louwrentius <louwrentius@gmail.com>
|
||||||
Lukas Wunner <lukas@wunner.de>
|
Lukas Wunner <lukas@wunner.de>
|
||||||
|
luozhengzheng <luo.zhengzheng@zte.com.cn>
|
||||||
|
Luís Henriques <henrix@camandro.org>
|
||||||
Madhav Suresh <madhav.suresh@delphix.com>
|
Madhav Suresh <madhav.suresh@delphix.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>
|
||||||
Marcel Huber <marcelhuberfoo@gmail.com>
|
Marcel Huber <marcelhuberfoo@gmail.com>
|
||||||
|
Marcel Menzel <mail@mcl.gg>
|
||||||
|
Marcel Schilling <marcel.schilling@uni-luebeck.de>
|
||||||
Marcel Telka <marcel.telka@nexenta.com>
|
Marcel Telka <marcel.telka@nexenta.com>
|
||||||
Marcel Wysocki <maci.stgn@gmail.com>
|
Marcel Wysocki <maci.stgn@gmail.com>
|
||||||
|
Marcin Skarbek <git@skarbek.name>
|
||||||
|
Mariusz Zaborski <mariusz.zaborski@klarasystems.com>
|
||||||
|
Mark Johnston <markj@FreeBSD.org>
|
||||||
|
Mark Maybee <mark.maybee@delphix.com>
|
||||||
|
Mark Roper <markroper@gmail.com>
|
||||||
Mark Shellenbaum <Mark.Shellenbaum@Oracle.COM>
|
Mark Shellenbaum <Mark.Shellenbaum@Oracle.COM>
|
||||||
|
marku89 <mar42@kola.li>
|
||||||
Mark Wright <markwright@internode.on.net>
|
Mark Wright <markwright@internode.on.net>
|
||||||
Martin Matuska <mm@FreeBSD.org>
|
Martin Matuska <mm@FreeBSD.org>
|
||||||
|
Martin Rüegg <martin.rueegg@metaworx.ch>
|
||||||
Massimo Maggi <me@massimo-maggi.eu>
|
Massimo Maggi <me@massimo-maggi.eu>
|
||||||
Matt Johnston <matt@fugro-fsi.com.au>
|
Mateusz Guzik <mjguzik@gmail.com>
|
||||||
Matt Kemp <matt@mattikus.com>
|
Mateusz Piotrowski <0mp@FreeBSD.org>
|
||||||
|
Mathieu Velten <matmaul@gmail.com>
|
||||||
|
Matt Fiddaman <github@m.fiddaman.uk>
|
||||||
Matthew Ahrens <matt@delphix.com>
|
Matthew Ahrens <matt@delphix.com>
|
||||||
Matthew Thode <mthode@mthode.org>
|
Matthew Thode <mthode@mthode.org>
|
||||||
|
Matthias Blankertz <matthias@blankertz.org>
|
||||||
|
Matt Johnston <matt@fugro-fsi.com.au>
|
||||||
|
Matt Kemp <matt@mattikus.com>
|
||||||
|
Matt Macy <mmacy@freebsd.org>
|
||||||
Matus Kral <matuskral@me.com>
|
Matus Kral <matuskral@me.com>
|
||||||
|
Mauricio Faria de Oliveira <mfo@canonical.com>
|
||||||
Max Grossman <max.grossman@delphix.com>
|
Max Grossman <max.grossman@delphix.com>
|
||||||
Maximilian Mehnert <maximilian.mehnert@gmx.de>
|
Maximilian Mehnert <maximilian.mehnert@gmx.de>
|
||||||
|
Max Zettlmeißl <max@zettlmeissl.de>
|
||||||
|
Md Islam <mdnahian@outlook.com>
|
||||||
|
megari <megari@iki.fi>
|
||||||
|
Michael D Labriola <michael.d.labriola@gmail.com>
|
||||||
|
Michael Franzl <michael@franzl.name>
|
||||||
Michael Gebetsroither <michael@mgeb.org>
|
Michael Gebetsroither <michael@mgeb.org>
|
||||||
Michael Kjorling <michael@kjorling.se>
|
Michael Kjorling <michael@kjorling.se>
|
||||||
Michael Martin <mgmartin.mgm@gmail.com>
|
Michael Martin <mgmartin.mgm@gmail.com>
|
||||||
Michael Niewöhner <foss@mniewoehner.de>
|
Michael Niewöhner <foss@mniewoehner.de>
|
||||||
|
Michael Zhivich <mzhivich@akamai.com>
|
||||||
|
Michal Vasilek <michal@vasilek.cz>
|
||||||
Mike Gerdts <mike.gerdts@joyent.com>
|
Mike Gerdts <mike.gerdts@joyent.com>
|
||||||
Mike Harsch <mike@harschsystems.com>
|
Mike Harsch <mike@harschsystems.com>
|
||||||
Mike Leddy <mike.leddy@gmail.com>
|
Mike Leddy <mike.leddy@gmail.com>
|
||||||
Mike Swanson <mikeonthecomputer@gmail.com>
|
Mike Swanson <mikeonthecomputer@gmail.com>
|
||||||
Milan Jurik <milan.jurik@xylab.cz>
|
Milan Jurik <milan.jurik@xylab.cz>
|
||||||
|
Minsoo Choo <minsoochoo0122@proton.me>
|
||||||
|
Mohamed Tawfik <m_tawfik@aucegypt.edu>
|
||||||
Morgan Jones <mjones@rice.edu>
|
Morgan Jones <mjones@rice.edu>
|
||||||
Moritz Maxeiner <moritz@ucworks.org>
|
Moritz Maxeiner <moritz@ucworks.org>
|
||||||
|
Mo Zhou <cdluminate@gmail.com>
|
||||||
|
naivekun <naivekun@outlook.com>
|
||||||
|
nathancheek <myself@nathancheek.com>
|
||||||
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>
|
||||||
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>
|
||||||
Neependra Khare <neependra@kqinfotech.com>
|
Neependra Khare <neependra@kqinfotech.com>
|
||||||
Neil Stockbridge <neil@dist.ro>
|
Neil Stockbridge <neil@dist.ro>
|
||||||
|
Nick Black <dank@qemfd.net>
|
||||||
Nick Garvey <garvey.nick@gmail.com>
|
Nick Garvey <garvey.nick@gmail.com>
|
||||||
|
Nick Mattis <nickm970@gmail.com>
|
||||||
|
Nick Terrell <terrelln@fb.com>
|
||||||
|
Niklas Haas <github-c6e1c8@haasn.xyz>
|
||||||
Nikolay Borisov <n.borisov.lkml@gmail.com>
|
Nikolay Borisov <n.borisov.lkml@gmail.com>
|
||||||
|
nordaux <nordaux@gmail.com>
|
||||||
|
ofthesun9 <olivier@ofthesun.net>
|
||||||
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 Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
|
||||||
|
omni <omni+vagant@hack.org>
|
||||||
|
Orivej Desh <orivej@gmx.fr>
|
||||||
|
Pablo Correa Gómez <ablocorrea@hotmail.com>
|
||||||
|
Palash Gandhi <pbg4930@rit.edu>
|
||||||
|
Patrick Mooney <pmooney@pfmooney.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>
|
||||||
@ -243,69 +465,160 @@ CONTRIBUTORS:
|
|||||||
Pedro Giffuni <pfg@freebsd.org>
|
Pedro Giffuni <pfg@freebsd.org>
|
||||||
Peng <peng.hse@xtaotech.com>
|
Peng <peng.hse@xtaotech.com>
|
||||||
Peter Ashford <ashford@accs.com>
|
Peter Ashford <ashford@accs.com>
|
||||||
|
Peter Dave Hello <hsu@peterdavehello.org>
|
||||||
|
Peter Levine <plevine457@gmail.com>
|
||||||
|
Peter Wirdemo <peter.wirdemo@gmail.com>
|
||||||
|
Petros Koutoupis <petros@petroskoutoupis.com>
|
||||||
|
Philip Pokorny <ppokorny@penguincomputing.com>
|
||||||
|
Philipp Riederer <pt@philipptoelke.de>
|
||||||
|
Phil Kauffman <philip@kauffman.me>
|
||||||
|
Ping Huang <huangping@smartx.com>
|
||||||
|
Piotr Kubaj <pkubaj@anongoth.pl>
|
||||||
|
Piotr P. Stefaniak <pstef@freebsd.org>
|
||||||
Prakash Surya <prakash.surya@delphix.com>
|
Prakash Surya <prakash.surya@delphix.com>
|
||||||
Prasad Joshi <prasadjoshi124@gmail.com>
|
Prasad Joshi <prasadjoshi124@gmail.com>
|
||||||
|
privb0x23 <privb0x23@users.noreply.github.com>
|
||||||
|
P.SCH <p88@yahoo.com>
|
||||||
|
Quentin Zdanis <zdanisq@gmail.com>
|
||||||
|
Rafael Kitover <rkitover@gmail.com>
|
||||||
|
RageLtMan <sempervictus@users.noreply.github.com>
|
||||||
Ralf Ertzinger <ralf@skytale.net>
|
Ralf Ertzinger <ralf@skytale.net>
|
||||||
Randall Mason <ClashTheBunny@gmail.com>
|
Randall Mason <ClashTheBunny@gmail.com>
|
||||||
Remy Blank <remy.blank@pobox.com>
|
Remy Blank <remy.blank@pobox.com>
|
||||||
|
renelson <bnelson@nelsonbe.com>
|
||||||
|
Reno Reckling <e-github@wthack.de>
|
||||||
Ricardo M. Correia <ricardo.correia@oracle.com>
|
Ricardo M. Correia <ricardo.correia@oracle.com>
|
||||||
Rich Ercolani <rincebrain@gmail.com>
|
Riccardo Schirone <rschirone91@gmail.com>
|
||||||
|
Richard Allen <belperite@gmail.com>
|
||||||
Richard Elling <Richard.Elling@RichardElling.com>
|
Richard Elling <Richard.Elling@RichardElling.com>
|
||||||
Richard Laager <rlaager@wiktel.com>
|
Richard Laager <rlaager@wiktel.com>
|
||||||
Richard Lowe <richlowe@richlowe.net>
|
Richard Lowe <richlowe@richlowe.net>
|
||||||
Richard Sharpe <rsharpe@samba.org>
|
Richard Sharpe <rsharpe@samba.org>
|
||||||
Richard Yao <ryao@gentoo.org>
|
Richard Yao <ryao@gentoo.org>
|
||||||
|
Rich Ercolani <rincebrain@gmail.com>
|
||||||
|
Robert Novak <sailnfool@gmail.com>
|
||||||
|
Roberto Ricci <ricci@disroot.org>
|
||||||
|
Rob Norris <robn@despairlabs.com>
|
||||||
|
Rob Wing <rew@FreeBSD.org>
|
||||||
Rohan Puri <rohan.puri15@gmail.com>
|
Rohan Puri <rohan.puri15@gmail.com>
|
||||||
Romain Dolbeau <romain.dolbeau@atos.net>
|
Romain Dolbeau <romain.dolbeau@atos.net>
|
||||||
Roman Strashkin <roman.strashkin@nexenta.com>
|
Roman Strashkin <roman.strashkin@nexenta.com>
|
||||||
|
Ross Williams <ross@ross-williams.net>
|
||||||
Ruben Kerkhof <ruben@rubenkerkhof.com>
|
Ruben Kerkhof <ruben@rubenkerkhof.com>
|
||||||
|
Ryan Hirasaki <ryanhirasaki@gmail.com>
|
||||||
|
Ryan Lahfa <masterancpp@gmail.com>
|
||||||
|
Ryan Libby <rlibby@FreeBSD.org>
|
||||||
|
Ryan Moeller <freqlabs@FreeBSD.org>
|
||||||
|
Sam Hathaway <github.com@munkynet.org>
|
||||||
|
Sam Lunt <samuel.j.lunt@gmail.com>
|
||||||
|
Samuel VERSCHELDE <stormi-github@ylix.fr>
|
||||||
|
Samuel Wycliffe <samuelwycliffe@gmail.com>
|
||||||
|
Samuel Wycliffe J <samwyc@hpe.com>
|
||||||
|
Sanjeev Bagewadi <sanjeev.bagewadi@gmail.com>
|
||||||
|
Sara Hartse <sara.hartse@delphix.com>
|
||||||
Saso Kiselkov <saso.kiselkov@nexenta.com>
|
Saso Kiselkov <saso.kiselkov@nexenta.com>
|
||||||
|
Satadru Pramanik <satadru@gmail.com>
|
||||||
|
Savyasachee Jha <genghizkhan91@hawkradius.com>
|
||||||
|
Scott Colby <scott@scolby.com>
|
||||||
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>
|
||||||
|
Sebastien Roy <seb@delphix.com>
|
||||||
Sen Haerens <sen@senhaerens.be>
|
Sen Haerens <sen@senhaerens.be>
|
||||||
Serapheim Dimitropoulos <serapheim@delphix.com>
|
Serapheim Dimitropoulos <serapheim@delphix.com>
|
||||||
Seth Forshee <seth.forshee@canonical.com>
|
Seth Forshee <seth.forshee@canonical.com>
|
||||||
|
Shaan Nobee <sniper111@gmail.com>
|
||||||
Shampavman <sham.pavman@nexenta.com>
|
Shampavman <sham.pavman@nexenta.com>
|
||||||
|
Shaun Tancheff <shaun@aeonazure.com>
|
||||||
Shen Yan <shenyanxxxy@qq.com>
|
Shen Yan <shenyanxxxy@qq.com>
|
||||||
Simon Guest <simon.guest@tesujimath.org>
|
Simon Guest <simon.guest@tesujimath.org>
|
||||||
Simon Klinkert <simon.klinkert@gmail.com>
|
Simon Klinkert <simon.klinkert@gmail.com>
|
||||||
Sowrabha Gopal <sowrabha.gopal@delphix.com>
|
Sowrabha Gopal <sowrabha.gopal@delphix.com>
|
||||||
|
Spencer Kinny <spencerkinny1995@gmail.com>
|
||||||
|
Srikanth N S <srikanth.nagasubbaraoseetharaman@hpe.com>
|
||||||
Stanislav Seletskiy <s.seletskiy@gmail.com>
|
Stanislav Seletskiy <s.seletskiy@gmail.com>
|
||||||
Steffen Müthing <steffen.muething@iwr.uni-heidelberg.de>
|
Steffen Müthing <steffen.muething@iwr.uni-heidelberg.de>
|
||||||
Stephen Blinick <stephen.blinick@delphix.com>
|
Stephen Blinick <stephen.blinick@delphix.com>
|
||||||
|
sterlingjensen <sterlingjensen@users.noreply.github.com>
|
||||||
Steve Dougherty <sdougherty@barracuda.com>
|
Steve Dougherty <sdougherty@barracuda.com>
|
||||||
|
Steve Mokris <smokris@softpixel.com>
|
||||||
Steven Burgess <sburgess@dattobackup.com>
|
Steven Burgess <sburgess@dattobackup.com>
|
||||||
Steven Hartland <smh@freebsd.org>
|
Steven Hartland <smh@freebsd.org>
|
||||||
Steven Johnson <sjohnson@sakuraindustries.com>
|
Steven Johnson <sjohnson@sakuraindustries.com>
|
||||||
|
Steven Noonan <steven@uplinklabs.net>
|
||||||
|
stf <s@ctrlc.hu>
|
||||||
Stian Ellingsen <stian@plaimi.net>
|
Stian Ellingsen <stian@plaimi.net>
|
||||||
|
Stoiko Ivanov <github@nomore.at>
|
||||||
|
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>
|
||||||
Sören Tempel <soeren+git@soeren-tempel.net>
|
Sören Tempel <soeren+git@soeren-tempel.net>
|
||||||
|
Tamas TEVESZ <ice@extreme.hu>
|
||||||
|
Teodor Spæren <teodor_spaeren@riseup.net>
|
||||||
|
TerraTech <TerraTech@users.noreply.github.com>
|
||||||
Thijs Cramer <thijs.cramer@gmail.com>
|
Thijs Cramer <thijs.cramer@gmail.com>
|
||||||
|
Thomas Geppert <geppi@digitx.de>
|
||||||
|
Thomas Lamprecht <guggentom@hotmail.de>
|
||||||
|
Till Maas <opensource@till.name>
|
||||||
Tim Chase <tim@chase2k.com>
|
Tim Chase <tim@chase2k.com>
|
||||||
Tim Connors <tconnors@rather.puzzling.org>
|
Tim Connors <tconnors@rather.puzzling.org>
|
||||||
Tim Crawford <tcrawford@datto.com>
|
Tim Crawford <tcrawford@datto.com>
|
||||||
Tim Haley <Tim.Haley@Sun.COM>
|
Tim Haley <Tim.Haley@Sun.COM>
|
||||||
|
timor <timor.dd@googlemail.com>
|
||||||
|
Timothy Day <tday141@gmail.com>
|
||||||
|
Tim Schumacher <timschumi@gmx.de>
|
||||||
Tino Reichardt <milky-zfs@mcmilk.de>
|
Tino Reichardt <milky-zfs@mcmilk.de>
|
||||||
Tobin Harding <me@tobin.cc>
|
Tobin Harding <me@tobin.cc>
|
||||||
Tom Caputi <tcaputi@datto.com>
|
Tom Caputi <tcaputi@datto.com>
|
||||||
Tom Matthews <tom@axiom-partners.com>
|
Tom Matthews <tom@axiom-partners.com>
|
||||||
Tom Prince <tom.prince@ualberta.net>
|
|
||||||
Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
|
Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
|
||||||
|
Tom Prince <tom.prince@ualberta.net>
|
||||||
Tony Hutter <hutter2@llnl.gov>
|
Tony Hutter <hutter2@llnl.gov>
|
||||||
|
Tony Nguyen <tony.nguyen@delphix.com>
|
||||||
|
Tony Perkins <tperkins@datto.com>
|
||||||
Toomas Soome <tsoome@me.com>
|
Toomas Soome <tsoome@me.com>
|
||||||
|
Torsten Wörtwein <twoertwein@gmail.com>
|
||||||
|
Toyam Cox <aviator45003@gmail.com>
|
||||||
|
Trevor Bautista <trevrb@trevrb.net>
|
||||||
Trey Dockendorf <treydock@gmail.com>
|
Trey Dockendorf <treydock@gmail.com>
|
||||||
|
Troels Nørgaard <tnn@tradeshift.com>
|
||||||
|
Tulsi Jain <tulsi.jain@delphix.com>
|
||||||
Turbo Fredriksson <turbo@bayour.com>
|
Turbo Fredriksson <turbo@bayour.com>
|
||||||
Tyler J. Stachecki <stachecki.tyler@gmail.com>
|
Tyler J. Stachecki <stachecki.tyler@gmail.com>
|
||||||
|
Umer Saleem <usaleem@ixsystems.com>
|
||||||
|
Valmiky Arquissandas <kayvlim@gmail.com>
|
||||||
|
Val Packett <val@packett.cool>
|
||||||
|
Vince van Oosten <techhazard@codeforyouand.me>
|
||||||
|
Violet Purcell <vimproved@inventati.org>
|
||||||
|
Vipin Kumar Verma <vipin.verma@hpe.com>
|
||||||
Vitaut Bajaryn <vitaut.bayaryn@gmail.com>
|
Vitaut Bajaryn <vitaut.bayaryn@gmail.com>
|
||||||
|
Volker Mauel <volkermauel@gmail.com>
|
||||||
|
Václav Skála <skala@vshosting.cz>
|
||||||
|
Walter Huf <hufman@gmail.com>
|
||||||
|
Warner Losh <imp@bsdimp.com>
|
||||||
Weigang Li <weigang.li@intel.com>
|
Weigang Li <weigang.li@intel.com>
|
||||||
|
WHR <msl0000023508@gmail.com>
|
||||||
Will Andrews <will@freebsd.org>
|
Will Andrews <will@freebsd.org>
|
||||||
Will Rouesnel <w.rouesnel@gmail.com>
|
Will Rouesnel <w.rouesnel@gmail.com>
|
||||||
|
Windel Bouwman <windel@windel.nl>
|
||||||
|
Wojciech Małota-Wójcik <outofforest@users.noreply.github.com>
|
||||||
Wolfgang Bumiller <w.bumiller@proxmox.com>
|
Wolfgang Bumiller <w.bumiller@proxmox.com>
|
||||||
Xin Li <delphij@FreeBSD.org>
|
Xin Li <delphij@FreeBSD.org>
|
||||||
|
Xinliang Liu <xinliang.liu@linaro.org>
|
||||||
|
xtouqh <xtouqh@hotmail.com>
|
||||||
|
Yann Collet <cyan@fb.com>
|
||||||
|
Yanping Gao <yanping.gao@xtaotech.com>
|
||||||
Ying Zhu <casualfisher@gmail.com>
|
Ying Zhu <casualfisher@gmail.com>
|
||||||
|
Youzhong Yang <youzhong@gmail.com>
|
||||||
|
yparitcher <y@paritcher.com>
|
||||||
|
yuina822 <ayuichi@club.kyutech.ac.jp>
|
||||||
YunQiang Su <syq@debian.org>
|
YunQiang Su <syq@debian.org>
|
||||||
Yuri Pankov <yuri.pankov@gmail.com>
|
Yuri Pankov <yuri.pankov@gmail.com>
|
||||||
Yuxuan Shui <yshuiv7@gmail.com>
|
Yuxuan Shui <yshuiv7@gmail.com>
|
||||||
Zachary Bedell <zac@thebedells.org>
|
Zachary Bedell <zac@thebedells.org>
|
||||||
|
Zach Dykstra <dykstra.zachary@gmail.com>
|
||||||
|
zgock <zgock@nuc.base.zgock-lab.net>
|
||||||
|
Zhu Chuang <chuang@melty.land>
|
||||||
|
Érico Nogueira <erico.erc@gmail.com>
|
||||||
|
Đoàn Trần Công Danh <congdanhqx@gmail.com>
|
||||||
|
韩朴宇 <w12101111@gmail.com>
|
||||||
|
6
META
6
META
@ -1,10 +1,10 @@
|
|||||||
Meta: 1
|
Meta: 1
|
||||||
Name: zfs
|
Name: zfs
|
||||||
Branch: 1.0
|
Branch: 1.0
|
||||||
Version: 2.2.0
|
Version: 2.2.3
|
||||||
Release: rc1
|
Release: 1
|
||||||
Release-Tags: relext
|
Release-Tags: relext
|
||||||
License: CDDL
|
License: CDDL
|
||||||
Author: OpenZFS
|
Author: OpenZFS
|
||||||
Linux-Maximum: 6.3
|
Linux-Maximum: 6.7
|
||||||
Linux-Minimum: 3.10
|
Linux-Minimum: 3.10
|
||||||
|
@ -32,4 +32,4 @@ For more details see the NOTICE, LICENSE and COPYRIGHT files; `UCRL-CODE-235197`
|
|||||||
|
|
||||||
# Supported Kernels
|
# Supported Kernels
|
||||||
* The `META` file contains the officially recognized supported Linux kernel versions.
|
* The `META` file contains the officially recognized supported Linux kernel versions.
|
||||||
* Supported FreeBSD versions are any supported branches and releases starting from 12.2-RELEASE.
|
* Supported FreeBSD versions are any supported branches and releases starting from 12.4-RELEASE.
|
||||||
|
@ -711,7 +711,7 @@ def section_archits(kstats_dict):
|
|||||||
pd_total = int(arc_stats['prefetch_data_hits']) +\
|
pd_total = int(arc_stats['prefetch_data_hits']) +\
|
||||||
int(arc_stats['prefetch_data_iohits']) +\
|
int(arc_stats['prefetch_data_iohits']) +\
|
||||||
int(arc_stats['prefetch_data_misses'])
|
int(arc_stats['prefetch_data_misses'])
|
||||||
prt_2('ARC prefetch metadata accesses:', f_perc(pd_total, all_accesses),
|
prt_2('ARC prefetch data accesses:', f_perc(pd_total, all_accesses),
|
||||||
f_hits(pd_total))
|
f_hits(pd_total))
|
||||||
pd_todo = (('Prefetch data hits:', arc_stats['prefetch_data_hits']),
|
pd_todo = (('Prefetch data hits:', arc_stats['prefetch_data_hits']),
|
||||||
('Prefetch data I/O hits:', arc_stats['prefetch_data_iohits']),
|
('Prefetch data I/O hits:', arc_stats['prefetch_data_iohits']),
|
||||||
|
232
cmd/zdb/zdb.c
232
cmd/zdb/zdb.c
@ -34,6 +34,7 @@
|
|||||||
* Copyright (c) 2021 Allan Jude
|
* Copyright (c) 2021 Allan Jude
|
||||||
* Copyright (c) 2021 Toomas Soome <tsoome@me.com>
|
* Copyright (c) 2021 Toomas Soome <tsoome@me.com>
|
||||||
* Copyright (c) 2023, Klara Inc.
|
* Copyright (c) 2023, Klara Inc.
|
||||||
|
* Copyright (c) 2023, Rob Norris <robn@despairlabs.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -79,6 +80,8 @@
|
|||||||
#include <sys/dsl_crypt.h>
|
#include <sys/dsl_crypt.h>
|
||||||
#include <sys/dsl_scan.h>
|
#include <sys/dsl_scan.h>
|
||||||
#include <sys/btree.h>
|
#include <sys/btree.h>
|
||||||
|
#include <sys/brt.h>
|
||||||
|
#include <sys/brt_impl.h>
|
||||||
#include <zfs_comutil.h>
|
#include <zfs_comutil.h>
|
||||||
#include <sys/zstd/zstd.h>
|
#include <sys/zstd/zstd.h>
|
||||||
|
|
||||||
@ -898,6 +901,8 @@ usage(void)
|
|||||||
"don't print label contents\n");
|
"don't print label contents\n");
|
||||||
(void) fprintf(stderr, " -t --txg=INTEGER "
|
(void) fprintf(stderr, " -t --txg=INTEGER "
|
||||||
"highest txg to use when searching for uberblocks\n");
|
"highest txg to use when searching for uberblocks\n");
|
||||||
|
(void) fprintf(stderr, " -T --brt-stats "
|
||||||
|
"BRT statistics\n");
|
||||||
(void) fprintf(stderr, " -u --uberblock "
|
(void) fprintf(stderr, " -u --uberblock "
|
||||||
"uberblock\n");
|
"uberblock\n");
|
||||||
(void) fprintf(stderr, " -U --cachefile=PATH "
|
(void) fprintf(stderr, " -U --cachefile=PATH "
|
||||||
@ -998,6 +1003,15 @@ zdb_nicenum(uint64_t num, char *buf, size_t buflen)
|
|||||||
nicenum(num, buf, buflen);
|
nicenum(num, buf, buflen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
zdb_nicebytes(uint64_t bytes, char *buf, size_t buflen)
|
||||||
|
{
|
||||||
|
if (dump_opt['P'])
|
||||||
|
(void) snprintf(buf, buflen, "%llu", (longlong_t)bytes);
|
||||||
|
else
|
||||||
|
zfs_nicebytes(bytes, buf, buflen);
|
||||||
|
}
|
||||||
|
|
||||||
static const char histo_stars[] = "****************************************";
|
static const char histo_stars[] = "****************************************";
|
||||||
static const uint64_t histo_width = sizeof (histo_stars) - 1;
|
static const uint64_t histo_width = sizeof (histo_stars) - 1;
|
||||||
|
|
||||||
@ -2080,6 +2094,76 @@ dump_all_ddts(spa_t *spa)
|
|||||||
dump_dedup_ratio(&dds_total);
|
dump_dedup_ratio(&dds_total);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
dump_brt(spa_t *spa)
|
||||||
|
{
|
||||||
|
if (!spa_feature_is_enabled(spa, SPA_FEATURE_BLOCK_CLONING)) {
|
||||||
|
printf("BRT: unsupported on this pool\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!spa_feature_is_active(spa, SPA_FEATURE_BLOCK_CLONING)) {
|
||||||
|
printf("BRT: empty\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
brt_t *brt = spa->spa_brt;
|
||||||
|
VERIFY(brt);
|
||||||
|
|
||||||
|
char count[32], used[32], saved[32];
|
||||||
|
zdb_nicebytes(brt_get_used(spa), used, sizeof (used));
|
||||||
|
zdb_nicebytes(brt_get_saved(spa), saved, sizeof (saved));
|
||||||
|
uint64_t ratio = brt_get_ratio(spa);
|
||||||
|
printf("BRT: used %s; saved %s; ratio %llu.%02llux\n", used, saved,
|
||||||
|
(u_longlong_t)(ratio / 100), (u_longlong_t)(ratio % 100));
|
||||||
|
|
||||||
|
if (dump_opt['T'] < 2)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (uint64_t vdevid = 0; vdevid < brt->brt_nvdevs; vdevid++) {
|
||||||
|
brt_vdev_t *brtvd = &brt->brt_vdevs[vdevid];
|
||||||
|
if (brtvd == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!brtvd->bv_initiated) {
|
||||||
|
printf("BRT: vdev %" PRIu64 ": empty\n", vdevid);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
zdb_nicenum(brtvd->bv_totalcount, count, sizeof (count));
|
||||||
|
zdb_nicebytes(brtvd->bv_usedspace, used, sizeof (used));
|
||||||
|
zdb_nicebytes(brtvd->bv_savedspace, saved, sizeof (saved));
|
||||||
|
printf("BRT: vdev %" PRIu64 ": refcnt %s; used %s; saved %s\n",
|
||||||
|
vdevid, count, used, saved);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dump_opt['T'] < 3)
|
||||||
|
return;
|
||||||
|
|
||||||
|
char dva[64];
|
||||||
|
printf("\n%-16s %-10s\n", "DVA", "REFCNT");
|
||||||
|
|
||||||
|
for (uint64_t vdevid = 0; vdevid < brt->brt_nvdevs; vdevid++) {
|
||||||
|
brt_vdev_t *brtvd = &brt->brt_vdevs[vdevid];
|
||||||
|
if (brtvd == NULL || !brtvd->bv_initiated)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
zap_cursor_t zc;
|
||||||
|
zap_attribute_t za;
|
||||||
|
for (zap_cursor_init(&zc, brt->brt_mos, brtvd->bv_mos_entries);
|
||||||
|
zap_cursor_retrieve(&zc, &za) == 0;
|
||||||
|
zap_cursor_advance(&zc)) {
|
||||||
|
uint64_t offset = *(uint64_t *)za.za_name;
|
||||||
|
uint64_t refcnt = za.za_first_integer;
|
||||||
|
|
||||||
|
snprintf(dva, sizeof (dva), "%" PRIu64 ":%llx", vdevid,
|
||||||
|
(u_longlong_t)offset);
|
||||||
|
printf("%-16s %-10llu\n", dva, (u_longlong_t)refcnt);
|
||||||
|
}
|
||||||
|
zap_cursor_fini(&zc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dump_dtl_seg(void *arg, uint64_t start, uint64_t size)
|
dump_dtl_seg(void *arg, uint64_t start, uint64_t size)
|
||||||
{
|
{
|
||||||
@ -2276,7 +2360,7 @@ static void
|
|||||||
snprintf_zstd_header(spa_t *spa, char *blkbuf, size_t buflen,
|
snprintf_zstd_header(spa_t *spa, char *blkbuf, size_t buflen,
|
||||||
const blkptr_t *bp)
|
const blkptr_t *bp)
|
||||||
{
|
{
|
||||||
abd_t *pabd;
|
static abd_t *pabd = NULL;
|
||||||
void *buf;
|
void *buf;
|
||||||
zio_t *zio;
|
zio_t *zio;
|
||||||
zfs_zstdhdr_t zstd_hdr;
|
zfs_zstdhdr_t zstd_hdr;
|
||||||
@ -2307,7 +2391,8 @@ snprintf_zstd_header(spa_t *spa, char *blkbuf, size_t buflen,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pabd = abd_alloc_for_io(SPA_MAXBLOCKSIZE, B_FALSE);
|
if (!pabd)
|
||||||
|
pabd = abd_alloc_for_io(SPA_MAXBLOCKSIZE, B_FALSE);
|
||||||
zio = zio_root(spa, NULL, NULL, 0);
|
zio = zio_root(spa, NULL, NULL, 0);
|
||||||
|
|
||||||
/* Decrypt but don't decompress so we can read the compression header */
|
/* Decrypt but don't decompress so we can read the compression header */
|
||||||
@ -5178,7 +5263,7 @@ dump_label(const char *dev)
|
|||||||
if (nvlist_size(config, &size, NV_ENCODE_XDR) != 0)
|
if (nvlist_size(config, &size, NV_ENCODE_XDR) != 0)
|
||||||
size = buflen;
|
size = buflen;
|
||||||
|
|
||||||
/* If the device is a cache device clear the header. */
|
/* If the device is a cache device read the header. */
|
||||||
if (!read_l2arc_header) {
|
if (!read_l2arc_header) {
|
||||||
if (nvlist_lookup_uint64(config,
|
if (nvlist_lookup_uint64(config,
|
||||||
ZPOOL_CONFIG_POOL_STATE, &l2cache) == 0 &&
|
ZPOOL_CONFIG_POOL_STATE, &l2cache) == 0 &&
|
||||||
@ -5342,12 +5427,20 @@ static const char *zdb_ot_extname[] = {
|
|||||||
#define ZB_TOTAL DN_MAX_LEVELS
|
#define ZB_TOTAL DN_MAX_LEVELS
|
||||||
#define SPA_MAX_FOR_16M (SPA_MAXBLOCKSHIFT+1)
|
#define SPA_MAX_FOR_16M (SPA_MAXBLOCKSHIFT+1)
|
||||||
|
|
||||||
|
typedef struct zdb_brt_entry {
|
||||||
|
dva_t zbre_dva;
|
||||||
|
uint64_t zbre_refcount;
|
||||||
|
avl_node_t zbre_node;
|
||||||
|
} zdb_brt_entry_t;
|
||||||
|
|
||||||
typedef struct zdb_cb {
|
typedef struct zdb_cb {
|
||||||
zdb_blkstats_t zcb_type[ZB_TOTAL + 1][ZDB_OT_TOTAL + 1];
|
zdb_blkstats_t zcb_type[ZB_TOTAL + 1][ZDB_OT_TOTAL + 1];
|
||||||
uint64_t zcb_removing_size;
|
uint64_t zcb_removing_size;
|
||||||
uint64_t zcb_checkpoint_size;
|
uint64_t zcb_checkpoint_size;
|
||||||
uint64_t zcb_dedup_asize;
|
uint64_t zcb_dedup_asize;
|
||||||
uint64_t zcb_dedup_blocks;
|
uint64_t zcb_dedup_blocks;
|
||||||
|
uint64_t zcb_clone_asize;
|
||||||
|
uint64_t zcb_clone_blocks;
|
||||||
uint64_t zcb_psize_count[SPA_MAX_FOR_16M];
|
uint64_t zcb_psize_count[SPA_MAX_FOR_16M];
|
||||||
uint64_t zcb_lsize_count[SPA_MAX_FOR_16M];
|
uint64_t zcb_lsize_count[SPA_MAX_FOR_16M];
|
||||||
uint64_t zcb_asize_count[SPA_MAX_FOR_16M];
|
uint64_t zcb_asize_count[SPA_MAX_FOR_16M];
|
||||||
@ -5368,6 +5461,8 @@ typedef struct zdb_cb {
|
|||||||
int zcb_haderrors;
|
int zcb_haderrors;
|
||||||
spa_t *zcb_spa;
|
spa_t *zcb_spa;
|
||||||
uint32_t **zcb_vd_obsolete_counts;
|
uint32_t **zcb_vd_obsolete_counts;
|
||||||
|
avl_tree_t zcb_brt;
|
||||||
|
boolean_t zcb_brt_is_active;
|
||||||
} zdb_cb_t;
|
} zdb_cb_t;
|
||||||
|
|
||||||
/* test if two DVA offsets from same vdev are within the same metaslab */
|
/* test if two DVA offsets from same vdev are within the same metaslab */
|
||||||
@ -5662,6 +5757,45 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t *zilog, const blkptr_t *bp,
|
|||||||
zcb->zcb_asize_len[bin] += BP_GET_ASIZE(bp);
|
zcb->zcb_asize_len[bin] += BP_GET_ASIZE(bp);
|
||||||
zcb->zcb_asize_total += BP_GET_ASIZE(bp);
|
zcb->zcb_asize_total += BP_GET_ASIZE(bp);
|
||||||
|
|
||||||
|
if (zcb->zcb_brt_is_active && brt_maybe_exists(zcb->zcb_spa, bp)) {
|
||||||
|
/*
|
||||||
|
* Cloned blocks are special. We need to count them, so we can
|
||||||
|
* later uncount them when reporting leaked space, and we must
|
||||||
|
* only claim them them once.
|
||||||
|
*
|
||||||
|
* To do this, we keep our own in-memory BRT. For each block
|
||||||
|
* we haven't seen before, we look it up in the real BRT and
|
||||||
|
* if its there, we note it and its refcount then proceed as
|
||||||
|
* normal. If we see the block again, we count it as a clone
|
||||||
|
* and then give it no further consideration.
|
||||||
|
*/
|
||||||
|
zdb_brt_entry_t zbre_search, *zbre;
|
||||||
|
avl_index_t where;
|
||||||
|
|
||||||
|
zbre_search.zbre_dva = bp->blk_dva[0];
|
||||||
|
zbre = avl_find(&zcb->zcb_brt, &zbre_search, &where);
|
||||||
|
if (zbre != NULL) {
|
||||||
|
zcb->zcb_clone_asize += BP_GET_ASIZE(bp);
|
||||||
|
zcb->zcb_clone_blocks++;
|
||||||
|
|
||||||
|
zbre->zbre_refcount--;
|
||||||
|
if (zbre->zbre_refcount == 0) {
|
||||||
|
avl_remove(&zcb->zcb_brt, zbre);
|
||||||
|
umem_free(zbre, sizeof (zdb_brt_entry_t));
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t crefcnt = brt_entry_get_refcount(zcb->zcb_spa, bp);
|
||||||
|
if (crefcnt > 0) {
|
||||||
|
zbre = umem_zalloc(sizeof (zdb_brt_entry_t),
|
||||||
|
UMEM_NOFAIL);
|
||||||
|
zbre->zbre_dva = bp->blk_dva[0];
|
||||||
|
zbre->zbre_refcount = crefcnt;
|
||||||
|
avl_insert(&zcb->zcb_brt, zbre, where);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (dump_opt['L'])
|
if (dump_opt['L'])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -6664,6 +6798,20 @@ deleted_livelists_dump_mos(spa_t *spa)
|
|||||||
iterate_deleted_livelists(spa, dump_livelist_cb, NULL);
|
iterate_deleted_livelists(spa, dump_livelist_cb, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
zdb_brt_entry_compare(const void *zcn1, const void *zcn2)
|
||||||
|
{
|
||||||
|
const dva_t *dva1 = &((const zdb_brt_entry_t *)zcn1)->zbre_dva;
|
||||||
|
const dva_t *dva2 = &((const zdb_brt_entry_t *)zcn2)->zbre_dva;
|
||||||
|
int cmp;
|
||||||
|
|
||||||
|
cmp = TREE_CMP(DVA_GET_VDEV(dva1), DVA_GET_VDEV(dva2));
|
||||||
|
if (cmp == 0)
|
||||||
|
cmp = TREE_CMP(DVA_GET_OFFSET(dva1), DVA_GET_OFFSET(dva2));
|
||||||
|
|
||||||
|
return (cmp);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dump_block_stats(spa_t *spa)
|
dump_block_stats(spa_t *spa)
|
||||||
{
|
{
|
||||||
@ -6678,6 +6826,13 @@ dump_block_stats(spa_t *spa)
|
|||||||
|
|
||||||
zcb = umem_zalloc(sizeof (zdb_cb_t), UMEM_NOFAIL);
|
zcb = umem_zalloc(sizeof (zdb_cb_t), UMEM_NOFAIL);
|
||||||
|
|
||||||
|
if (spa_feature_is_active(spa, SPA_FEATURE_BLOCK_CLONING)) {
|
||||||
|
avl_create(&zcb->zcb_brt, zdb_brt_entry_compare,
|
||||||
|
sizeof (zdb_brt_entry_t),
|
||||||
|
offsetof(zdb_brt_entry_t, zbre_node));
|
||||||
|
zcb->zcb_brt_is_active = B_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
(void) printf("\nTraversing all blocks %s%s%s%s%s...\n\n",
|
(void) printf("\nTraversing all blocks %s%s%s%s%s...\n\n",
|
||||||
(dump_opt['c'] || !dump_opt['L']) ? "to verify " : "",
|
(dump_opt['c'] || !dump_opt['L']) ? "to verify " : "",
|
||||||
(dump_opt['c'] == 1) ? "metadata " : "",
|
(dump_opt['c'] == 1) ? "metadata " : "",
|
||||||
@ -6779,7 +6934,8 @@ dump_block_stats(spa_t *spa)
|
|||||||
metaslab_class_get_alloc(spa_special_class(spa)) +
|
metaslab_class_get_alloc(spa_special_class(spa)) +
|
||||||
metaslab_class_get_alloc(spa_dedup_class(spa)) +
|
metaslab_class_get_alloc(spa_dedup_class(spa)) +
|
||||||
get_unflushed_alloc_space(spa);
|
get_unflushed_alloc_space(spa);
|
||||||
total_found = tzb->zb_asize - zcb->zcb_dedup_asize +
|
total_found =
|
||||||
|
tzb->zb_asize - zcb->zcb_dedup_asize - zcb->zcb_clone_asize +
|
||||||
zcb->zcb_removing_size + zcb->zcb_checkpoint_size;
|
zcb->zcb_removing_size + zcb->zcb_checkpoint_size;
|
||||||
|
|
||||||
if (total_found == total_alloc && !dump_opt['L']) {
|
if (total_found == total_alloc && !dump_opt['L']) {
|
||||||
@ -6820,6 +6976,9 @@ dump_block_stats(spa_t *spa)
|
|||||||
"bp deduped:", (u_longlong_t)zcb->zcb_dedup_asize,
|
"bp deduped:", (u_longlong_t)zcb->zcb_dedup_asize,
|
||||||
(u_longlong_t)zcb->zcb_dedup_blocks,
|
(u_longlong_t)zcb->zcb_dedup_blocks,
|
||||||
(double)zcb->zcb_dedup_asize / tzb->zb_asize + 1.0);
|
(double)zcb->zcb_dedup_asize / tzb->zb_asize + 1.0);
|
||||||
|
(void) printf("\t%-16s %14llu count: %6llu\n",
|
||||||
|
"bp cloned:", (u_longlong_t)zcb->zcb_clone_asize,
|
||||||
|
(u_longlong_t)zcb->zcb_clone_blocks);
|
||||||
(void) printf("\t%-16s %14llu used: %5.2f%%\n", "Normal class:",
|
(void) printf("\t%-16s %14llu used: %5.2f%%\n", "Normal class:",
|
||||||
(u_longlong_t)norm_alloc, 100.0 * norm_alloc / norm_space);
|
(u_longlong_t)norm_alloc, 100.0 * norm_alloc / norm_space);
|
||||||
|
|
||||||
@ -7882,6 +8041,17 @@ dump_mos_leaks(spa_t *spa)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (spa->spa_brt != NULL) {
|
||||||
|
brt_t *brt = spa->spa_brt;
|
||||||
|
for (uint64_t vdevid = 0; vdevid < brt->brt_nvdevs; vdevid++) {
|
||||||
|
brt_vdev_t *brtvd = &brt->brt_vdevs[vdevid];
|
||||||
|
if (brtvd != NULL && brtvd->bv_initiated) {
|
||||||
|
mos_obj_refd(brtvd->bv_mos_brtvdev);
|
||||||
|
mos_obj_refd(brtvd->bv_mos_entries);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Visit all allocated objects and make sure they are referenced.
|
* Visit all allocated objects and make sure they are referenced.
|
||||||
*/
|
*/
|
||||||
@ -8018,6 +8188,9 @@ dump_zpool(spa_t *spa)
|
|||||||
if (dump_opt['D'])
|
if (dump_opt['D'])
|
||||||
dump_all_ddts(spa);
|
dump_all_ddts(spa);
|
||||||
|
|
||||||
|
if (dump_opt['T'])
|
||||||
|
dump_brt(spa);
|
||||||
|
|
||||||
if (dump_opt['d'] > 2 || dump_opt['m'])
|
if (dump_opt['d'] > 2 || dump_opt['m'])
|
||||||
dump_metaslabs(spa);
|
dump_metaslabs(spa);
|
||||||
if (dump_opt['M'])
|
if (dump_opt['M'])
|
||||||
@ -8329,6 +8502,14 @@ zdb_decompress_block(abd_t *pabd, void *buf, void *lbuf, uint64_t lsize,
|
|||||||
*cfuncp++ = ZIO_COMPRESS_LZ4;
|
*cfuncp++ = ZIO_COMPRESS_LZ4;
|
||||||
*cfuncp++ = ZIO_COMPRESS_LZJB;
|
*cfuncp++ = ZIO_COMPRESS_LZJB;
|
||||||
mask |= ZIO_COMPRESS_MASK(LZ4) | ZIO_COMPRESS_MASK(LZJB);
|
mask |= ZIO_COMPRESS_MASK(LZ4) | ZIO_COMPRESS_MASK(LZJB);
|
||||||
|
/*
|
||||||
|
* Every gzip level has the same decompressor, no need to
|
||||||
|
* run it 9 times per bruteforce attempt.
|
||||||
|
*/
|
||||||
|
mask |= ZIO_COMPRESS_MASK(GZIP_2) | ZIO_COMPRESS_MASK(GZIP_3);
|
||||||
|
mask |= ZIO_COMPRESS_MASK(GZIP_4) | ZIO_COMPRESS_MASK(GZIP_5);
|
||||||
|
mask |= ZIO_COMPRESS_MASK(GZIP_6) | ZIO_COMPRESS_MASK(GZIP_7);
|
||||||
|
mask |= ZIO_COMPRESS_MASK(GZIP_8) | ZIO_COMPRESS_MASK(GZIP_9);
|
||||||
for (int c = 0; c < ZIO_COMPRESS_FUNCTIONS; c++)
|
for (int c = 0; c < ZIO_COMPRESS_FUNCTIONS; c++)
|
||||||
if (((1ULL << c) & mask) == 0)
|
if (((1ULL << c) & mask) == 0)
|
||||||
*cfuncp++ = c;
|
*cfuncp++ = c;
|
||||||
@ -8804,6 +8985,7 @@ main(int argc, char **argv)
|
|||||||
{"io-stats", no_argument, NULL, 's'},
|
{"io-stats", no_argument, NULL, 's'},
|
||||||
{"simulate-dedup", no_argument, NULL, 'S'},
|
{"simulate-dedup", no_argument, NULL, 'S'},
|
||||||
{"txg", required_argument, NULL, 't'},
|
{"txg", required_argument, NULL, 't'},
|
||||||
|
{"brt-stats", no_argument, NULL, 'T'},
|
||||||
{"uberblock", no_argument, NULL, 'u'},
|
{"uberblock", no_argument, NULL, 'u'},
|
||||||
{"cachefile", required_argument, NULL, 'U'},
|
{"cachefile", required_argument, NULL, 'U'},
|
||||||
{"verbose", no_argument, NULL, 'v'},
|
{"verbose", no_argument, NULL, 'v'},
|
||||||
@ -8817,7 +8999,7 @@ main(int argc, char **argv)
|
|||||||
};
|
};
|
||||||
|
|
||||||
while ((c = getopt_long(argc, argv,
|
while ((c = getopt_long(argc, argv,
|
||||||
"AbBcCdDeEFGhiI:kK:lLmMNo:Op:PqrRsSt:uU:vVx:XYyZ",
|
"AbBcCdDeEFGhiI:kK:lLmMNo:Op:PqrRsSt:TuU:vVx:XYyZ",
|
||||||
long_options, NULL)) != -1) {
|
long_options, NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'b':
|
case 'b':
|
||||||
@ -8839,6 +9021,7 @@ main(int argc, char **argv)
|
|||||||
case 'R':
|
case 'R':
|
||||||
case 's':
|
case 's':
|
||||||
case 'S':
|
case 'S':
|
||||||
|
case 'T':
|
||||||
case 'u':
|
case 'u':
|
||||||
case 'y':
|
case 'y':
|
||||||
case 'Z':
|
case 'Z':
|
||||||
@ -9001,22 +9184,6 @@ main(int argc, char **argv)
|
|||||||
if (dump_opt['l'])
|
if (dump_opt['l'])
|
||||||
return (dump_label(argv[0]));
|
return (dump_label(argv[0]));
|
||||||
|
|
||||||
if (dump_opt['O']) {
|
|
||||||
if (argc != 2)
|
|
||||||
usage();
|
|
||||||
dump_opt['v'] = verbose + 3;
|
|
||||||
return (dump_path(argv[0], argv[1], NULL));
|
|
||||||
}
|
|
||||||
if (dump_opt['r']) {
|
|
||||||
target_is_spa = B_FALSE;
|
|
||||||
if (argc != 3)
|
|
||||||
usage();
|
|
||||||
dump_opt['v'] = verbose;
|
|
||||||
error = dump_path(argv[0], argv[1], &object);
|
|
||||||
if (error != 0)
|
|
||||||
fatal("internal error: %s", strerror(error));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dump_opt['X'] || dump_opt['F'])
|
if (dump_opt['X'] || dump_opt['F'])
|
||||||
rewind = ZPOOL_DO_REWIND |
|
rewind = ZPOOL_DO_REWIND |
|
||||||
(dump_opt['X'] ? ZPOOL_EXTREME_REWIND : 0);
|
(dump_opt['X'] ? ZPOOL_EXTREME_REWIND : 0);
|
||||||
@ -9117,6 +9284,29 @@ main(int argc, char **argv)
|
|||||||
searchdirs = NULL;
|
searchdirs = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We need to make sure to process -O option or call
|
||||||
|
* dump_path after the -e option has been processed,
|
||||||
|
* which imports the pool to the namespace if it's
|
||||||
|
* not in the cachefile.
|
||||||
|
*/
|
||||||
|
if (dump_opt['O']) {
|
||||||
|
if (argc != 2)
|
||||||
|
usage();
|
||||||
|
dump_opt['v'] = verbose + 3;
|
||||||
|
return (dump_path(argv[0], argv[1], NULL));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dump_opt['r']) {
|
||||||
|
target_is_spa = B_FALSE;
|
||||||
|
if (argc != 3)
|
||||||
|
usage();
|
||||||
|
dump_opt['v'] = verbose;
|
||||||
|
error = dump_path(argv[0], argv[1], &object);
|
||||||
|
if (error != 0)
|
||||||
|
fatal("internal error: %s", strerror(error));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* import_checkpointed_state makes the assumption that the
|
* import_checkpointed_state makes the assumption that the
|
||||||
* target pool that we pass it is already part of the spa
|
* target pool that we pass it is already part of the spa
|
||||||
|
@ -168,7 +168,7 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
|
|||||||
(u_longlong_t)lr->lr_foid, (u_longlong_t)lr->lr_offset,
|
(u_longlong_t)lr->lr_foid, (u_longlong_t)lr->lr_offset,
|
||||||
(u_longlong_t)lr->lr_length);
|
(u_longlong_t)lr->lr_length);
|
||||||
|
|
||||||
if (txtype == TX_WRITE2 || verbose < 5)
|
if (txtype == TX_WRITE2 || verbose < 4)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
|
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
|
||||||
@ -178,6 +178,8 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
|
|||||||
"will claim" : "won't claim");
|
"will claim" : "won't claim");
|
||||||
print_log_bp(bp, tab_prefix);
|
print_log_bp(bp, tab_prefix);
|
||||||
|
|
||||||
|
if (verbose < 5)
|
||||||
|
return;
|
||||||
if (BP_IS_HOLE(bp)) {
|
if (BP_IS_HOLE(bp)) {
|
||||||
(void) printf("\t\t\tLSIZE 0x%llx\n",
|
(void) printf("\t\t\tLSIZE 0x%llx\n",
|
||||||
(u_longlong_t)BP_GET_LSIZE(bp));
|
(u_longlong_t)BP_GET_LSIZE(bp));
|
||||||
@ -202,6 +204,9 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
|
|||||||
if (error)
|
if (error)
|
||||||
goto out;
|
goto out;
|
||||||
} else {
|
} else {
|
||||||
|
if (verbose < 5)
|
||||||
|
return;
|
||||||
|
|
||||||
/* data is stored after the end of the lr_write record */
|
/* data is stored after the end of the lr_write record */
|
||||||
data = abd_alloc(lr->lr_length, B_FALSE);
|
data = abd_alloc(lr->lr_length, B_FALSE);
|
||||||
abd_copy_from_buf(data, lr + 1, lr->lr_length);
|
abd_copy_from_buf(data, lr + 1, lr->lr_length);
|
||||||
@ -217,6 +222,28 @@ out:
|
|||||||
abd_free(data);
|
abd_free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
zil_prt_rec_write_enc(zilog_t *zilog, int txtype, const void *arg)
|
||||||
|
{
|
||||||
|
(void) txtype;
|
||||||
|
const lr_write_t *lr = arg;
|
||||||
|
const blkptr_t *bp = &lr->lr_blkptr;
|
||||||
|
int verbose = MAX(dump_opt['d'], dump_opt['i']);
|
||||||
|
|
||||||
|
(void) printf("%s(encrypted)\n", tab_prefix);
|
||||||
|
|
||||||
|
if (verbose < 4)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
|
||||||
|
(void) printf("%shas blkptr, %s\n", tab_prefix,
|
||||||
|
!BP_IS_HOLE(bp) &&
|
||||||
|
bp->blk_birth >= spa_min_claim_txg(zilog->zl_spa) ?
|
||||||
|
"will claim" : "won't claim");
|
||||||
|
print_log_bp(bp, tab_prefix);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
zil_prt_rec_truncate(zilog_t *zilog, int txtype, const void *arg)
|
zil_prt_rec_truncate(zilog_t *zilog, int txtype, const void *arg)
|
||||||
{
|
{
|
||||||
@ -312,11 +339,34 @@ zil_prt_rec_clone_range(zilog_t *zilog, int txtype, const void *arg)
|
|||||||
{
|
{
|
||||||
(void) zilog, (void) txtype;
|
(void) zilog, (void) txtype;
|
||||||
const lr_clone_range_t *lr = arg;
|
const lr_clone_range_t *lr = arg;
|
||||||
|
int verbose = MAX(dump_opt['d'], dump_opt['i']);
|
||||||
|
|
||||||
(void) printf("%sfoid %llu, offset %llx, length %llx, blksize %llx\n",
|
(void) printf("%sfoid %llu, offset %llx, length %llx, blksize %llx\n",
|
||||||
tab_prefix, (u_longlong_t)lr->lr_foid, (u_longlong_t)lr->lr_offset,
|
tab_prefix, (u_longlong_t)lr->lr_foid, (u_longlong_t)lr->lr_offset,
|
||||||
(u_longlong_t)lr->lr_length, (u_longlong_t)lr->lr_blksz);
|
(u_longlong_t)lr->lr_length, (u_longlong_t)lr->lr_blksz);
|
||||||
|
|
||||||
|
if (verbose < 4)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < lr->lr_nbps; i++) {
|
||||||
|
(void) printf("%s[%u/%llu] ", tab_prefix, i + 1,
|
||||||
|
(u_longlong_t)lr->lr_nbps);
|
||||||
|
print_log_bp(&lr->lr_bps[i], "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
zil_prt_rec_clone_range_enc(zilog_t *zilog, int txtype, const void *arg)
|
||||||
|
{
|
||||||
|
(void) zilog, (void) txtype;
|
||||||
|
const lr_clone_range_t *lr = arg;
|
||||||
|
int verbose = MAX(dump_opt['d'], dump_opt['i']);
|
||||||
|
|
||||||
|
(void) printf("%s(encrypted)\n", tab_prefix);
|
||||||
|
|
||||||
|
if (verbose < 4)
|
||||||
|
return;
|
||||||
|
|
||||||
for (unsigned int i = 0; i < lr->lr_nbps; i++) {
|
for (unsigned int i = 0; i < lr->lr_nbps; i++) {
|
||||||
(void) printf("%s[%u/%llu] ", tab_prefix, i + 1,
|
(void) printf("%s[%u/%llu] ", tab_prefix, i + 1,
|
||||||
(u_longlong_t)lr->lr_nbps);
|
(u_longlong_t)lr->lr_nbps);
|
||||||
@ -327,6 +377,7 @@ zil_prt_rec_clone_range(zilog_t *zilog, int txtype, const void *arg)
|
|||||||
typedef void (*zil_prt_rec_func_t)(zilog_t *, int, const void *);
|
typedef void (*zil_prt_rec_func_t)(zilog_t *, int, const void *);
|
||||||
typedef struct zil_rec_info {
|
typedef struct zil_rec_info {
|
||||||
zil_prt_rec_func_t zri_print;
|
zil_prt_rec_func_t zri_print;
|
||||||
|
zil_prt_rec_func_t zri_print_enc;
|
||||||
const char *zri_name;
|
const char *zri_name;
|
||||||
uint64_t zri_count;
|
uint64_t zri_count;
|
||||||
} zil_rec_info_t;
|
} zil_rec_info_t;
|
||||||
@ -341,7 +392,9 @@ static zil_rec_info_t zil_rec_info[TX_MAX_TYPE] = {
|
|||||||
{.zri_print = zil_prt_rec_remove, .zri_name = "TX_RMDIR "},
|
{.zri_print = zil_prt_rec_remove, .zri_name = "TX_RMDIR "},
|
||||||
{.zri_print = zil_prt_rec_link, .zri_name = "TX_LINK "},
|
{.zri_print = zil_prt_rec_link, .zri_name = "TX_LINK "},
|
||||||
{.zri_print = zil_prt_rec_rename, .zri_name = "TX_RENAME "},
|
{.zri_print = zil_prt_rec_rename, .zri_name = "TX_RENAME "},
|
||||||
{.zri_print = zil_prt_rec_write, .zri_name = "TX_WRITE "},
|
{.zri_print = zil_prt_rec_write,
|
||||||
|
.zri_print_enc = zil_prt_rec_write_enc,
|
||||||
|
.zri_name = "TX_WRITE "},
|
||||||
{.zri_print = zil_prt_rec_truncate, .zri_name = "TX_TRUNCATE "},
|
{.zri_print = zil_prt_rec_truncate, .zri_name = "TX_TRUNCATE "},
|
||||||
{.zri_print = zil_prt_rec_setattr, .zri_name = "TX_SETATTR "},
|
{.zri_print = zil_prt_rec_setattr, .zri_name = "TX_SETATTR "},
|
||||||
{.zri_print = zil_prt_rec_acl, .zri_name = "TX_ACL_V0 "},
|
{.zri_print = zil_prt_rec_acl, .zri_name = "TX_ACL_V0 "},
|
||||||
@ -358,6 +411,7 @@ static zil_rec_info_t zil_rec_info[TX_MAX_TYPE] = {
|
|||||||
{.zri_print = zil_prt_rec_rename, .zri_name = "TX_RENAME_EXCHANGE "},
|
{.zri_print = zil_prt_rec_rename, .zri_name = "TX_RENAME_EXCHANGE "},
|
||||||
{.zri_print = zil_prt_rec_rename, .zri_name = "TX_RENAME_WHITEOUT "},
|
{.zri_print = zil_prt_rec_rename, .zri_name = "TX_RENAME_WHITEOUT "},
|
||||||
{.zri_print = zil_prt_rec_clone_range,
|
{.zri_print = zil_prt_rec_clone_range,
|
||||||
|
.zri_print_enc = zil_prt_rec_clone_range_enc,
|
||||||
.zri_name = "TX_CLONE_RANGE "},
|
.zri_name = "TX_CLONE_RANGE "},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -384,6 +438,8 @@ print_log_record(zilog_t *zilog, const lr_t *lr, void *arg, uint64_t claim_txg)
|
|||||||
if (txtype && verbose >= 3) {
|
if (txtype && verbose >= 3) {
|
||||||
if (!zilog->zl_os->os_encrypted) {
|
if (!zilog->zl_os->os_encrypted) {
|
||||||
zil_rec_info[txtype].zri_print(zilog, txtype, lr);
|
zil_rec_info[txtype].zri_print(zilog, txtype, lr);
|
||||||
|
} else if (zil_rec_info[txtype].zri_print_enc) {
|
||||||
|
zil_rec_info[txtype].zri_print_enc(zilog, txtype, lr);
|
||||||
} else {
|
} else {
|
||||||
(void) printf("%s(encrypted)\n", tab_prefix);
|
(void) printf("%s(encrypted)\n", tab_prefix);
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
|
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2016, 2017, Intel Corporation.
|
* Copyright (c) 2016, 2017, Intel Corporation.
|
||||||
* Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
|
* Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
|
||||||
|
* Copyright (c) 2023, Klara Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -146,6 +147,17 @@ zfs_unavail_pool(zpool_handle_t *zhp, void *data)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write an array of strings to the zed log
|
||||||
|
*/
|
||||||
|
static void lines_to_zed_log_msg(char **lines, int lines_cnt)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < lines_cnt; i++) {
|
||||||
|
zed_log_msg(LOG_INFO, "%s", lines[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Two stage replace on Linux
|
* Two stage replace on Linux
|
||||||
* since we get disk notifications
|
* since we get disk notifications
|
||||||
@ -193,14 +205,21 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
|||||||
uint64_t is_spare = 0;
|
uint64_t is_spare = 0;
|
||||||
const char *physpath = NULL, *new_devid = NULL, *enc_sysfs_path = NULL;
|
const char *physpath = NULL, *new_devid = NULL, *enc_sysfs_path = NULL;
|
||||||
char rawpath[PATH_MAX], fullpath[PATH_MAX];
|
char rawpath[PATH_MAX], fullpath[PATH_MAX];
|
||||||
char devpath[PATH_MAX];
|
char pathbuf[PATH_MAX];
|
||||||
int ret;
|
int ret;
|
||||||
int online_flag = ZFS_ONLINE_CHECKREMOVE | ZFS_ONLINE_UNSPARE;
|
int online_flag = ZFS_ONLINE_CHECKREMOVE | ZFS_ONLINE_UNSPARE;
|
||||||
boolean_t is_sd = B_FALSE;
|
boolean_t is_sd = B_FALSE;
|
||||||
boolean_t is_mpath_wholedisk = B_FALSE;
|
boolean_t is_mpath_wholedisk = B_FALSE;
|
||||||
uint_t c;
|
uint_t c;
|
||||||
vdev_stat_t *vs;
|
vdev_stat_t *vs;
|
||||||
|
char **lines = NULL;
|
||||||
|
int lines_cnt = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get the persistent path, typically under the '/dev/disk/by-id' or
|
||||||
|
* '/dev/disk/by-vdev' directories. Note that this path can change
|
||||||
|
* when a vdev is replaced with a new disk.
|
||||||
|
*/
|
||||||
if (nvlist_lookup_string(vdev, ZPOOL_CONFIG_PATH, &path) != 0)
|
if (nvlist_lookup_string(vdev, ZPOOL_CONFIG_PATH, &path) != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -214,8 +233,12 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
|||||||
}
|
}
|
||||||
|
|
||||||
(void) nvlist_lookup_string(vdev, ZPOOL_CONFIG_PHYS_PATH, &physpath);
|
(void) nvlist_lookup_string(vdev, ZPOOL_CONFIG_PHYS_PATH, &physpath);
|
||||||
|
|
||||||
|
update_vdev_config_dev_sysfs_path(vdev, path,
|
||||||
|
ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH);
|
||||||
(void) nvlist_lookup_string(vdev, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH,
|
(void) nvlist_lookup_string(vdev, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH,
|
||||||
&enc_sysfs_path);
|
&enc_sysfs_path);
|
||||||
|
|
||||||
(void) nvlist_lookup_uint64(vdev, ZPOOL_CONFIG_WHOLE_DISK, &wholedisk);
|
(void) nvlist_lookup_uint64(vdev, ZPOOL_CONFIG_WHOLE_DISK, &wholedisk);
|
||||||
(void) nvlist_lookup_uint64(vdev, ZPOOL_CONFIG_OFFLINE, &offline);
|
(void) nvlist_lookup_uint64(vdev, ZPOOL_CONFIG_OFFLINE, &offline);
|
||||||
(void) nvlist_lookup_uint64(vdev, ZPOOL_CONFIG_FAULTED, &faulted);
|
(void) nvlist_lookup_uint64(vdev, ZPOOL_CONFIG_FAULTED, &faulted);
|
||||||
@ -357,21 +380,24 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
|||||||
(void) snprintf(rawpath, sizeof (rawpath), "%s%s",
|
(void) snprintf(rawpath, sizeof (rawpath), "%s%s",
|
||||||
is_sd ? DEV_BYVDEV_PATH : DEV_BYPATH_PATH, physpath);
|
is_sd ? DEV_BYVDEV_PATH : DEV_BYPATH_PATH, physpath);
|
||||||
|
|
||||||
if (realpath(rawpath, devpath) == NULL && !is_mpath_wholedisk) {
|
if (realpath(rawpath, pathbuf) == NULL && !is_mpath_wholedisk) {
|
||||||
zed_log_msg(LOG_INFO, " realpath: %s failed (%s)",
|
zed_log_msg(LOG_INFO, " realpath: %s failed (%s)",
|
||||||
rawpath, strerror(errno));
|
rawpath, strerror(errno));
|
||||||
|
|
||||||
(void) zpool_vdev_online(zhp, fullpath, ZFS_ONLINE_FORCEFAULT,
|
int err = zpool_vdev_online(zhp, fullpath,
|
||||||
&newstate);
|
ZFS_ONLINE_FORCEFAULT, &newstate);
|
||||||
|
|
||||||
zed_log_msg(LOG_INFO, " zpool_vdev_online: %s FORCEFAULT (%s)",
|
zed_log_msg(LOG_INFO, " zpool_vdev_online: %s FORCEFAULT (%s) "
|
||||||
fullpath, libzfs_error_description(g_zfshdl));
|
"err %d, new state %d",
|
||||||
|
fullpath, libzfs_error_description(g_zfshdl), err,
|
||||||
|
err ? (int)newstate : 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Only autoreplace bad disks */
|
/* Only autoreplace bad disks */
|
||||||
if ((vs->vs_state != VDEV_STATE_DEGRADED) &&
|
if ((vs->vs_state != VDEV_STATE_DEGRADED) &&
|
||||||
(vs->vs_state != VDEV_STATE_FAULTED) &&
|
(vs->vs_state != VDEV_STATE_FAULTED) &&
|
||||||
|
(vs->vs_state != VDEV_STATE_REMOVED) &&
|
||||||
(vs->vs_state != VDEV_STATE_CANT_OPEN)) {
|
(vs->vs_state != VDEV_STATE_CANT_OPEN)) {
|
||||||
zed_log_msg(LOG_INFO, " not autoreplacing since disk isn't in "
|
zed_log_msg(LOG_INFO, " not autoreplacing since disk isn't in "
|
||||||
"a bad state (currently %llu)", vs->vs_state);
|
"a bad state (currently %llu)", vs->vs_state);
|
||||||
@ -382,6 +408,22 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
|||||||
|
|
||||||
if (is_mpath_wholedisk) {
|
if (is_mpath_wholedisk) {
|
||||||
/* Don't label device mapper or multipath disks. */
|
/* Don't label device mapper or multipath disks. */
|
||||||
|
zed_log_msg(LOG_INFO,
|
||||||
|
" it's a multipath wholedisk, don't label");
|
||||||
|
if (zpool_prepare_disk(zhp, vdev, "autoreplace", &lines,
|
||||||
|
&lines_cnt) != 0) {
|
||||||
|
zed_log_msg(LOG_INFO,
|
||||||
|
" zpool_prepare_disk: could not "
|
||||||
|
"prepare '%s' (%s)", fullpath,
|
||||||
|
libzfs_error_description(g_zfshdl));
|
||||||
|
if (lines_cnt > 0) {
|
||||||
|
zed_log_msg(LOG_INFO,
|
||||||
|
" zfs_prepare_disk output:");
|
||||||
|
lines_to_zed_log_msg(lines, lines_cnt);
|
||||||
|
}
|
||||||
|
libzfs_free_str_array(lines, lines_cnt);
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else if (!labeled) {
|
} else if (!labeled) {
|
||||||
/*
|
/*
|
||||||
* we're auto-replacing a raw disk, so label it first
|
* we're auto-replacing a raw disk, so label it first
|
||||||
@ -398,16 +440,24 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
|||||||
* to trigger a ZFS fault for the device (and any hot spare
|
* to trigger a ZFS fault for the device (and any hot spare
|
||||||
* replacement).
|
* replacement).
|
||||||
*/
|
*/
|
||||||
leafname = strrchr(devpath, '/') + 1;
|
leafname = strrchr(pathbuf, '/') + 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this is a request to label a whole disk, then attempt to
|
* If this is a request to label a whole disk, then attempt to
|
||||||
* write out the label.
|
* write out the label.
|
||||||
*/
|
*/
|
||||||
if (zpool_label_disk(g_zfshdl, zhp, leafname) != 0) {
|
if (zpool_prepare_and_label_disk(g_zfshdl, zhp, leafname,
|
||||||
zed_log_msg(LOG_INFO, " zpool_label_disk: could not "
|
vdev, "autoreplace", &lines, &lines_cnt) != 0) {
|
||||||
|
zed_log_msg(LOG_WARNING,
|
||||||
|
" zpool_prepare_and_label_disk: could not "
|
||||||
"label '%s' (%s)", leafname,
|
"label '%s' (%s)", leafname,
|
||||||
libzfs_error_description(g_zfshdl));
|
libzfs_error_description(g_zfshdl));
|
||||||
|
if (lines_cnt > 0) {
|
||||||
|
zed_log_msg(LOG_INFO,
|
||||||
|
" zfs_prepare_disk output:");
|
||||||
|
lines_to_zed_log_msg(lines, lines_cnt);
|
||||||
|
}
|
||||||
|
libzfs_free_str_array(lines, lines_cnt);
|
||||||
|
|
||||||
(void) zpool_vdev_online(zhp, fullpath,
|
(void) zpool_vdev_online(zhp, fullpath,
|
||||||
ZFS_ONLINE_FORCEFAULT, &newstate);
|
ZFS_ONLINE_FORCEFAULT, &newstate);
|
||||||
@ -430,7 +480,7 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
|||||||
sizeof (device->pd_physpath));
|
sizeof (device->pd_physpath));
|
||||||
list_insert_tail(&g_device_list, device);
|
list_insert_tail(&g_device_list, device);
|
||||||
|
|
||||||
zed_log_msg(LOG_INFO, " zpool_label_disk: async '%s' (%llu)",
|
zed_log_msg(LOG_NOTICE, " zpool_label_disk: async '%s' (%llu)",
|
||||||
leafname, (u_longlong_t)guid);
|
leafname, (u_longlong_t)guid);
|
||||||
|
|
||||||
return; /* resumes at EC_DEV_ADD.ESC_DISK for partition */
|
return; /* resumes at EC_DEV_ADD.ESC_DISK for partition */
|
||||||
@ -453,8 +503,8 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
|||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
/* unexpected partition slice encountered */
|
/* unexpected partition slice encountered */
|
||||||
zed_log_msg(LOG_INFO, "labeled disk %s unexpected here",
|
zed_log_msg(LOG_WARNING, "labeled disk %s was "
|
||||||
fullpath);
|
"unexpected here", fullpath);
|
||||||
(void) zpool_vdev_online(zhp, fullpath,
|
(void) zpool_vdev_online(zhp, fullpath,
|
||||||
ZFS_ONLINE_FORCEFAULT, &newstate);
|
ZFS_ONLINE_FORCEFAULT, &newstate);
|
||||||
return;
|
return;
|
||||||
@ -463,10 +513,21 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
|||||||
zed_log_msg(LOG_INFO, " zpool_label_disk: resume '%s' (%llu)",
|
zed_log_msg(LOG_INFO, " zpool_label_disk: resume '%s' (%llu)",
|
||||||
physpath, (u_longlong_t)guid);
|
physpath, (u_longlong_t)guid);
|
||||||
|
|
||||||
(void) snprintf(devpath, sizeof (devpath), "%s%s",
|
/*
|
||||||
DEV_BYID_PATH, new_devid);
|
* Paths that begin with '/dev/disk/by-id/' will change and so
|
||||||
|
* they must be updated before calling zpool_vdev_attach().
|
||||||
|
*/
|
||||||
|
if (strncmp(path, DEV_BYID_PATH, strlen(DEV_BYID_PATH)) == 0) {
|
||||||
|
(void) snprintf(pathbuf, sizeof (pathbuf), "%s%s",
|
||||||
|
DEV_BYID_PATH, new_devid);
|
||||||
|
zed_log_msg(LOG_INFO, " zpool_label_disk: path '%s' "
|
||||||
|
"replaced by '%s'", path, pathbuf);
|
||||||
|
path = pathbuf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
libzfs_free_str_array(lines, lines_cnt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Construct the root vdev to pass to zpool_vdev_attach(). While adding
|
* Construct the root vdev to pass to zpool_vdev_attach(). While adding
|
||||||
* the entire vdev structure is harmless, we construct a reduced set of
|
* the entire vdev structure is harmless, we construct a reduced set of
|
||||||
@ -505,9 +566,11 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
|||||||
* Wait for udev to verify the links exist, then auto-replace
|
* Wait for udev to verify the links exist, then auto-replace
|
||||||
* the leaf disk at same physical location.
|
* the leaf disk at same physical location.
|
||||||
*/
|
*/
|
||||||
if (zpool_label_disk_wait(path, 3000) != 0) {
|
if (zpool_label_disk_wait(path, DISK_LABEL_WAIT) != 0) {
|
||||||
zed_log_msg(LOG_WARNING, "zfs_mod: expected replacement "
|
zed_log_msg(LOG_WARNING, "zfs_mod: pool '%s', after labeling "
|
||||||
"disk %s is missing", path);
|
"replacement disk, the expected disk partition link '%s' "
|
||||||
|
"is missing after waiting %u ms",
|
||||||
|
zpool_get_name(zhp), path, DISK_LABEL_WAIT);
|
||||||
nvlist_free(nvroot);
|
nvlist_free(nvroot);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -522,7 +585,7 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
|||||||
B_TRUE, B_FALSE);
|
B_TRUE, B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
zed_log_msg(LOG_INFO, " zpool_vdev_replace: %s with %s (%s)",
|
zed_log_msg(LOG_WARNING, " zpool_vdev_replace: %s with %s (%s)",
|
||||||
fullpath, path, (ret == 0) ? "no errors" :
|
fullpath, path, (ret == 0) ? "no errors" :
|
||||||
libzfs_error_description(g_zfshdl));
|
libzfs_error_description(g_zfshdl));
|
||||||
|
|
||||||
@ -607,8 +670,6 @@ zfs_iter_vdev(zpool_handle_t *zhp, nvlist_t *nvl, void *data)
|
|||||||
*/
|
*/
|
||||||
if (nvlist_lookup_string(nvl, dp->dd_prop, &path) != 0 ||
|
if (nvlist_lookup_string(nvl, dp->dd_prop, &path) != 0 ||
|
||||||
strcmp(dp->dd_compare, path) != 0) {
|
strcmp(dp->dd_compare, path) != 0) {
|
||||||
zed_log_msg(LOG_INFO, " %s: no match (%s != vdev %s)",
|
|
||||||
__func__, dp->dd_compare, path);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (dp->dd_new_vdev_guid != 0 && dp->dd_new_vdev_guid != guid) {
|
if (dp->dd_new_vdev_guid != 0 && dp->dd_new_vdev_guid != guid) {
|
||||||
@ -622,7 +683,7 @@ zfs_iter_vdev(zpool_handle_t *zhp, nvlist_t *nvl, void *data)
|
|||||||
dp->dd_prop, path);
|
dp->dd_prop, path);
|
||||||
dp->dd_found = B_TRUE;
|
dp->dd_found = B_TRUE;
|
||||||
|
|
||||||
/* pass the new devid for use by replacing code */
|
/* pass the new devid for use by auto-replacing code */
|
||||||
if (dp->dd_new_devid != NULL) {
|
if (dp->dd_new_devid != NULL) {
|
||||||
(void) nvlist_add_string(nvl, "new_devid",
|
(void) nvlist_add_string(nvl, "new_devid",
|
||||||
dp->dd_new_devid);
|
dp->dd_new_devid);
|
||||||
|
@ -416,6 +416,11 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
|
|||||||
FM_EREPORT_PAYLOAD_ZFS_VDEV_GUID, &vdev_guid) != 0)
|
FM_EREPORT_PAYLOAD_ZFS_VDEV_GUID, &vdev_guid) != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (vdev_guid == 0) {
|
||||||
|
fmd_hdl_debug(hdl, "Got a zero GUID");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (spare) {
|
if (spare) {
|
||||||
int nspares = find_and_remove_spares(zhdl, vdev_guid);
|
int nspares = find_and_remove_spares(zhdl, vdev_guid);
|
||||||
fmd_hdl_debug(hdl, "%d spares removed", nspares);
|
fmd_hdl_debug(hdl, "%d spares removed", nspares);
|
||||||
|
@ -16,6 +16,7 @@ dist_zedexec_SCRIPTS = \
|
|||||||
%D%/scrub_finish-notify.sh \
|
%D%/scrub_finish-notify.sh \
|
||||||
%D%/statechange-led.sh \
|
%D%/statechange-led.sh \
|
||||||
%D%/statechange-notify.sh \
|
%D%/statechange-notify.sh \
|
||||||
|
%D%/statechange-slot_off.sh \
|
||||||
%D%/trim_finish-notify.sh \
|
%D%/trim_finish-notify.sh \
|
||||||
%D%/vdev_attach-led.sh \
|
%D%/vdev_attach-led.sh \
|
||||||
%D%/vdev_clear-led.sh
|
%D%/vdev_clear-led.sh
|
||||||
@ -35,6 +36,7 @@ zedconfdefaults = \
|
|||||||
scrub_finish-notify.sh \
|
scrub_finish-notify.sh \
|
||||||
statechange-led.sh \
|
statechange-led.sh \
|
||||||
statechange-notify.sh \
|
statechange-notify.sh \
|
||||||
|
statechange-slot_off.sh \
|
||||||
vdev_attach-led.sh \
|
vdev_attach-led.sh \
|
||||||
vdev_clear-led.sh
|
vdev_clear-led.sh
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ state_to_val()
|
|||||||
{
|
{
|
||||||
state="$1"
|
state="$1"
|
||||||
case "$state" in
|
case "$state" in
|
||||||
FAULTED|DEGRADED|UNAVAIL)
|
FAULTED|DEGRADED|UNAVAIL|REMOVED)
|
||||||
echo 1
|
echo 1
|
||||||
;;
|
;;
|
||||||
ONLINE)
|
ONLINE)
|
||||||
|
64
cmd/zed/zed.d/statechange-slot_off.sh
Executable file
64
cmd/zed/zed.d/statechange-slot_off.sh
Executable file
@ -0,0 +1,64 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# shellcheck disable=SC3014,SC2154,SC2086,SC2034
|
||||||
|
#
|
||||||
|
# Turn off disk's enclosure slot if it becomes FAULTED.
|
||||||
|
#
|
||||||
|
# Bad SCSI disks can often "disappear and reappear" causing all sorts of chaos
|
||||||
|
# as they flip between FAULTED and ONLINE. If
|
||||||
|
# ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT is set in zed.rc, and the disk gets
|
||||||
|
# FAULTED, then power down the slot via sysfs:
|
||||||
|
#
|
||||||
|
# /sys/class/enclosure/<enclosure>/<slot>/power_status
|
||||||
|
#
|
||||||
|
# We assume the user will be responsible for turning the slot back on again.
|
||||||
|
#
|
||||||
|
# Note that this script requires that your enclosure be supported by the
|
||||||
|
# Linux SCSI Enclosure services (SES) driver. The script will do nothing
|
||||||
|
# if you have no enclosure, or if your enclosure isn't supported.
|
||||||
|
#
|
||||||
|
# Exit codes:
|
||||||
|
# 0: slot successfully powered off
|
||||||
|
# 1: enclosure not available
|
||||||
|
# 2: ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT disabled
|
||||||
|
# 3: vdev was not FAULTED
|
||||||
|
# 4: The enclosure sysfs path passed from ZFS does not exist
|
||||||
|
# 5: Enclosure slot didn't actually turn off after we told it to
|
||||||
|
|
||||||
|
[ -f "${ZED_ZEDLET_DIR}/zed.rc" ] && . "${ZED_ZEDLET_DIR}/zed.rc"
|
||||||
|
. "${ZED_ZEDLET_DIR}/zed-functions.sh"
|
||||||
|
|
||||||
|
if [ ! -d /sys/class/enclosure ] ; then
|
||||||
|
# No JBOD enclosure or NVMe slots
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT}" != "1" ] ; then
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$ZEVENT_VDEV_STATE_STR" != "FAULTED" ] ; then
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$ZEVENT_VDEV_ENC_SYSFS_PATH/power_status" ] ; then
|
||||||
|
exit 4
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Turn off the slot and wait for sysfs to report that the slot is off.
|
||||||
|
# It can take ~400ms on some enclosures and multiple retries may be needed.
|
||||||
|
for i in $(seq 1 20) ; do
|
||||||
|
echo "off" | tee "$ZEVENT_VDEV_ENC_SYSFS_PATH/power_status"
|
||||||
|
|
||||||
|
for j in $(seq 1 5) ; do
|
||||||
|
if [ "$(cat $ZEVENT_VDEV_ENC_SYSFS_PATH/power_status)" == "off" ] ; then
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$(cat $ZEVENT_VDEV_ENC_SYSFS_PATH/power_status)" != "off" ] ; then
|
||||||
|
exit 5
|
||||||
|
fi
|
||||||
|
|
||||||
|
zed_log_msg "powered down slot $ZEVENT_VDEV_ENC_SYSFS_PATH for $ZEVENT_VDEV_PATH"
|
@ -205,6 +205,10 @@ zed_notify()
|
|||||||
[ "${rv}" -eq 0 ] && num_success=$((num_success + 1))
|
[ "${rv}" -eq 0 ] && num_success=$((num_success + 1))
|
||||||
[ "${rv}" -eq 1 ] && num_failure=$((num_failure + 1))
|
[ "${rv}" -eq 1 ] && num_failure=$((num_failure + 1))
|
||||||
|
|
||||||
|
zed_notify_ntfy "${subject}" "${pathname}"; rv=$?
|
||||||
|
[ "${rv}" -eq 0 ] && num_success=$((num_success + 1))
|
||||||
|
[ "${rv}" -eq 1 ] && num_failure=$((num_failure + 1))
|
||||||
|
|
||||||
[ "${num_success}" -gt 0 ] && return 0
|
[ "${num_success}" -gt 0 ] && return 0
|
||||||
[ "${num_failure}" -gt 0 ] && return 1
|
[ "${num_failure}" -gt 0 ] && return 1
|
||||||
return 2
|
return 2
|
||||||
@ -527,6 +531,100 @@ zed_notify_pushover()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# zed_notify_ntfy (subject, pathname)
|
||||||
|
#
|
||||||
|
# Send a notification via Ntfy.sh <https://ntfy.sh/>.
|
||||||
|
# The ntfy topic (ZED_NTFY_TOPIC) identifies the topic that the notification
|
||||||
|
# will be sent to Ntfy.sh server. The ntfy url (ZED_NTFY_URL) defines the
|
||||||
|
# self-hosted or provided hosted ntfy service location. The ntfy access token
|
||||||
|
# <https://docs.ntfy.sh/publish/#access-tokens> (ZED_NTFY_ACCESS_TOKEN) reprsents an
|
||||||
|
# access token that could be used if a topic is read/write protected. If a
|
||||||
|
# topic can be written to publicaly, a ZED_NTFY_ACCESS_TOKEN is not required.
|
||||||
|
#
|
||||||
|
# Requires curl and sed executables to be installed in the standard PATH.
|
||||||
|
#
|
||||||
|
# References
|
||||||
|
# https://docs.ntfy.sh
|
||||||
|
#
|
||||||
|
# Arguments
|
||||||
|
# subject: notification subject
|
||||||
|
# pathname: pathname containing the notification message (OPTIONAL)
|
||||||
|
#
|
||||||
|
# Globals
|
||||||
|
# ZED_NTFY_TOPIC
|
||||||
|
# ZED_NTFY_ACCESS_TOKEN (OPTIONAL)
|
||||||
|
# ZED_NTFY_URL
|
||||||
|
#
|
||||||
|
# Return
|
||||||
|
# 0: notification sent
|
||||||
|
# 1: notification failed
|
||||||
|
# 2: not configured
|
||||||
|
#
|
||||||
|
zed_notify_ntfy()
|
||||||
|
{
|
||||||
|
local subject="$1"
|
||||||
|
local pathname="${2:-"/dev/null"}"
|
||||||
|
local msg_body
|
||||||
|
local msg_out
|
||||||
|
local msg_err
|
||||||
|
|
||||||
|
[ -n "${ZED_NTFY_TOPIC}" ] || return 2
|
||||||
|
local url="${ZED_NTFY_URL:-"https://ntfy.sh"}/${ZED_NTFY_TOPIC}"
|
||||||
|
|
||||||
|
if [ ! -r "${pathname}" ]; then
|
||||||
|
zed_log_err "ntfy cannot read \"${pathname}\""
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
zed_check_cmd "curl" "sed" || return 1
|
||||||
|
|
||||||
|
# Read the message body in.
|
||||||
|
#
|
||||||
|
msg_body="$(cat "${pathname}")"
|
||||||
|
|
||||||
|
if [ -z "${msg_body}" ]
|
||||||
|
then
|
||||||
|
msg_body=$subject
|
||||||
|
subject=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Send the POST request and check for errors.
|
||||||
|
#
|
||||||
|
if [ -n "${ZED_NTFY_ACCESS_TOKEN}" ]; then
|
||||||
|
msg_out="$( \
|
||||||
|
curl \
|
||||||
|
-u ":${ZED_NTFY_ACCESS_TOKEN}" \
|
||||||
|
-H "Title: ${subject}" \
|
||||||
|
-d "${msg_body}" \
|
||||||
|
-H "Priority: high" \
|
||||||
|
"${url}" \
|
||||||
|
2>/dev/null \
|
||||||
|
)"; rv=$?
|
||||||
|
else
|
||||||
|
msg_out="$( \
|
||||||
|
curl \
|
||||||
|
-H "Title: ${subject}" \
|
||||||
|
-d "${msg_body}" \
|
||||||
|
-H "Priority: high" \
|
||||||
|
"${url}" \
|
||||||
|
2>/dev/null \
|
||||||
|
)"; rv=$?
|
||||||
|
fi
|
||||||
|
if [ "${rv}" -ne 0 ]; then
|
||||||
|
zed_log_err "curl exit=${rv}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
msg_err="$(echo "${msg_out}" \
|
||||||
|
| sed -n -e 's/.*"errors" *:.*\[\(.*\)\].*/\1/p')"
|
||||||
|
if [ -n "${msg_err}" ]; then
|
||||||
|
zed_log_err "ntfy \"${msg_err}"\"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# zed_rate_limit (tag, [interval])
|
# zed_rate_limit (tag, [interval])
|
||||||
#
|
#
|
||||||
# Check whether an event of a given type [tag] has already occurred within the
|
# Check whether an event of a given type [tag] has already occurred within the
|
||||||
|
@ -142,3 +142,30 @@ ZED_SYSLOG_SUBCLASS_EXCLUDE="history_event"
|
|||||||
# Disabled by default, 1 to enable and 0 to disable.
|
# Disabled by default, 1 to enable and 0 to disable.
|
||||||
#ZED_SYSLOG_DISPLAY_GUIDS=1
|
#ZED_SYSLOG_DISPLAY_GUIDS=1
|
||||||
|
|
||||||
|
##
|
||||||
|
# Power off the drive's slot in the enclosure if it becomes FAULTED. This can
|
||||||
|
# help silence misbehaving drives. This assumes your drive enclosure fully
|
||||||
|
# supports slot power control via sysfs.
|
||||||
|
#ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT=1
|
||||||
|
|
||||||
|
##
|
||||||
|
# Ntfy topic
|
||||||
|
# This defines which topic will receive the ntfy notification.
|
||||||
|
# <https://docs.ntfy.sh/publish/>
|
||||||
|
# Disabled by default; uncomment to enable.
|
||||||
|
#ZED_NTFY_TOPIC=""
|
||||||
|
|
||||||
|
##
|
||||||
|
# Ntfy access token (optional for public topics)
|
||||||
|
# This defines an access token which can be used
|
||||||
|
# to allow you to authenticate when sending to topics
|
||||||
|
# <https://docs.ntfy.sh/publish/#access-tokens>
|
||||||
|
# Disabled by default; uncomment to enable.
|
||||||
|
#ZED_NTFY_ACCESS_TOKEN=""
|
||||||
|
|
||||||
|
##
|
||||||
|
# Ntfy Service URL
|
||||||
|
# This defines which service the ntfy call will be directed toward
|
||||||
|
# <https://docs.ntfy.sh/install/>
|
||||||
|
# https://ntfy.sh by default; uncomment to enable an alternative service url.
|
||||||
|
#ZED_NTFY_URL="https://ntfy.sh"
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "zed_strings.h"
|
#include "zed_strings.h"
|
||||||
|
|
||||||
#include "agents/zfs_agents.h"
|
#include "agents/zfs_agents.h"
|
||||||
|
#include <libzutil.h>
|
||||||
|
|
||||||
#define MAXBUF 4096
|
#define MAXBUF 4096
|
||||||
|
|
||||||
@ -922,6 +923,25 @@ _zed_event_add_time_strings(uint64_t eid, zed_strings_t *zsp, int64_t etime[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
_zed_event_update_enc_sysfs_path(nvlist_t *nvl)
|
||||||
|
{
|
||||||
|
const char *vdev_path;
|
||||||
|
|
||||||
|
if (nvlist_lookup_string(nvl, FM_EREPORT_PAYLOAD_ZFS_VDEV_PATH,
|
||||||
|
&vdev_path) != 0) {
|
||||||
|
return; /* some other kind of event, ignore it */
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vdev_path == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
update_vdev_config_dev_sysfs_path(nvl, vdev_path,
|
||||||
|
FM_EREPORT_PAYLOAD_ZFS_VDEV_ENC_SYSFS_PATH);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Service the next zevent, blocking until one is available.
|
* Service the next zevent, blocking until one is available.
|
||||||
*/
|
*/
|
||||||
@ -969,6 +989,17 @@ zed_event_service(struct zed_conf *zcp)
|
|||||||
zed_log_msg(LOG_WARNING,
|
zed_log_msg(LOG_WARNING,
|
||||||
"Failed to lookup zevent class (eid=%llu)", eid);
|
"Failed to lookup zevent class (eid=%llu)", eid);
|
||||||
} else {
|
} else {
|
||||||
|
/*
|
||||||
|
* Special case: If we can dynamically detect an enclosure sysfs
|
||||||
|
* path, then use that value rather than the one stored in the
|
||||||
|
* vd->vdev_enc_sysfs_path. There have been rare cases where
|
||||||
|
* vd->vdev_enc_sysfs_path becomes outdated. However, there
|
||||||
|
* will be other times when we can not dynamically detect the
|
||||||
|
* sysfs path (like if a disk disappears) and have to rely on
|
||||||
|
* the old value for things like turning on the fault LED.
|
||||||
|
*/
|
||||||
|
_zed_event_update_enc_sysfs_path(nvl);
|
||||||
|
|
||||||
/* let internal modules see this event first */
|
/* let internal modules see this event first */
|
||||||
zfs_agent_post_event(class, NULL, nvl);
|
zfs_agent_post_event(class, NULL, nvl);
|
||||||
|
|
||||||
|
@ -132,6 +132,8 @@ static int zfs_do_zone(int argc, char **argv);
|
|||||||
static int zfs_do_unzone(int argc, char **argv);
|
static int zfs_do_unzone(int argc, char **argv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static int zfs_do_help(int argc, char **argv);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable a reasonable set of defaults for libumem debugging on DEBUG builds.
|
* Enable a reasonable set of defaults for libumem debugging on DEBUG builds.
|
||||||
*/
|
*/
|
||||||
@ -337,7 +339,7 @@ get_usage(zfs_help_t idx)
|
|||||||
"\tsend [-nVvPe] -t <receive_resume_token>\n"
|
"\tsend [-nVvPe] -t <receive_resume_token>\n"
|
||||||
"\tsend [-PnVv] --saved filesystem\n"));
|
"\tsend [-PnVv] --saved filesystem\n"));
|
||||||
case HELP_SET:
|
case HELP_SET:
|
||||||
return (gettext("\tset <property=value> ... "
|
return (gettext("\tset [-u] <property=value> ... "
|
||||||
"<filesystem|volume|snapshot> ...\n"));
|
"<filesystem|volume|snapshot> ...\n"));
|
||||||
case HELP_SHARE:
|
case HELP_SHARE:
|
||||||
return (gettext("\tshare [-l] <-a [nfs|smb] | filesystem>\n"));
|
return (gettext("\tshare [-l] <-a [nfs|smb] | filesystem>\n"));
|
||||||
@ -606,6 +608,9 @@ usage(boolean_t requested)
|
|||||||
(void) fprintf(fp,
|
(void) fprintf(fp,
|
||||||
gettext("\nFor the delegated permission list, run: %s\n"),
|
gettext("\nFor the delegated permission list, run: %s\n"),
|
||||||
"zfs allow|unallow");
|
"zfs allow|unallow");
|
||||||
|
(void) fprintf(fp,
|
||||||
|
gettext("\nFor further help on a command or topic, "
|
||||||
|
"run: %s\n"), "zfs help [<topic>]");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -3667,15 +3672,25 @@ zfs_do_list(int argc, char **argv)
|
|||||||
|
|
||||||
for (char *tok; (tok = strsep(&optarg, ",")); ) {
|
for (char *tok; (tok = strsep(&optarg, ",")); ) {
|
||||||
static const char *const type_subopts[] = {
|
static const char *const type_subopts[] = {
|
||||||
"filesystem", "volume",
|
"filesystem",
|
||||||
"snapshot", "snap",
|
"fs",
|
||||||
|
"volume",
|
||||||
|
"vol",
|
||||||
|
"snapshot",
|
||||||
|
"snap",
|
||||||
"bookmark",
|
"bookmark",
|
||||||
"all" };
|
"all"
|
||||||
|
};
|
||||||
static const int type_types[] = {
|
static const int type_types[] = {
|
||||||
ZFS_TYPE_FILESYSTEM, ZFS_TYPE_VOLUME,
|
ZFS_TYPE_FILESYSTEM,
|
||||||
ZFS_TYPE_SNAPSHOT, ZFS_TYPE_SNAPSHOT,
|
ZFS_TYPE_FILESYSTEM,
|
||||||
|
ZFS_TYPE_VOLUME,
|
||||||
|
ZFS_TYPE_VOLUME,
|
||||||
|
ZFS_TYPE_SNAPSHOT,
|
||||||
|
ZFS_TYPE_SNAPSHOT,
|
||||||
ZFS_TYPE_BOOKMARK,
|
ZFS_TYPE_BOOKMARK,
|
||||||
ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK };
|
ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK
|
||||||
|
};
|
||||||
|
|
||||||
for (c = 0; c < ARRAY_SIZE(type_subopts); ++c)
|
for (c = 0; c < ARRAY_SIZE(type_subopts); ++c)
|
||||||
if (strcmp(tok, type_subopts[c]) == 0) {
|
if (strcmp(tok, type_subopts[c]) == 0) {
|
||||||
@ -4197,9 +4212,10 @@ out:
|
|||||||
static int
|
static int
|
||||||
set_callback(zfs_handle_t *zhp, void *data)
|
set_callback(zfs_handle_t *zhp, void *data)
|
||||||
{
|
{
|
||||||
nvlist_t *props = data;
|
zprop_set_cbdata_t *cb = data;
|
||||||
|
int ret = zfs_prop_set_list_flags(zhp, cb->cb_proplist, cb->cb_flags);
|
||||||
|
|
||||||
if (zfs_prop_set_list(zhp, props) != 0) {
|
if (ret != 0 || libzfs_errno(g_zfs) != EZFS_SUCCESS) {
|
||||||
switch (libzfs_errno(g_zfs)) {
|
switch (libzfs_errno(g_zfs)) {
|
||||||
case EZFS_MOUNTFAILED:
|
case EZFS_MOUNTFAILED:
|
||||||
(void) fprintf(stderr, gettext("property may be set "
|
(void) fprintf(stderr, gettext("property may be set "
|
||||||
@ -4210,33 +4226,42 @@ set_callback(zfs_handle_t *zhp, void *data)
|
|||||||
"but unable to reshare filesystem\n"));
|
"but unable to reshare filesystem\n"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return (1);
|
|
||||||
}
|
}
|
||||||
return (0);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
zfs_do_set(int argc, char **argv)
|
zfs_do_set(int argc, char **argv)
|
||||||
{
|
{
|
||||||
nvlist_t *props = NULL;
|
zprop_set_cbdata_t cb = { 0 };
|
||||||
int ds_start = -1; /* argv idx of first dataset arg */
|
int ds_start = -1; /* argv idx of first dataset arg */
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int i;
|
int i, c;
|
||||||
|
|
||||||
/* check for options */
|
/* check options */
|
||||||
if (argc > 1 && argv[1][0] == '-') {
|
while ((c = getopt(argc, argv, "u")) != -1) {
|
||||||
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
switch (c) {
|
||||||
argv[1][1]);
|
case 'u':
|
||||||
usage(B_FALSE);
|
cb.cb_flags |= ZFS_SET_NOMOUNT;
|
||||||
|
break;
|
||||||
|
case '?':
|
||||||
|
default:
|
||||||
|
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
||||||
|
optopt);
|
||||||
|
usage(B_FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
argc -= optind;
|
||||||
|
argv += optind;
|
||||||
|
|
||||||
/* check number of arguments */
|
/* check number of arguments */
|
||||||
if (argc < 2) {
|
if (argc < 1) {
|
||||||
(void) fprintf(stderr, gettext("missing arguments\n"));
|
(void) fprintf(stderr, gettext("missing arguments\n"));
|
||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
}
|
}
|
||||||
if (argc < 3) {
|
if (argc < 2) {
|
||||||
if (strchr(argv[1], '=') == NULL) {
|
if (strchr(argv[0], '=') == NULL) {
|
||||||
(void) fprintf(stderr, gettext("missing property=value "
|
(void) fprintf(stderr, gettext("missing property=value "
|
||||||
"argument(s)\n"));
|
"argument(s)\n"));
|
||||||
} else {
|
} else {
|
||||||
@ -4247,7 +4272,7 @@ zfs_do_set(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* validate argument order: prop=val args followed by dataset args */
|
/* validate argument order: prop=val args followed by dataset args */
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
if (strchr(argv[i], '=') != NULL) {
|
if (strchr(argv[i], '=') != NULL) {
|
||||||
if (ds_start > 0) {
|
if (ds_start > 0) {
|
||||||
/* out-of-order prop=val argument */
|
/* out-of-order prop=val argument */
|
||||||
@ -4265,20 +4290,20 @@ zfs_do_set(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Populate a list of property settings */
|
/* Populate a list of property settings */
|
||||||
if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0)
|
if (nvlist_alloc(&cb.cb_proplist, NV_UNIQUE_NAME, 0) != 0)
|
||||||
nomem();
|
nomem();
|
||||||
for (i = 1; i < ds_start; i++) {
|
for (i = 0; i < ds_start; i++) {
|
||||||
if (!parseprop(props, argv[i])) {
|
if (!parseprop(cb.cb_proplist, argv[i])) {
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = zfs_for_each(argc - ds_start, argv + ds_start, 0,
|
ret = zfs_for_each(argc - ds_start, argv + ds_start, 0,
|
||||||
ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, props);
|
ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, &cb);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
nvlist_free(props);
|
nvlist_free(cb.cb_proplist);
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7215,7 +7240,8 @@ share_mount(int op, int argc, char **argv)
|
|||||||
pthread_mutex_init(&share_mount_state.sm_lock, NULL);
|
pthread_mutex_init(&share_mount_state.sm_lock, NULL);
|
||||||
|
|
||||||
/* For a 'zfs share -a' operation start with a clean slate. */
|
/* For a 'zfs share -a' operation start with a clean slate. */
|
||||||
zfs_truncate_shares(NULL);
|
if (op == OP_SHARE)
|
||||||
|
zfs_truncate_shares(NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* libshare isn't mt-safe, so only do the operation in parallel
|
* libshare isn't mt-safe, so only do the operation in parallel
|
||||||
@ -8726,6 +8752,25 @@ zfs_do_version(int argc, char **argv)
|
|||||||
return (zfs_version_print() != 0);
|
return (zfs_version_print() != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Display documentation */
|
||||||
|
static int
|
||||||
|
zfs_do_help(int argc, char **argv)
|
||||||
|
{
|
||||||
|
char page[MAXNAMELEN];
|
||||||
|
if (argc < 3 || strcmp(argv[2], "zfs") == 0)
|
||||||
|
strcpy(page, "zfs");
|
||||||
|
else if (strcmp(argv[2], "concepts") == 0 ||
|
||||||
|
strcmp(argv[2], "props") == 0)
|
||||||
|
snprintf(page, sizeof (page), "zfs%s", argv[2]);
|
||||||
|
else
|
||||||
|
snprintf(page, sizeof (page), "zfs-%s", argv[2]);
|
||||||
|
|
||||||
|
execlp("man", "man", page, NULL);
|
||||||
|
|
||||||
|
fprintf(stderr, "couldn't run man program: %s", strerror(errno));
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
@ -8781,6 +8826,12 @@ main(int argc, char **argv)
|
|||||||
if ((strcmp(cmdname, "-V") == 0) || (strcmp(cmdname, "--version") == 0))
|
if ((strcmp(cmdname, "-V") == 0) || (strcmp(cmdname, "--version") == 0))
|
||||||
return (zfs_do_version(argc, argv));
|
return (zfs_do_version(argc, argv));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Special case 'help'
|
||||||
|
*/
|
||||||
|
if (strcmp(cmdname, "help") == 0)
|
||||||
|
return (zfs_do_help(argc, argv));
|
||||||
|
|
||||||
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));
|
||||||
return (1);
|
return (1);
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
# Features which are supported by GRUB2
|
# Features which are supported by GRUB2
|
||||||
|
allocation_classes
|
||||||
async_destroy
|
async_destroy
|
||||||
|
block_cloning
|
||||||
bookmarks
|
bookmarks
|
||||||
|
device_rebuild
|
||||||
embedded_data
|
embedded_data
|
||||||
empty_bpobj
|
empty_bpobj
|
||||||
enabled_txg
|
enabled_txg
|
||||||
@ -9,6 +12,12 @@ filesystem_limits
|
|||||||
hole_birth
|
hole_birth
|
||||||
large_blocks
|
large_blocks
|
||||||
livelist
|
livelist
|
||||||
|
log_spacemap
|
||||||
lz4_compress
|
lz4_compress
|
||||||
|
project_quota
|
||||||
|
resilver_defer
|
||||||
spacemap_histogram
|
spacemap_histogram
|
||||||
|
spacemap_v2
|
||||||
|
userobj_accounting
|
||||||
|
zilsaxattr
|
||||||
zpool_checkpoint
|
zpool_checkpoint
|
||||||
|
@ -6,7 +6,6 @@ edonr
|
|||||||
embedded_data
|
embedded_data
|
||||||
empty_bpobj
|
empty_bpobj
|
||||||
enabled_txg
|
enabled_txg
|
||||||
encryption
|
|
||||||
extensible_dataset
|
extensible_dataset
|
||||||
filesystem_limits
|
filesystem_limits
|
||||||
hole_birth
|
hole_birth
|
||||||
|
@ -124,3 +124,24 @@ check_file(const char *file, boolean_t force, boolean_t isspare)
|
|||||||
{
|
{
|
||||||
return (check_file_generic(file, force, isspare));
|
return (check_file_generic(file, force, isspare));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
zpool_power_current_state(zpool_handle_t *zhp, char *vdev)
|
||||||
|
{
|
||||||
|
|
||||||
|
(void) zhp;
|
||||||
|
(void) vdev;
|
||||||
|
/* Enclosure slot power not supported on FreeBSD yet */
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
zpool_power(zpool_handle_t *zhp, char *vdev, boolean_t turn_on)
|
||||||
|
{
|
||||||
|
|
||||||
|
(void) zhp;
|
||||||
|
(void) vdev;
|
||||||
|
(void) turn_on;
|
||||||
|
/* Enclosure slot power not supported on FreeBSD yet */
|
||||||
|
return (ENOTSUP);
|
||||||
|
}
|
||||||
|
@ -416,3 +416,258 @@ check_file(const char *file, boolean_t force, boolean_t isspare)
|
|||||||
{
|
{
|
||||||
return (check_file_generic(file, force, isspare));
|
return (check_file_generic(file, force, isspare));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read from a sysfs file and return an allocated string. Removes
|
||||||
|
* the newline from the end of the string if there is one.
|
||||||
|
*
|
||||||
|
* Returns a string on success (which must be freed), or NULL on error.
|
||||||
|
*/
|
||||||
|
static char *zpool_sysfs_gets(char *path)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
struct stat statbuf;
|
||||||
|
char *buf = NULL;
|
||||||
|
ssize_t count = 0;
|
||||||
|
fd = open(path, O_RDONLY);
|
||||||
|
if (fd < 0)
|
||||||
|
return (NULL);
|
||||||
|
|
||||||
|
if (fstat(fd, &statbuf) != 0) {
|
||||||
|
close(fd);
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
buf = calloc(sizeof (*buf), statbuf.st_size + 1);
|
||||||
|
if (buf == NULL) {
|
||||||
|
close(fd);
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note, we can read less bytes than st_size, and that's ok. Sysfs
|
||||||
|
* files will report their size is 4k even if they only return a small
|
||||||
|
* string.
|
||||||
|
*/
|
||||||
|
count = read(fd, buf, statbuf.st_size);
|
||||||
|
if (count < 0) {
|
||||||
|
/* Error doing read() or we overran the buffer */
|
||||||
|
close(fd);
|
||||||
|
free(buf);
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing newline */
|
||||||
|
if (buf[count - 1] == '\n')
|
||||||
|
buf[count - 1] = 0;
|
||||||
|
|
||||||
|
close(fd);
|
||||||
|
|
||||||
|
return (buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write a string to a sysfs file.
|
||||||
|
*
|
||||||
|
* Returns 0 on success, non-zero otherwise.
|
||||||
|
*/
|
||||||
|
static int zpool_sysfs_puts(char *path, char *str)
|
||||||
|
{
|
||||||
|
FILE *file;
|
||||||
|
|
||||||
|
file = fopen(path, "w");
|
||||||
|
if (!file) {
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fputs(str, file) < 0) {
|
||||||
|
fclose(file);
|
||||||
|
return (-2);
|
||||||
|
}
|
||||||
|
fclose(file);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Given a vdev nvlist_t, rescan its enclosure sysfs path */
|
||||||
|
static void
|
||||||
|
rescan_vdev_config_dev_sysfs_path(nvlist_t *vdev_nv)
|
||||||
|
{
|
||||||
|
update_vdev_config_dev_sysfs_path(vdev_nv,
|
||||||
|
fnvlist_lookup_string(vdev_nv, ZPOOL_CONFIG_PATH),
|
||||||
|
ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Given a power string: "on", "off", "1", or "0", return 0 if it's an
|
||||||
|
* off value, 1 if it's an on value, and -1 if the value is unrecognized.
|
||||||
|
*/
|
||||||
|
static int zpool_power_parse_value(char *str)
|
||||||
|
{
|
||||||
|
if ((strcmp(str, "off") == 0) || (strcmp(str, "0") == 0))
|
||||||
|
return (0);
|
||||||
|
|
||||||
|
if ((strcmp(str, "on") == 0) || (strcmp(str, "1") == 0))
|
||||||
|
return (1);
|
||||||
|
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Given a vdev string return an allocated string containing the sysfs path to
|
||||||
|
* its power control file. Also do a check if the power control file really
|
||||||
|
* exists and has correct permissions.
|
||||||
|
*
|
||||||
|
* Example returned strings:
|
||||||
|
*
|
||||||
|
* /sys/class/enclosure/0:0:122:0/10/power_status
|
||||||
|
* /sys/bus/pci/slots/10/power
|
||||||
|
*
|
||||||
|
* Returns allocated string on success (which must be freed), NULL on failure.
|
||||||
|
*/
|
||||||
|
static char *
|
||||||
|
zpool_power_sysfs_path(zpool_handle_t *zhp, char *vdev)
|
||||||
|
{
|
||||||
|
const char *enc_sysfs_dir = NULL;
|
||||||
|
char *path = NULL;
|
||||||
|
nvlist_t *vdev_nv = zpool_find_vdev(zhp, vdev, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
if (vdev_nv == NULL) {
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make sure we're getting the updated enclosure sysfs path */
|
||||||
|
rescan_vdev_config_dev_sysfs_path(vdev_nv);
|
||||||
|
|
||||||
|
if (nvlist_lookup_string(vdev_nv, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH,
|
||||||
|
&enc_sysfs_dir) != 0) {
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (asprintf(&path, "%s/power_status", enc_sysfs_dir) == -1)
|
||||||
|
return (NULL);
|
||||||
|
|
||||||
|
if (access(path, W_OK) != 0) {
|
||||||
|
free(path);
|
||||||
|
path = NULL;
|
||||||
|
/* No HDD 'power_control' file, maybe it's NVMe? */
|
||||||
|
if (asprintf(&path, "%s/power", enc_sysfs_dir) == -1) {
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (access(path, R_OK | W_OK) != 0) {
|
||||||
|
/* Not NVMe either */
|
||||||
|
free(path);
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Given a path to a sysfs power control file, return B_TRUE if you should use
|
||||||
|
* "on/off" words to control it, or B_FALSE otherwise ("0/1" to control).
|
||||||
|
*/
|
||||||
|
static boolean_t
|
||||||
|
zpool_power_use_word(char *sysfs_path)
|
||||||
|
{
|
||||||
|
if (strcmp(&sysfs_path[strlen(sysfs_path) - strlen("power_status")],
|
||||||
|
"power_status") == 0) {
|
||||||
|
return (B_TRUE);
|
||||||
|
}
|
||||||
|
return (B_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check the sysfs power control value for a vdev.
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* 0 - Power is off
|
||||||
|
* 1 - Power is on
|
||||||
|
* -1 - Error or unsupported
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
zpool_power_current_state(zpool_handle_t *zhp, char *vdev)
|
||||||
|
{
|
||||||
|
char *val;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
char *path = zpool_power_sysfs_path(zhp, vdev);
|
||||||
|
if (path == NULL)
|
||||||
|
return (-1);
|
||||||
|
|
||||||
|
val = zpool_sysfs_gets(path);
|
||||||
|
if (val == NULL) {
|
||||||
|
free(path);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
rc = zpool_power_parse_value(val);
|
||||||
|
free(val);
|
||||||
|
free(path);
|
||||||
|
return (rc);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Turn on or off the slot to a device
|
||||||
|
*
|
||||||
|
* Device path is the full path to the device (like /dev/sda or /dev/sda1).
|
||||||
|
*
|
||||||
|
* Return code:
|
||||||
|
* 0: Success
|
||||||
|
* ENOTSUP: Power control not supported for OS
|
||||||
|
* EBADSLT: Couldn't read current power state
|
||||||
|
* ENOENT: No sysfs path to power control
|
||||||
|
* EIO: Couldn't write sysfs power value
|
||||||
|
* EBADE: Sysfs power value didn't change
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
zpool_power(zpool_handle_t *zhp, char *vdev, boolean_t turn_on)
|
||||||
|
{
|
||||||
|
char *sysfs_path;
|
||||||
|
const char *val;
|
||||||
|
int rc;
|
||||||
|
int timeout_ms;
|
||||||
|
|
||||||
|
rc = zpool_power_current_state(zhp, vdev);
|
||||||
|
if (rc == -1) {
|
||||||
|
return (EBADSLT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Already correct value? */
|
||||||
|
if (rc == (int)turn_on)
|
||||||
|
return (0);
|
||||||
|
|
||||||
|
sysfs_path = zpool_power_sysfs_path(zhp, vdev);
|
||||||
|
if (sysfs_path == NULL)
|
||||||
|
return (ENOENT);
|
||||||
|
|
||||||
|
if (zpool_power_use_word(sysfs_path)) {
|
||||||
|
val = turn_on ? "on" : "off";
|
||||||
|
} else {
|
||||||
|
val = turn_on ? "1" : "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
rc = zpool_sysfs_puts(sysfs_path, (char *)val);
|
||||||
|
|
||||||
|
free(sysfs_path);
|
||||||
|
if (rc != 0) {
|
||||||
|
return (EIO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Wait up to 30 seconds for sysfs power value to change after
|
||||||
|
* writing it.
|
||||||
|
*/
|
||||||
|
timeout_ms = zpool_getenv_int("ZPOOL_POWER_ON_SLOT_TIMEOUT_MS", 30000);
|
||||||
|
for (int i = 0; i < MAX(1, timeout_ms / 200); i++) {
|
||||||
|
rc = zpool_power_current_state(zhp, vdev);
|
||||||
|
if (rc == (int)turn_on)
|
||||||
|
return (0); /* success */
|
||||||
|
|
||||||
|
fsleep(0.200); /* 200ms */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* sysfs value never changed */
|
||||||
|
return (EBADE);
|
||||||
|
}
|
||||||
|
@ -33,10 +33,18 @@ for i in $scripts ; do
|
|||||||
val=""
|
val=""
|
||||||
case $i in
|
case $i in
|
||||||
enc)
|
enc)
|
||||||
val=$(ls "$VDEV_ENC_SYSFS_PATH/../../" 2>/dev/null)
|
if echo "$VDEV_ENC_SYSFS_PATH" | grep -q '/sys/bus/pci/slots' ; then
|
||||||
|
val="$VDEV_ENC_SYSFS_PATH"
|
||||||
|
else
|
||||||
|
val="$(ls """$VDEV_ENC_SYSFS_PATH/../../""" 2>/dev/null)"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
slot)
|
slot)
|
||||||
val=$(cat "$VDEV_ENC_SYSFS_PATH/slot" 2>/dev/null)
|
if echo "$VDEV_ENC_SYSFS_PATH" | grep -q '/sys/bus/pci/slots' ; then
|
||||||
|
val="$(basename """$VDEV_ENC_SYSFS_PATH""")"
|
||||||
|
else
|
||||||
|
val="$(cat """$VDEV_ENC_SYSFS_PATH/slot""" 2>/dev/null)"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
encdev)
|
encdev)
|
||||||
val=$(ls "$VDEV_ENC_SYSFS_PATH/../device/scsi_generic" 2>/dev/null)
|
val=$(ls "$VDEV_ENC_SYSFS_PATH/../device/scsi_generic" 2>/dev/null)
|
||||||
|
@ -443,37 +443,22 @@ vdev_run_cmd(vdev_cmd_data_t *data, char *cmd)
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
char *argv[2] = {cmd};
|
char *argv[2] = {cmd};
|
||||||
char *env[5] = {(char *)"PATH=/bin:/sbin:/usr/bin:/usr/sbin"};
|
char **env;
|
||||||
char **lines = NULL;
|
char **lines = NULL;
|
||||||
int lines_cnt = 0;
|
int lines_cnt = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Setup our custom environment variables */
|
env = zpool_vdev_script_alloc_env(data->pool, data->path, data->upath,
|
||||||
rc = asprintf(&env[1], "VDEV_PATH=%s",
|
data->vdev_enc_sysfs_path, NULL, NULL);
|
||||||
data->path ? data->path : "");
|
if (env == NULL)
|
||||||
if (rc == -1) {
|
|
||||||
env[1] = NULL;
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
|
|
||||||
rc = asprintf(&env[2], "VDEV_UPATH=%s",
|
|
||||||
data->upath ? data->upath : "");
|
|
||||||
if (rc == -1) {
|
|
||||||
env[2] = NULL;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = asprintf(&env[3], "VDEV_ENC_SYSFS_PATH=%s",
|
|
||||||
data->vdev_enc_sysfs_path ?
|
|
||||||
data->vdev_enc_sysfs_path : "");
|
|
||||||
if (rc == -1) {
|
|
||||||
env[3] = NULL;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Run the command */
|
/* Run the command */
|
||||||
rc = libzfs_run_process_get_stdout_nopath(cmd, argv, env, &lines,
|
rc = libzfs_run_process_get_stdout_nopath(cmd, argv, env, &lines,
|
||||||
&lines_cnt);
|
&lines_cnt);
|
||||||
|
|
||||||
|
zpool_vdev_script_free_env(env);
|
||||||
|
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@ -485,10 +470,6 @@ vdev_run_cmd(vdev_cmd_data_t *data, char *cmd)
|
|||||||
out:
|
out:
|
||||||
if (lines != NULL)
|
if (lines != NULL)
|
||||||
libzfs_free_str_array(lines, lines_cnt);
|
libzfs_free_str_array(lines, lines_cnt);
|
||||||
|
|
||||||
/* Start with i = 1 since env[0] was statically allocated */
|
|
||||||
for (i = 1; i < ARRAY_SIZE(env); i++)
|
|
||||||
free(env[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -573,6 +554,10 @@ for_each_vdev_run_cb(void *zhp_data, nvlist_t *nv, void *cb_vcdl)
|
|||||||
if (nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) != 0)
|
if (nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) != 0)
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
|
/* Make sure we're getting the updated enclosure sysfs path */
|
||||||
|
update_vdev_config_dev_sysfs_path(nv, path,
|
||||||
|
ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH);
|
||||||
|
|
||||||
nvlist_lookup_string(nv, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH,
|
nvlist_lookup_string(nv, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH,
|
||||||
&vdev_enc_sysfs_path);
|
&vdev_enc_sysfs_path);
|
||||||
|
|
||||||
|
@ -126,6 +126,8 @@ static int zpool_do_version(int, char **);
|
|||||||
|
|
||||||
static int zpool_do_wait(int, char **);
|
static int zpool_do_wait(int, char **);
|
||||||
|
|
||||||
|
static int zpool_do_help(int argc, char **argv);
|
||||||
|
|
||||||
static zpool_compat_status_t zpool_do_load_compat(
|
static zpool_compat_status_t zpool_do_load_compat(
|
||||||
const char *, boolean_t *);
|
const char *, boolean_t *);
|
||||||
|
|
||||||
@ -351,7 +353,7 @@ get_usage(zpool_help_t idx)
|
|||||||
return (gettext("\tattach [-fsw] [-o property=value] "
|
return (gettext("\tattach [-fsw] [-o property=value] "
|
||||||
"<pool> <device> <new-device>\n"));
|
"<pool> <device> <new-device>\n"));
|
||||||
case HELP_CLEAR:
|
case HELP_CLEAR:
|
||||||
return (gettext("\tclear [-nF] <pool> [device]\n"));
|
return (gettext("\tclear [[--power]|[-nF]] <pool> [device]\n"));
|
||||||
case HELP_CREATE:
|
case HELP_CREATE:
|
||||||
return (gettext("\tcreate [-fnd] [-o property=value] ... \n"
|
return (gettext("\tcreate [-fnd] [-o property=value] ... \n"
|
||||||
"\t [-O file-system-property=value] ... \n"
|
"\t [-O file-system-property=value] ... \n"
|
||||||
@ -387,9 +389,11 @@ get_usage(zpool_help_t idx)
|
|||||||
"[-T d|u] [pool] ... \n"
|
"[-T d|u] [pool] ... \n"
|
||||||
"\t [interval [count]]\n"));
|
"\t [interval [count]]\n"));
|
||||||
case HELP_OFFLINE:
|
case HELP_OFFLINE:
|
||||||
return (gettext("\toffline [-f] [-t] <pool> <device> ...\n"));
|
return (gettext("\toffline [--power]|[[-f][-t]] <pool> "
|
||||||
|
"<device> ...\n"));
|
||||||
case HELP_ONLINE:
|
case HELP_ONLINE:
|
||||||
return (gettext("\tonline [-e] <pool> <device> ...\n"));
|
return (gettext("\tonline [--power][-e] <pool> <device> "
|
||||||
|
"...\n"));
|
||||||
case HELP_REPLACE:
|
case HELP_REPLACE:
|
||||||
return (gettext("\treplace [-fsw] [-o property=value] "
|
return (gettext("\treplace [-fsw] [-o property=value] "
|
||||||
"<pool> <device> [new-device]\n"));
|
"<pool> <device> [new-device]\n"));
|
||||||
@ -408,7 +412,7 @@ get_usage(zpool_help_t idx)
|
|||||||
return (gettext("\ttrim [-dw] [-r <rate>] [-c | -s] <pool> "
|
return (gettext("\ttrim [-dw] [-r <rate>] [-c | -s] <pool> "
|
||||||
"[<device> ...]\n"));
|
"[<device> ...]\n"));
|
||||||
case HELP_STATUS:
|
case HELP_STATUS:
|
||||||
return (gettext("\tstatus [-c [script1,script2,...]] "
|
return (gettext("\tstatus [--power] [-c [script1,script2,...]] "
|
||||||
"[-igLpPstvxD] [-T d|u] [pool] ... \n"
|
"[-igLpPstvxD] [-T d|u] [pool] ... \n"
|
||||||
"\t [interval [count]]\n"));
|
"\t [interval [count]]\n"));
|
||||||
case HELP_UPGRADE:
|
case HELP_UPGRADE:
|
||||||
@ -514,6 +518,77 @@ print_vdev_prop_cb(int prop, void *cb)
|
|||||||
return (ZPROP_CONT);
|
return (ZPROP_CONT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Given a leaf vdev name like 'L5' return its VDEV_CONFIG_PATH like
|
||||||
|
* '/dev/disk/by-vdev/L5'.
|
||||||
|
*/
|
||||||
|
static const char *
|
||||||
|
vdev_name_to_path(zpool_handle_t *zhp, char *vdev)
|
||||||
|
{
|
||||||
|
nvlist_t *vdev_nv = zpool_find_vdev(zhp, vdev, NULL, NULL, NULL);
|
||||||
|
if (vdev_nv == NULL) {
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
return (fnvlist_lookup_string(vdev_nv, ZPOOL_CONFIG_PATH));
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
zpool_power_on(zpool_handle_t *zhp, char *vdev)
|
||||||
|
{
|
||||||
|
return (zpool_power(zhp, vdev, B_TRUE));
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
zpool_power_on_and_disk_wait(zpool_handle_t *zhp, char *vdev)
|
||||||
|
{
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
rc = zpool_power_on(zhp, vdev);
|
||||||
|
if (rc != 0)
|
||||||
|
return (rc);
|
||||||
|
|
||||||
|
zpool_disk_wait(vdev_name_to_path(zhp, vdev));
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
zpool_power_on_pool_and_wait_for_devices(zpool_handle_t *zhp)
|
||||||
|
{
|
||||||
|
nvlist_t *nv;
|
||||||
|
const char *path = NULL;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
/* Power up all the devices first */
|
||||||
|
FOR_EACH_REAL_LEAF_VDEV(zhp, nv) {
|
||||||
|
path = fnvlist_lookup_string(nv, ZPOOL_CONFIG_PATH);
|
||||||
|
if (path != NULL) {
|
||||||
|
rc = zpool_power_on(zhp, (char *)path);
|
||||||
|
if (rc != 0) {
|
||||||
|
return (rc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Wait for their devices to show up. Since we powered them on
|
||||||
|
* at roughly the same time, they should all come online around
|
||||||
|
* the same time.
|
||||||
|
*/
|
||||||
|
FOR_EACH_REAL_LEAF_VDEV(zhp, nv) {
|
||||||
|
path = fnvlist_lookup_string(nv, ZPOOL_CONFIG_PATH);
|
||||||
|
zpool_disk_wait(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
zpool_power_off(zpool_handle_t *zhp, char *vdev)
|
||||||
|
{
|
||||||
|
return (zpool_power(zhp, vdev, B_FALSE));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Display usage message. If we're inside a command, display only the usage for
|
* Display usage message. If we're inside a command, display only the usage for
|
||||||
* that command. Otherwise, iterate over the entire command table and display
|
* that command. Otherwise, iterate over the entire command table and display
|
||||||
@ -538,6 +613,10 @@ usage(boolean_t requested)
|
|||||||
(void) fprintf(fp, "%s",
|
(void) fprintf(fp, "%s",
|
||||||
get_usage(command_table[i].usage));
|
get_usage(command_table[i].usage));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(void) fprintf(fp,
|
||||||
|
gettext("\nFor further help on a command or topic, "
|
||||||
|
"run: %s\n"), "zpool help [<topic>]");
|
||||||
} else {
|
} else {
|
||||||
(void) fprintf(fp, gettext("usage:\n"));
|
(void) fprintf(fp, gettext("usage:\n"));
|
||||||
(void) fprintf(fp, "%s", get_usage(current_command->usage));
|
(void) fprintf(fp, "%s", get_usage(current_command->usage));
|
||||||
@ -2082,11 +2161,13 @@ typedef struct status_cbdata {
|
|||||||
boolean_t cb_explain;
|
boolean_t cb_explain;
|
||||||
boolean_t cb_first;
|
boolean_t cb_first;
|
||||||
boolean_t cb_dedup_stats;
|
boolean_t cb_dedup_stats;
|
||||||
|
boolean_t cb_print_unhealthy;
|
||||||
boolean_t cb_print_status;
|
boolean_t cb_print_status;
|
||||||
boolean_t cb_print_slow_ios;
|
boolean_t cb_print_slow_ios;
|
||||||
boolean_t cb_print_vdev_init;
|
boolean_t cb_print_vdev_init;
|
||||||
boolean_t cb_print_vdev_trim;
|
boolean_t cb_print_vdev_trim;
|
||||||
vdev_cmd_data_list_t *vcdl;
|
vdev_cmd_data_list_t *vcdl;
|
||||||
|
boolean_t cb_print_power;
|
||||||
} status_cbdata_t;
|
} status_cbdata_t;
|
||||||
|
|
||||||
/* Return 1 if string is NULL, empty, or whitespace; return 0 otherwise. */
|
/* Return 1 if string is NULL, empty, or whitespace; return 0 otherwise. */
|
||||||
@ -2277,6 +2358,35 @@ health_str_to_color(const char *health)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called for each leaf vdev. Returns 0 if the vdev is healthy.
|
||||||
|
* A vdev is unhealthy if any of the following are true:
|
||||||
|
* 1) there are read, write, or checksum errors,
|
||||||
|
* 2) its state is not ONLINE, or
|
||||||
|
* 3) slow IO reporting was requested (-s) and there are slow IOs.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
vdev_health_check_cb(void *hdl_data, nvlist_t *nv, void *data)
|
||||||
|
{
|
||||||
|
status_cbdata_t *cb = data;
|
||||||
|
vdev_stat_t *vs;
|
||||||
|
uint_t vsc;
|
||||||
|
(void) hdl_data;
|
||||||
|
|
||||||
|
if (nvlist_lookup_uint64_array(nv, ZPOOL_CONFIG_VDEV_STATS,
|
||||||
|
(uint64_t **)&vs, &vsc) != 0)
|
||||||
|
return (1);
|
||||||
|
|
||||||
|
if (vs->vs_checksum_errors || vs->vs_read_errors ||
|
||||||
|
vs->vs_write_errors || vs->vs_state != VDEV_STATE_HEALTHY)
|
||||||
|
return (1);
|
||||||
|
|
||||||
|
if (cb->cb_print_slow_ios && vs->vs_slow_ios)
|
||||||
|
return (1);
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Print out configuration state as requested by status_callback.
|
* Print out configuration state as requested by status_callback.
|
||||||
*/
|
*/
|
||||||
@ -2295,7 +2405,8 @@ print_status_config(zpool_handle_t *zhp, status_cbdata_t *cb, const char *name,
|
|||||||
const char *state;
|
const char *state;
|
||||||
const char *type;
|
const char *type;
|
||||||
const char *path = NULL;
|
const char *path = NULL;
|
||||||
const char *rcolor = NULL, *wcolor = NULL, *ccolor = NULL;
|
const char *rcolor = NULL, *wcolor = NULL, *ccolor = NULL,
|
||||||
|
*scolor = NULL;
|
||||||
|
|
||||||
if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN,
|
if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN,
|
||||||
&child, &children) != 0)
|
&child, &children) != 0)
|
||||||
@ -2322,6 +2433,15 @@ print_status_config(zpool_handle_t *zhp, status_cbdata_t *cb, const char *name,
|
|||||||
state = gettext("AVAIL");
|
state = gettext("AVAIL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If '-e' is specified then top-level vdevs and their children
|
||||||
|
* can be pruned if all of their leaves are healthy.
|
||||||
|
*/
|
||||||
|
if (cb->cb_print_unhealthy && depth > 0 &&
|
||||||
|
for_each_vdev_in_nvlist(nv, vdev_health_check_cb, cb) == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
printf_color(health_str_to_color(state),
|
printf_color(health_str_to_color(state),
|
||||||
"\t%*s%-*s %-8s", depth, "", cb->cb_namewidth - depth,
|
"\t%*s%-*s %-8s", depth, "", cb->cb_namewidth - depth,
|
||||||
name, state);
|
name, state);
|
||||||
@ -2336,6 +2456,9 @@ print_status_config(zpool_handle_t *zhp, status_cbdata_t *cb, const char *name,
|
|||||||
if (vs->vs_checksum_errors)
|
if (vs->vs_checksum_errors)
|
||||||
ccolor = ANSI_RED;
|
ccolor = ANSI_RED;
|
||||||
|
|
||||||
|
if (vs->vs_slow_ios)
|
||||||
|
scolor = ANSI_BLUE;
|
||||||
|
|
||||||
if (cb->cb_literal) {
|
if (cb->cb_literal) {
|
||||||
fputc(' ', stdout);
|
fputc(' ', stdout);
|
||||||
printf_color(rcolor, "%5llu",
|
printf_color(rcolor, "%5llu",
|
||||||
@ -2368,9 +2491,30 @@ print_status_config(zpool_handle_t *zhp, status_cbdata_t *cb, const char *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cb->cb_literal)
|
if (cb->cb_literal)
|
||||||
printf(" %5llu", (u_longlong_t)vs->vs_slow_ios);
|
printf_color(scolor, " %5llu",
|
||||||
|
(u_longlong_t)vs->vs_slow_ios);
|
||||||
else
|
else
|
||||||
printf(" %5s", rbuf);
|
printf_color(scolor, " %5s", rbuf);
|
||||||
|
}
|
||||||
|
if (cb->cb_print_power) {
|
||||||
|
if (children == 0) {
|
||||||
|
/* Only leaf vdevs have physical slots */
|
||||||
|
switch (zpool_power_current_state(zhp, (char *)
|
||||||
|
fnvlist_lookup_string(nv,
|
||||||
|
ZPOOL_CONFIG_PATH))) {
|
||||||
|
case 0:
|
||||||
|
printf_color(ANSI_RED, " %5s",
|
||||||
|
gettext("off"));
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
printf(" %5s", gettext("on"));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printf(" %5s", "-");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
printf(" %5s", "-");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3116,12 +3260,21 @@ zfs_force_import_required(nvlist_t *config)
|
|||||||
nvlist_t *nvinfo;
|
nvlist_t *nvinfo;
|
||||||
|
|
||||||
state = fnvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE);
|
state = fnvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE);
|
||||||
(void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_HOSTID, &hostid);
|
nvinfo = fnvlist_lookup_nvlist(config, ZPOOL_CONFIG_LOAD_INFO);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The hostid on LOAD_INFO comes from the MOS label via
|
||||||
|
* spa_tryimport(). If its not there then we're likely talking to an
|
||||||
|
* older kernel, so use the top one, which will be from the label
|
||||||
|
* discovered in zpool_find_import(), or if a cachefile is in use, the
|
||||||
|
* local hostid.
|
||||||
|
*/
|
||||||
|
if (nvlist_lookup_uint64(nvinfo, ZPOOL_CONFIG_HOSTID, &hostid) != 0)
|
||||||
|
nvlist_lookup_uint64(config, ZPOOL_CONFIG_HOSTID, &hostid);
|
||||||
|
|
||||||
if (state != POOL_STATE_EXPORTED && hostid != get_system_hostid())
|
if (state != POOL_STATE_EXPORTED && hostid != get_system_hostid())
|
||||||
return (B_TRUE);
|
return (B_TRUE);
|
||||||
|
|
||||||
nvinfo = fnvlist_lookup_nvlist(config, ZPOOL_CONFIG_LOAD_INFO);
|
|
||||||
if (nvlist_exists(nvinfo, ZPOOL_CONFIG_MMP_STATE)) {
|
if (nvlist_exists(nvinfo, ZPOOL_CONFIG_MMP_STATE)) {
|
||||||
mmp_state_t mmp_state = fnvlist_lookup_uint64(nvinfo,
|
mmp_state_t mmp_state = fnvlist_lookup_uint64(nvinfo,
|
||||||
ZPOOL_CONFIG_MMP_STATE);
|
ZPOOL_CONFIG_MMP_STATE);
|
||||||
@ -3143,6 +3296,7 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts,
|
|||||||
nvlist_t *props, int flags)
|
nvlist_t *props, int flags)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
int ms_status = 0;
|
||||||
zpool_handle_t *zhp;
|
zpool_handle_t *zhp;
|
||||||
const char *name;
|
const char *name;
|
||||||
uint64_t version;
|
uint64_t version;
|
||||||
@ -3191,7 +3345,10 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts,
|
|||||||
time_t timestamp = 0;
|
time_t timestamp = 0;
|
||||||
uint64_t hostid = 0;
|
uint64_t hostid = 0;
|
||||||
|
|
||||||
if (nvlist_exists(config, ZPOOL_CONFIG_HOSTNAME))
|
if (nvlist_exists(nvinfo, ZPOOL_CONFIG_HOSTNAME))
|
||||||
|
hostname = fnvlist_lookup_string(nvinfo,
|
||||||
|
ZPOOL_CONFIG_HOSTNAME);
|
||||||
|
else if (nvlist_exists(config, ZPOOL_CONFIG_HOSTNAME))
|
||||||
hostname = fnvlist_lookup_string(config,
|
hostname = fnvlist_lookup_string(config,
|
||||||
ZPOOL_CONFIG_HOSTNAME);
|
ZPOOL_CONFIG_HOSTNAME);
|
||||||
|
|
||||||
@ -3199,7 +3356,10 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts,
|
|||||||
timestamp = fnvlist_lookup_uint64(config,
|
timestamp = fnvlist_lookup_uint64(config,
|
||||||
ZPOOL_CONFIG_TIMESTAMP);
|
ZPOOL_CONFIG_TIMESTAMP);
|
||||||
|
|
||||||
if (nvlist_exists(config, ZPOOL_CONFIG_HOSTID))
|
if (nvlist_exists(nvinfo, ZPOOL_CONFIG_HOSTID))
|
||||||
|
hostid = fnvlist_lookup_uint64(nvinfo,
|
||||||
|
ZPOOL_CONFIG_HOSTID);
|
||||||
|
else if (nvlist_exists(config, ZPOOL_CONFIG_HOSTID))
|
||||||
hostid = fnvlist_lookup_uint64(config,
|
hostid = fnvlist_lookup_uint64(config,
|
||||||
ZPOOL_CONFIG_HOSTID);
|
ZPOOL_CONFIG_HOSTID);
|
||||||
|
|
||||||
@ -3232,10 +3392,15 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts,
|
|||||||
ret = 1;
|
ret = 1;
|
||||||
|
|
||||||
if (zpool_get_state(zhp) != POOL_STATE_UNAVAIL &&
|
if (zpool_get_state(zhp) != POOL_STATE_UNAVAIL &&
|
||||||
!(flags & ZFS_IMPORT_ONLY) &&
|
!(flags & ZFS_IMPORT_ONLY)) {
|
||||||
zpool_enable_datasets(zhp, mntopts, 0) != 0) {
|
ms_status = zpool_enable_datasets(zhp, mntopts, 0);
|
||||||
zpool_close(zhp);
|
if (ms_status == EZFS_SHAREFAILED) {
|
||||||
return (1);
|
(void) fprintf(stderr, gettext("Import was "
|
||||||
|
"successful, but unable to share some datasets"));
|
||||||
|
} else if (ms_status == EZFS_MOUNTFAILED) {
|
||||||
|
(void) fprintf(stderr, gettext("Import was "
|
||||||
|
"successful, but unable to mount some datasets"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
zpool_close(zhp);
|
zpool_close(zhp);
|
||||||
@ -5401,19 +5566,6 @@ get_interval_count_filter_guids(int *argc, char **argv, float *interval,
|
|||||||
interval, count);
|
interval, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Floating point sleep(). Allows you to pass in a floating point value for
|
|
||||||
* seconds.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
fsleep(float sec)
|
|
||||||
{
|
|
||||||
struct timespec req;
|
|
||||||
req.tv_sec = floor(sec);
|
|
||||||
req.tv_nsec = (sec - (float)req.tv_sec) * NANOSEC;
|
|
||||||
nanosleep(&req, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Terminal height, in rows. Returns -1 if stdout is not connected to a TTY or
|
* Terminal height, in rows. Returns -1 if stdout is not connected to a TTY or
|
||||||
* if we were unable to determine its size.
|
* if we were unable to determine its size.
|
||||||
@ -6755,6 +6907,7 @@ zpool_do_split(int argc, char **argv)
|
|||||||
char *mntopts = NULL;
|
char *mntopts = NULL;
|
||||||
splitflags_t flags;
|
splitflags_t flags;
|
||||||
int c, ret = 0;
|
int c, ret = 0;
|
||||||
|
int ms_status = 0;
|
||||||
boolean_t loadkeys = B_FALSE;
|
boolean_t loadkeys = B_FALSE;
|
||||||
zpool_handle_t *zhp;
|
zpool_handle_t *zhp;
|
||||||
nvlist_t *config, *props = NULL;
|
nvlist_t *config, *props = NULL;
|
||||||
@ -6891,13 +7044,18 @@ zpool_do_split(int argc, char **argv)
|
|||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zpool_get_state(zhp) != POOL_STATE_UNAVAIL &&
|
if (zpool_get_state(zhp) != POOL_STATE_UNAVAIL) {
|
||||||
zpool_enable_datasets(zhp, mntopts, 0) != 0) {
|
ms_status = zpool_enable_datasets(zhp, mntopts, 0);
|
||||||
ret = 1;
|
if (ms_status == EZFS_SHAREFAILED) {
|
||||||
(void) fprintf(stderr, gettext("Split was successful, but "
|
(void) fprintf(stderr, gettext("Split was successful, "
|
||||||
"the datasets could not all be mounted\n"));
|
"datasets are mounted but sharing of some datasets "
|
||||||
(void) fprintf(stderr, gettext("Try doing '%s' with a "
|
"has failed\n"));
|
||||||
"different altroot\n"), "zpool import");
|
} else if (ms_status == EZFS_MOUNTFAILED) {
|
||||||
|
(void) fprintf(stderr, gettext("Split was successful"
|
||||||
|
", but some datasets could not be mounted\n"));
|
||||||
|
(void) fprintf(stderr, gettext("Try doing '%s' with a "
|
||||||
|
"different altroot\n"), "zpool import");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
zpool_close(zhp);
|
zpool_close(zhp);
|
||||||
nvlist_free(config);
|
nvlist_free(config);
|
||||||
@ -6906,10 +7064,12 @@ zpool_do_split(int argc, char **argv)
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define POWER_OPT 1024
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* zpool online <pool> <device> ...
|
* zpool online [--power] <pool> <device> ...
|
||||||
|
*
|
||||||
|
* --power: Power on the enclosure slot to the drive (if possible)
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
zpool_do_online(int argc, char **argv)
|
zpool_do_online(int argc, char **argv)
|
||||||
@ -6920,13 +7080,21 @@ zpool_do_online(int argc, char **argv)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
vdev_state_t newstate;
|
vdev_state_t newstate;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
boolean_t is_power_on = B_FALSE;
|
||||||
|
struct option long_options[] = {
|
||||||
|
{"power", no_argument, NULL, POWER_OPT},
|
||||||
|
{0, 0, 0, 0}
|
||||||
|
};
|
||||||
|
|
||||||
/* check options */
|
/* check options */
|
||||||
while ((c = getopt(argc, argv, "e")) != -1) {
|
while ((c = getopt_long(argc, argv, "e", long_options, NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'e':
|
case 'e':
|
||||||
flags |= ZFS_ONLINE_EXPAND;
|
flags |= ZFS_ONLINE_EXPAND;
|
||||||
break;
|
break;
|
||||||
|
case POWER_OPT:
|
||||||
|
is_power_on = B_TRUE;
|
||||||
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
||||||
optopt);
|
optopt);
|
||||||
@ -6934,6 +7102,9 @@ zpool_do_online(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (libzfs_envvar_is_set("ZPOOL_AUTO_POWER_ON_SLOT"))
|
||||||
|
is_power_on = B_TRUE;
|
||||||
|
|
||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
@ -6955,6 +7126,18 @@ zpool_do_online(int argc, char **argv)
|
|||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
vdev_state_t oldstate;
|
vdev_state_t oldstate;
|
||||||
boolean_t avail_spare, l2cache;
|
boolean_t avail_spare, l2cache;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
if (is_power_on) {
|
||||||
|
rc = zpool_power_on_and_disk_wait(zhp, argv[i]);
|
||||||
|
if (rc == ENOTSUP) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
gettext("Power control not supported\n"));
|
||||||
|
}
|
||||||
|
if (rc != 0)
|
||||||
|
return (rc);
|
||||||
|
}
|
||||||
|
|
||||||
nvlist_t *tgt = zpool_find_vdev(zhp, argv[i], &avail_spare,
|
nvlist_t *tgt = zpool_find_vdev(zhp, argv[i], &avail_spare,
|
||||||
&l2cache, NULL);
|
&l2cache, NULL);
|
||||||
if (tgt == NULL) {
|
if (tgt == NULL) {
|
||||||
@ -7000,12 +7183,15 @@ zpool_do_online(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* zpool offline [-ft] <pool> <device> ...
|
* zpool offline [-ft]|[--power] <pool> <device> ...
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* -f Force the device into a faulted state.
|
* -f Force the device into a faulted state.
|
||||||
*
|
*
|
||||||
* -t Only take the device off-line temporarily. The offline/faulted
|
* -t Only take the device off-line temporarily. The offline/faulted
|
||||||
* state will not be persistent across reboots.
|
* state will not be persistent across reboots.
|
||||||
|
*
|
||||||
|
* --power Power off the enclosure slot to the drive (if possible)
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
zpool_do_offline(int argc, char **argv)
|
zpool_do_offline(int argc, char **argv)
|
||||||
@ -7016,9 +7202,15 @@ zpool_do_offline(int argc, char **argv)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
boolean_t istmp = B_FALSE;
|
boolean_t istmp = B_FALSE;
|
||||||
boolean_t fault = B_FALSE;
|
boolean_t fault = B_FALSE;
|
||||||
|
boolean_t is_power_off = B_FALSE;
|
||||||
|
|
||||||
|
struct option long_options[] = {
|
||||||
|
{"power", no_argument, NULL, POWER_OPT},
|
||||||
|
{0, 0, 0, 0}
|
||||||
|
};
|
||||||
|
|
||||||
/* check options */
|
/* check options */
|
||||||
while ((c = getopt(argc, argv, "ft")) != -1) {
|
while ((c = getopt_long(argc, argv, "ft", long_options, NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'f':
|
case 'f':
|
||||||
fault = B_TRUE;
|
fault = B_TRUE;
|
||||||
@ -7026,6 +7218,9 @@ zpool_do_offline(int argc, char **argv)
|
|||||||
case 't':
|
case 't':
|
||||||
istmp = B_TRUE;
|
istmp = B_TRUE;
|
||||||
break;
|
break;
|
||||||
|
case POWER_OPT:
|
||||||
|
is_power_off = B_TRUE;
|
||||||
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
||||||
optopt);
|
optopt);
|
||||||
@ -7033,6 +7228,20 @@ zpool_do_offline(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_power_off && fault) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
gettext("-0 and -f cannot be used together\n"));
|
||||||
|
usage(B_FALSE);
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_power_off && istmp) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
gettext("-0 and -t cannot be used together\n"));
|
||||||
|
usage(B_FALSE);
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
|
||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
@ -7052,8 +7261,22 @@ zpool_do_offline(int argc, char **argv)
|
|||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
if (fault) {
|
uint64_t guid = zpool_vdev_path_to_guid(zhp, argv[i]);
|
||||||
uint64_t guid = zpool_vdev_path_to_guid(zhp, argv[i]);
|
if (is_power_off) {
|
||||||
|
/*
|
||||||
|
* Note: we have to power off first, then set REMOVED,
|
||||||
|
* or else zpool_vdev_set_removed_state() returns
|
||||||
|
* EAGAIN.
|
||||||
|
*/
|
||||||
|
ret = zpool_power_off(zhp, argv[i]);
|
||||||
|
if (ret != 0) {
|
||||||
|
(void) fprintf(stderr, "%s %s %d\n",
|
||||||
|
gettext("unable to power off slot for"),
|
||||||
|
argv[i], ret);
|
||||||
|
}
|
||||||
|
zpool_vdev_set_removed_state(zhp, guid, VDEV_AUX_NONE);
|
||||||
|
|
||||||
|
} else if (fault) {
|
||||||
vdev_aux_t aux;
|
vdev_aux_t aux;
|
||||||
if (istmp == B_FALSE) {
|
if (istmp == B_FALSE) {
|
||||||
/* Force the fault to persist across imports */
|
/* Force the fault to persist across imports */
|
||||||
@ -7076,7 +7299,7 @@ zpool_do_offline(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* zpool clear <pool> [device]
|
* zpool clear [-nF]|[--power] <pool> [device]
|
||||||
*
|
*
|
||||||
* Clear all errors associated with a pool or a particular device.
|
* Clear all errors associated with a pool or a particular device.
|
||||||
*/
|
*/
|
||||||
@ -7088,13 +7311,20 @@ zpool_do_clear(int argc, char **argv)
|
|||||||
boolean_t dryrun = B_FALSE;
|
boolean_t dryrun = B_FALSE;
|
||||||
boolean_t do_rewind = B_FALSE;
|
boolean_t do_rewind = B_FALSE;
|
||||||
boolean_t xtreme_rewind = B_FALSE;
|
boolean_t xtreme_rewind = B_FALSE;
|
||||||
|
boolean_t is_power_on = B_FALSE;
|
||||||
uint32_t rewind_policy = ZPOOL_NO_REWIND;
|
uint32_t rewind_policy = ZPOOL_NO_REWIND;
|
||||||
nvlist_t *policy = NULL;
|
nvlist_t *policy = NULL;
|
||||||
zpool_handle_t *zhp;
|
zpool_handle_t *zhp;
|
||||||
char *pool, *device;
|
char *pool, *device;
|
||||||
|
|
||||||
|
struct option long_options[] = {
|
||||||
|
{"power", no_argument, NULL, POWER_OPT},
|
||||||
|
{0, 0, 0, 0}
|
||||||
|
};
|
||||||
|
|
||||||
/* check options */
|
/* check options */
|
||||||
while ((c = getopt(argc, argv, "FnX")) != -1) {
|
while ((c = getopt_long(argc, argv, "FnX", long_options,
|
||||||
|
NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'F':
|
case 'F':
|
||||||
do_rewind = B_TRUE;
|
do_rewind = B_TRUE;
|
||||||
@ -7105,6 +7335,9 @@ zpool_do_clear(int argc, char **argv)
|
|||||||
case 'X':
|
case 'X':
|
||||||
xtreme_rewind = B_TRUE;
|
xtreme_rewind = B_TRUE;
|
||||||
break;
|
break;
|
||||||
|
case POWER_OPT:
|
||||||
|
is_power_on = B_TRUE;
|
||||||
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
||||||
optopt);
|
optopt);
|
||||||
@ -7112,6 +7345,9 @@ zpool_do_clear(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (libzfs_envvar_is_set("ZPOOL_AUTO_POWER_ON_SLOT"))
|
||||||
|
is_power_on = B_TRUE;
|
||||||
|
|
||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
@ -7152,6 +7388,14 @@ zpool_do_clear(int argc, char **argv)
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_power_on) {
|
||||||
|
if (device == NULL) {
|
||||||
|
zpool_power_on_pool_and_wait_for_devices(zhp);
|
||||||
|
} else {
|
||||||
|
zpool_power_on_and_disk_wait(zhp, device);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (zpool_clear(zhp, device, policy) != 0)
|
if (zpool_clear(zhp, device, policy) != 0)
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
|
||||||
@ -8768,6 +9012,10 @@ status_callback(zpool_handle_t *zhp, void *data)
|
|||||||
printf_color(ANSI_BOLD, " %5s", gettext("SLOW"));
|
printf_color(ANSI_BOLD, " %5s", gettext("SLOW"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cbp->cb_print_power) {
|
||||||
|
printf_color(ANSI_BOLD, " %5s", gettext("POWER"));
|
||||||
|
}
|
||||||
|
|
||||||
if (cbp->vcdl != NULL)
|
if (cbp->vcdl != NULL)
|
||||||
print_cmd_columns(cbp->vcdl, 0);
|
print_cmd_columns(cbp->vcdl, 0);
|
||||||
|
|
||||||
@ -8795,9 +9043,11 @@ status_callback(zpool_handle_t *zhp, void *data)
|
|||||||
(void) printf(gettext(
|
(void) printf(gettext(
|
||||||
"errors: No known data errors\n"));
|
"errors: No known data errors\n"));
|
||||||
} else if (!cbp->cb_verbose) {
|
} else if (!cbp->cb_verbose) {
|
||||||
|
color_start(ANSI_RED);
|
||||||
(void) printf(gettext("errors: %llu data "
|
(void) printf(gettext("errors: %llu data "
|
||||||
"errors, use '-v' for a list\n"),
|
"errors, use '-v' for a list\n"),
|
||||||
(u_longlong_t)nerr);
|
(u_longlong_t)nerr);
|
||||||
|
color_end();
|
||||||
} else {
|
} else {
|
||||||
print_error_log(zhp);
|
print_error_log(zhp);
|
||||||
}
|
}
|
||||||
@ -8814,10 +9064,11 @@ status_callback(zpool_handle_t *zhp, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* zpool status [-c [script1,script2,...]] [-igLpPstvx] [-T d|u] [pool] ...
|
* zpool status [-c [script1,script2,...]] [-igLpPstvx] [--power] [-T d|u] ...
|
||||||
* [interval [count]]
|
* [pool] [interval [count]]
|
||||||
*
|
*
|
||||||
* -c CMD For each vdev, run command CMD
|
* -c CMD For each vdev, run command CMD
|
||||||
|
* -e Display only unhealthy vdevs
|
||||||
* -i Display vdev initialization status.
|
* -i Display vdev initialization status.
|
||||||
* -g Display guid for individual vdev name.
|
* -g Display guid for individual vdev name.
|
||||||
* -L Follow links when resolving vdev path name.
|
* -L Follow links when resolving vdev path name.
|
||||||
@ -8829,6 +9080,7 @@ status_callback(zpool_handle_t *zhp, void *data)
|
|||||||
* -D Display dedup status (undocumented)
|
* -D Display dedup status (undocumented)
|
||||||
* -t Display vdev TRIM status.
|
* -t Display vdev TRIM status.
|
||||||
* -T Display a timestamp in date(1) or Unix format
|
* -T Display a timestamp in date(1) or Unix format
|
||||||
|
* --power Display vdev enclosure slot power status
|
||||||
*
|
*
|
||||||
* Describes the health status of all pools or some subset.
|
* Describes the health status of all pools or some subset.
|
||||||
*/
|
*/
|
||||||
@ -8842,8 +9094,14 @@ zpool_do_status(int argc, char **argv)
|
|||||||
status_cbdata_t cb = { 0 };
|
status_cbdata_t cb = { 0 };
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
|
|
||||||
|
struct option long_options[] = {
|
||||||
|
{"power", no_argument, NULL, POWER_OPT},
|
||||||
|
{0, 0, 0, 0}
|
||||||
|
};
|
||||||
|
|
||||||
/* check options */
|
/* check options */
|
||||||
while ((c = getopt(argc, argv, "c:igLpPsvxDtT:")) != -1) {
|
while ((c = getopt_long(argc, argv, "c:eigLpPsvxDtT:", long_options,
|
||||||
|
NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'c':
|
case 'c':
|
||||||
if (cmd != NULL) {
|
if (cmd != NULL) {
|
||||||
@ -8869,6 +9127,9 @@ zpool_do_status(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
cmd = optarg;
|
cmd = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'e':
|
||||||
|
cb.cb_print_unhealthy = B_TRUE;
|
||||||
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
cb.cb_print_vdev_init = B_TRUE;
|
cb.cb_print_vdev_init = B_TRUE;
|
||||||
break;
|
break;
|
||||||
@ -8902,6 +9163,9 @@ zpool_do_status(int argc, char **argv)
|
|||||||
case 'T':
|
case 'T':
|
||||||
get_timestamp_arg(*optarg);
|
get_timestamp_arg(*optarg);
|
||||||
break;
|
break;
|
||||||
|
case POWER_OPT:
|
||||||
|
cb.cb_print_power = B_TRUE;
|
||||||
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
if (optopt == 'c') {
|
if (optopt == 'c') {
|
||||||
print_zpool_script_list("status");
|
print_zpool_script_list("status");
|
||||||
@ -10719,6 +10983,9 @@ print_wait_status_row(wait_data_t *wd, zpool_handle_t *zhp, int row)
|
|||||||
col_widths[i] = MAX(strlen(headers[i]), 6) + 2;
|
col_widths[i] = MAX(strlen(headers[i]), 6) + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (timestamp_fmt != NODATE)
|
||||||
|
print_timestamp(timestamp_fmt);
|
||||||
|
|
||||||
/* Print header if appropriate */
|
/* Print header if appropriate */
|
||||||
int term_height = terminal_height();
|
int term_height = terminal_height();
|
||||||
boolean_t reprint_header = (!wd->wd_headers_once && term_height > 0 &&
|
boolean_t reprint_header = (!wd->wd_headers_once && term_height > 0 &&
|
||||||
@ -10786,9 +11053,6 @@ print_wait_status_row(wait_data_t *wd, zpool_handle_t *zhp, int row)
|
|||||||
if (vdev_any_spare_replacing(nvroot))
|
if (vdev_any_spare_replacing(nvroot))
|
||||||
bytes_rem[ZPOOL_WAIT_REPLACE] = bytes_rem[ZPOOL_WAIT_RESILVER];
|
bytes_rem[ZPOOL_WAIT_REPLACE] = bytes_rem[ZPOOL_WAIT_RESILVER];
|
||||||
|
|
||||||
if (timestamp_fmt != NODATE)
|
|
||||||
print_timestamp(timestamp_fmt);
|
|
||||||
|
|
||||||
for (i = 0; i < ZPOOL_WAIT_NUM_ACTIVITIES; i++) {
|
for (i = 0; i < ZPOOL_WAIT_NUM_ACTIVITIES; i++) {
|
||||||
char buf[64];
|
char buf[64];
|
||||||
if (!wd->wd_enabled[i])
|
if (!wd->wd_enabled[i])
|
||||||
@ -11039,6 +11303,25 @@ zpool_do_version(int argc, char **argv)
|
|||||||
return (zfs_version_print() != 0);
|
return (zfs_version_print() != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Display documentation */
|
||||||
|
static int
|
||||||
|
zpool_do_help(int argc, char **argv)
|
||||||
|
{
|
||||||
|
char page[MAXNAMELEN];
|
||||||
|
if (argc < 3 || strcmp(argv[2], "zpool") == 0)
|
||||||
|
strcpy(page, "zpool");
|
||||||
|
else if (strcmp(argv[2], "concepts") == 0 ||
|
||||||
|
strcmp(argv[2], "props") == 0)
|
||||||
|
snprintf(page, sizeof (page), "zpool%s", argv[2]);
|
||||||
|
else
|
||||||
|
snprintf(page, sizeof (page), "zpool-%s", argv[2]);
|
||||||
|
|
||||||
|
execlp("man", "man", page, NULL);
|
||||||
|
|
||||||
|
fprintf(stderr, "couldn't run man program: %s", strerror(errno));
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do zpool_load_compat() and print error message on failure
|
* Do zpool_load_compat() and print error message on failure
|
||||||
*/
|
*/
|
||||||
@ -11106,6 +11389,12 @@ main(int argc, char **argv)
|
|||||||
if ((strcmp(cmdname, "-V") == 0) || (strcmp(cmdname, "--version") == 0))
|
if ((strcmp(cmdname, "-V") == 0) || (strcmp(cmdname, "--version") == 0))
|
||||||
return (zpool_do_version(argc, argv));
|
return (zpool_do_version(argc, argv));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Special case 'help'
|
||||||
|
*/
|
||||||
|
if (strcmp(cmdname, "help") == 0)
|
||||||
|
return (zpool_do_help(argc, argv));
|
||||||
|
|
||||||
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));
|
||||||
return (1);
|
return (1);
|
||||||
|
@ -126,6 +126,10 @@ vdev_cmd_data_list_t *all_pools_for_each_vdev_run(int argc, char **argv,
|
|||||||
|
|
||||||
void free_vdev_cmd_data_list(vdev_cmd_data_list_t *vcdl);
|
void free_vdev_cmd_data_list(vdev_cmd_data_list_t *vcdl);
|
||||||
|
|
||||||
|
void free_vdev_cmd_data(vdev_cmd_data_t *data);
|
||||||
|
|
||||||
|
int vdev_run_cmd_simple(char *path, char *cmd);
|
||||||
|
|
||||||
int check_device(const char *path, boolean_t force,
|
int check_device(const char *path, boolean_t force,
|
||||||
boolean_t isspare, boolean_t iswholedisk);
|
boolean_t isspare, boolean_t iswholedisk);
|
||||||
boolean_t check_sector_size_database(char *path, int *sector_size);
|
boolean_t check_sector_size_database(char *path, int *sector_size);
|
||||||
@ -134,6 +138,9 @@ int check_file(const char *file, boolean_t force, boolean_t isspare);
|
|||||||
void after_zpool_upgrade(zpool_handle_t *zhp);
|
void after_zpool_upgrade(zpool_handle_t *zhp);
|
||||||
int check_file_generic(const char *file, boolean_t force, boolean_t isspare);
|
int check_file_generic(const char *file, boolean_t force, boolean_t isspare);
|
||||||
|
|
||||||
|
int zpool_power(zpool_handle_t *zhp, char *vdev, boolean_t turn_on);
|
||||||
|
int zpool_power_current_state(zpool_handle_t *zhp, char *vdev);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -372,6 +372,10 @@ make_leaf_vdev(nvlist_t *props, const char *arg, boolean_t is_primary)
|
|||||||
verify(nvlist_add_string(vdev, ZPOOL_CONFIG_PATH, path) == 0);
|
verify(nvlist_add_string(vdev, ZPOOL_CONFIG_PATH, path) == 0);
|
||||||
verify(nvlist_add_string(vdev, ZPOOL_CONFIG_TYPE, type) == 0);
|
verify(nvlist_add_string(vdev, ZPOOL_CONFIG_TYPE, type) == 0);
|
||||||
|
|
||||||
|
/* Lookup and add the enclosure sysfs path (if exists) */
|
||||||
|
update_vdev_config_dev_sysfs_path(vdev, path,
|
||||||
|
ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH);
|
||||||
|
|
||||||
if (strcmp(type, VDEV_TYPE_DISK) == 0)
|
if (strcmp(type, VDEV_TYPE_DISK) == 0)
|
||||||
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);
|
||||||
@ -936,6 +940,15 @@ zero_label(const char *path)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
lines_to_stderr(char *lines[], int lines_cnt)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < lines_cnt; i++) {
|
||||||
|
fprintf(stderr, "%s\n", lines[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Go through and find any whole disks in the vdev specification, labelling them
|
* Go through and find any whole disks in the vdev specification, labelling them
|
||||||
* as appropriate. When constructing the vdev spec, we were unable to open this
|
* as appropriate. When constructing the vdev spec, we were unable to open this
|
||||||
@ -947,7 +960,7 @@ zero_label(const char *path)
|
|||||||
* need to get the devid after we label the disk.
|
* need to get the devid after we label the disk.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
make_disks(zpool_handle_t *zhp, nvlist_t *nv, boolean_t replacing)
|
||||||
{
|
{
|
||||||
nvlist_t **child;
|
nvlist_t **child;
|
||||||
uint_t c, children;
|
uint_t c, children;
|
||||||
@ -1032,6 +1045,8 @@ make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
|||||||
*/
|
*/
|
||||||
if (!is_exclusive && !is_spare(NULL, udevpath)) {
|
if (!is_exclusive && !is_spare(NULL, udevpath)) {
|
||||||
char *devnode = strrchr(devpath, '/') + 1;
|
char *devnode = strrchr(devpath, '/') + 1;
|
||||||
|
char **lines = NULL;
|
||||||
|
int lines_cnt = 0;
|
||||||
|
|
||||||
ret = strncmp(udevpath, UDISK_ROOT, strlen(UDISK_ROOT));
|
ret = strncmp(udevpath, UDISK_ROOT, strlen(UDISK_ROOT));
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
@ -1043,9 +1058,27 @@ make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
|||||||
/*
|
/*
|
||||||
* When labeling a pool the raw device node name
|
* When labeling a pool the raw device node name
|
||||||
* is provided as it appears under /dev/.
|
* is provided as it appears under /dev/.
|
||||||
|
*
|
||||||
|
* Note that 'zhp' will be NULL when we're creating a
|
||||||
|
* pool.
|
||||||
*/
|
*/
|
||||||
if (zpool_label_disk(g_zfs, zhp, devnode) == -1)
|
if (zpool_prepare_and_label_disk(g_zfs, zhp, devnode,
|
||||||
|
nv, zhp == NULL ? "create" :
|
||||||
|
replacing ? "replace" : "add", &lines,
|
||||||
|
&lines_cnt) != 0) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
gettext(
|
||||||
|
"Error preparing/labeling disk.\n"));
|
||||||
|
if (lines_cnt > 0) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
gettext("zfs_prepare_disk output:\n"));
|
||||||
|
lines_to_stderr(lines, lines_cnt);
|
||||||
|
}
|
||||||
|
|
||||||
|
libzfs_free_str_array(lines, lines_cnt);
|
||||||
return (-1);
|
return (-1);
|
||||||
|
}
|
||||||
|
libzfs_free_str_array(lines, lines_cnt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wait for udev to signal the device is available
|
* Wait for udev to signal the device is available
|
||||||
@ -1082,19 +1115,19 @@ make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (c = 0; c < children; c++)
|
for (c = 0; c < children; c++)
|
||||||
if ((ret = make_disks(zhp, child[c])) != 0)
|
if ((ret = make_disks(zhp, child[c], replacing)) != 0)
|
||||||
return (ret);
|
return (ret);
|
||||||
|
|
||||||
if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_SPARES,
|
if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_SPARES,
|
||||||
&child, &children) == 0)
|
&child, &children) == 0)
|
||||||
for (c = 0; c < children; c++)
|
for (c = 0; c < children; c++)
|
||||||
if ((ret = make_disks(zhp, child[c])) != 0)
|
if ((ret = make_disks(zhp, child[c], replacing)) != 0)
|
||||||
return (ret);
|
return (ret);
|
||||||
|
|
||||||
if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_L2CACHE,
|
if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_L2CACHE,
|
||||||
&child, &children) == 0)
|
&child, &children) == 0)
|
||||||
for (c = 0; c < children; c++)
|
for (c = 0; c < children; c++)
|
||||||
if ((ret = make_disks(zhp, child[c])) != 0)
|
if ((ret = make_disks(zhp, child[c], replacing)) != 0)
|
||||||
return (ret);
|
return (ret);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
@ -1752,7 +1785,7 @@ split_mirror_vdev(zpool_handle_t *zhp, char *newname, nvlist_t *props,
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!flags.dryrun && make_disks(zhp, newroot) != 0) {
|
if (!flags.dryrun && make_disks(zhp, newroot, B_FALSE) != 0) {
|
||||||
nvlist_free(newroot);
|
nvlist_free(newroot);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
@ -1873,7 +1906,7 @@ make_root_vdev(zpool_handle_t *zhp, nvlist_t *props, int force, int check_rep,
|
|||||||
/*
|
/*
|
||||||
* Run through the vdev specification and label any whole disks found.
|
* Run through the vdev specification and label any whole disks found.
|
||||||
*/
|
*/
|
||||||
if (!dryrun && make_disks(zhp, newroot) != 0) {
|
if (!dryrun && make_disks(zhp, newroot, replacing) != 0) {
|
||||||
nvlist_free(newroot);
|
nvlist_free(newroot);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
28
cmd/ztest.c
28
cmd/ztest.c
@ -2412,7 +2412,6 @@ ztest_get_data(void *arg, uint64_t arg2, lr_write_t *lr, char *buf,
|
|||||||
int error;
|
int error;
|
||||||
|
|
||||||
ASSERT3P(lwb, !=, NULL);
|
ASSERT3P(lwb, !=, NULL);
|
||||||
ASSERT3P(zio, !=, NULL);
|
|
||||||
ASSERT3U(size, !=, 0);
|
ASSERT3U(size, !=, 0);
|
||||||
|
|
||||||
ztest_object_lock(zd, object, RL_READER);
|
ztest_object_lock(zd, object, RL_READER);
|
||||||
@ -2446,6 +2445,7 @@ ztest_get_data(void *arg, uint64_t arg2, lr_write_t *lr, char *buf,
|
|||||||
DMU_READ_NO_PREFETCH);
|
DMU_READ_NO_PREFETCH);
|
||||||
ASSERT0(error);
|
ASSERT0(error);
|
||||||
} else {
|
} else {
|
||||||
|
ASSERT3P(zio, !=, NULL);
|
||||||
size = doi.doi_data_block_size;
|
size = doi.doi_data_block_size;
|
||||||
if (ISP2(size)) {
|
if (ISP2(size)) {
|
||||||
offset = P2ALIGN(offset, size);
|
offset = P2ALIGN(offset, size);
|
||||||
@ -2457,8 +2457,7 @@ ztest_get_data(void *arg, uint64_t arg2, lr_write_t *lr, char *buf,
|
|||||||
zgd->zgd_lr = (struct zfs_locked_range *)ztest_range_lock(zd,
|
zgd->zgd_lr = (struct zfs_locked_range *)ztest_range_lock(zd,
|
||||||
object, offset, size, RL_READER);
|
object, offset, size, RL_READER);
|
||||||
|
|
||||||
error = dmu_buf_hold(os, object, offset, zgd, &db,
|
error = dmu_buf_hold_noread(os, object, offset, zgd, &db);
|
||||||
DMU_READ_NO_PREFETCH);
|
|
||||||
|
|
||||||
if (error == 0) {
|
if (error == 0) {
|
||||||
blkptr_t *bp = &lr->lr_blkptr;
|
blkptr_t *bp = &lr->lr_blkptr;
|
||||||
@ -3767,7 +3766,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;
|
||||||
|
|
||||||
@ -6379,6 +6378,7 @@ ztest_reguid(ztest_ds_t *zd, uint64_t id)
|
|||||||
spa_t *spa = ztest_spa;
|
spa_t *spa = ztest_spa;
|
||||||
uint64_t orig, load;
|
uint64_t orig, load;
|
||||||
int error;
|
int error;
|
||||||
|
ztest_shared_t *zs = ztest_shared;
|
||||||
|
|
||||||
if (ztest_opts.zo_mmp_test)
|
if (ztest_opts.zo_mmp_test)
|
||||||
return;
|
return;
|
||||||
@ -6388,6 +6388,7 @@ ztest_reguid(ztest_ds_t *zd, uint64_t id)
|
|||||||
|
|
||||||
(void) pthread_rwlock_wrlock(&ztest_name_lock);
|
(void) pthread_rwlock_wrlock(&ztest_name_lock);
|
||||||
error = spa_change_guid(spa);
|
error = spa_change_guid(spa);
|
||||||
|
zs->zs_guid = spa_guid(spa);
|
||||||
(void) pthread_rwlock_unlock(&ztest_name_lock);
|
(void) pthread_rwlock_unlock(&ztest_name_lock);
|
||||||
|
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
@ -6917,7 +6918,7 @@ ztest_trim(ztest_ds_t *zd, uint64_t id)
|
|||||||
* Verify pool integrity by running zdb.
|
* Verify pool integrity by running zdb.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
ztest_run_zdb(const char *pool)
|
ztest_run_zdb(uint64_t guid)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
char *bin;
|
char *bin;
|
||||||
@ -6941,13 +6942,13 @@ ztest_run_zdb(const char *pool)
|
|||||||
free(set_gvars_args);
|
free(set_gvars_args);
|
||||||
|
|
||||||
size_t would = snprintf(zdb, len,
|
size_t would = snprintf(zdb, len,
|
||||||
"%s -bcc%s%s -G -d -Y -e -y %s -p %s %s",
|
"%s -bcc%s%s -G -d -Y -e -y %s -p %s %"PRIu64,
|
||||||
bin,
|
bin,
|
||||||
ztest_opts.zo_verbose >= 3 ? "s" : "",
|
ztest_opts.zo_verbose >= 3 ? "s" : "",
|
||||||
ztest_opts.zo_verbose >= 4 ? "v" : "",
|
ztest_opts.zo_verbose >= 4 ? "v" : "",
|
||||||
set_gvars_args_joined,
|
set_gvars_args_joined,
|
||||||
ztest_opts.zo_dir,
|
ztest_opts.zo_dir,
|
||||||
pool);
|
guid);
|
||||||
ASSERT3U(would, <, len);
|
ASSERT3U(would, <, len);
|
||||||
|
|
||||||
umem_free(set_gvars_args_joined, strlen(set_gvars_args_joined) + 1);
|
umem_free(set_gvars_args_joined, strlen(set_gvars_args_joined) + 1);
|
||||||
@ -7525,14 +7526,15 @@ ztest_import(ztest_shared_t *zs)
|
|||||||
VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG));
|
VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG));
|
||||||
zs->zs_metaslab_sz =
|
zs->zs_metaslab_sz =
|
||||||
1ULL << spa->spa_root_vdev->vdev_child[0]->vdev_ms_shift;
|
1ULL << spa->spa_root_vdev->vdev_child[0]->vdev_ms_shift;
|
||||||
|
zs->zs_guid = spa_guid(spa);
|
||||||
spa_close(spa, FTAG);
|
spa_close(spa, FTAG);
|
||||||
|
|
||||||
kernel_fini();
|
kernel_fini();
|
||||||
|
|
||||||
if (!ztest_opts.zo_mmp_test) {
|
if (!ztest_opts.zo_mmp_test) {
|
||||||
ztest_run_zdb(ztest_opts.zo_pool);
|
ztest_run_zdb(zs->zs_guid);
|
||||||
ztest_freeze();
|
ztest_freeze();
|
||||||
ztest_run_zdb(ztest_opts.zo_pool);
|
ztest_run_zdb(zs->zs_guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) pthread_rwlock_destroy(&ztest_name_lock);
|
(void) pthread_rwlock_destroy(&ztest_name_lock);
|
||||||
@ -7603,7 +7605,6 @@ ztest_run(ztest_shared_t *zs)
|
|||||||
dsl_pool_config_enter(dmu_objset_pool(os), FTAG);
|
dsl_pool_config_enter(dmu_objset_pool(os), FTAG);
|
||||||
dmu_objset_fast_stat(os, &dds);
|
dmu_objset_fast_stat(os, &dds);
|
||||||
dsl_pool_config_exit(dmu_objset_pool(os), FTAG);
|
dsl_pool_config_exit(dmu_objset_pool(os), FTAG);
|
||||||
zs->zs_guid = dds.dds_guid;
|
|
||||||
dmu_objset_disown(os, B_TRUE, FTAG);
|
dmu_objset_disown(os, B_TRUE, FTAG);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -7874,14 +7875,15 @@ ztest_init(ztest_shared_t *zs)
|
|||||||
VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG));
|
VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG));
|
||||||
zs->zs_metaslab_sz =
|
zs->zs_metaslab_sz =
|
||||||
1ULL << spa->spa_root_vdev->vdev_child[0]->vdev_ms_shift;
|
1ULL << spa->spa_root_vdev->vdev_child[0]->vdev_ms_shift;
|
||||||
|
zs->zs_guid = spa_guid(spa);
|
||||||
spa_close(spa, FTAG);
|
spa_close(spa, FTAG);
|
||||||
|
|
||||||
kernel_fini();
|
kernel_fini();
|
||||||
|
|
||||||
if (!ztest_opts.zo_mmp_test) {
|
if (!ztest_opts.zo_mmp_test) {
|
||||||
ztest_run_zdb(ztest_opts.zo_pool);
|
ztest_run_zdb(zs->zs_guid);
|
||||||
ztest_freeze();
|
ztest_freeze();
|
||||||
ztest_run_zdb(ztest_opts.zo_pool);
|
ztest_run_zdb(zs->zs_guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) pthread_rwlock_destroy(&ztest_name_lock);
|
(void) pthread_rwlock_destroy(&ztest_name_lock);
|
||||||
@ -8304,7 +8306,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ztest_opts.zo_mmp_test)
|
if (!ztest_opts.zo_mmp_test)
|
||||||
ztest_run_zdb(ztest_opts.zo_pool);
|
ztest_run_zdb(zs->zs_guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ztest_opts.zo_verbose >= 1) {
|
if (ztest_opts.zo_verbose >= 1) {
|
||||||
|
@ -33,6 +33,7 @@ AM_CPPFLAGS += -D_REENTRANT
|
|||||||
AM_CPPFLAGS += -D_FILE_OFFSET_BITS=64
|
AM_CPPFLAGS += -D_FILE_OFFSET_BITS=64
|
||||||
AM_CPPFLAGS += -D_LARGEFILE64_SOURCE
|
AM_CPPFLAGS += -D_LARGEFILE64_SOURCE
|
||||||
AM_CPPFLAGS += -DLIBEXECDIR=\"$(libexecdir)\"
|
AM_CPPFLAGS += -DLIBEXECDIR=\"$(libexecdir)\"
|
||||||
|
AM_CPPFLAGS += -DZFSEXECDIR=\"$(zfsexecdir)\"
|
||||||
AM_CPPFLAGS += -DRUNSTATEDIR=\"$(runstatedir)\"
|
AM_CPPFLAGS += -DRUNSTATEDIR=\"$(runstatedir)\"
|
||||||
AM_CPPFLAGS += -DSBINDIR=\"$(sbindir)\"
|
AM_CPPFLAGS += -DSBINDIR=\"$(sbindir)\"
|
||||||
AM_CPPFLAGS += -DSYSCONFDIR=\"$(sysconfdir)\"
|
AM_CPPFLAGS += -DSYSCONFDIR=\"$(sysconfdir)\"
|
||||||
@ -41,21 +42,6 @@ AM_CPPFLAGS += $(DEBUG_CPPFLAGS)
|
|||||||
AM_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
|
AM_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
|
||||||
AM_CPPFLAGS += -DTEXT_DOMAIN=\"zfs-@ac_system_l@-user\"
|
AM_CPPFLAGS += -DTEXT_DOMAIN=\"zfs-@ac_system_l@-user\"
|
||||||
|
|
||||||
AM_CPPFLAGS_NOCHECK = -D"strtok(...)=strtok(__VA_ARGS__) __attribute__((deprecated(\"Use strtok_r(3) instead!\")))"
|
|
||||||
AM_CPPFLAGS_NOCHECK += -D"__xpg_basename(...)=__xpg_basename(__VA_ARGS__) __attribute__((deprecated(\"basename(3) is underspecified. Use zfs_basename() instead!\")))"
|
|
||||||
AM_CPPFLAGS_NOCHECK += -D"basename(...)=basename(__VA_ARGS__) __attribute__((deprecated(\"basename(3) is underspecified. Use zfs_basename() instead!\")))"
|
|
||||||
AM_CPPFLAGS_NOCHECK += -D"dirname(...)=dirname(__VA_ARGS__) __attribute__((deprecated(\"dirname(3) is underspecified. Use zfs_dirnamelen() instead!\")))"
|
|
||||||
AM_CPPFLAGS_NOCHECK += -D"bcopy(...)=__attribute__((deprecated(\"bcopy(3) is deprecated. Use memcpy(3)/memmove(3) instead!\"))) bcopy(__VA_ARGS__)"
|
|
||||||
AM_CPPFLAGS_NOCHECK += -D"bcmp(...)=__attribute__((deprecated(\"bcmp(3) is deprecated. Use memcmp(3) instead!\"))) bcmp(__VA_ARGS__)"
|
|
||||||
AM_CPPFLAGS_NOCHECK += -D"bzero(...)=__attribute__((deprecated(\"bzero(3) is deprecated. Use memset(3) instead!\"))) bzero(__VA_ARGS__)"
|
|
||||||
AM_CPPFLAGS_NOCHECK += -D"asctime(...)=__attribute__((deprecated(\"Use strftime(3) instead!\"))) asctime(__VA_ARGS__)"
|
|
||||||
AM_CPPFLAGS_NOCHECK += -D"asctime_r(...)=__attribute__((deprecated(\"Use strftime(3) instead!\"))) asctime_r(__VA_ARGS__)"
|
|
||||||
AM_CPPFLAGS_NOCHECK += -D"gmtime(...)=__attribute__((deprecated(\"gmtime(3) isn't thread-safe. Use gmtime_r(3) instead!\"))) gmtime(__VA_ARGS__)"
|
|
||||||
AM_CPPFLAGS_NOCHECK += -D"localtime(...)=__attribute__((deprecated(\"localtime(3) isn't thread-safe. Use localtime_r(3) instead!\"))) localtime(__VA_ARGS__)"
|
|
||||||
AM_CPPFLAGS_NOCHECK += -D"strncpy(...)=__attribute__((deprecated(\"strncpy(3) is deprecated. Use strlcpy(3) instead!\"))) strncpy(__VA_ARGS__)"
|
|
||||||
|
|
||||||
AM_CPPFLAGS += $(AM_CPPFLAGS_NOCHECK)
|
|
||||||
|
|
||||||
if ASAN_ENABLED
|
if ASAN_ENABLED
|
||||||
AM_CPPFLAGS += -DZFS_ASAN_ENABLED
|
AM_CPPFLAGS += -DZFS_ASAN_ENABLED
|
||||||
endif
|
endif
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
# Not following: a was not specified as input (see shellcheck -x). [SC1091]
|
# Not following: a was not specified as input (see shellcheck -x). [SC1091]
|
||||||
# Prefer putting braces around variable references even when not strictly required. [SC2250]
|
# Prefer putting braces around variable references even when not strictly required. [SC2250]
|
||||||
# Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore). [SC2312]
|
# Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore). [SC2312]
|
||||||
|
# Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317]
|
||||||
# In POSIX sh, 'local' is undefined. [SC2039] # older ShellCheck versions
|
# In POSIX sh, 'local' is undefined. [SC2039] # older ShellCheck versions
|
||||||
# In POSIX sh, 'local' is undefined. [SC3043] # newer ShellCheck versions
|
# In POSIX sh, 'local' is undefined. [SC3043] # newer ShellCheck versions
|
||||||
|
|
||||||
@ -18,7 +19,7 @@ PHONY += shellcheck
|
|||||||
_STGT = $(subst ^,/,$(subst shellcheck-here-,,$@))
|
_STGT = $(subst ^,/,$(subst shellcheck-here-,,$@))
|
||||||
shellcheck-here-%:
|
shellcheck-here-%:
|
||||||
if HAVE_SHELLCHECK
|
if HAVE_SHELLCHECK
|
||||||
shellcheck --format=gcc --enable=all --exclude=SC1090,SC1091,SC2039,SC2250,SC2312,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
|
||||||
|
@ -172,7 +172,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_get_acl], [
|
ZFS_LINUX_TEST_SRC([inode_operations_get_acl], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
struct posix_acl *get_acl_fn(struct inode *inode, int type)
|
static struct posix_acl *get_acl_fn(struct inode *inode, int type)
|
||||||
{ return NULL; }
|
{ return NULL; }
|
||||||
|
|
||||||
static const struct inode_operations
|
static const struct inode_operations
|
||||||
@ -184,7 +184,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_get_acl_rcu], [
|
ZFS_LINUX_TEST_SRC([inode_operations_get_acl_rcu], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
struct posix_acl *get_acl_fn(struct inode *inode, int type,
|
static struct posix_acl *get_acl_fn(struct inode *inode, int type,
|
||||||
bool rcu) { return NULL; }
|
bool rcu) { return NULL; }
|
||||||
|
|
||||||
static const struct inode_operations
|
static const struct inode_operations
|
||||||
@ -196,7 +196,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_get_inode_acl], [
|
ZFS_LINUX_TEST_SRC([inode_operations_get_inode_acl], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
struct posix_acl *get_inode_acl_fn(struct inode *inode, int type,
|
static struct posix_acl *get_inode_acl_fn(struct inode *inode, int type,
|
||||||
bool rcu) { return NULL; }
|
bool rcu) { return NULL; }
|
||||||
|
|
||||||
static const struct inode_operations
|
static const struct inode_operations
|
||||||
@ -243,7 +243,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_mnt_idmap_dentry], [
|
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_mnt_idmap_dentry], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int set_acl_fn(struct mnt_idmap *idmap,
|
static int set_acl_fn(struct mnt_idmap *idmap,
|
||||||
struct dentry *dent, struct posix_acl *acl,
|
struct dentry *dent, struct posix_acl *acl,
|
||||||
int type) { return 0; }
|
int type) { return 0; }
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns_dentry], [
|
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns_dentry], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int set_acl_fn(struct user_namespace *userns,
|
static int set_acl_fn(struct user_namespace *userns,
|
||||||
struct dentry *dent, struct posix_acl *acl,
|
struct dentry *dent, struct posix_acl *acl,
|
||||||
int type) { return 0; }
|
int type) { return 0; }
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns], [
|
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int set_acl_fn(struct user_namespace *userns,
|
static int set_acl_fn(struct user_namespace *userns,
|
||||||
struct inode *inode, struct posix_acl *acl,
|
struct inode *inode, struct posix_acl *acl,
|
||||||
int type) { return 0; }
|
int type) { return 0; }
|
||||||
|
|
||||||
@ -279,7 +279,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_set_acl], [
|
ZFS_LINUX_TEST_SRC([inode_operations_set_acl], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int set_acl_fn(struct inode *inode, struct posix_acl *acl,
|
static int set_acl_fn(struct inode *inode, struct posix_acl *acl,
|
||||||
int type) { return 0; }
|
int type) { return 0; }
|
||||||
|
|
||||||
static const struct inode_operations
|
static const struct inode_operations
|
||||||
|
@ -8,7 +8,7 @@ dnl #
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_AUTOMOUNT], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_AUTOMOUNT], [
|
||||||
ZFS_LINUX_TEST_SRC([dentry_operations_d_automount], [
|
ZFS_LINUX_TEST_SRC([dentry_operations_d_automount], [
|
||||||
#include <linux/dcache.h>
|
#include <linux/dcache.h>
|
||||||
struct vfsmount *d_automount(struct path *p) { return NULL; }
|
static struct vfsmount *d_automount(struct path *p) { return NULL; }
|
||||||
struct dentry_operations dops __attribute__ ((unused)) = {
|
struct dentry_operations dops __attribute__ ((unused)) = {
|
||||||
.d_automount = d_automount,
|
.d_automount = d_automount,
|
||||||
};
|
};
|
||||||
|
@ -247,7 +247,7 @@ dnl #
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_END_IO_T_ARGS], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_END_IO_T_ARGS], [
|
||||||
ZFS_LINUX_TEST_SRC([bio_end_io_t_args], [
|
ZFS_LINUX_TEST_SRC([bio_end_io_t_args], [
|
||||||
#include <linux/bio.h>
|
#include <linux/bio.h>
|
||||||
void wanted_end_io(struct bio *bio) { return; }
|
static void wanted_end_io(struct bio *bio) { return; }
|
||||||
bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
|
bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
|
||||||
], [])
|
], [])
|
||||||
])
|
])
|
||||||
|
@ -16,12 +16,90 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.5.x API change,
|
||||||
|
dnl # blkdev_get_by_path() takes 4 args
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG], [
|
||||||
|
ZFS_LINUX_TEST_SRC([blkdev_get_by_path_4arg], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
], [
|
||||||
|
struct block_device *bdev __attribute__ ((unused)) = NULL;
|
||||||
|
const char *path = "path";
|
||||||
|
fmode_t mode = 0;
|
||||||
|
void *holder = NULL;
|
||||||
|
struct blk_holder_ops h;
|
||||||
|
|
||||||
|
bdev = blkdev_get_by_path(path, mode, holder, &h);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.8.x API change
|
||||||
|
dnl # bdev_open_by_path() replaces blkdev_get_by_path()
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_OPEN_BY_PATH], [
|
||||||
|
ZFS_LINUX_TEST_SRC([bdev_open_by_path], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
], [
|
||||||
|
struct bdev_handle *bdh __attribute__ ((unused)) = NULL;
|
||||||
|
const char *path = "path";
|
||||||
|
fmode_t mode = 0;
|
||||||
|
void *holder = NULL;
|
||||||
|
struct blk_holder_ops h;
|
||||||
|
|
||||||
|
bdh = bdev_open_by_path(path, mode, holder, &h);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH], [
|
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH], [
|
||||||
AC_MSG_CHECKING([whether blkdev_get_by_path() exists])
|
AC_MSG_CHECKING([whether blkdev_get_by_path() exists and takes 3 args])
|
||||||
ZFS_LINUX_TEST_RESULT([blkdev_get_by_path], [
|
ZFS_LINUX_TEST_RESULT([blkdev_get_by_path], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
], [
|
], [
|
||||||
ZFS_LINUX_TEST_ERROR([blkdev_get_by_path()])
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_CHECKING([whether blkdev_get_by_path() exists and takes 4 args])
|
||||||
|
ZFS_LINUX_TEST_RESULT([blkdev_get_by_path_4arg], [
|
||||||
|
AC_DEFINE(HAVE_BLKDEV_GET_BY_PATH_4ARG, 1,
|
||||||
|
[blkdev_get_by_path() exists and takes 4 args])
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_CHECKING([whether bdev_open_by_path() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([bdev_open_by_path], [
|
||||||
|
AC_DEFINE(HAVE_BDEV_OPEN_BY_PATH, 1,
|
||||||
|
[bdev_open_by_path() exists])
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
], [
|
||||||
|
ZFS_LINUX_TEST_ERROR([blkdev_get_by_path()])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.5.x API change
|
||||||
|
dnl # blk_mode_t was added as a type to supercede some places where fmode_t
|
||||||
|
dnl # is used
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BLK_MODE_T], [
|
||||||
|
ZFS_LINUX_TEST_SRC([blk_mode_t], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
], [
|
||||||
|
blk_mode_t m __attribute((unused)) = (blk_mode_t)0;
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BLK_MODE_T], [
|
||||||
|
AC_MSG_CHECKING([whether blk_mode_t is defined])
|
||||||
|
ZFS_LINUX_TEST_RESULT([blk_mode_t], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_BLK_MODE_T, 1, [blk_mode_t is defined])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -41,12 +119,58 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_PUT], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.5.x API change.
|
||||||
|
dnl # blkdev_put() takes (void* holder) as arg 2
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_PUT_HOLDER], [
|
||||||
|
ZFS_LINUX_TEST_SRC([blkdev_put_holder], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
], [
|
||||||
|
struct block_device *bdev = NULL;
|
||||||
|
void *holder = NULL;
|
||||||
|
|
||||||
|
blkdev_put(bdev, holder);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.8.x API change
|
||||||
|
dnl # bdev_release() replaces blkdev_put()
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_RELEASE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([bdev_release], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
], [
|
||||||
|
struct bdev_handle *bdh = NULL;
|
||||||
|
bdev_release(bdh);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_PUT], [
|
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_PUT], [
|
||||||
AC_MSG_CHECKING([whether blkdev_put() exists])
|
AC_MSG_CHECKING([whether blkdev_put() exists])
|
||||||
ZFS_LINUX_TEST_RESULT([blkdev_put], [
|
ZFS_LINUX_TEST_RESULT([blkdev_put], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
], [
|
], [
|
||||||
ZFS_LINUX_TEST_ERROR([blkdev_put()])
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_CHECKING([whether blkdev_put() accepts void* as arg 2])
|
||||||
|
ZFS_LINUX_TEST_RESULT([blkdev_put_holder], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_BLKDEV_PUT_HOLDER, 1,
|
||||||
|
[blkdev_put() accepts void* as arg 2])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_CHECKING([whether bdev_release() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([bdev_release], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_BDEV_RELEASE, 1,
|
||||||
|
[bdev_release() exists])
|
||||||
|
], [
|
||||||
|
ZFS_LINUX_TEST_ERROR([blkdev_put()])
|
||||||
|
])
|
||||||
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -103,6 +227,33 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_CHECK_DISK_CHANGE], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.5.x API change
|
||||||
|
dnl # disk_check_media_change() was added
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_DISK_CHECK_MEDIA_CHANGE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([disk_check_media_change], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
], [
|
||||||
|
struct block_device *bdev = NULL;
|
||||||
|
bool error;
|
||||||
|
|
||||||
|
error = disk_check_media_change(bdev->bd_disk);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_DISK_CHECK_MEDIA_CHANGE], [
|
||||||
|
AC_MSG_CHECKING([whether disk_check_media_change() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([disk_check_media_change], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_DISK_CHECK_MEDIA_CHANGE, 1,
|
||||||
|
[disk_check_media_change() exists])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # bdev_kobj() is introduced from 5.12
|
dnl # bdev_kobj() is introduced from 5.12
|
||||||
dnl #
|
dnl #
|
||||||
@ -373,6 +524,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BDEVNAME], [
|
|||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 5.19 API: blkdev_issue_secure_erase()
|
dnl # 5.19 API: blkdev_issue_secure_erase()
|
||||||
|
dnl # 4.7 API: __blkdev_issue_discard(..., BLKDEV_DISCARD_SECURE)
|
||||||
dnl # 3.10 API: blkdev_issue_discard(..., BLKDEV_DISCARD_SECURE)
|
dnl # 3.10 API: blkdev_issue_discard(..., BLKDEV_DISCARD_SECURE)
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_SECURE_ERASE], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_SECURE_ERASE], [
|
||||||
@ -388,6 +540,20 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_SECURE_ERASE], [
|
|||||||
sector, nr_sects, GFP_KERNEL);
|
sector, nr_sects, GFP_KERNEL);
|
||||||
])
|
])
|
||||||
|
|
||||||
|
ZFS_LINUX_TEST_SRC([blkdev_issue_discard_async_flags], [
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
],[
|
||||||
|
struct block_device *bdev = NULL;
|
||||||
|
sector_t sector = 0;
|
||||||
|
sector_t nr_sects = 0;
|
||||||
|
unsigned long flags = 0;
|
||||||
|
struct bio *biop = NULL;
|
||||||
|
int error __attribute__ ((unused));
|
||||||
|
|
||||||
|
error = __blkdev_issue_discard(bdev,
|
||||||
|
sector, nr_sects, GFP_KERNEL, flags, &biop);
|
||||||
|
])
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([blkdev_issue_discard_flags], [
|
ZFS_LINUX_TEST_SRC([blkdev_issue_discard_flags], [
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
],[
|
],[
|
||||||
@ -411,13 +577,22 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_ISSUE_SECURE_ERASE], [
|
|||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether blkdev_issue_discard() is available])
|
AC_MSG_CHECKING([whether __blkdev_issue_discard() is available])
|
||||||
ZFS_LINUX_TEST_RESULT([blkdev_issue_discard_flags], [
|
ZFS_LINUX_TEST_RESULT([blkdev_issue_discard_async_flags], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_BLKDEV_ISSUE_DISCARD, 1,
|
AC_DEFINE(HAVE_BLKDEV_ISSUE_DISCARD_ASYNC, 1,
|
||||||
[blkdev_issue_discard() is available])
|
[__blkdev_issue_discard() is available])
|
||||||
],[
|
],[
|
||||||
ZFS_LINUX_TEST_ERROR([blkdev_issue_discard()])
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether blkdev_issue_discard() is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([blkdev_issue_discard_flags], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_BLKDEV_ISSUE_DISCARD, 1,
|
||||||
|
[blkdev_issue_discard() is available])
|
||||||
|
],[
|
||||||
|
ZFS_LINUX_TEST_ERROR([blkdev_issue_discard()])
|
||||||
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@ -443,9 +618,36 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_ERESTARTSYS], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.5.x API change
|
||||||
|
dnl # BLK_STS_NEXUS replaced with BLK_STS_RESV_CONFLICT
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BLK_STS_RESV_CONFLICT], [
|
||||||
|
ZFS_LINUX_TEST_SRC([blk_sts_resv_conflict], [
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
],[
|
||||||
|
blk_status_t s __attribute__ ((unused)) = BLK_STS_RESV_CONFLICT;
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BLK_STS_RESV_CONFLICT], [
|
||||||
|
AC_MSG_CHECKING([whether BLK_STS_RESV_CONFLICT is defined])
|
||||||
|
ZFS_LINUX_TEST_RESULT([blk_sts_resv_conflict], [
|
||||||
|
AC_DEFINE(HAVE_BLK_STS_RESV_CONFLICT, 1, [BLK_STS_RESV_CONFLICT is defined])
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH
|
ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH
|
||||||
|
ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG
|
||||||
|
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_OPEN_BY_PATH
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_PUT
|
ZFS_AC_KERNEL_SRC_BLKDEV_PUT
|
||||||
|
ZFS_AC_KERNEL_SRC_BLKDEV_PUT_HOLDER
|
||||||
|
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_RELEASE
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_REREAD_PART
|
ZFS_AC_KERNEL_SRC_BLKDEV_REREAD_PART
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_INVALIDATE_BDEV
|
ZFS_AC_KERNEL_SRC_BLKDEV_INVALIDATE_BDEV
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_LOOKUP_BDEV
|
ZFS_AC_KERNEL_SRC_BLKDEV_LOOKUP_BDEV
|
||||||
@ -458,6 +660,9 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [
|
|||||||
ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_SECURE_ERASE
|
ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_SECURE_ERASE
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_KOBJ
|
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_KOBJ
|
||||||
ZFS_AC_KERNEL_SRC_BLKDEV_PART_TO_DEV
|
ZFS_AC_KERNEL_SRC_BLKDEV_PART_TO_DEV
|
||||||
|
ZFS_AC_KERNEL_SRC_BLKDEV_DISK_CHECK_MEDIA_CHANGE
|
||||||
|
ZFS_AC_KERNEL_SRC_BLKDEV_BLK_STS_RESV_CONFLICT
|
||||||
|
ZFS_AC_KERNEL_SRC_BLKDEV_BLK_MODE_T
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV], [
|
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV], [
|
||||||
@ -476,4 +681,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV], [
|
|||||||
ZFS_AC_KERNEL_BLKDEV_ISSUE_SECURE_ERASE
|
ZFS_AC_KERNEL_BLKDEV_ISSUE_SECURE_ERASE
|
||||||
ZFS_AC_KERNEL_BLKDEV_BDEV_KOBJ
|
ZFS_AC_KERNEL_BLKDEV_BDEV_KOBJ
|
||||||
ZFS_AC_KERNEL_BLKDEV_PART_TO_DEV
|
ZFS_AC_KERNEL_BLKDEV_PART_TO_DEV
|
||||||
|
ZFS_AC_KERNEL_BLKDEV_DISK_CHECK_MEDIA_CHANGE
|
||||||
|
ZFS_AC_KERNEL_BLKDEV_BLK_STS_RESV_CONFLICT
|
||||||
|
ZFS_AC_KERNEL_BLKDEV_BLK_MODE_T
|
||||||
])
|
])
|
||||||
|
@ -5,7 +5,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS], [
|
|||||||
ZFS_LINUX_TEST_SRC([block_device_operations_check_events], [
|
ZFS_LINUX_TEST_SRC([block_device_operations_check_events], [
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
|
|
||||||
unsigned int blk_check_events(struct gendisk *disk,
|
static unsigned int blk_check_events(struct gendisk *disk,
|
||||||
unsigned int clearing) {
|
unsigned int clearing) {
|
||||||
(void) disk, (void) clearing;
|
(void) disk, (void) clearing;
|
||||||
return (0);
|
return (0);
|
||||||
@ -34,7 +34,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
|
|||||||
ZFS_LINUX_TEST_SRC([block_device_operations_release_void], [
|
ZFS_LINUX_TEST_SRC([block_device_operations_release_void], [
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
|
|
||||||
void blk_release(struct gendisk *g, fmode_t mode) {
|
static void blk_release(struct gendisk *g, fmode_t mode) {
|
||||||
(void) g, (void) mode;
|
(void) g, (void) mode;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -49,12 +49,42 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
|
|||||||
], [], [])
|
], [], [])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 5.9.x API change
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG], [
|
||||||
|
ZFS_LINUX_TEST_SRC([block_device_operations_release_void_1arg], [
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
|
||||||
|
static void blk_release(struct gendisk *g) {
|
||||||
|
(void) g;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct block_device_operations
|
||||||
|
bops __attribute__ ((unused)) = {
|
||||||
|
.open = NULL,
|
||||||
|
.release = blk_release,
|
||||||
|
.ioctl = NULL,
|
||||||
|
.compat_ioctl = NULL,
|
||||||
|
};
|
||||||
|
], [], [])
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
|
AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
|
||||||
AC_MSG_CHECKING([whether bops->release() is void])
|
AC_MSG_CHECKING([whether bops->release() is void and takes 2 args])
|
||||||
ZFS_LINUX_TEST_RESULT([block_device_operations_release_void], [
|
ZFS_LINUX_TEST_RESULT([block_device_operations_release_void], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
],[
|
],[
|
||||||
ZFS_LINUX_TEST_ERROR([bops->release()])
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_CHECKING([whether bops->release() is void and takes 1 arg])
|
||||||
|
ZFS_LINUX_TEST_RESULT([block_device_operations_release_void_1arg], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE([HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG], [1],
|
||||||
|
[Define if release() in block_device_operations takes 1 arg])
|
||||||
|
],[
|
||||||
|
ZFS_LINUX_TEST_ERROR([bops->release()])
|
||||||
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -66,7 +96,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK], [
|
|||||||
ZFS_LINUX_TEST_SRC([block_device_operations_revalidate_disk], [
|
ZFS_LINUX_TEST_SRC([block_device_operations_revalidate_disk], [
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
|
|
||||||
int blk_revalidate_disk(struct gendisk *disk) {
|
static int blk_revalidate_disk(struct gendisk *disk) {
|
||||||
(void) disk;
|
(void) disk;
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
@ -92,6 +122,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK], [
|
|||||||
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_REVALIDATE_DISK
|
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ dnl #
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_COMMIT_METADATA], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_COMMIT_METADATA], [
|
||||||
ZFS_LINUX_TEST_SRC([export_operations_commit_metadata], [
|
ZFS_LINUX_TEST_SRC([export_operations_commit_metadata], [
|
||||||
#include <linux/exportfs.h>
|
#include <linux/exportfs.h>
|
||||||
int commit_metadata(struct inode *inode) { return 0; }
|
static int commit_metadata(struct inode *inode) { return 0; }
|
||||||
static struct export_operations eops __attribute__ ((unused))={
|
static struct export_operations eops __attribute__ ((unused))={
|
||||||
.commit_metadata = commit_metadata,
|
.commit_metadata = commit_metadata,
|
||||||
};
|
};
|
||||||
|
@ -2,12 +2,15 @@ dnl #
|
|||||||
dnl # 4.9, current_time() added
|
dnl # 4.9, current_time() added
|
||||||
dnl # 4.18, return type changed from timespec to timespec64
|
dnl # 4.18, return type changed from timespec to timespec64
|
||||||
dnl #
|
dnl #
|
||||||
|
dnl # Note that we don't care about the return type in this check. If we have
|
||||||
|
dnl # to implement a fallback, we'll know we're <4.9, which was timespec.
|
||||||
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_CURRENT_TIME], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_CURRENT_TIME], [
|
||||||
ZFS_LINUX_TEST_SRC([current_time], [
|
ZFS_LINUX_TEST_SRC([current_time], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
], [
|
], [
|
||||||
struct inode ip __attribute__ ((unused));
|
struct inode ip __attribute__ ((unused));
|
||||||
ip.i_atime = current_time(&ip);
|
(void) current_time(&ip);
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_D_REVALIDATE_NAMEIDATA], [
|
|||||||
#include <linux/dcache.h>
|
#include <linux/dcache.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
|
||||||
int revalidate (struct dentry *dentry,
|
static int revalidate (struct dentry *dentry,
|
||||||
struct nameidata *nidata) { return 0; }
|
struct nameidata *nidata) { return 0; }
|
||||||
|
|
||||||
static const struct dentry_operations
|
static const struct dentry_operations
|
||||||
|
@ -8,7 +8,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_DIRTY_INODE], [
|
|||||||
ZFS_LINUX_TEST_SRC([dirty_inode_with_flags], [
|
ZFS_LINUX_TEST_SRC([dirty_inode_with_flags], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
void dirty_inode(struct inode *a, int b) { return; }
|
static void dirty_inode(struct inode *a, int b) { return; }
|
||||||
|
|
||||||
static const struct super_operations
|
static const struct super_operations
|
||||||
sops __attribute__ ((unused)) = {
|
sops __attribute__ ((unused)) = {
|
||||||
|
@ -7,7 +7,7 @@ dnl #
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_ENCODE_FH_WITH_INODE], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_ENCODE_FH_WITH_INODE], [
|
||||||
ZFS_LINUX_TEST_SRC([export_operations_encode_fh], [
|
ZFS_LINUX_TEST_SRC([export_operations_encode_fh], [
|
||||||
#include <linux/exportfs.h>
|
#include <linux/exportfs.h>
|
||||||
int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
|
static int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
|
||||||
struct inode *parent) { return 0; }
|
struct inode *parent) { return 0; }
|
||||||
static struct export_operations eops __attribute__ ((unused))={
|
static struct export_operations eops __attribute__ ((unused))={
|
||||||
.encode_fh = encode_fh,
|
.encode_fh = encode_fh,
|
||||||
|
@ -6,7 +6,7 @@ dnl #
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_EVICT_INODE], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_EVICT_INODE], [
|
||||||
ZFS_LINUX_TEST_SRC([evict_inode], [
|
ZFS_LINUX_TEST_SRC([evict_inode], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
void evict_inode (struct inode * t) { return; }
|
static void evict_inode (struct inode * t) { return; }
|
||||||
static struct super_operations sops __attribute__ ((unused)) = {
|
static struct super_operations sops __attribute__ ((unused)) = {
|
||||||
.evict_inode = evict_inode,
|
.evict_inode = evict_inode,
|
||||||
};
|
};
|
||||||
|
@ -11,7 +11,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_FALLOCATE], [
|
|||||||
ZFS_LINUX_TEST_SRC([file_fallocate], [
|
ZFS_LINUX_TEST_SRC([file_fallocate], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
long test_fallocate(struct file *file, int mode,
|
static long test_fallocate(struct file *file, int mode,
|
||||||
loff_t offset, loff_t len) { return 0; }
|
loff_t offset, loff_t len) { return 0; }
|
||||||
|
|
||||||
static const struct file_operations
|
static const struct file_operations
|
||||||
|
25
config/kernel-filemap-splice-read.m4
Normal file
25
config/kernel-filemap-splice-read.m4
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_COPY_SPLICE_READ], [
|
||||||
|
dnl #
|
||||||
|
dnl # Kernel 6.5 - generic_file_splice_read was removed in favor
|
||||||
|
dnl # of copy_splice_read for the .splice_read member of the
|
||||||
|
dnl # file_operations struct.
|
||||||
|
dnl #
|
||||||
|
ZFS_LINUX_TEST_SRC([has_copy_splice_read], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
|
||||||
|
struct file_operations fops __attribute__((unused)) = {
|
||||||
|
.splice_read = copy_splice_read,
|
||||||
|
};
|
||||||
|
],[])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_COPY_SPLICE_READ], [
|
||||||
|
AC_MSG_CHECKING([whether copy_splice_read() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([has_copy_splice_read], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_COPY_SPLICE_READ, 1,
|
||||||
|
[copy_splice_read exists])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
])
|
@ -1,7 +1,8 @@
|
|||||||
dnl #
|
dnl #
|
||||||
dnl # Starting from Linux 5.13, flush_dcache_page() becomes an inline
|
dnl # Starting from Linux 5.13, flush_dcache_page() becomes an inline
|
||||||
dnl # function and may indirectly referencing GPL-only cpu_feature_keys on
|
dnl # function and may indirectly referencing GPL-only symbols:
|
||||||
dnl # powerpc
|
dnl # on powerpc: cpu_feature_keys
|
||||||
|
dnl # on riscv: PageHuge (added from 6.2)
|
||||||
dnl #
|
dnl #
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
|
@ -79,6 +79,12 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_FPU], [
|
|||||||
__kernel_fpu_end();
|
__kernel_fpu_end();
|
||||||
], [], [ZFS_META_LICENSE])
|
], [], [ZFS_META_LICENSE])
|
||||||
|
|
||||||
|
ZFS_LINUX_TEST_SRC([kernel_neon], [
|
||||||
|
#include <asm/neon.h>
|
||||||
|
], [
|
||||||
|
kernel_neon_begin();
|
||||||
|
kernel_neon_end();
|
||||||
|
], [], [ZFS_META_LICENSE])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_FPU], [
|
AC_DEFUN([ZFS_AC_KERNEL_FPU], [
|
||||||
@ -105,9 +111,20 @@ AC_DEFUN([ZFS_AC_KERNEL_FPU], [
|
|||||||
AC_DEFINE(KERNEL_EXPORTS_X86_FPU, 1,
|
AC_DEFINE(KERNEL_EXPORTS_X86_FPU, 1,
|
||||||
[kernel exports FPU functions])
|
[kernel exports FPU functions])
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(internal)
|
dnl #
|
||||||
AC_DEFINE(HAVE_KERNEL_FPU_INTERNAL, 1,
|
dnl # ARM neon symbols (only on arm and arm64)
|
||||||
[kernel fpu internal])
|
dnl # could be GPL-only on arm64 after Linux 6.2
|
||||||
|
dnl #
|
||||||
|
ZFS_LINUX_TEST_RESULT([kernel_neon_license],[
|
||||||
|
AC_MSG_RESULT(kernel_neon_*)
|
||||||
|
AC_DEFINE(HAVE_KERNEL_NEON, 1,
|
||||||
|
[kernel has kernel_neon_* functions])
|
||||||
|
],[
|
||||||
|
# catch-all
|
||||||
|
AC_MSG_RESULT(internal)
|
||||||
|
AC_DEFINE(HAVE_KERNEL_FPU_INTERNAL, 1,
|
||||||
|
[kernel fpu internal])
|
||||||
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
36
config/kernel-fsync-bdev.m4
Normal file
36
config/kernel-fsync-bdev.m4
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # 6.6 API change,
|
||||||
|
dnl # fsync_bdev was removed in favor of sync_blockdev
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_SYNC_BDEV], [
|
||||||
|
ZFS_LINUX_TEST_SRC([fsync_bdev], [
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
],[
|
||||||
|
fsync_bdev(NULL);
|
||||||
|
])
|
||||||
|
|
||||||
|
ZFS_LINUX_TEST_SRC([sync_blockdev], [
|
||||||
|
#include <linux/blkdev.h>
|
||||||
|
],[
|
||||||
|
sync_blockdev(NULL);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SYNC_BDEV], [
|
||||||
|
AC_MSG_CHECKING([whether fsync_bdev() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([fsync_bdev], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_FSYNC_BDEV, 1,
|
||||||
|
[fsync_bdev() is declared in include/blkdev.h])
|
||||||
|
],[
|
||||||
|
AC_MSG_CHECKING([whether sync_blockdev() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([sync_blockdev], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_SYNC_BLOCKDEV, 1,
|
||||||
|
[sync_blockdev() is declared in include/blkdev.h])
|
||||||
|
],[
|
||||||
|
ZFS_LINUX_TEST_ERROR(
|
||||||
|
[neither fsync_bdev() nor sync_blockdev() exist])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
])
|
@ -5,7 +5,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_FSYNC], [
|
|||||||
ZFS_LINUX_TEST_SRC([fsync_without_dentry], [
|
ZFS_LINUX_TEST_SRC([fsync_without_dentry], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int test_fsync(struct file *f, int x) { return 0; }
|
static int test_fsync(struct file *f, int x) { return 0; }
|
||||||
|
|
||||||
static const struct file_operations
|
static const struct file_operations
|
||||||
fops __attribute__ ((unused)) = {
|
fops __attribute__ ((unused)) = {
|
||||||
@ -16,7 +16,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_FSYNC], [
|
|||||||
ZFS_LINUX_TEST_SRC([fsync_range], [
|
ZFS_LINUX_TEST_SRC([fsync_range], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int test_fsync(struct file *f, loff_t a, loff_t b, int c)
|
static int test_fsync(struct file *f, loff_t a, loff_t b, int c)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
static const struct file_operations
|
static const struct file_operations
|
||||||
|
@ -7,6 +7,10 @@ dnl #
|
|||||||
dnl # 6.3 API
|
dnl # 6.3 API
|
||||||
dnl # generic_fillattr() now takes struct mnt_idmap* as the first argument
|
dnl # generic_fillattr() now takes struct mnt_idmap* as the first argument
|
||||||
dnl #
|
dnl #
|
||||||
|
dnl # 6.6 API
|
||||||
|
dnl # generic_fillattr() now takes u32 as second argument, representing a
|
||||||
|
dnl # request_mask for statx
|
||||||
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR], [
|
||||||
ZFS_LINUX_TEST_SRC([generic_fillattr_userns], [
|
ZFS_LINUX_TEST_SRC([generic_fillattr_userns], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
@ -25,22 +29,39 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR], [
|
|||||||
struct kstat *k = NULL;
|
struct kstat *k = NULL;
|
||||||
generic_fillattr(idmap, in, k);
|
generic_fillattr(idmap, in, k);
|
||||||
])
|
])
|
||||||
|
|
||||||
|
ZFS_LINUX_TEST_SRC([generic_fillattr_mnt_idmap_reqmask], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
],[
|
||||||
|
struct mnt_idmap *idmap = NULL;
|
||||||
|
struct inode *in = NULL;
|
||||||
|
struct kstat *k = NULL;
|
||||||
|
generic_fillattr(idmap, 0, in, k);
|
||||||
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GENERIC_FILLATTR], [
|
AC_DEFUN([ZFS_AC_KERNEL_GENERIC_FILLATTR], [
|
||||||
AC_MSG_CHECKING([whether generic_fillattr requires struct mnt_idmap*])
|
AC_MSG_CHECKING(
|
||||||
ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap], [
|
[whether generic_fillattr requires struct mnt_idmap* and request_mask])
|
||||||
|
ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap_reqmask], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP, 1,
|
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP_REQMASK, 1,
|
||||||
[generic_fillattr requires struct mnt_idmap*])
|
[generic_fillattr requires struct mnt_idmap* and u32 request_mask])
|
||||||
],[
|
],[
|
||||||
AC_MSG_CHECKING([whether generic_fillattr requires struct user_namespace*])
|
AC_MSG_CHECKING([whether generic_fillattr requires struct mnt_idmap*])
|
||||||
ZFS_LINUX_TEST_RESULT([generic_fillattr_userns], [
|
ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
AC_DEFINE(HAVE_GENERIC_FILLATTR_USERNS, 1,
|
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP, 1,
|
||||||
[generic_fillattr requires struct user_namespace*])
|
[generic_fillattr requires struct mnt_idmap*])
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_CHECKING([whether generic_fillattr requires struct user_namespace*])
|
||||||
|
ZFS_LINUX_TEST_RESULT([generic_fillattr_userns], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_GENERIC_FILLATTR_USERNS, 1,
|
||||||
|
[generic_fillattr requires struct user_namespace*])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
@ -5,7 +5,7 @@ dnl #
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_get_link], [
|
ZFS_LINUX_TEST_SRC([inode_operations_get_link], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
const char *get_link(struct dentry *de, struct inode *ip,
|
static const char *get_link(struct dentry *de, struct inode *ip,
|
||||||
struct delayed_call *done) { return "symlink"; }
|
struct delayed_call *done) { return "symlink"; }
|
||||||
static struct inode_operations
|
static struct inode_operations
|
||||||
iops __attribute__ ((unused)) = {
|
iops __attribute__ ((unused)) = {
|
||||||
@ -15,7 +15,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
|
|||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_get_link_cookie], [
|
ZFS_LINUX_TEST_SRC([inode_operations_get_link_cookie], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
const char *get_link(struct dentry *de, struct
|
static const char *get_link(struct dentry *de, struct
|
||||||
inode *ip, void **cookie) { return "symlink"; }
|
inode *ip, void **cookie) { return "symlink"; }
|
||||||
static struct inode_operations
|
static struct inode_operations
|
||||||
iops __attribute__ ((unused)) = {
|
iops __attribute__ ((unused)) = {
|
||||||
@ -25,7 +25,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
|
|||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_follow_link], [
|
ZFS_LINUX_TEST_SRC([inode_operations_follow_link], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
const char *follow_link(struct dentry *de,
|
static const char *follow_link(struct dentry *de,
|
||||||
void **cookie) { return "symlink"; }
|
void **cookie) { return "symlink"; }
|
||||||
static struct inode_operations
|
static struct inode_operations
|
||||||
iops __attribute__ ((unused)) = {
|
iops __attribute__ ((unused)) = {
|
||||||
@ -35,7 +35,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
|
|||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_follow_link_nameidata], [
|
ZFS_LINUX_TEST_SRC([inode_operations_follow_link_nameidata], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
void *follow_link(struct dentry *de, struct
|
static void *follow_link(struct dentry *de, struct
|
||||||
nameidata *nd) { return (void *)NULL; }
|
nameidata *nd) { return (void *)NULL; }
|
||||||
static struct inode_operations
|
static struct inode_operations
|
||||||
iops __attribute__ ((unused)) = {
|
iops __attribute__ ((unused)) = {
|
||||||
|
@ -23,3 +23,28 @@ AC_DEFUN([ZFS_AC_KERNEL_IDMAP_MNT_API], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.8 decouples mnt_idmap from user_namespace. This is all internal
|
||||||
|
dnl # to mnt_idmap so we can't detect it directly, but we detect a related
|
||||||
|
dnl # change as use that as a signal.
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_IDMAP_NO_USERNS], [
|
||||||
|
ZFS_LINUX_TEST_SRC([idmap_no_userns], [
|
||||||
|
#include <linux/uidgid.h>
|
||||||
|
], [
|
||||||
|
struct uid_gid_map *map = NULL;
|
||||||
|
map_id_down(map, 0);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_IDMAP_NO_USERNS], [
|
||||||
|
AC_MSG_CHECKING([whether idmapped mounts have a user namespace])
|
||||||
|
ZFS_LINUX_TEST_RESULT([idmap_no_userns], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_IDMAP_NO_USERNS, 1,
|
||||||
|
[mnt_idmap does not have user_namespace])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
|
||||||
int inode_create(struct mnt_idmap *idmap,
|
static int inode_create(struct mnt_idmap *idmap,
|
||||||
struct inode *inode ,struct dentry *dentry,
|
struct inode *inode ,struct dentry *dentry,
|
||||||
umode_t umode, bool flag) { return 0; }
|
umode_t umode, bool flag) { return 0; }
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
|
||||||
int inode_create(struct user_namespace *userns,
|
static int inode_create(struct user_namespace *userns,
|
||||||
struct inode *inode ,struct dentry *dentry,
|
struct inode *inode ,struct dentry *dentry,
|
||||||
umode_t umode, bool flag) { return 0; }
|
umode_t umode, bool flag) { return 0; }
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
|
||||||
int inode_create(struct inode *inode ,struct dentry *dentry,
|
static int inode_create(struct inode *inode ,struct dentry *dentry,
|
||||||
umode_t umode, bool flag) { return 0; }
|
umode_t umode, bool flag) { return 0; }
|
||||||
|
|
||||||
static const struct inode_operations
|
static const struct inode_operations
|
||||||
|
@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_getattr_mnt_idmap], [
|
ZFS_LINUX_TEST_SRC([inode_operations_getattr_mnt_idmap], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int test_getattr(
|
static int test_getattr(
|
||||||
struct mnt_idmap *idmap,
|
struct mnt_idmap *idmap,
|
||||||
const struct path *p, struct kstat *k,
|
const struct path *p, struct kstat *k,
|
||||||
u32 request_mask, unsigned int query_flags)
|
u32 request_mask, unsigned int query_flags)
|
||||||
@ -28,7 +28,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_getattr_userns], [
|
ZFS_LINUX_TEST_SRC([inode_operations_getattr_userns], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int test_getattr(
|
static int test_getattr(
|
||||||
struct user_namespace *userns,
|
struct user_namespace *userns,
|
||||||
const struct path *p, struct kstat *k,
|
const struct path *p, struct kstat *k,
|
||||||
u32 request_mask, unsigned int query_flags)
|
u32 request_mask, unsigned int query_flags)
|
||||||
@ -47,7 +47,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_getattr_path], [
|
ZFS_LINUX_TEST_SRC([inode_operations_getattr_path], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int test_getattr(
|
static int test_getattr(
|
||||||
const struct path *p, struct kstat *k,
|
const struct path *p, struct kstat *k,
|
||||||
u32 request_mask, unsigned int query_flags)
|
u32 request_mask, unsigned int query_flags)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
@ -61,7 +61,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_getattr_vfsmount], [
|
ZFS_LINUX_TEST_SRC([inode_operations_getattr_vfsmount], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int test_getattr(
|
static int test_getattr(
|
||||||
struct vfsmount *mnt, struct dentry *d,
|
struct vfsmount *mnt, struct dentry *d,
|
||||||
struct kstat *k)
|
struct kstat *k)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
@ -6,7 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_LOOKUP_FLAGS], [
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
|
||||||
struct dentry *inode_lookup(struct inode *inode,
|
static struct dentry *inode_lookup(struct inode *inode,
|
||||||
struct dentry *dentry, unsigned int flags) { return NULL; }
|
struct dentry *dentry, unsigned int flags) { return NULL; }
|
||||||
|
|
||||||
static const struct inode_operations iops
|
static const struct inode_operations iops
|
||||||
|
@ -8,12 +8,12 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_PERMISSION], [
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
|
||||||
int inode_permission(struct mnt_idmap *idmap,
|
static int test_permission(struct mnt_idmap *idmap,
|
||||||
struct inode *inode, int mask) { return 0; }
|
struct inode *inode, int mask) { return 0; }
|
||||||
|
|
||||||
static const struct inode_operations
|
static const struct inode_operations
|
||||||
iops __attribute__ ((unused)) = {
|
iops __attribute__ ((unused)) = {
|
||||||
.permission = inode_permission,
|
.permission = test_permission,
|
||||||
};
|
};
|
||||||
],[])
|
],[])
|
||||||
|
|
||||||
@ -25,12 +25,12 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_PERMISSION], [
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
|
||||||
int inode_permission(struct user_namespace *userns,
|
static int test_permission(struct user_namespace *userns,
|
||||||
struct inode *inode, int mask) { return 0; }
|
struct inode *inode, int mask) { return 0; }
|
||||||
|
|
||||||
static const struct inode_operations
|
static const struct inode_operations
|
||||||
iops __attribute__ ((unused)) = {
|
iops __attribute__ ((unused)) = {
|
||||||
.permission = inode_permission,
|
.permission = test_permission,
|
||||||
};
|
};
|
||||||
],[])
|
],[])
|
||||||
])
|
])
|
||||||
|
@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_setattr_mnt_idmap], [
|
ZFS_LINUX_TEST_SRC([inode_operations_setattr_mnt_idmap], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int test_setattr(
|
static int test_setattr(
|
||||||
struct mnt_idmap *idmap,
|
struct mnt_idmap *idmap,
|
||||||
struct dentry *de, struct iattr *ia)
|
struct dentry *de, struct iattr *ia)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
@ -27,7 +27,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_setattr_userns], [
|
ZFS_LINUX_TEST_SRC([inode_operations_setattr_userns], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int test_setattr(
|
static int test_setattr(
|
||||||
struct user_namespace *userns,
|
struct user_namespace *userns,
|
||||||
struct dentry *de, struct iattr *ia)
|
struct dentry *de, struct iattr *ia)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
@ -41,7 +41,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_setattr], [
|
ZFS_LINUX_TEST_SRC([inode_operations_setattr], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int test_setattr(
|
static int test_setattr(
|
||||||
struct dentry *de, struct iattr *ia)
|
struct dentry *de, struct iattr *ia)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
|
@ -27,6 +27,73 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [
|
|||||||
memset(&ip, 0, sizeof(ip));
|
memset(&ip, 0, sizeof(ip));
|
||||||
ts = ip.i_mtime;
|
ts = ip.i_mtime;
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.6 API change
|
||||||
|
dnl # i_ctime no longer directly accessible, must use
|
||||||
|
dnl # inode_get_ctime(ip), inode_set_ctime*(ip) to
|
||||||
|
dnl # read/write.
|
||||||
|
dnl #
|
||||||
|
ZFS_LINUX_TEST_SRC([inode_get_ctime], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
],[
|
||||||
|
struct inode ip;
|
||||||
|
|
||||||
|
memset(&ip, 0, sizeof(ip));
|
||||||
|
inode_get_ctime(&ip);
|
||||||
|
])
|
||||||
|
|
||||||
|
ZFS_LINUX_TEST_SRC([inode_set_ctime_to_ts], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
],[
|
||||||
|
struct inode ip;
|
||||||
|
struct timespec64 ts = {0};
|
||||||
|
|
||||||
|
memset(&ip, 0, sizeof(ip));
|
||||||
|
inode_set_ctime_to_ts(&ip, ts);
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.7 API change
|
||||||
|
dnl # i_atime/i_mtime no longer directly accessible, must use
|
||||||
|
dnl # inode_get_mtime(ip), inode_set_mtime*(ip) to
|
||||||
|
dnl # read/write.
|
||||||
|
dnl #
|
||||||
|
ZFS_LINUX_TEST_SRC([inode_get_atime], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
],[
|
||||||
|
struct inode ip;
|
||||||
|
|
||||||
|
memset(&ip, 0, sizeof(ip));
|
||||||
|
inode_get_atime(&ip);
|
||||||
|
])
|
||||||
|
ZFS_LINUX_TEST_SRC([inode_get_mtime], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
],[
|
||||||
|
struct inode ip;
|
||||||
|
|
||||||
|
memset(&ip, 0, sizeof(ip));
|
||||||
|
inode_get_mtime(&ip);
|
||||||
|
])
|
||||||
|
|
||||||
|
ZFS_LINUX_TEST_SRC([inode_set_atime_to_ts], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
],[
|
||||||
|
struct inode ip;
|
||||||
|
struct timespec64 ts = {0};
|
||||||
|
|
||||||
|
memset(&ip, 0, sizeof(ip));
|
||||||
|
inode_set_atime_to_ts(&ip, ts);
|
||||||
|
])
|
||||||
|
ZFS_LINUX_TEST_SRC([inode_set_mtime_to_ts], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
],[
|
||||||
|
struct inode ip;
|
||||||
|
struct timespec64 ts = {0};
|
||||||
|
|
||||||
|
memset(&ip, 0, sizeof(ip));
|
||||||
|
inode_set_mtime_to_ts(&ip, ts);
|
||||||
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
|
AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
|
||||||
@ -47,4 +114,58 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
|
|||||||
AC_DEFINE(HAVE_INODE_TIMESPEC64_TIMES, 1,
|
AC_DEFINE(HAVE_INODE_TIMESPEC64_TIMES, 1,
|
||||||
[inode->i_*time's are timespec64])
|
[inode->i_*time's are timespec64])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether inode_get_ctime() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([inode_get_ctime], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_INODE_GET_CTIME, 1,
|
||||||
|
[inode_get_ctime() exists in linux/fs.h])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether inode_set_ctime_to_ts() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([inode_set_ctime_to_ts], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_INODE_SET_CTIME_TO_TS, 1,
|
||||||
|
[inode_set_ctime_to_ts() exists in linux/fs.h])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether inode_get_atime() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([inode_get_atime], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_INODE_GET_ATIME, 1,
|
||||||
|
[inode_get_atime() exists in linux/fs.h])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether inode_set_atime_to_ts() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([inode_set_atime_to_ts], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_INODE_SET_ATIME_TO_TS, 1,
|
||||||
|
[inode_set_atime_to_ts() exists in linux/fs.h])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether inode_get_mtime() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([inode_get_mtime], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_INODE_GET_MTIME, 1,
|
||||||
|
[inode_get_mtime() exists in linux/fs.h])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether inode_set_mtime_to_ts() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([inode_set_mtime_to_ts], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_INODE_SET_MTIME_TO_TS, 1,
|
||||||
|
[inode_set_mtime_to_ts() exists in linux/fs.h])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
])
|
])
|
||||||
|
@ -4,7 +4,7 @@ dnl #
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
|
||||||
ZFS_LINUX_TEST_SRC([make_request_fn_void], [
|
ZFS_LINUX_TEST_SRC([make_request_fn_void], [
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
void make_request(struct request_queue *q,
|
static void make_request(struct request_queue *q,
|
||||||
struct bio *bio) { return; }
|
struct bio *bio) { return; }
|
||||||
],[
|
],[
|
||||||
blk_queue_make_request(NULL, &make_request);
|
blk_queue_make_request(NULL, &make_request);
|
||||||
@ -12,7 +12,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
|
|||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([make_request_fn_blk_qc_t], [
|
ZFS_LINUX_TEST_SRC([make_request_fn_blk_qc_t], [
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
blk_qc_t make_request(struct request_queue *q,
|
static blk_qc_t make_request(struct request_queue *q,
|
||||||
struct bio *bio) { return (BLK_QC_T_NONE); }
|
struct bio *bio) { return (BLK_QC_T_NONE); }
|
||||||
],[
|
],[
|
||||||
blk_queue_make_request(NULL, &make_request);
|
blk_queue_make_request(NULL, &make_request);
|
||||||
@ -20,7 +20,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
|
|||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([blk_alloc_queue_request_fn], [
|
ZFS_LINUX_TEST_SRC([blk_alloc_queue_request_fn], [
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
blk_qc_t make_request(struct request_queue *q,
|
static blk_qc_t make_request(struct request_queue *q,
|
||||||
struct bio *bio) { return (BLK_QC_T_NONE); }
|
struct bio *bio) { return (BLK_QC_T_NONE); }
|
||||||
],[
|
],[
|
||||||
struct request_queue *q __attribute__ ((unused));
|
struct request_queue *q __attribute__ ((unused));
|
||||||
@ -29,7 +29,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
|
|||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([blk_alloc_queue_request_fn_rh], [
|
ZFS_LINUX_TEST_SRC([blk_alloc_queue_request_fn_rh], [
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
blk_qc_t make_request(struct request_queue *q,
|
static blk_qc_t make_request(struct request_queue *q,
|
||||||
struct bio *bio) { return (BLK_QC_T_NONE); }
|
struct bio *bio) { return (BLK_QC_T_NONE); }
|
||||||
],[
|
],[
|
||||||
struct request_queue *q __attribute__ ((unused));
|
struct request_queue *q __attribute__ ((unused));
|
||||||
|
@ -9,7 +9,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
|
|||||||
ZFS_LINUX_TEST_SRC([mkdir_mnt_idmap], [
|
ZFS_LINUX_TEST_SRC([mkdir_mnt_idmap], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int mkdir(struct mnt_idmap *idmap,
|
static int mkdir(struct mnt_idmap *idmap,
|
||||||
struct inode *inode, struct dentry *dentry,
|
struct inode *inode, struct dentry *dentry,
|
||||||
umode_t umode) { return 0; }
|
umode_t umode) { return 0; }
|
||||||
static const struct inode_operations
|
static const struct inode_operations
|
||||||
@ -26,7 +26,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
|
|||||||
ZFS_LINUX_TEST_SRC([mkdir_user_namespace], [
|
ZFS_LINUX_TEST_SRC([mkdir_user_namespace], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int mkdir(struct user_namespace *userns,
|
static int mkdir(struct user_namespace *userns,
|
||||||
struct inode *inode, struct dentry *dentry,
|
struct inode *inode, struct dentry *dentry,
|
||||||
umode_t umode) { return 0; }
|
umode_t umode) { return 0; }
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
|
|||||||
ZFS_LINUX_TEST_SRC([inode_operations_mkdir], [
|
ZFS_LINUX_TEST_SRC([inode_operations_mkdir], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int mkdir(struct inode *inode, struct dentry *dentry,
|
static int mkdir(struct inode *inode, struct dentry *dentry,
|
||||||
umode_t umode) { return 0; }
|
umode_t umode) { return 0; }
|
||||||
|
|
||||||
static const struct inode_operations
|
static const struct inode_operations
|
||||||
|
@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKNOD], [
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
|
||||||
int tmp_mknod(struct mnt_idmap *idmap,
|
static int tmp_mknod(struct mnt_idmap *idmap,
|
||||||
struct inode *inode ,struct dentry *dentry,
|
struct inode *inode ,struct dentry *dentry,
|
||||||
umode_t u, dev_t d) { return 0; }
|
umode_t u, dev_t d) { return 0; }
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKNOD], [
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
|
||||||
int tmp_mknod(struct user_namespace *userns,
|
static int tmp_mknod(struct user_namespace *userns,
|
||||||
struct inode *inode ,struct dentry *dentry,
|
struct inode *inode ,struct dentry *dentry,
|
||||||
umode_t u, dev_t d) { return 0; }
|
umode_t u, dev_t d) { return 0; }
|
||||||
|
|
||||||
|
@ -7,14 +7,14 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_PROC_OPERATIONS], [
|
|||||||
ZFS_LINUX_TEST_SRC([proc_ops_struct], [
|
ZFS_LINUX_TEST_SRC([proc_ops_struct], [
|
||||||
#include <linux/proc_fs.h>
|
#include <linux/proc_fs.h>
|
||||||
|
|
||||||
int test_open(struct inode *ip, struct file *fp) { return 0; }
|
static int test_open(struct inode *ip, struct file *fp) { return 0; }
|
||||||
ssize_t test_read(struct file *fp, char __user *ptr,
|
static ssize_t test_read(struct file *fp, char __user *ptr,
|
||||||
size_t size, loff_t *offp) { return 0; }
|
size_t size, loff_t *offp) { return 0; }
|
||||||
ssize_t test_write(struct file *fp, const char __user *ptr,
|
static ssize_t test_write(struct file *fp, const char __user *ptr,
|
||||||
size_t size, loff_t *offp) { return 0; }
|
size_t size, loff_t *offp) { return 0; }
|
||||||
loff_t test_lseek(struct file *fp, loff_t off, int flag)
|
static loff_t test_lseek(struct file *fp, loff_t off, int flag)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
int test_release(struct inode *ip, struct file *fp)
|
static int test_release(struct inode *ip, struct file *fp)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
const struct proc_ops test_ops __attribute__ ((unused)) = {
|
const struct proc_ops test_ops __attribute__ ((unused)) = {
|
||||||
|
@ -4,7 +4,7 @@ dnl #
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_PUT_LINK], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_PUT_LINK], [
|
||||||
ZFS_LINUX_TEST_SRC([put_link_cookie], [
|
ZFS_LINUX_TEST_SRC([put_link_cookie], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
void put_link(struct inode *ip, void *cookie)
|
static void put_link(struct inode *ip, void *cookie)
|
||||||
{ return; }
|
{ return; }
|
||||||
static struct inode_operations
|
static struct inode_operations
|
||||||
iops __attribute__ ((unused)) = {
|
iops __attribute__ ((unused)) = {
|
||||||
@ -14,7 +14,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_PUT_LINK], [
|
|||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([put_link_nameidata], [
|
ZFS_LINUX_TEST_SRC([put_link_nameidata], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
void put_link(struct dentry *de, struct
|
static void put_link(struct dentry *de, struct
|
||||||
nameidata *nd, void *ptr) { return; }
|
nameidata *nd, void *ptr) { return; }
|
||||||
static struct inode_operations
|
static struct inode_operations
|
||||||
iops __attribute__ ((unused)) = {
|
iops __attribute__ ((unused)) = {
|
||||||
|
27
config/kernel-register_sysctl_table.m4
Normal file
27
config/kernel-register_sysctl_table.m4
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # Linux 6.5 removes register_sysctl_table
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_TABLE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([has_register_sysctl_table], [
|
||||||
|
#include <linux/sysctl.h>
|
||||||
|
|
||||||
|
static struct ctl_table dummy_table[] = {
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
],[
|
||||||
|
struct ctl_table_header *h
|
||||||
|
__attribute((unused)) = register_sysctl_table(dummy_table);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_REGISTER_SYSCTL_TABLE], [
|
||||||
|
AC_MSG_CHECKING([whether register_sysctl_table exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([has_register_sysctl_table], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_REGISTER_SYSCTL_TABLE, 1,
|
||||||
|
[register_sysctl_table exists])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
@ -8,7 +8,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
|
|||||||
dnl #
|
dnl #
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_rename2], [
|
ZFS_LINUX_TEST_SRC([inode_operations_rename2], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
int rename2_fn(struct inode *sip, struct dentry *sdp,
|
static int rename2_fn(struct inode *sip, struct dentry *sdp,
|
||||||
struct inode *tip, struct dentry *tdp,
|
struct inode *tip, struct dentry *tdp,
|
||||||
unsigned int flags) { return 0; }
|
unsigned int flags) { return 0; }
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
|
|||||||
dnl #
|
dnl #
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_rename_flags], [
|
ZFS_LINUX_TEST_SRC([inode_operations_rename_flags], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
int rename_fn(struct inode *sip, struct dentry *sdp,
|
static int rename_fn(struct inode *sip, struct dentry *sdp,
|
||||||
struct inode *tip, struct dentry *tdp,
|
struct inode *tip, struct dentry *tdp,
|
||||||
unsigned int flags) { return 0; }
|
unsigned int flags) { return 0; }
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
|
|||||||
dnl #
|
dnl #
|
||||||
ZFS_LINUX_TEST_SRC([dir_inode_operations_wrapper_rename2], [
|
ZFS_LINUX_TEST_SRC([dir_inode_operations_wrapper_rename2], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
int rename2_fn(struct inode *sip, struct dentry *sdp,
|
static int rename2_fn(struct inode *sip, struct dentry *sdp,
|
||||||
struct inode *tip, struct dentry *tdp,
|
struct inode *tip, struct dentry *tdp,
|
||||||
unsigned int flags) { return 0; }
|
unsigned int flags) { return 0; }
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
|
|||||||
dnl #
|
dnl #
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_rename_userns], [
|
ZFS_LINUX_TEST_SRC([inode_operations_rename_userns], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
int rename_fn(struct user_namespace *user_ns, struct inode *sip,
|
static int rename_fn(struct user_namespace *user_ns, struct inode *sip,
|
||||||
struct dentry *sdp, struct inode *tip, struct dentry *tdp,
|
struct dentry *sdp, struct inode *tip, struct dentry *tdp,
|
||||||
unsigned int flags) { return 0; }
|
unsigned int flags) { return 0; }
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
|
|||||||
dnl #
|
dnl #
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_rename_mnt_idmap], [
|
ZFS_LINUX_TEST_SRC([inode_operations_rename_mnt_idmap], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
int rename_fn(struct mnt_idmap *idmap, struct inode *sip,
|
static int rename_fn(struct mnt_idmap *idmap, struct inode *sip,
|
||||||
struct dentry *sdp, struct inode *tip, struct dentry *tdp,
|
struct dentry *sdp, struct inode *tip, struct dentry *tdp,
|
||||||
unsigned int flags) { return 0; }
|
unsigned int flags) { return 0; }
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SHOW_OPTIONS], [
|
|||||||
ZFS_LINUX_TEST_SRC([super_operations_show_options], [
|
ZFS_LINUX_TEST_SRC([super_operations_show_options], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int show_options(struct seq_file * x, struct dentry * y) {
|
static int show_options(struct seq_file * x, struct dentry * y) {
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,9 +8,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK], [
|
|||||||
ZFS_LINUX_TEST_SRC([super_block_s_shrink], [
|
ZFS_LINUX_TEST_SRC([super_block_s_shrink], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
int shrink(struct shrinker *s, struct shrink_control *sc)
|
|
||||||
{ return 0; }
|
|
||||||
|
|
||||||
static const struct super_block
|
static const struct super_block
|
||||||
sb __attribute__ ((unused)) = {
|
sb __attribute__ ((unused)) = {
|
||||||
.s_shrink.seeks = DEFAULT_SEEKS,
|
.s_shrink.seeks = DEFAULT_SEEKS,
|
||||||
@ -19,12 +16,44 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK], [
|
|||||||
],[])
|
],[])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.7 API change
|
||||||
|
dnl # s_shrink is now a pointer.
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK_PTR], [
|
||||||
|
ZFS_LINUX_TEST_SRC([super_block_s_shrink_ptr], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
static unsigned long shrinker_cb(struct shrinker *shrink,
|
||||||
|
struct shrink_control *sc) { return 0; }
|
||||||
|
static struct shrinker shrinker = {
|
||||||
|
.count_objects = shrinker_cb,
|
||||||
|
.scan_objects = shrinker_cb,
|
||||||
|
.seeks = DEFAULT_SEEKS,
|
||||||
|
};
|
||||||
|
static const struct super_block
|
||||||
|
sb __attribute__ ((unused)) = {
|
||||||
|
.s_shrink = &shrinker,
|
||||||
|
};
|
||||||
|
],[])
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SUPER_BLOCK_S_SHRINK], [
|
AC_DEFUN([ZFS_AC_KERNEL_SUPER_BLOCK_S_SHRINK], [
|
||||||
AC_MSG_CHECKING([whether super_block has s_shrink])
|
AC_MSG_CHECKING([whether super_block has s_shrink])
|
||||||
ZFS_LINUX_TEST_RESULT([super_block_s_shrink], [
|
ZFS_LINUX_TEST_RESULT([super_block_s_shrink], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_SUPER_BLOCK_S_SHRINK, 1,
|
||||||
|
[have super_block s_shrink])
|
||||||
],[
|
],[
|
||||||
ZFS_LINUX_TEST_ERROR([sb->s_shrink()])
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_CHECKING([whether super_block has s_shrink pointer])
|
||||||
|
ZFS_LINUX_TEST_RESULT([super_block_s_shrink_ptr], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_SUPER_BLOCK_S_SHRINK_PTR, 1,
|
||||||
|
[have super_block s_shrink pointer])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ZFS_LINUX_TEST_ERROR([sb->s_shrink()])
|
||||||
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -57,7 +86,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID], [
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG], [
|
||||||
ZFS_LINUX_TEST_SRC([register_shrinker_vararg], [
|
ZFS_LINUX_TEST_SRC([register_shrinker_vararg], [
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
unsigned long shrinker_cb(struct shrinker *shrink,
|
static unsigned long shrinker_cb(struct shrinker *shrink,
|
||||||
struct shrink_control *sc) { return 0; }
|
struct shrink_control *sc) { return 0; }
|
||||||
],[
|
],[
|
||||||
struct shrinker cache_shrinker = {
|
struct shrinker cache_shrinker = {
|
||||||
@ -72,7 +101,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG], [
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK], [
|
||||||
ZFS_LINUX_TEST_SRC([shrinker_cb_shrink_control], [
|
ZFS_LINUX_TEST_SRC([shrinker_cb_shrink_control], [
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
int shrinker_cb(struct shrinker *shrink,
|
static int shrinker_cb(struct shrinker *shrink,
|
||||||
struct shrink_control *sc) { return 0; }
|
struct shrink_control *sc) { return 0; }
|
||||||
],[
|
],[
|
||||||
struct shrinker cache_shrinker = {
|
struct shrinker cache_shrinker = {
|
||||||
@ -84,7 +113,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK], [
|
|||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([shrinker_cb_shrink_control_split], [
|
ZFS_LINUX_TEST_SRC([shrinker_cb_shrink_control_split], [
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
unsigned long shrinker_cb(struct shrinker *shrink,
|
static unsigned long shrinker_cb(struct shrinker *shrink,
|
||||||
struct shrink_control *sc) { return 0; }
|
struct shrink_control *sc) { return 0; }
|
||||||
],[
|
],[
|
||||||
struct shrinker cache_shrinker = {
|
struct shrinker cache_shrinker = {
|
||||||
@ -96,6 +125,25 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.7 API change
|
||||||
|
dnl # register_shrinker has been replaced by shrinker_register.
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_REGISTER], [
|
||||||
|
ZFS_LINUX_TEST_SRC([shrinker_register], [
|
||||||
|
#include <linux/shrinker.h>
|
||||||
|
static unsigned long shrinker_cb(struct shrinker *shrink,
|
||||||
|
struct shrink_control *sc) { return 0; }
|
||||||
|
],[
|
||||||
|
struct shrinker cache_shrinker = {
|
||||||
|
.count_objects = shrinker_cb,
|
||||||
|
.scan_objects = shrinker_cb,
|
||||||
|
.seeks = DEFAULT_SEEKS,
|
||||||
|
};
|
||||||
|
shrinker_register(&cache_shrinker);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SHRINKER_CALLBACK],[
|
AC_DEFUN([ZFS_AC_KERNEL_SHRINKER_CALLBACK],[
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 6.0 API change
|
dnl # 6.0 API change
|
||||||
@ -133,14 +181,36 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINKER_CALLBACK],[
|
|||||||
dnl # cs->shrink() is logically split in to
|
dnl # cs->shrink() is logically split in to
|
||||||
dnl # cs->count_objects() and cs->scan_objects()
|
dnl # cs->count_objects() and cs->scan_objects()
|
||||||
dnl #
|
dnl #
|
||||||
AC_MSG_CHECKING([if cs->count_objects callback exists])
|
AC_MSG_CHECKING(
|
||||||
|
[whether cs->count_objects callback exists])
|
||||||
ZFS_LINUX_TEST_RESULT(
|
ZFS_LINUX_TEST_RESULT(
|
||||||
[shrinker_cb_shrink_control_split],[
|
[shrinker_cb_shrink_control_split],[
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_SPLIT_SHRINKER_CALLBACK, 1,
|
AC_DEFINE(HAVE_SPLIT_SHRINKER_CALLBACK, 1,
|
||||||
[cs->count_objects exists])
|
[cs->count_objects exists])
|
||||||
],[
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(
|
||||||
|
[whether shrinker_register exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([shrinker_register], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_SHRINKER_REGISTER, 1,
|
||||||
|
[shrinker_register exists])
|
||||||
|
|
||||||
|
dnl # We assume that the split shrinker
|
||||||
|
dnl # callback exists if
|
||||||
|
dnl # shrinker_register() exists,
|
||||||
|
dnl # because the latter is a much more
|
||||||
|
dnl # recent addition, and the macro
|
||||||
|
dnl # test for shrinker_register() only
|
||||||
|
dnl # works if the callback is split
|
||||||
|
AC_DEFINE(HAVE_SPLIT_SHRINKER_CALLBACK,
|
||||||
|
1, [cs->count_objects exists])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
ZFS_LINUX_TEST_ERROR([shrinker])
|
ZFS_LINUX_TEST_ERROR([shrinker])
|
||||||
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@ -174,10 +244,12 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINK_CONTROL_STRUCT], [
|
|||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER], [
|
||||||
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK
|
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK
|
||||||
|
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK_PTR
|
||||||
ZFS_AC_KERNEL_SRC_SHRINK_CONTROL_HAS_NID
|
ZFS_AC_KERNEL_SRC_SHRINK_CONTROL_HAS_NID
|
||||||
ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK
|
ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK
|
||||||
ZFS_AC_KERNEL_SRC_SHRINK_CONTROL_STRUCT
|
ZFS_AC_KERNEL_SRC_SHRINK_CONTROL_STRUCT
|
||||||
ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG
|
ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG
|
||||||
|
ZFS_AC_KERNEL_SRC_SHRINKER_REGISTER
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SHRINKER], [
|
AC_DEFUN([ZFS_AC_KERNEL_SHRINKER], [
|
||||||
|
47
config/kernel-strlcpy.m4
Normal file
47
config/kernel-strlcpy.m4
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # 6.8.x replaced strlcpy with strscpy. Check for both so we can provide
|
||||||
|
dnl # appropriate fallbacks.
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_STRLCPY], [
|
||||||
|
ZFS_LINUX_TEST_SRC([kernel_has_strlcpy], [
|
||||||
|
#include <linux/string.h>
|
||||||
|
], [
|
||||||
|
const char *src = "goodbye";
|
||||||
|
char dst[32];
|
||||||
|
size_t len;
|
||||||
|
len = strlcpy(dst, src, sizeof (dst));
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_STRSCPY], [
|
||||||
|
ZFS_LINUX_TEST_SRC([kernel_has_strscpy], [
|
||||||
|
#include <linux/string.h>
|
||||||
|
], [
|
||||||
|
const char *src = "goodbye";
|
||||||
|
char dst[32];
|
||||||
|
ssize_t len;
|
||||||
|
len = strscpy(dst, src, sizeof (dst));
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_STRLCPY], [
|
||||||
|
AC_MSG_CHECKING([whether strlcpy() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([kernel_has_strlcpy], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_KERNEL_STRLCPY, 1,
|
||||||
|
[strlcpy() exists])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_STRSCPY], [
|
||||||
|
AC_MSG_CHECKING([whether strscpy() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([kernel_has_strscpy], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_KERNEL_STRSCPY, 1,
|
||||||
|
[strscpy() exists])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
@ -6,7 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SYMLINK], [
|
|||||||
ZFS_LINUX_TEST_SRC([symlink_mnt_idmap], [
|
ZFS_LINUX_TEST_SRC([symlink_mnt_idmap], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
int tmp_symlink(struct mnt_idmap *idmap,
|
static int tmp_symlink(struct mnt_idmap *idmap,
|
||||||
struct inode *inode ,struct dentry *dentry,
|
struct inode *inode ,struct dentry *dentry,
|
||||||
const char *path) { return 0; }
|
const char *path) { return 0; }
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SYMLINK], [
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
|
||||||
int tmp_symlink(struct user_namespace *userns,
|
static int tmp_symlink(struct user_namespace *userns,
|
||||||
struct inode *inode ,struct dentry *dentry,
|
struct inode *inode ,struct dentry *dentry,
|
||||||
const char *path) { return 0; }
|
const char *path) { return 0; }
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER_SETUP], [
|
|||||||
int data;
|
int data;
|
||||||
};
|
};
|
||||||
|
|
||||||
void task_expire(struct timer_list *tl)
|
static void task_expire(struct timer_list *tl)
|
||||||
{
|
{
|
||||||
struct my_task_timer *task_timer =
|
struct my_task_timer *task_timer =
|
||||||
from_timer(task_timer, tl, timer);
|
from_timer(task_timer, tl, timer);
|
||||||
@ -31,7 +31,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER_SETUP], [
|
|||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([timer_list_function], [
|
ZFS_LINUX_TEST_SRC([timer_list_function], [
|
||||||
#include <linux/timer.h>
|
#include <linux/timer.h>
|
||||||
void task_expire(struct timer_list *tl) {}
|
static void task_expire(struct timer_list *tl) {}
|
||||||
],[
|
],[
|
||||||
struct timer_list tl;
|
struct timer_list tl;
|
||||||
tl.function = task_expire;
|
tl.function = task_expire;
|
||||||
|
@ -9,7 +9,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
|
|||||||
dnl #
|
dnl #
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_mnt_idmap], [
|
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_mnt_idmap], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
int tmpfile(struct mnt_idmap *idmap,
|
static int tmpfile(struct mnt_idmap *idmap,
|
||||||
struct inode *inode, struct file *file,
|
struct inode *inode, struct file *file,
|
||||||
umode_t mode) { return 0; }
|
umode_t mode) { return 0; }
|
||||||
static struct inode_operations
|
static struct inode_operations
|
||||||
@ -22,7 +22,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
|
|||||||
dnl #
|
dnl #
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [
|
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
int tmpfile(struct user_namespace *userns,
|
static int tmpfile(struct user_namespace *userns,
|
||||||
struct inode *inode, struct file *file,
|
struct inode *inode, struct file *file,
|
||||||
umode_t mode) { return 0; }
|
umode_t mode) { return 0; }
|
||||||
static struct inode_operations
|
static struct inode_operations
|
||||||
@ -36,7 +36,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
|
|||||||
dnl #
|
dnl #
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry_userns], [
|
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry_userns], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
int tmpfile(struct user_namespace *userns,
|
static int tmpfile(struct user_namespace *userns,
|
||||||
struct inode *inode, struct dentry *dentry,
|
struct inode *inode, struct dentry *dentry,
|
||||||
umode_t mode) { return 0; }
|
umode_t mode) { return 0; }
|
||||||
static struct inode_operations
|
static struct inode_operations
|
||||||
@ -46,7 +46,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
|
|||||||
],[])
|
],[])
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry], [
|
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
int tmpfile(struct inode *inode, struct dentry *dentry,
|
static int tmpfile(struct inode *inode, struct dentry *dentry,
|
||||||
umode_t mode) { return 0; }
|
umode_t mode) { return 0; }
|
||||||
static struct inode_operations
|
static struct inode_operations
|
||||||
iops __attribute__ ((unused)) = {
|
iops __attribute__ ((unused)) = {
|
||||||
|
@ -5,7 +5,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
|
|||||||
ZFS_LINUX_TEST_SRC([direct_io_iter], [
|
ZFS_LINUX_TEST_SRC([direct_io_iter], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
ssize_t test_direct_IO(struct kiocb *kiocb,
|
static ssize_t test_direct_IO(struct kiocb *kiocb,
|
||||||
struct iov_iter *iter) { return 0; }
|
struct iov_iter *iter) { return 0; }
|
||||||
|
|
||||||
static const struct address_space_operations
|
static const struct address_space_operations
|
||||||
@ -17,7 +17,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
|
|||||||
ZFS_LINUX_TEST_SRC([direct_io_iter_offset], [
|
ZFS_LINUX_TEST_SRC([direct_io_iter_offset], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
ssize_t test_direct_IO(struct kiocb *kiocb,
|
static ssize_t test_direct_IO(struct kiocb *kiocb,
|
||||||
struct iov_iter *iter, loff_t offset) { return 0; }
|
struct iov_iter *iter, loff_t offset) { return 0; }
|
||||||
|
|
||||||
static const struct address_space_operations
|
static const struct address_space_operations
|
||||||
@ -29,7 +29,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
|
|||||||
ZFS_LINUX_TEST_SRC([direct_io_iter_rw_offset], [
|
ZFS_LINUX_TEST_SRC([direct_io_iter_rw_offset], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
ssize_t test_direct_IO(int rw, struct kiocb *kiocb,
|
static ssize_t test_direct_IO(int rw, struct kiocb *kiocb,
|
||||||
struct iov_iter *iter, loff_t offset) { return 0; }
|
struct iov_iter *iter, loff_t offset) { return 0; }
|
||||||
|
|
||||||
static const struct address_space_operations
|
static const struct address_space_operations
|
||||||
@ -41,7 +41,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
|
|||||||
ZFS_LINUX_TEST_SRC([direct_io_iovec], [
|
ZFS_LINUX_TEST_SRC([direct_io_iovec], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
ssize_t test_direct_IO(int rw, struct kiocb *kiocb,
|
static ssize_t test_direct_IO(int rw, struct kiocb *kiocb,
|
||||||
const struct iovec *iov, loff_t offset,
|
const struct iovec *iov, loff_t offset,
|
||||||
unsigned long nr_segs) { return 0; }
|
unsigned long nr_segs) { return 0; }
|
||||||
|
|
||||||
|
50
config/kernel-vfs-extended-file_range.m4
Normal file
50
config/kernel-vfs-extended-file_range.m4
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # EL7 have backported copy_file_range and clone_file_range and
|
||||||
|
dnl # added them to an "extended" file_operations struct.
|
||||||
|
dnl #
|
||||||
|
dnl # We're testing for both functions in one here, because they will only
|
||||||
|
dnl # ever appear together and we don't want to match a similar method in
|
||||||
|
dnl # some future vendor kernel.
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_FILE_OPERATIONS_EXTEND], [
|
||||||
|
ZFS_LINUX_TEST_SRC([vfs_file_operations_extend], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
|
||||||
|
static ssize_t test_copy_file_range(struct file *src_file,
|
||||||
|
loff_t src_off, struct file *dst_file, loff_t dst_off,
|
||||||
|
size_t len, unsigned int flags) {
|
||||||
|
(void) src_file; (void) src_off;
|
||||||
|
(void) dst_file; (void) dst_off;
|
||||||
|
(void) len; (void) flags;
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int test_clone_file_range(struct file *src_file,
|
||||||
|
loff_t src_off, struct file *dst_file, loff_t dst_off,
|
||||||
|
u64 len) {
|
||||||
|
(void) src_file; (void) src_off;
|
||||||
|
(void) dst_file; (void) dst_off;
|
||||||
|
(void) len;
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct file_operations_extend
|
||||||
|
fops __attribute__ ((unused)) = {
|
||||||
|
.kabi_fops = {},
|
||||||
|
.copy_file_range = test_copy_file_range,
|
||||||
|
.clone_file_range = test_clone_file_range,
|
||||||
|
};
|
||||||
|
],[])
|
||||||
|
])
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_VFS_FILE_OPERATIONS_EXTEND], [
|
||||||
|
AC_MSG_CHECKING([whether file_operations_extend takes \
|
||||||
|
.copy_file_range() and .clone_file_range()])
|
||||||
|
ZFS_LINUX_TEST_RESULT([vfs_file_operations_extend], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_VFS_FILE_OPERATIONS_EXTEND, 1,
|
||||||
|
[file_operations_extend takes .copy_file_range()
|
||||||
|
and .clone_file_range()])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
164
config/kernel-vfs-file_range.m4
Normal file
164
config/kernel-vfs-file_range.m4
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # The *_file_range APIs have a long history:
|
||||||
|
dnl #
|
||||||
|
dnl # 2.6.29: BTRFS_IOC_CLONE and BTRFS_IOC_CLONE_RANGE ioctl introduced
|
||||||
|
dnl # 3.12: BTRFS_IOC_FILE_EXTENT_SAME ioctl introduced
|
||||||
|
dnl #
|
||||||
|
dnl # 4.5: copy_file_range() syscall introduced, added to VFS
|
||||||
|
dnl # 4.5: BTRFS_IOC_CLONE and BTRFS_IOC_CLONE_RANGE renamed to FICLONE ands
|
||||||
|
dnl # FICLONERANGE, added to VFS as clone_file_range()
|
||||||
|
dnl # 4.5: BTRFS_IOC_FILE_EXTENT_SAME renamed to FIDEDUPERANGE, added to VFS
|
||||||
|
dnl # as dedupe_file_range()
|
||||||
|
dnl #
|
||||||
|
dnl # 4.20: VFS clone_file_range() and dedupe_file_range() replaced by
|
||||||
|
dnl # remap_file_range()
|
||||||
|
dnl #
|
||||||
|
dnl # 5.3: VFS copy_file_range() expected to do its own fallback,
|
||||||
|
dnl # generic_copy_file_range() added to support it
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_COPY_FILE_RANGE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([vfs_copy_file_range], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
|
||||||
|
static ssize_t test_copy_file_range(struct file *src_file,
|
||||||
|
loff_t src_off, struct file *dst_file, loff_t dst_off,
|
||||||
|
size_t len, unsigned int flags) {
|
||||||
|
(void) src_file; (void) src_off;
|
||||||
|
(void) dst_file; (void) dst_off;
|
||||||
|
(void) len; (void) flags;
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct file_operations
|
||||||
|
fops __attribute__ ((unused)) = {
|
||||||
|
.copy_file_range = test_copy_file_range,
|
||||||
|
};
|
||||||
|
],[])
|
||||||
|
])
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_VFS_COPY_FILE_RANGE], [
|
||||||
|
AC_MSG_CHECKING([whether fops->copy_file_range() is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([vfs_copy_file_range], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_VFS_COPY_FILE_RANGE, 1,
|
||||||
|
[fops->copy_file_range() is available])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_GENERIC_COPY_FILE_RANGE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([generic_copy_file_range], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
], [
|
||||||
|
struct file *src_file __attribute__ ((unused)) = NULL;
|
||||||
|
loff_t src_off __attribute__ ((unused)) = 0;
|
||||||
|
struct file *dst_file __attribute__ ((unused)) = NULL;
|
||||||
|
loff_t dst_off __attribute__ ((unused)) = 0;
|
||||||
|
size_t len __attribute__ ((unused)) = 0;
|
||||||
|
unsigned int flags __attribute__ ((unused)) = 0;
|
||||||
|
generic_copy_file_range(src_file, src_off, dst_file, dst_off,
|
||||||
|
len, flags);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_VFS_GENERIC_COPY_FILE_RANGE], [
|
||||||
|
AC_MSG_CHECKING([whether generic_copy_file_range() is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT_SYMBOL([generic_copy_file_range],
|
||||||
|
[generic_copy_file_range], [fs/read_write.c], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_VFS_GENERIC_COPY_FILE_RANGE, 1,
|
||||||
|
[generic_copy_file_range() is available])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_CLONE_FILE_RANGE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([vfs_clone_file_range], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
|
||||||
|
static int test_clone_file_range(struct file *src_file,
|
||||||
|
loff_t src_off, struct file *dst_file, loff_t dst_off,
|
||||||
|
u64 len) {
|
||||||
|
(void) src_file; (void) src_off;
|
||||||
|
(void) dst_file; (void) dst_off;
|
||||||
|
(void) len;
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct file_operations
|
||||||
|
fops __attribute__ ((unused)) = {
|
||||||
|
.clone_file_range = test_clone_file_range,
|
||||||
|
};
|
||||||
|
],[])
|
||||||
|
])
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_VFS_CLONE_FILE_RANGE], [
|
||||||
|
AC_MSG_CHECKING([whether fops->clone_file_range() is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([vfs_clone_file_range], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_VFS_CLONE_FILE_RANGE, 1,
|
||||||
|
[fops->clone_file_range() is available])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DEDUPE_FILE_RANGE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([vfs_dedupe_file_range], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
|
||||||
|
static int test_dedupe_file_range(struct file *src_file,
|
||||||
|
loff_t src_off, struct file *dst_file, loff_t dst_off,
|
||||||
|
u64 len) {
|
||||||
|
(void) src_file; (void) src_off;
|
||||||
|
(void) dst_file; (void) dst_off;
|
||||||
|
(void) len;
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct file_operations
|
||||||
|
fops __attribute__ ((unused)) = {
|
||||||
|
.dedupe_file_range = test_dedupe_file_range,
|
||||||
|
};
|
||||||
|
],[])
|
||||||
|
])
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_VFS_DEDUPE_FILE_RANGE], [
|
||||||
|
AC_MSG_CHECKING([whether fops->dedupe_file_range() is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([vfs_dedupe_file_range], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_VFS_DEDUPE_FILE_RANGE, 1,
|
||||||
|
[fops->dedupe_file_range() is available])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_REMAP_FILE_RANGE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([vfs_remap_file_range], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
|
||||||
|
static loff_t test_remap_file_range(struct file *src_file,
|
||||||
|
loff_t src_off, struct file *dst_file, loff_t dst_off,
|
||||||
|
loff_t len, unsigned int flags) {
|
||||||
|
(void) src_file; (void) src_off;
|
||||||
|
(void) dst_file; (void) dst_off;
|
||||||
|
(void) len; (void) flags;
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct file_operations
|
||||||
|
fops __attribute__ ((unused)) = {
|
||||||
|
.remap_file_range = test_remap_file_range,
|
||||||
|
};
|
||||||
|
],[])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_VFS_REMAP_FILE_RANGE], [
|
||||||
|
AC_MSG_CHECKING([whether fops->remap_file_range() is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([vfs_remap_file_range], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_VFS_REMAP_FILE_RANGE, 1,
|
||||||
|
[fops->remap_file_range() is available])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
@ -6,8 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/uio.h>
|
#include <linux/uio.h>
|
||||||
],[
|
],[
|
||||||
int type __attribute__ ((unused)) =
|
int type __attribute__ ((unused)) = ITER_KVEC;
|
||||||
ITER_IOVEC | ITER_KVEC | ITER_BVEC | ITER_PIPE;
|
|
||||||
])
|
])
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([iov_iter_advance], [
|
ZFS_LINUX_TEST_SRC([iov_iter_advance], [
|
||||||
@ -93,6 +92,14 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [
|
|||||||
struct iov_iter iter = { 0 };
|
struct iov_iter iter = { 0 };
|
||||||
__attribute__((unused)) enum iter_type i = iov_iter_type(&iter);
|
__attribute__((unused)) enum iter_type i = iov_iter_type(&iter);
|
||||||
])
|
])
|
||||||
|
|
||||||
|
ZFS_LINUX_TEST_SRC([iter_iov], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/uio.h>
|
||||||
|
],[
|
||||||
|
struct iov_iter iter = { 0 };
|
||||||
|
__attribute__((unused)) const struct iovec *iov = iter_iov(&iter);
|
||||||
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [
|
AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [
|
||||||
@ -201,4 +208,19 @@ AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [
|
|||||||
AC_DEFINE(HAVE_VFS_IOV_ITER, 1,
|
AC_DEFINE(HAVE_VFS_IOV_ITER, 1,
|
||||||
[All required iov_iter interfaces are available])
|
[All required iov_iter interfaces are available])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # Kernel 6.5 introduces the iter_iov() function that returns the
|
||||||
|
dnl # __iov member of an iov_iter*. The iov member was renamed to this
|
||||||
|
dnl # __iov member, and is intended to be accessed via the helper
|
||||||
|
dnl # function now.
|
||||||
|
dnl #
|
||||||
|
AC_MSG_CHECKING([whether iter_iov() is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([iter_iov], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_ITER_IOV, 1,
|
||||||
|
[iter_iov() is available])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
])
|
])
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [
|
||||||
ZFS_LINUX_TEST_SRC([file_operations_iterate_shared], [
|
ZFS_LINUX_TEST_SRC([file_operations_iterate_shared], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
int iterate(struct file *filp, struct dir_context * context)
|
static int iterate(struct file *filp, struct dir_context * context)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
static const struct file_operations fops
|
static const struct file_operations fops
|
||||||
@ -12,7 +12,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [
|
|||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([file_operations_iterate], [
|
ZFS_LINUX_TEST_SRC([file_operations_iterate], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
int iterate(struct file *filp,
|
static int iterate(struct file *filp,
|
||||||
struct dir_context *context) { return 0; }
|
struct dir_context *context) { return 0; }
|
||||||
|
|
||||||
static const struct file_operations fops
|
static const struct file_operations fops
|
||||||
@ -27,7 +27,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [
|
|||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([file_operations_readdir], [
|
ZFS_LINUX_TEST_SRC([file_operations_readdir], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
int readdir(struct file *filp, void *entry,
|
static int readdir(struct file *filp, void *entry,
|
||||||
filldir_t func) { return 0; }
|
filldir_t func) { return 0; }
|
||||||
|
|
||||||
static const struct file_operations fops
|
static const struct file_operations fops
|
||||||
|
@ -5,9 +5,9 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_RW_ITERATE], [
|
|||||||
ZFS_LINUX_TEST_SRC([file_operations_rw], [
|
ZFS_LINUX_TEST_SRC([file_operations_rw], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
|
static ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
|
static ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
static const struct file_operations
|
static const struct file_operations
|
||||||
|
@ -6,7 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITEPAGE_T], [
|
|||||||
dnl #
|
dnl #
|
||||||
ZFS_LINUX_TEST_SRC([writepage_t_folio], [
|
ZFS_LINUX_TEST_SRC([writepage_t_folio], [
|
||||||
#include <linux/writeback.h>
|
#include <linux/writeback.h>
|
||||||
int putpage(struct folio *folio,
|
static int putpage(struct folio *folio,
|
||||||
struct writeback_control *wbc, void *data)
|
struct writeback_control *wbc, void *data)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
writepage_t func = putpage;
|
writepage_t func = putpage;
|
||||||
|
@ -68,7 +68,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
|
|||||||
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
int get(const struct xattr_handler *handler,
|
static int get(const struct xattr_handler *handler,
|
||||||
struct dentry *dentry, struct inode *inode,
|
struct dentry *dentry, struct inode *inode,
|
||||||
const char *name, void *buffer, size_t size) { return 0; }
|
const char *name, void *buffer, size_t size) { return 0; }
|
||||||
static const struct xattr_handler
|
static const struct xattr_handler
|
||||||
@ -80,7 +80,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
|
|||||||
ZFS_LINUX_TEST_SRC([xattr_handler_get_xattr_handler], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_get_xattr_handler], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
int get(const struct xattr_handler *handler,
|
static int get(const struct xattr_handler *handler,
|
||||||
struct dentry *dentry, const char *name,
|
struct dentry *dentry, const char *name,
|
||||||
void *buffer, size_t size) { return 0; }
|
void *buffer, size_t size) { return 0; }
|
||||||
static const struct xattr_handler
|
static const struct xattr_handler
|
||||||
@ -92,7 +92,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
|
|||||||
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
int get(struct dentry *dentry, const char *name,
|
static int get(struct dentry *dentry, const char *name,
|
||||||
void *buffer, size_t size, int handler_flags)
|
void *buffer, size_t size, int handler_flags)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
static const struct xattr_handler
|
static const struct xattr_handler
|
||||||
@ -104,7 +104,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
|
|||||||
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode_flags], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode_flags], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
int get(const struct xattr_handler *handler,
|
static int get(const struct xattr_handler *handler,
|
||||||
struct dentry *dentry, struct inode *inode,
|
struct dentry *dentry, struct inode *inode,
|
||||||
const char *name, void *buffer,
|
const char *name, void *buffer,
|
||||||
size_t size, int flags) { return 0; }
|
size_t size, int flags) { return 0; }
|
||||||
@ -182,7 +182,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
|
|||||||
ZFS_LINUX_TEST_SRC([xattr_handler_set_mnt_idmap], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_set_mnt_idmap], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
int set(const struct xattr_handler *handler,
|
static int set(const struct xattr_handler *handler,
|
||||||
struct mnt_idmap *idmap,
|
struct mnt_idmap *idmap,
|
||||||
struct dentry *dentry, struct inode *inode,
|
struct dentry *dentry, struct inode *inode,
|
||||||
const char *name, const void *buffer,
|
const char *name, const void *buffer,
|
||||||
@ -197,7 +197,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
|
|||||||
ZFS_LINUX_TEST_SRC([xattr_handler_set_userns], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_set_userns], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
int set(const struct xattr_handler *handler,
|
static int set(const struct xattr_handler *handler,
|
||||||
struct user_namespace *mnt_userns,
|
struct user_namespace *mnt_userns,
|
||||||
struct dentry *dentry, struct inode *inode,
|
struct dentry *dentry, struct inode *inode,
|
||||||
const char *name, const void *buffer,
|
const char *name, const void *buffer,
|
||||||
@ -212,7 +212,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
|
|||||||
ZFS_LINUX_TEST_SRC([xattr_handler_set_dentry_inode], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_set_dentry_inode], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
int set(const struct xattr_handler *handler,
|
static int set(const struct xattr_handler *handler,
|
||||||
struct dentry *dentry, struct inode *inode,
|
struct dentry *dentry, struct inode *inode,
|
||||||
const char *name, const void *buffer,
|
const char *name, const void *buffer,
|
||||||
size_t size, int flags)
|
size_t size, int flags)
|
||||||
@ -226,7 +226,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
|
|||||||
ZFS_LINUX_TEST_SRC([xattr_handler_set_xattr_handler], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_set_xattr_handler], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
int set(const struct xattr_handler *handler,
|
static int set(const struct xattr_handler *handler,
|
||||||
struct dentry *dentry, const char *name,
|
struct dentry *dentry, const char *name,
|
||||||
const void *buffer, size_t size, int flags)
|
const void *buffer, size_t size, int flags)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
@ -239,7 +239,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
|
|||||||
ZFS_LINUX_TEST_SRC([xattr_handler_set_dentry], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_set_dentry], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
int set(struct dentry *dentry, const char *name,
|
static int set(struct dentry *dentry, const char *name,
|
||||||
const void *buffer, size_t size, int flags,
|
const void *buffer, size_t size, int flags,
|
||||||
int handler_flags) { return 0; }
|
int handler_flags) { return 0; }
|
||||||
static const struct xattr_handler
|
static const struct xattr_handler
|
||||||
@ -325,7 +325,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_LIST], [
|
|||||||
ZFS_LINUX_TEST_SRC([xattr_handler_list_simple], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_list_simple], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
bool list(struct dentry *dentry) { return 0; }
|
static bool list(struct dentry *dentry) { return 0; }
|
||||||
static const struct xattr_handler
|
static const struct xattr_handler
|
||||||
xops __attribute__ ((unused)) = {
|
xops __attribute__ ((unused)) = {
|
||||||
.list = list,
|
.list = list,
|
||||||
@ -335,7 +335,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_LIST], [
|
|||||||
ZFS_LINUX_TEST_SRC([xattr_handler_list_xattr_handler], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_list_xattr_handler], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
size_t list(const struct xattr_handler *handler,
|
static size_t list(const struct xattr_handler *handler,
|
||||||
struct dentry *dentry, char *list, size_t list_size,
|
struct dentry *dentry, char *list, size_t list_size,
|
||||||
const char *name, size_t name_len) { return 0; }
|
const char *name, size_t name_len) { return 0; }
|
||||||
static const struct xattr_handler
|
static const struct xattr_handler
|
||||||
@ -347,7 +347,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_LIST], [
|
|||||||
ZFS_LINUX_TEST_SRC([xattr_handler_list_dentry], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_list_dentry], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
size_t list(struct dentry *dentry,
|
static size_t list(struct dentry *dentry,
|
||||||
char *list, size_t list_size,
|
char *list, size_t list_size,
|
||||||
const char *name, size_t name_len,
|
const char *name, size_t name_len,
|
||||||
int handler_flags) { return 0; }
|
int handler_flags) { return 0; }
|
||||||
|
@ -116,6 +116,12 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_VFS_RW_ITERATE
|
ZFS_AC_KERNEL_SRC_VFS_RW_ITERATE
|
||||||
ZFS_AC_KERNEL_SRC_VFS_GENERIC_WRITE_CHECKS
|
ZFS_AC_KERNEL_SRC_VFS_GENERIC_WRITE_CHECKS
|
||||||
ZFS_AC_KERNEL_SRC_VFS_IOV_ITER
|
ZFS_AC_KERNEL_SRC_VFS_IOV_ITER
|
||||||
|
ZFS_AC_KERNEL_SRC_VFS_COPY_FILE_RANGE
|
||||||
|
ZFS_AC_KERNEL_SRC_VFS_GENERIC_COPY_FILE_RANGE
|
||||||
|
ZFS_AC_KERNEL_SRC_VFS_REMAP_FILE_RANGE
|
||||||
|
ZFS_AC_KERNEL_SRC_VFS_CLONE_FILE_RANGE
|
||||||
|
ZFS_AC_KERNEL_SRC_VFS_DEDUPE_FILE_RANGE
|
||||||
|
ZFS_AC_KERNEL_SRC_VFS_FILE_OPERATIONS_EXTEND
|
||||||
ZFS_AC_KERNEL_SRC_KMAP_ATOMIC_ARGS
|
ZFS_AC_KERNEL_SRC_KMAP_ATOMIC_ARGS
|
||||||
ZFS_AC_KERNEL_SRC_FOLLOW_DOWN_ONE
|
ZFS_AC_KERNEL_SRC_FOLLOW_DOWN_ONE
|
||||||
ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN
|
ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN
|
||||||
@ -143,6 +149,8 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_SYSFS
|
ZFS_AC_KERNEL_SRC_SYSFS
|
||||||
ZFS_AC_KERNEL_SRC_SET_SPECIAL_STATE
|
ZFS_AC_KERNEL_SRC_SET_SPECIAL_STATE
|
||||||
ZFS_AC_KERNEL_SRC_STANDALONE_LINUX_STDARG
|
ZFS_AC_KERNEL_SRC_STANDALONE_LINUX_STDARG
|
||||||
|
ZFS_AC_KERNEL_SRC_STRLCPY
|
||||||
|
ZFS_AC_KERNEL_SRC_STRSCPY
|
||||||
ZFS_AC_KERNEL_SRC_PAGEMAP_FOLIO_WAIT_BIT
|
ZFS_AC_KERNEL_SRC_PAGEMAP_FOLIO_WAIT_BIT
|
||||||
ZFS_AC_KERNEL_SRC_ADD_DISK
|
ZFS_AC_KERNEL_SRC_ADD_DISK
|
||||||
ZFS_AC_KERNEL_SRC_KTHREAD
|
ZFS_AC_KERNEL_SRC_KTHREAD
|
||||||
@ -150,15 +158,22 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC___COPY_FROM_USER_INATOMIC
|
ZFS_AC_KERNEL_SRC___COPY_FROM_USER_INATOMIC
|
||||||
ZFS_AC_KERNEL_SRC_USER_NS_COMMON_INUM
|
ZFS_AC_KERNEL_SRC_USER_NS_COMMON_INUM
|
||||||
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_IATTR_VFSID
|
ZFS_AC_KERNEL_SRC_IATTR_VFSID
|
||||||
ZFS_AC_KERNEL_SRC_FILEMAP
|
ZFS_AC_KERNEL_SRC_FILEMAP
|
||||||
ZFS_AC_KERNEL_SRC_WRITEPAGE_T
|
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_COPY_SPLICE_READ
|
||||||
|
ZFS_AC_KERNEL_SRC_SYNC_BDEV
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
powerpc*)
|
powerpc*)
|
||||||
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
|
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
|
||||||
ZFS_AC_KERNEL_SRC_FLUSH_DCACHE_PAGE
|
ZFS_AC_KERNEL_SRC_FLUSH_DCACHE_PAGE
|
||||||
;;
|
;;
|
||||||
|
riscv*)
|
||||||
|
ZFS_AC_KERNEL_SRC_FLUSH_DCACHE_PAGE
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AC_MSG_CHECKING([for available kernel interfaces])
|
AC_MSG_CHECKING([for available kernel interfaces])
|
||||||
@ -249,6 +264,12 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_VFS_RW_ITERATE
|
ZFS_AC_KERNEL_VFS_RW_ITERATE
|
||||||
ZFS_AC_KERNEL_VFS_GENERIC_WRITE_CHECKS
|
ZFS_AC_KERNEL_VFS_GENERIC_WRITE_CHECKS
|
||||||
ZFS_AC_KERNEL_VFS_IOV_ITER
|
ZFS_AC_KERNEL_VFS_IOV_ITER
|
||||||
|
ZFS_AC_KERNEL_VFS_COPY_FILE_RANGE
|
||||||
|
ZFS_AC_KERNEL_VFS_GENERIC_COPY_FILE_RANGE
|
||||||
|
ZFS_AC_KERNEL_VFS_REMAP_FILE_RANGE
|
||||||
|
ZFS_AC_KERNEL_VFS_CLONE_FILE_RANGE
|
||||||
|
ZFS_AC_KERNEL_VFS_DEDUPE_FILE_RANGE
|
||||||
|
ZFS_AC_KERNEL_VFS_FILE_OPERATIONS_EXTEND
|
||||||
ZFS_AC_KERNEL_KMAP_ATOMIC_ARGS
|
ZFS_AC_KERNEL_KMAP_ATOMIC_ARGS
|
||||||
ZFS_AC_KERNEL_FOLLOW_DOWN_ONE
|
ZFS_AC_KERNEL_FOLLOW_DOWN_ONE
|
||||||
ZFS_AC_KERNEL_MAKE_REQUEST_FN
|
ZFS_AC_KERNEL_MAKE_REQUEST_FN
|
||||||
@ -276,6 +297,8 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_SYSFS
|
ZFS_AC_KERNEL_SYSFS
|
||||||
ZFS_AC_KERNEL_SET_SPECIAL_STATE
|
ZFS_AC_KERNEL_SET_SPECIAL_STATE
|
||||||
ZFS_AC_KERNEL_STANDALONE_LINUX_STDARG
|
ZFS_AC_KERNEL_STANDALONE_LINUX_STDARG
|
||||||
|
ZFS_AC_KERNEL_STRLCPY
|
||||||
|
ZFS_AC_KERNEL_STRSCPY
|
||||||
ZFS_AC_KERNEL_PAGEMAP_FOLIO_WAIT_BIT
|
ZFS_AC_KERNEL_PAGEMAP_FOLIO_WAIT_BIT
|
||||||
ZFS_AC_KERNEL_ADD_DISK
|
ZFS_AC_KERNEL_ADD_DISK
|
||||||
ZFS_AC_KERNEL_KTHREAD
|
ZFS_AC_KERNEL_KTHREAD
|
||||||
@ -283,15 +306,22 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL___COPY_FROM_USER_INATOMIC
|
ZFS_AC_KERNEL___COPY_FROM_USER_INATOMIC
|
||||||
ZFS_AC_KERNEL_USER_NS_COMMON_INUM
|
ZFS_AC_KERNEL_USER_NS_COMMON_INUM
|
||||||
ZFS_AC_KERNEL_IDMAP_MNT_API
|
ZFS_AC_KERNEL_IDMAP_MNT_API
|
||||||
|
ZFS_AC_KERNEL_IDMAP_NO_USERNS
|
||||||
ZFS_AC_KERNEL_IATTR_VFSID
|
ZFS_AC_KERNEL_IATTR_VFSID
|
||||||
ZFS_AC_KERNEL_FILEMAP
|
ZFS_AC_KERNEL_FILEMAP
|
||||||
ZFS_AC_KERNEL_WRITEPAGE_T
|
ZFS_AC_KERNEL_WRITEPAGE_T
|
||||||
ZFS_AC_KERNEL_RECLAIMED
|
ZFS_AC_KERNEL_RECLAIMED
|
||||||
|
ZFS_AC_KERNEL_REGISTER_SYSCTL_TABLE
|
||||||
|
ZFS_AC_KERNEL_COPY_SPLICE_READ
|
||||||
|
ZFS_AC_KERNEL_SYNC_BDEV
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
powerpc*)
|
powerpc*)
|
||||||
ZFS_AC_KERNEL_CPU_HAS_FEATURE
|
ZFS_AC_KERNEL_CPU_HAS_FEATURE
|
||||||
ZFS_AC_KERNEL_FLUSH_DCACHE_PAGE
|
ZFS_AC_KERNEL_FLUSH_DCACHE_PAGE
|
||||||
;;
|
;;
|
||||||
|
riscv*)
|
||||||
|
ZFS_AC_KERNEL_FLUSH_DCACHE_PAGE
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -83,6 +83,11 @@ srpm-common:
|
|||||||
rpm-local || exit 1; \
|
rpm-local || exit 1; \
|
||||||
LANG=C $(RPMBUILD) \
|
LANG=C $(RPMBUILD) \
|
||||||
--define "_tmppath $$rpmbuild/TMP" \
|
--define "_tmppath $$rpmbuild/TMP" \
|
||||||
|
--define "_builddir $$rpmbuild/BUILD" \
|
||||||
|
--define "_rpmdir $$rpmbuild/RPMS" \
|
||||||
|
--define "_srcrpmdir $$rpmbuild/SRPMS" \
|
||||||
|
--define "_specdir $$rpmbuild/SPECS" \
|
||||||
|
--define "_sourcedir $$rpmbuild/SOURCES" \
|
||||||
--define "_topdir $$rpmbuild" \
|
--define "_topdir $$rpmbuild" \
|
||||||
$(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \
|
$(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \
|
||||||
cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \
|
cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \
|
||||||
@ -99,6 +104,11 @@ rpm-common:
|
|||||||
rpm-local || exit 1; \
|
rpm-local || exit 1; \
|
||||||
LANG=C ${RPMBUILD} \
|
LANG=C ${RPMBUILD} \
|
||||||
--define "_tmppath $$rpmbuild/TMP" \
|
--define "_tmppath $$rpmbuild/TMP" \
|
||||||
|
--define "_builddir $$rpmbuild/BUILD" \
|
||||||
|
--define "_rpmdir $$rpmbuild/RPMS" \
|
||||||
|
--define "_srcrpmdir $$rpmbuild/SRPMS" \
|
||||||
|
--define "_specdir $$rpmbuild/SPECS" \
|
||||||
|
--define "_sourcedir $$rpmbuild/SOURCES" \
|
||||||
--define "_topdir $$rpmbuild" \
|
--define "_topdir $$rpmbuild" \
|
||||||
$(def) --rebuild $$rpmpkg || exit 1; \
|
$(def) --rebuild $$rpmpkg || exit 1; \
|
||||||
cp $$rpmbuild/RPMS/*/* . || exit 1; \
|
cp $$rpmbuild/RPMS/*/* . || exit 1; \
|
||||||
|
@ -358,6 +358,9 @@ AC_DEFUN([ZFS_AC_RPM], [
|
|||||||
AS_IF([test -n "$udevruledir" ], [
|
AS_IF([test -n "$udevruledir" ], [
|
||||||
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_udevruledir $(udevruledir)"'
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_udevruledir $(udevruledir)"'
|
||||||
])
|
])
|
||||||
|
AS_IF([test -n "$bashcompletiondir" ], [
|
||||||
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_bashcompletiondir $(bashcompletiondir)"'
|
||||||
|
])
|
||||||
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_SYSTEMD)'
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_SYSTEMD)'
|
||||||
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PYZFS)'
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PYZFS)'
|
||||||
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PAM)'
|
RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PAM)'
|
||||||
@ -617,6 +620,18 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
|||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
fi
|
fi
|
||||||
AC_SUBST(RPM_DEFINE_INITRAMFS)
|
AC_SUBST(RPM_DEFINE_INITRAMFS)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([default bash completion directory])
|
||||||
|
case "$VENDOR" in
|
||||||
|
ubuntu) bashcompletiondir=/usr/share/bash-completion/completions ;;
|
||||||
|
debian) bashcompletiondir=/usr/share/bash-completion/completions ;;
|
||||||
|
freebsd) bashcompletiondir=$sysconfdir/bash_completion.d;;
|
||||||
|
gentoo) bashcompletiondir=/usr/share/bash-completion/completions ;;
|
||||||
|
*) bashcompletiondir=/etc/bash_completion.d ;;
|
||||||
|
esac
|
||||||
|
AC_MSG_RESULT([$bashcompletiondir])
|
||||||
|
AC_SUBST(bashcompletiondir)
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
|
@ -67,6 +67,7 @@ ZFS_AC_DEBUG_INVARIANTS
|
|||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
contrib/debian/rules
|
contrib/debian/rules
|
||||||
|
contrib/debian/changelog
|
||||||
Makefile
|
Makefile
|
||||||
include/Makefile
|
include/Makefile
|
||||||
lib/libzfs/libzfs.pc
|
lib/libzfs/libzfs.pc
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
bashcompletiondir = $(sysconfdir)/bash_completion.d
|
|
||||||
|
|
||||||
nodist_bashcompletion_DATA = %D%/zfs
|
nodist_bashcompletion_DATA = %D%/zfs
|
||||||
SUBSTFILES += $(nodist_bashcompletion_DATA)
|
SUBSTFILES += $(nodist_bashcompletion_DATA)
|
||||||
|
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
openzfs-linux (@VERSION@-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* OpenZFS @VERSION@ is tagged.
|
||||||
|
|
||||||
|
-- Umer Saleem <usaleem@ixsystems.com> Wed, 15 Nov 2023 15:00:00 +0500
|
||||||
|
|
||||||
|
openzfs-linux (2.2.0-0) unstable; urgency=low
|
||||||
|
|
||||||
|
* OpenZFS 2.2.0 is tagged.
|
||||||
|
|
||||||
|
-- Umer Saleem <usaleem@ixsystems.com> Tue, 25 Jul 2023 15:00:00 +0500
|
||||||
|
|
||||||
openzfs-linux (2.1.99-1) unstable; urgency=low
|
openzfs-linux (2.1.99-1) unstable; urgency=low
|
||||||
|
|
||||||
* Integrate minimally modified Debian packaging from ZFS on Linux
|
* Integrate minimally modified Debian packaging from ZFS on Linux
|
@ -4,7 +4,7 @@ Priority: optional
|
|||||||
Maintainer: ZFS on Linux specific mailing list <zfs-discuss@list.zfsonlinux.org>
|
Maintainer: ZFS on Linux specific mailing list <zfs-discuss@list.zfsonlinux.org>
|
||||||
Build-Depends: debhelper-compat (= 12),
|
Build-Depends: debhelper-compat (= 12),
|
||||||
dh-python,
|
dh-python,
|
||||||
dkms (>> 2.1.1.2-5),
|
dh-sequence-dkms | dkms (>> 2.1.1.2-5),
|
||||||
libaio-dev,
|
libaio-dev,
|
||||||
libblkid-dev,
|
libblkid-dev,
|
||||||
libcurl4-openssl-dev,
|
libcurl4-openssl-dev,
|
||||||
@ -197,7 +197,6 @@ Recommends: openzfs-zfs-zed, openzfs-zfsutils (>= ${source:Version}), ${linux:Re
|
|||||||
Suggests: debhelper
|
Suggests: debhelper
|
||||||
Breaks: spl-dkms (<< 0.8.0~rc1)
|
Breaks: spl-dkms (<< 0.8.0~rc1)
|
||||||
Replaces: spl-dkms, zfs-dkms
|
Replaces: spl-dkms, zfs-dkms
|
||||||
Conflicts: zfs-dkms
|
|
||||||
Provides: openzfs-zfs-modules
|
Provides: openzfs-zfs-modules
|
||||||
Description: OpenZFS filesystem kernel modules for Linux
|
Description: OpenZFS filesystem kernel modules for Linux
|
||||||
OpenZFS is a storage platform that encompasses the functionality of
|
OpenZFS is a storage platform that encompasses the functionality of
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
sbin/zinject
|
|
||||||
sbin/ztest
|
sbin/ztest
|
||||||
usr/bin/raidz_test
|
usr/bin/raidz_test
|
||||||
usr/share/man/man1/raidz_test.1
|
usr/share/man/man1/raidz_test.1
|
||||||
usr/share/man/man1/test-runner.1
|
usr/share/man/man1/test-runner.1
|
||||||
usr/share/man/man1/ztest.1
|
usr/share/man/man1/ztest.1
|
||||||
usr/share/man/man8/zinject.8
|
|
||||||
usr/share/zfs/common.sh
|
usr/share/zfs/common.sh
|
||||||
usr/share/zfs/runfiles/
|
usr/share/zfs/runfiles/
|
||||||
usr/share/zfs/test-runner
|
usr/share/zfs/test-runner
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
etc/default/zfs
|
etc/default/zfs
|
||||||
etc/zfs/zfs-functions
|
etc/zfs/zfs-functions
|
||||||
etc/zfs/zpool.d/
|
etc/zfs/zpool.d/
|
||||||
etc/bash_completion.d/zfs
|
|
||||||
lib/systemd/system-generators/
|
lib/systemd/system-generators/
|
||||||
lib/systemd/system-preset/
|
lib/systemd/system-preset/
|
||||||
lib/systemd/system/zfs-import-cache.service
|
lib/systemd/system/zfs-import-cache.service
|
||||||
@ -27,6 +26,7 @@ sbin/zfs
|
|||||||
sbin/zfs_ids_to_path
|
sbin/zfs_ids_to_path
|
||||||
sbin/zgenhostid
|
sbin/zgenhostid
|
||||||
sbin/zhack
|
sbin/zhack
|
||||||
|
sbin/zinject
|
||||||
sbin/zpool
|
sbin/zpool
|
||||||
sbin/zstream
|
sbin/zstream
|
||||||
sbin/zstreamdump
|
sbin/zstreamdump
|
||||||
@ -34,6 +34,7 @@ usr/bin/zvol_wait
|
|||||||
usr/lib/modules-load.d/ lib/
|
usr/lib/modules-load.d/ lib/
|
||||||
usr/lib/zfs-linux/zpool.d/
|
usr/lib/zfs-linux/zpool.d/
|
||||||
usr/lib/zfs-linux/zpool_influxdb
|
usr/lib/zfs-linux/zpool_influxdb
|
||||||
|
usr/lib/zfs-linux/zfs_prepare_disk
|
||||||
usr/sbin/arc_summary
|
usr/sbin/arc_summary
|
||||||
usr/sbin/arcstat
|
usr/sbin/arcstat
|
||||||
usr/sbin/dbufstat
|
usr/sbin/dbufstat
|
||||||
@ -59,7 +60,6 @@ usr/share/man/man8/zfs-get.8
|
|||||||
usr/share/man/man8/zfs-groupspace.8
|
usr/share/man/man8/zfs-groupspace.8
|
||||||
usr/share/man/man8/zfs-hold.8
|
usr/share/man/man8/zfs-hold.8
|
||||||
usr/share/man/man8/zfs-inherit.8
|
usr/share/man/man8/zfs-inherit.8
|
||||||
usr/share/man/man8/zfs-jail.8
|
|
||||||
usr/share/man/man8/zfs-list.8
|
usr/share/man/man8/zfs-list.8
|
||||||
usr/share/man/man8/zfs-load-key.8
|
usr/share/man/man8/zfs-load-key.8
|
||||||
usr/share/man/man8/zfs-mount-generator.8
|
usr/share/man/man8/zfs-mount-generator.8
|
||||||
@ -79,7 +79,6 @@ usr/share/man/man8/zfs-set.8
|
|||||||
usr/share/man/man8/zfs-share.8
|
usr/share/man/man8/zfs-share.8
|
||||||
usr/share/man/man8/zfs-snapshot.8
|
usr/share/man/man8/zfs-snapshot.8
|
||||||
usr/share/man/man8/zfs-unallow.8
|
usr/share/man/man8/zfs-unallow.8
|
||||||
usr/share/man/man8/zfs-unjail.8
|
|
||||||
usr/share/man/man8/zfs-unload-key.8
|
usr/share/man/man8/zfs-unload-key.8
|
||||||
usr/share/man/man8/zfs-unmount.8
|
usr/share/man/man8/zfs-unmount.8
|
||||||
usr/share/man/man8/zfs-unzone.8
|
usr/share/man/man8/zfs-unzone.8
|
||||||
@ -89,9 +88,11 @@ usr/share/man/man8/zfs-wait.8
|
|||||||
usr/share/man/man8/zfs-zone.8
|
usr/share/man/man8/zfs-zone.8
|
||||||
usr/share/man/man8/zfs.8
|
usr/share/man/man8/zfs.8
|
||||||
usr/share/man/man8/zfs_ids_to_path.8
|
usr/share/man/man8/zfs_ids_to_path.8
|
||||||
|
usr/share/man/man8/zfs_prepare_disk.8
|
||||||
usr/share/man/man7/zfsconcepts.7
|
usr/share/man/man7/zfsconcepts.7
|
||||||
usr/share/man/man7/zfsprops.7
|
usr/share/man/man7/zfsprops.7
|
||||||
usr/share/man/man8/zgenhostid.8
|
usr/share/man/man8/zgenhostid.8
|
||||||
|
usr/share/man/man8/zinject.8
|
||||||
usr/share/man/man8/zpool-add.8
|
usr/share/man/man8/zpool-add.8
|
||||||
usr/share/man/man8/zpool-attach.8
|
usr/share/man/man8/zpool-attach.8
|
||||||
usr/share/man/man8/zpool-checkpoint.8
|
usr/share/man/man8/zpool-checkpoint.8
|
||||||
|
@ -71,10 +71,6 @@ override_dh_auto_install:
|
|||||||
@# Install the utilities.
|
@# Install the utilities.
|
||||||
$(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
|
$(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
|
||||||
|
|
||||||
# Use upstream's bash completion
|
|
||||||
install -D -t '$(CURDIR)/debian/tmp/usr/share/bash-completion/completions/' \
|
|
||||||
'$(CURDIR)/contrib/bash_completion.d/zfs'
|
|
||||||
|
|
||||||
# Move from bin_dir to /usr/sbin
|
# Move from bin_dir to /usr/sbin
|
||||||
# Remove suffix (.py) as per policy 10.4 - Scripts
|
# Remove suffix (.py) as per policy 10.4 - Scripts
|
||||||
# https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
|
# https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
|
||||||
@ -136,7 +132,6 @@ override_dh_auto_install:
|
|||||||
|
|
||||||
chmod a-x '$(CURDIR)/debian/tmp/etc/zfs/zfs-functions'
|
chmod a-x '$(CURDIR)/debian/tmp/etc/zfs/zfs-functions'
|
||||||
chmod a-x '$(CURDIR)/debian/tmp/etc/default/zfs'
|
chmod a-x '$(CURDIR)/debian/tmp/etc/default/zfs'
|
||||||
chmod a-x '$(CURDIR)/debian/tmp/usr/share/bash-completion/completions/zfs'
|
|
||||||
|
|
||||||
override_dh_python3:
|
override_dh_python3:
|
||||||
dh_python3 -p openzfs-python3-pyzfs
|
dh_python3 -p openzfs-python3-pyzfs
|
||||||
|
@ -12,11 +12,12 @@ ExecStart=/bin/sh -c '
|
|||||||
decode_root_args || exit 0; \
|
decode_root_args || exit 0; \
|
||||||
[ "$root" = "zfs:AUTO" ] && root="$(@sbindir@/zpool list -H -o bootfs | grep -m1 -vFx -)"; \
|
[ "$root" = "zfs:AUTO" ] && root="$(@sbindir@/zpool list -H -o bootfs | grep -m1 -vFx -)"; \
|
||||||
rootflags="$(getarg rootflags=)"; \
|
rootflags="$(getarg rootflags=)"; \
|
||||||
case ",$rootflags," in \
|
[ "$(@sbindir@/zfs get -H -o value mountpoint "$root")" = legacy ] || \
|
||||||
*,zfsutil,*) ;; \
|
case ",$rootflags," in \
|
||||||
,,) rootflags=zfsutil ;; \
|
*,zfsutil,*) ;; \
|
||||||
*) rootflags="zfsutil,$rootflags" ;; \
|
,,) rootflags=zfsutil ;; \
|
||||||
esac; \
|
*) rootflags="zfsutil,$rootflags" ;; \
|
||||||
|
esac; \
|
||||||
exec systemctl set-environment BOOTFS="$root" BOOTFSFLAGS="$rootflags"'
|
exec systemctl set-environment BOOTFS="$root" BOOTFSFLAGS="$rootflags"'
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Description=Rollback bootfs just before it is mounted
|
Description=Rollback bootfs just before it is mounted
|
||||||
Requisite=zfs-import.target
|
Requisite=zfs-import.target
|
||||||
After=zfs-import.target dracut-pre-mount.service zfs-snapshot-bootfs.service
|
After=zfs-import.target dracut-pre-mount.service zfs-snapshot-bootfs.service
|
||||||
Before=dracut-mount.service
|
Before=dracut-mount.service sysroot.mount
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
ConditionKernelCommandLine=bootfs.rollback
|
ConditionKernelCommandLine=bootfs.rollback
|
||||||
ConditionEnvironment=BOOTFS
|
ConditionEnvironment=BOOTFS
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user