mirror of
https://github.com/openzfs/zfs.git
synced 2025-10-02 13:27:14 +00:00
Compare commits
675 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cb3c18a9a9 | ||
![]() |
e829e2fd04 | ||
![]() |
8869caae5f | ||
![]() |
fa4d4b1f80 | ||
![]() |
32ce74ff32 | ||
![]() |
102ff2a640 | ||
![]() |
e4a407f29f | ||
![]() |
f0a95e8971 | ||
![]() |
75be5f2973 | ||
![]() |
8d4c3ee9e6 | ||
![]() |
4ff25e9013 | ||
![]() |
a44985315e | ||
![]() |
79be201806 | ||
![]() |
aecd6deeb3 | ||
![]() |
5c38029f4b | ||
![]() |
26b0f561be | ||
![]() |
c722bf8812 | ||
![]() |
0e1a53a8c0 | ||
![]() |
3e9347c9f7 | ||
![]() |
b2196fbedf | ||
![]() |
ea37c30fcb | ||
![]() |
876f705cc4 | ||
![]() |
11787965e0 | ||
![]() |
6ba51da93b | ||
![]() |
545d66204d | ||
![]() |
3387d34093 | ||
![]() |
ab8cc63c77 | ||
![]() |
ab93b4b70e | ||
![]() |
ffe93aee0a | ||
![]() |
1d2d812986 | ||
![]() |
d36684201f | ||
![]() |
45ac6045cc | ||
![]() |
faf2db3435 | ||
![]() |
d147ed7d26 | ||
![]() |
58b84289e8 | ||
![]() |
5c46baa1ce | ||
![]() |
f330b463de | ||
![]() |
4b764fb01a | ||
![]() |
f319ff3570 | ||
![]() |
3f4312a0a4 | ||
![]() |
9b772f328b | ||
![]() |
455c36156c | ||
![]() |
bc8bcfc71a | ||
![]() |
cb5f9aa582 | ||
![]() |
35f47cb4f4 | ||
![]() |
37cd30f714 | ||
![]() |
955fbc5ade | ||
![]() |
7b1cc9eb61 | ||
![]() |
654f2dcb42 | ||
![]() |
bc0b5318aa | ||
![]() |
d64711c202 | ||
![]() |
0620c979a5 | ||
![]() |
7f7c58389e | ||
![]() |
cd6db758f3 | ||
![]() |
bc4aac0395 | ||
![]() |
8f15d2e4d5 | ||
![]() |
92ca3ae56a | ||
![]() |
9ae20cf03d | ||
![]() |
a5571a0dd1 | ||
![]() |
d3429a75b0 | ||
![]() |
c6fe41cac5 | ||
![]() |
fe2f7cf6d7 | ||
![]() |
7939bad5e7 | ||
![]() |
9e5e95c24d | ||
![]() |
4b83891db0 | ||
![]() |
e29bfa5bd0 | ||
![]() |
a2424312c4 | ||
![]() |
59f8f5dfe1 | ||
![]() |
8266fa5858 | ||
![]() |
e3c3e86c04 | ||
![]() |
ced72fdd69 | ||
![]() |
b9c6b0e09b | ||
![]() |
c69b7ea6ca | ||
![]() |
ffba31c236 | ||
![]() |
dfc2c32590 | ||
![]() |
11b5c50238 | ||
![]() |
0e88a0e1ea | ||
![]() |
69b65dda8a | ||
![]() |
64d3143e82 | ||
![]() |
9acedbacee | ||
![]() |
5a8ba4520b | ||
![]() |
ccf5a8a6fc | ||
![]() |
1da2c30bed | ||
![]() |
976f765341 | ||
![]() |
ee7c362645 | ||
![]() |
14bad10f96 | ||
![]() |
e903177b56 | ||
![]() |
d247538e15 | ||
![]() |
0d54ae2880 | ||
![]() |
b6bd3228bb | ||
![]() |
e7485d04f1 | ||
![]() |
f1f74577cb | ||
![]() |
00dfa094ac | ||
![]() |
28ff57505b | ||
![]() |
94413bc75d | ||
![]() |
574eec2964 | ||
![]() |
aa6f0f878b | ||
![]() |
eecff1b4a9 | ||
![]() |
f3e49b0cf5 | ||
![]() |
3abf72b251 | ||
![]() |
14d2480708 | ||
![]() |
79a59ae787 | ||
![]() |
2d7928428b | ||
![]() |
a9410ccbd9 | ||
![]() |
2c877e8453 | ||
![]() |
dcd73069f0 | ||
![]() |
8a0e5e8b54 | ||
![]() |
96f9d271ea | ||
![]() |
b2c792778c | ||
![]() |
6bb8fe5528 | ||
![]() |
30a915efed | ||
![]() |
7b54567c1f | ||
![]() |
f65321e30c | ||
![]() |
9b0a9b410e | ||
![]() |
5061f959d1 | ||
![]() |
d151432073 | ||
![]() |
8d35a022e4 | ||
![]() |
28433c4547 | ||
![]() |
930f9cc66c | ||
![]() |
bb9225ea86 | ||
![]() |
885d929cf8 | ||
![]() |
3cfd670e74 | ||
![]() |
077269bfed | ||
![]() |
d3c1d27afd | ||
![]() |
f8bc01c79f | ||
![]() |
22671c4da4 | ||
![]() |
152e34822b | ||
![]() |
1ccae433e9 | ||
![]() |
e0e60d319c | ||
![]() |
531568f438 | ||
![]() |
7c9adc6858 | ||
![]() |
f562e0f691 | ||
![]() |
92da3e18c8 | ||
![]() |
508c546975 | ||
![]() |
6b3333de2d | ||
![]() |
1d0b94c4e7 | ||
![]() |
2fd145b578 | ||
![]() |
90a1e13df2 | ||
![]() |
ef4058fcdc | ||
![]() |
3d6ee9a68c | ||
![]() |
391e85f519 | ||
![]() |
72602f6ad9 | ||
![]() |
99a5f5d1ba | ||
![]() |
967b15b888 | ||
![]() |
1f8c39ddb2 | ||
![]() |
b270663e8a | ||
![]() |
82d6f7b047 | ||
![]() |
f7bdd84328 | ||
![]() |
611b95da18 | ||
![]() |
5c7df3bcac | ||
![]() |
c39e076f23 | ||
![]() |
2564308cb2 | ||
![]() |
e44e51f28d | ||
![]() |
e6eb03a991 | ||
![]() |
3e671f2353 | ||
![]() |
0c376d0f59 | ||
![]() |
3e004369f7 | ||
![]() |
25930cb8a1 | ||
![]() |
03592417cb | ||
![]() |
8302b6e32b | ||
![]() |
60f714e6e2 | ||
![]() |
4ae8bf406b | ||
![]() |
894edd084e | ||
![]() |
c3496b5cc6 | ||
![]() |
fb7a8503bc | ||
![]() |
a18c9edda6 | ||
![]() |
7ac5440ecf | ||
![]() |
31c4fa93bb | ||
![]() |
8ecf044d62 | ||
![]() |
2c8beeece0 | ||
![]() |
48c9b2e79d | ||
![]() |
0b6fd024a7 | ||
![]() |
0f8a1105ee | ||
![]() |
1aec627c60 | ||
![]() |
92da9e0e93 | ||
![]() |
cb5e7e097d | ||
![]() |
2957eabbef | ||
![]() |
dea0fc969b | ||
![]() |
ce9c3b4b94 | ||
![]() |
f70c85086b | ||
![]() |
10a78e2647 | ||
![]() |
b6e8db509d | ||
![]() |
fc885f308f | ||
![]() |
f23e040a37 | ||
![]() |
cf146460c1 | ||
![]() |
4bd7a2eaa5 | ||
![]() |
a8646a8186 | ||
![]() |
5a9b9c7f87 | ||
![]() |
00ce064d8f | ||
![]() |
bf38c15071 | ||
![]() |
d2b9e66b88 | ||
![]() |
e9d249d7e4 | ||
![]() |
2755e2aa60 | ||
![]() |
9292071565 | ||
![]() |
1c483cf3d0 | ||
![]() |
96d20d7d59 | ||
![]() |
cecff09faa | ||
![]() |
a7a144e655 | ||
![]() |
be1e991a1a | ||
![]() |
2669b00f13 | ||
![]() |
d7ab07dfb4 | ||
![]() |
c1e51c55f5 | ||
![]() |
b21e04e8d9 | ||
![]() |
d323fbf49c | ||
![]() |
ee2a2d941a | ||
![]() |
1b84bd1dff | ||
![]() |
fce18e04d5 | ||
![]() |
cb9742e532 | ||
![]() |
967ce75669 | ||
![]() |
3a494c6d2a | ||
![]() |
fe3b2b76cf | ||
![]() |
8de8e0df9f | ||
![]() |
2461e6f636 | ||
![]() |
d6dcae3166 | ||
![]() |
f66b57c87d | ||
![]() |
ea38787f2e | ||
![]() |
a981cb69e4 | ||
![]() |
e845be28e7 | ||
![]() |
4c2a7f85d5 | ||
![]() |
523d9d6007 | ||
![]() |
6af8db61b1 | ||
![]() |
92d3b4ee2c | ||
![]() |
ee0cb4cb89 | ||
![]() |
d411ea2e4d | ||
![]() |
c98a393cb6 | ||
![]() |
4e92aee233 | ||
![]() |
17ee0fd4fa | ||
![]() |
6d838ec0b6 | ||
![]() |
bf846dcb7d | ||
![]() |
eacf618a65 | ||
![]() |
dee62e074a | ||
![]() |
69ee01aa4b | ||
![]() |
ea076d6921 | ||
![]() |
0a2163d194 | ||
![]() |
d461a67d0a | ||
![]() |
46a4075100 | ||
![]() |
48ce292ea0 | ||
![]() |
8170eb6ebc | ||
![]() |
5e5253be84 | ||
![]() |
717213d431 | ||
![]() |
585dbbf13b | ||
![]() |
6cf17f6538 | ||
![]() |
bd27b75401 | ||
![]() |
b4ebba0e04 | ||
![]() |
238eab7dc1 | ||
![]() |
aa964ce61b | ||
![]() |
d1c88cbd4c | ||
![]() |
e3f5e317e0 | ||
![]() |
52352dd748 | ||
![]() |
c1b7bc52fe | ||
![]() |
e0ef4d2768 | ||
![]() |
66ec7fb269 | ||
![]() |
4ae931aa93 | ||
![]() |
3ff2eca0be | ||
![]() |
1987498b66 | ||
![]() |
fbfda270d5 | ||
![]() |
560e3170ef | ||
![]() |
ba227e2cc2 | ||
![]() |
bcd0430236 | ||
![]() |
0e9e2e2501 | ||
![]() |
46b82de618 | ||
![]() |
af7d609592 | ||
![]() |
b96f1a4b1f | ||
![]() |
b7f919d228 | ||
![]() |
68817d28c5 | ||
![]() |
108562344c | ||
![]() |
e0edfcbd4e | ||
![]() |
e1677d9ee1 | ||
![]() |
e8e602d987 | ||
![]() |
90011644ce | ||
![]() |
2d33c8edb6 | ||
![]() |
f03f9c9bde | ||
![]() |
08bf660ac4 | ||
![]() |
a38376b37a | ||
![]() |
1bd225ed8a | ||
![]() |
008c9666ef | ||
![]() |
f5a6dd8b70 | ||
![]() |
b3b3cd1e4f | ||
![]() |
1d482ca6e3 | ||
![]() |
5764e218ba | ||
![]() |
44e3266894 | ||
![]() |
0c94d3838d | ||
![]() |
3084336ae4 | ||
![]() |
3dfa98d013 | ||
![]() |
fa697b94e6 | ||
![]() |
00360efa35 | ||
![]() |
9392be427e | ||
![]() |
dd4e2f99f0 | ||
![]() |
589d99171f | ||
![]() |
6e7e7ea7ef | ||
![]() |
58235f52af | ||
![]() |
7b183f1918 | ||
![]() |
b0e053a10d | ||
![]() |
d1724b59dc | ||
![]() |
5ef91c2bee | ||
![]() |
906ced88df | ||
![]() |
c464f1d014 | ||
![]() |
0372def8c9 | ||
![]() |
2303775fea | ||
![]() |
55d035e866 | ||
![]() |
4653e2f7d3 | ||
![]() |
ac2e579521 | ||
![]() |
468d22d60c | ||
![]() |
8487945034 | ||
![]() |
06fa8f3f69 | ||
![]() |
087d7d80c7 | ||
![]() |
fc617645a3 | ||
![]() |
284580c878 | ||
![]() |
2a91d577b1 | ||
![]() |
b048bfa9c1 | ||
![]() |
9d76950d67 | ||
![]() |
b01d7bd32d | ||
![]() |
92157c840c | ||
![]() |
cdb4c44684 | ||
![]() |
ddf28f27c5 | ||
![]() |
5c30b24381 | ||
![]() |
a6f20250de | ||
![]() |
a387b7599c | ||
![]() |
c4c3917b2a | ||
![]() |
f454cc1723 | ||
![]() |
2e5e4bb0f8 | ||
![]() |
83fa80a550 | ||
![]() |
f0baaa329a | ||
![]() |
841be1d049 | ||
![]() |
bb740d66de | ||
![]() |
d8a33bc0a5 | ||
![]() |
ea74cdedda | ||
![]() |
e55225be3e | ||
![]() |
d5616ad34a | ||
![]() |
086105f4c4 | ||
![]() |
b6916f995e | ||
![]() |
89a8a91582 | ||
![]() |
0aa83dce99 | ||
![]() |
b55256e5bb | ||
![]() |
734eba251d | ||
![]() |
e2ba0f7643 | ||
![]() |
485a2d0112 | ||
![]() |
ae2caf9cb0 | ||
![]() |
8e318fda80 | ||
![]() |
b2284aedab | ||
![]() |
49fbdd4533 | ||
![]() |
9aae14a14a | ||
![]() |
8b9c4e643b | ||
![]() |
2ee5b51a57 | ||
![]() |
c17bdc4914 | ||
![]() |
1a8f5ad3b0 | ||
![]() |
f13d760aa8 | ||
![]() |
4800181b3b | ||
![]() |
78628a5c15 | ||
![]() |
b1ccab1721 | ||
![]() |
c5a6b4417d | ||
![]() |
246e5883bb | ||
![]() |
a7de203c86 | ||
![]() |
f85c96edf7 | ||
![]() |
f86d9af16b | ||
![]() |
634c172ee8 | ||
![]() |
a6cca8a7da | ||
![]() |
f40ab9e399 | ||
![]() |
3b18877269 | ||
![]() |
27f3d94940 | ||
![]() |
aa46cc9812 | ||
![]() |
81dec433b0 | ||
![]() |
c8fa39b46c | ||
![]() |
ba17cedf65 | ||
![]() |
63de2d2dbd | ||
![]() |
88ec6c4f40 | ||
![]() |
d947b9aedd | ||
![]() |
1ef706c4ad | ||
![]() |
1b4826b9a2 | ||
![]() |
7031a48c70 | ||
![]() |
37a3e26552 | ||
![]() |
38c3a8be83 | ||
![]() |
6afb405d96 | ||
![]() |
8f2c2dea3c | ||
![]() |
cb49e7701f | ||
![]() |
5f5321effa | ||
![]() |
1d8f625233 | ||
![]() |
8d1489735b | ||
![]() |
ba03054c83 | ||
![]() |
155847c72d | ||
![]() |
4866c2fabf | ||
![]() |
131df3bbf2 | ||
![]() |
189dc26296 | ||
![]() |
5ab601771c | ||
![]() |
ab9bb193f9 | ||
![]() |
a497c5fc8b | ||
![]() |
8f08dbfbe1 | ||
![]() |
88e3885cf4 | ||
![]() |
09fc7bb47e | ||
![]() |
78a7c78bdf | ||
![]() |
b14b3e3985 | ||
![]() |
c050b7315d | ||
![]() |
7bb13950b4 | ||
![]() |
c967faf19e | ||
![]() |
7c4ff2a051 | ||
![]() |
6f6c504700 | ||
![]() |
9cb9a59e1c | ||
![]() |
20705a8430 | ||
![]() |
2a8d9d9607 | ||
![]() |
7be9fa259e | ||
![]() |
5b0c27cd14 | ||
![]() |
029c4ae03a | ||
![]() |
047803e906 | ||
![]() |
87f8bf6b0c | ||
![]() |
301da593ad | ||
![]() |
367d34b3aa | ||
![]() |
11ca12dbd3 | ||
![]() |
75e921da6f | ||
![]() |
5b29e70ae1 | ||
![]() |
30cc2331f4 | ||
![]() |
dd2a46b5e6 | ||
![]() |
4abc21b28c | ||
![]() |
50d87fed6a | ||
![]() |
240fc4a6d1 | ||
![]() |
a0e62718cf | ||
![]() |
9611dfdc70 | ||
![]() |
885f87fa3e | ||
![]() |
fd018248d5 | ||
![]() |
ef81812726 | ||
![]() |
e759a86fa5 | ||
![]() |
1d4505d7a1 | ||
![]() |
b386bf87c1 | ||
![]() |
73494f3352 | ||
![]() |
530ddcd5f1 | ||
![]() |
94a3fabcb0 | ||
![]() |
3862ebbf1f | ||
![]() |
45e9b54e9e | ||
![]() |
d28d2e3007 | ||
![]() |
5b5a514955 | ||
![]() |
9250403ba6 | ||
![]() |
94b9cbbe1e | ||
![]() |
676b7ef104 | ||
![]() |
83fa051ceb | ||
![]() |
d033f26765 | ||
![]() |
3cd9934a48 | ||
![]() |
6e89095873 | ||
![]() |
cb4b854838 | ||
![]() |
f69631992d | ||
![]() |
21850f519b | ||
![]() |
f5312d2996 | ||
![]() |
a8847a7e4f | ||
![]() |
bf754d6010 | ||
![]() |
44dc09614e | ||
![]() |
9fd7401d75 | ||
![]() |
ff28d9fc6f | ||
![]() |
f8d29099e7 | ||
![]() |
f83431b3bd | ||
![]() |
c404ffb446 | ||
![]() |
7d8dd8d9a5 | ||
![]() |
4eafa9e5e8 | ||
![]() |
137045be98 | ||
![]() |
eb9098ed47 | ||
![]() |
201d262949 | ||
![]() |
1b495eeab3 | ||
![]() |
084531bcce | ||
![]() |
0ea44e576b | ||
![]() |
09f4dd06c3 | ||
![]() |
13ec35ce3b | ||
![]() |
0433523ca2 | ||
![]() |
4ddaf45ba4 | ||
![]() |
41823a0ede | ||
![]() |
62a9d372f8 | ||
![]() |
fe674998bb | ||
![]() |
57f192fcaa | ||
![]() |
fc460bfbaf | ||
![]() |
a44f423b00 | ||
![]() |
72c0fde609 | ||
![]() |
60031906b4 | ||
![]() |
2c897e0666 | ||
![]() |
4581c4fcbe | ||
![]() |
cc9180d338 | ||
![]() |
4afec534cc | ||
![]() |
f65fc98a8c | ||
![]() |
7f05fface3 | ||
![]() |
88b0594f93 | ||
![]() |
ece35e0e66 | ||
![]() |
ab3db6d15d | ||
![]() |
701093c44f | ||
![]() |
a5fb5c55be | ||
![]() |
d7d2744711 | ||
![]() |
523e3adac9 | ||
![]() |
ecc44c45cb | ||
![]() |
ee8803adc2 | ||
![]() |
682c5f6a0a | ||
![]() |
c43df8bbbf | ||
![]() |
6a2f7b3844 | ||
![]() |
68473c4fd8 | ||
![]() |
d4a5a7e3aa | ||
![]() |
db62886d98 | ||
![]() |
b901d4a0b6 | ||
![]() |
b8c73ab780 | ||
![]() |
d2147de319 | ||
![]() |
c2458ba921 | ||
![]() |
88020b993c | ||
![]() |
40496514b8 | ||
![]() |
2cccbacefc | ||
![]() |
0be1da26cb | ||
![]() |
2ca91ba3cf | ||
![]() |
7ef6b70e96 | ||
![]() |
390f6c1190 | ||
![]() |
21205f6488 | ||
![]() |
387ed5ca41 | ||
![]() |
1e32c57893 | ||
![]() |
12f0baf348 | ||
![]() |
34205715e1 | ||
![]() |
26e38aec46 | ||
![]() |
dfdc5ea993 | ||
![]() |
59a77512ca | ||
![]() |
4acce93fde | ||
![]() |
722cf7bfd5 | ||
![]() |
b8c0c154ad | ||
![]() |
919bc4d10e | ||
![]() |
788e69ca5d | ||
![]() |
aaeb7fa3d0 | ||
![]() |
fe44c5ae27 | ||
![]() |
2aa3fbe761 | ||
![]() |
fae4c664a4 | ||
![]() |
b8e09c7007 | ||
![]() |
18c67d2418 | ||
![]() |
3a445f2ef5 | ||
![]() |
dc0324bfa9 | ||
![]() |
939e0237c5 | ||
![]() |
50cbb14641 | ||
![]() |
ee3bde9dad | ||
![]() |
c02e1cf055 | ||
![]() |
e94549d868 | ||
![]() |
478b09577a | ||
![]() |
d35f9f2e84 | ||
![]() |
d6b4110d71 | ||
![]() |
8dc15ef4b3 | ||
![]() |
3c2267a873 | ||
![]() |
25238baad5 | ||
![]() |
54126fdb5b | ||
![]() |
9dd5fe1095 | ||
![]() |
a153397f41 | ||
![]() |
b66d910113 | ||
![]() |
8bf1e83eef | ||
![]() |
c4e5fa5e17 | ||
![]() |
03b7cfdef3 | ||
![]() |
779c5a5deb | ||
![]() |
89f796dec6 | ||
![]() |
c37a2ddaaa | ||
![]() |
1acd246964 | ||
![]() |
219a89cbbf | ||
![]() |
f00a57a786 | ||
![]() |
e5ac7786bd | ||
![]() |
ab7cbbe789 | ||
![]() |
830a531249 | ||
![]() |
882a809983 | ||
![]() |
c6442bd3b6 | ||
![]() |
acda137d8c | ||
![]() |
22259fb24d | ||
![]() |
ff6266ee9b | ||
![]() |
586304ac44 | ||
![]() |
46e06feded | ||
![]() |
fbea92432a | ||
![]() |
76f57ab9f7 | ||
![]() |
ecc0970e3e | ||
![]() |
6c9b4f18d3 | ||
![]() |
19a04e5ad2 | ||
![]() |
e0039c7057 | ||
![]() |
0de8ae56f7 | ||
![]() |
ba00a6f9a3 | ||
![]() |
903895ea5f | ||
![]() |
a44eaf1690 | ||
![]() |
e8b333e4d3 | ||
![]() |
44446dccdb | ||
![]() |
2507db612d | ||
![]() |
a01504b35c | ||
![]() |
c33a55b0c2 | ||
![]() |
0e020bf3e1 | ||
![]() |
4b4e346b9f | ||
![]() |
1cd2419ece | ||
![]() |
654ade8ca2 | ||
![]() |
ae00c807dc | ||
![]() |
027b3e06ed | ||
![]() |
6e3c109bc0 | ||
![]() |
3e9ba0f223 | ||
![]() |
c8a326aab7 | ||
![]() |
f29dcc25c7 | ||
![]() |
0ffa6f3464 | ||
![]() |
d2b0ca953f | ||
![]() |
d0a91b9f88 | ||
![]() |
b3b0ce64d5 | ||
![]() |
38c0324c0f | ||
![]() |
ae1d11882d | ||
![]() |
225e76cd7d | ||
![]() |
9a81484e35 | ||
![]() |
d02257c280 | ||
![]() |
d76d79fd27 | ||
![]() |
457f8b76e7 | ||
![]() |
49a377aa30 | ||
![]() |
0ca82c5680 | ||
![]() |
534688948c | ||
![]() |
ffe2112795 | ||
![]() |
e08e832b10 | ||
![]() |
0d6306be8c | ||
![]() |
ff3df1211c | ||
![]() |
fd6e8c1d2a | ||
![]() |
309ce6303f | ||
![]() |
1ee251bdde | ||
![]() |
483087b06f | ||
![]() |
648873f020 | ||
![]() |
de2e9a5c6b | ||
![]() |
3462f3bd50 | ||
![]() |
8dc452d907 | ||
![]() |
46c4f2ce0b | ||
![]() |
a60ed3822b | ||
![]() |
178682506f | ||
![]() |
25eb538778 | ||
![]() |
1c9a4c8cb4 | ||
![]() |
3a0a142f1c | ||
![]() |
57fc5971f6 | ||
![]() |
4a7a0a0290 | ||
![]() |
187f931372 | ||
![]() |
5945676bcc | ||
![]() |
7b6e9675da | ||
![]() |
f38e2d239f | ||
![]() |
60c202cca4 | ||
![]() |
e17a9698fa | ||
![]() |
5e726779f5 | ||
![]() |
5a2333b10f | ||
![]() |
c8aed9f973 | ||
![]() |
b16e096198 | ||
![]() |
91bd12dfeb | ||
![]() |
1c7d4b4c94 | ||
![]() |
db2354534d | ||
![]() |
673efbbf5d | ||
![]() |
acb6e71eda | ||
![]() |
3c650bec15 | ||
![]() |
e7425ae624 | ||
![]() |
63bafe60ec | ||
![]() |
ae93aeb849 | ||
![]() |
6187b19434 | ||
![]() |
2bf1520211 | ||
![]() |
c480e06d88 | ||
![]() |
e5d1f68167 | ||
![]() |
94a03dd1e4 | ||
![]() |
2e4e092822 | ||
![]() |
aefc2da8a5 | ||
![]() |
152ae5c9bc | ||
![]() |
96f382d113 | ||
![]() |
21cba06bef | ||
![]() |
b2f6de7b58 | ||
![]() |
a9851ea3dd | ||
![]() |
fba6a90696 | ||
![]() |
b85c564161 | ||
![]() |
2596a75306 | ||
![]() |
c7e47b3d9a | ||
![]() |
0a001f3088 | ||
![]() |
27e8f56102 | ||
![]() |
38a04f0a7c | ||
![]() |
e0bf43d64e | ||
![]() |
e7b64159f8 | ||
![]() |
c642e985e5 | ||
![]() |
48dfe39747 | ||
![]() |
97ba7c210c | ||
![]() |
9f3f80c0cc | ||
![]() |
34efa8e2d8 | ||
![]() |
7e4be92750 | ||
![]() |
7bf525530a | ||
![]() |
b4e4cbeb20 | ||
![]() |
efeb60b86a | ||
![]() |
4319e71402 | ||
![]() |
cefef28e98 | ||
![]() |
75dda92dc3 | ||
![]() |
65a94ffa80 | ||
![]() |
ca0141f325 | ||
![]() |
ab777f436c | ||
![]() |
e8f0aa143e | ||
![]() |
c59d5495fe | ||
![]() |
0b4dcbe5b4 | ||
![]() |
995a3a61fd | ||
![]() |
87ca6ba9a8 | ||
![]() |
437227a9cc |
21
.cirrus.yml
21
.cirrus.yml
@ -1,21 +0,0 @@
|
|||||||
env:
|
|
||||||
CIRRUS_CLONE_DEPTH: 1
|
|
||||||
ARCH: amd64
|
|
||||||
|
|
||||||
build_task:
|
|
||||||
matrix:
|
|
||||||
freebsd_instance:
|
|
||||||
image_family: freebsd-13-5
|
|
||||||
freebsd_instance:
|
|
||||||
image_family: freebsd-14-2
|
|
||||||
freebsd_instance:
|
|
||||||
image_family: freebsd-15-0-snap
|
|
||||||
prepare_script:
|
|
||||||
- pkg install -y autoconf automake libtool gettext-runtime gmake ksh93 py311-packaging py311-cffi py311-sysctl
|
|
||||||
configure_script:
|
|
||||||
- env MAKE=gmake ./autogen.sh
|
|
||||||
- env MAKE=gmake ./configure --with-config="user" --with-python=3.11
|
|
||||||
build_script:
|
|
||||||
- gmake -j `sysctl -n kern.smp.cpus`
|
|
||||||
install_script:
|
|
||||||
- gmake install
|
|
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -14,7 +14,7 @@ Please check our issue tracker before opening a new feature request.
|
|||||||
Filling out the following template will help other contributors better understand your proposed feature.
|
Filling out the following template will help other contributors better understand your proposed feature.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
### Describe the feature would like to see added to OpenZFS
|
### Describe the feature you would like to see added to OpenZFS
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Provide a clear and concise description of the feature.
|
Provide a clear and concise description of the feature.
|
||||||
|
5
.github/PULL_REQUEST_TEMPLATE.md
vendored
5
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -2,11 +2,6 @@
|
|||||||
|
|
||||||
<!--- Provide a general summary of your changes in the Title above -->
|
<!--- Provide a general summary of your changes in the Title above -->
|
||||||
|
|
||||||
<!---
|
|
||||||
Documentation on ZFS Buildbot options can be found at
|
|
||||||
https://openzfs.github.io/openzfs-docs/Developer%20Resources/Buildbot%20Options.html
|
|
||||||
-->
|
|
||||||
|
|
||||||
### Motivation and Context
|
### Motivation and Context
|
||||||
<!--- Why is this change required? What problem does it solve? -->
|
<!--- Why is this change required? What problem does it solve? -->
|
||||||
<!--- If it fixes an open issue, please link to the issue here. -->
|
<!--- If it fixes an open issue, please link to the issue here. -->
|
||||||
|
1
.github/codeql-cpp.yml
vendored
1
.github/codeql-cpp.yml
vendored
@ -2,3 +2,4 @@ name: "Custom CodeQL Analysis"
|
|||||||
|
|
||||||
queries:
|
queries:
|
||||||
- uses: ./.github/codeql/custom-queries/cpp/deprecatedFunctionUsage.ql
|
- uses: ./.github/codeql/custom-queries/cpp/deprecatedFunctionUsage.ql
|
||||||
|
- uses: ./.github/codeql/custom-queries/cpp/dslDatasetHoldReleMismatch.ql
|
||||||
|
34
.github/codeql/custom-queries/cpp/dslDatasetHoldReleMismatch.ql
vendored
Normal file
34
.github/codeql/custom-queries/cpp/dslDatasetHoldReleMismatch.ql
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/**
|
||||||
|
* @name Detect mismatched dsl_dataset_hold/_rele pairs
|
||||||
|
* @description Flags instances of issue #12014 where
|
||||||
|
* - a dataset held with dsl_dataset_hold_obj() ends up in dsl_dataset_rele_flags(), or
|
||||||
|
* - a dataset held with dsl_dataset_hold_obj_flags() ends up in dsl_dataset_rele().
|
||||||
|
* @kind problem
|
||||||
|
* @severity error
|
||||||
|
* @tags correctness
|
||||||
|
* @id cpp/dslDatasetHoldReleMismatch
|
||||||
|
*/
|
||||||
|
|
||||||
|
import cpp
|
||||||
|
|
||||||
|
from Variable ds, Call holdCall, Call releCall, string message
|
||||||
|
where
|
||||||
|
ds.getType().toString() = "dsl_dataset_t *" and
|
||||||
|
holdCall.getASuccessor*() = releCall and
|
||||||
|
(
|
||||||
|
(holdCall.getTarget().getName() = "dsl_dataset_hold_obj_flags" and
|
||||||
|
holdCall.getArgument(4).(AddressOfExpr).getOperand().(VariableAccess).getTarget() = ds and
|
||||||
|
releCall.getTarget().getName() = "dsl_dataset_rele" and
|
||||||
|
releCall.getArgument(0).(VariableAccess).getTarget() = ds and
|
||||||
|
message = "Held with dsl_dataset_hold_obj_flags but released with dsl_dataset_rele")
|
||||||
|
or
|
||||||
|
(holdCall.getTarget().getName() = "dsl_dataset_hold_obj" and
|
||||||
|
holdCall.getArgument(3).(AddressOfExpr).getOperand().(VariableAccess).getTarget() = ds and
|
||||||
|
releCall.getTarget().getName() = "dsl_dataset_rele_flags" and
|
||||||
|
releCall.getArgument(0).(VariableAccess).getTarget() = ds and
|
||||||
|
message = "Held with dsl_dataset_hold_obj but released with dsl_dataset_rele_flags")
|
||||||
|
)
|
||||||
|
select releCall,
|
||||||
|
"Mismatched release: held with $@ but released with " + releCall.getTarget().getName() + " for dataset $@",
|
||||||
|
holdCall, holdCall.getTarget().getName(),
|
||||||
|
ds, ds.toString()
|
@ -65,7 +65,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# check last (HEAD) commit message
|
# check last (HEAD) commit message
|
||||||
last_commit_message_raw = subprocess.run([
|
last_commit_message_raw = subprocess.run([
|
||||||
'git', 'show', '-s', '--format=%B', 'HEAD'
|
'git', 'show', '-s', '--format=%B', head
|
||||||
], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
|
||||||
for line in last_commit_message_raw.stdout.decode().splitlines():
|
for line in last_commit_message_raw.stdout.decode().splitlines():
|
||||||
|
10
.github/workflows/scripts/qemu-1-setup.sh
vendored
10
.github/workflows/scripts/qemu-1-setup.sh
vendored
@ -6,6 +6,13 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
# We've been seeing this script take over 15min to run. This may or
|
||||||
|
# may not be normal. Just to get a little more insight, print out
|
||||||
|
# a message to stdout with the top running process, and do this every
|
||||||
|
# 30 seconds. We can delete this watchdog later once we get a better
|
||||||
|
# handle on what the timeout value should be.
|
||||||
|
(while [ 1 ] ; do sleep 30 && echo "[watchdog: $(ps -eo cmd --sort=-pcpu | head -n 2 | tail -n 1)}')]"; done) &
|
||||||
|
|
||||||
# install needed packages
|
# install needed packages
|
||||||
export DEBIAN_FRONTEND="noninteractive"
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
@ -65,3 +72,6 @@ sudo zpool create -f -o ashift=12 zpool $SSD1 $SSD2 -O relatime=off \
|
|||||||
for i in /sys/block/s*/queue/scheduler; do
|
for i in /sys/block/s*/queue/scheduler; do
|
||||||
echo "none" | sudo tee $i
|
echo "none" | sudo tee $i
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Kill off our watchdog
|
||||||
|
kill $(jobs -p)
|
||||||
|
155
.github/workflows/scripts/qemu-2-start.sh
vendored
155
.github/workflows/scripts/qemu-2-start.sh
vendored
@ -12,10 +12,10 @@ OS="$1"
|
|||||||
# OS variant (virt-install --os-variant list)
|
# OS variant (virt-install --os-variant list)
|
||||||
OSv=$OS
|
OSv=$OS
|
||||||
|
|
||||||
# compressed with .zst extension
|
# FreeBSD urls's
|
||||||
REPO="https://github.com/mcmilk/openzfs-freebsd-images"
|
FREEBSD_REL="https://download.freebsd.org/releases/CI-IMAGES"
|
||||||
FREEBSD="$REPO/releases/download/v2025-04-13"
|
FREEBSD_SNAP="https://download.freebsd.org/snapshots/CI-IMAGES"
|
||||||
URLzs=""
|
URLxz=""
|
||||||
|
|
||||||
# Ubuntu mirrors
|
# Ubuntu mirrors
|
||||||
UBMIRROR="https://cloud-images.ubuntu.com"
|
UBMIRROR="https://cloud-images.ubuntu.com"
|
||||||
@ -25,6 +25,10 @@ UBMIRROR="https://cloud-images.ubuntu.com"
|
|||||||
# default nic model for vm's
|
# default nic model for vm's
|
||||||
NIC="virtio"
|
NIC="virtio"
|
||||||
|
|
||||||
|
# additional options for virt-install
|
||||||
|
OPTS[0]=""
|
||||||
|
OPTS[1]=""
|
||||||
|
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
almalinux8)
|
almalinux8)
|
||||||
OSNAME="AlmaLinux 8"
|
OSNAME="AlmaLinux 8"
|
||||||
@ -61,6 +65,14 @@ case "$OS" in
|
|||||||
OSNAME="Debian 12"
|
OSNAME="Debian 12"
|
||||||
URL="https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2"
|
URL="https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2"
|
||||||
;;
|
;;
|
||||||
|
debian13)
|
||||||
|
OSNAME="Debian 13"
|
||||||
|
# TODO: Overwrite OSv to debian13 for virt-install until it's added to osinfo
|
||||||
|
OSv="debian12"
|
||||||
|
URL="https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2"
|
||||||
|
OPTS[0]="--boot"
|
||||||
|
OPTS[1]="uefi=on"
|
||||||
|
;;
|
||||||
fedora41)
|
fedora41)
|
||||||
OSNAME="Fedora 41"
|
OSNAME="Fedora 41"
|
||||||
OSv="fedora-unknown"
|
OSv="fedora-unknown"
|
||||||
@ -71,50 +83,49 @@ case "$OS" in
|
|||||||
OSv="fedora-unknown"
|
OSv="fedora-unknown"
|
||||||
URL="https://download.fedoraproject.org/pub/fedora/linux/releases/42/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-42-1.1.x86_64.qcow2"
|
URL="https://download.fedoraproject.org/pub/fedora/linux/releases/42/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-42-1.1.x86_64.qcow2"
|
||||||
;;
|
;;
|
||||||
freebsd13-4r)
|
|
||||||
OSNAME="FreeBSD 13.4-RELEASE"
|
|
||||||
OSv="freebsd13.0"
|
|
||||||
URLzs="$FREEBSD/amd64-freebsd-13.4-RELEASE.qcow2.zst"
|
|
||||||
BASH="/usr/local/bin/bash"
|
|
||||||
NIC="rtl8139"
|
|
||||||
;;
|
|
||||||
freebsd13-5r)
|
freebsd13-5r)
|
||||||
OSNAME="FreeBSD 13.5-RELEASE"
|
FreeBSD="13.5-RELEASE"
|
||||||
|
OSNAME="FreeBSD $FreeBSD"
|
||||||
OSv="freebsd13.0"
|
OSv="freebsd13.0"
|
||||||
URLzs="$FREEBSD/amd64-freebsd-13.5-RELEASE.qcow2.zst"
|
URLxz="$FREEBSD_REL/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI.raw.xz"
|
||||||
BASH="/usr/local/bin/bash"
|
KSRC="$FREEBSD_REL/../amd64/$FreeBSD/src.txz"
|
||||||
NIC="rtl8139"
|
NIC="rtl8139"
|
||||||
;;
|
;;
|
||||||
freebsd14-1r)
|
|
||||||
OSNAME="FreeBSD 14.1-RELEASE"
|
|
||||||
OSv="freebsd14.0"
|
|
||||||
URLzs="$FREEBSD/amd64-freebsd-14.1-RELEASE.qcow2.zst"
|
|
||||||
BASH="/usr/local/bin/bash"
|
|
||||||
;;
|
|
||||||
freebsd14-2r)
|
freebsd14-2r)
|
||||||
OSNAME="FreeBSD 14.2-RELEASE"
|
FreeBSD="14.2-RELEASE"
|
||||||
|
OSNAME="FreeBSD $FreeBSD"
|
||||||
OSv="freebsd14.0"
|
OSv="freebsd14.0"
|
||||||
URLzs="$FREEBSD/amd64-freebsd-14.2-RELEASE.qcow2.zst"
|
KSRC="$FREEBSD_REL/../amd64/$FreeBSD/src.txz"
|
||||||
BASH="/usr/local/bin/bash"
|
URLxz="$FREEBSD_REL/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI.raw.xz"
|
||||||
|
;;
|
||||||
|
freebsd14-3r)
|
||||||
|
FreeBSD="14.3-RELEASE"
|
||||||
|
OSNAME="FreeBSD $FreeBSD"
|
||||||
|
OSv="freebsd14.0"
|
||||||
|
URLxz="$FREEBSD_REL/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI.raw.xz"
|
||||||
|
KSRC="$FREEBSD_REL/../amd64/$FreeBSD/src.txz"
|
||||||
;;
|
;;
|
||||||
freebsd13-5s)
|
freebsd13-5s)
|
||||||
OSNAME="FreeBSD 13.5-STABLE"
|
FreeBSD="13.5-STABLE"
|
||||||
|
OSNAME="FreeBSD $FreeBSD"
|
||||||
OSv="freebsd13.0"
|
OSv="freebsd13.0"
|
||||||
URLzs="$FREEBSD/amd64-freebsd-13.5-STABLE.qcow2.zst"
|
URLxz="$FREEBSD_SNAP/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI.raw.xz"
|
||||||
BASH="/usr/local/bin/bash"
|
KSRC="$FREEBSD_SNAP/../amd64/$FreeBSD/src.txz"
|
||||||
NIC="rtl8139"
|
NIC="rtl8139"
|
||||||
;;
|
;;
|
||||||
freebsd14-2s)
|
freebsd14-3s)
|
||||||
OSNAME="FreeBSD 14.2-STABLE"
|
FreeBSD="14.3-STABLE"
|
||||||
|
OSNAME="FreeBSD $FreeBSD"
|
||||||
OSv="freebsd14.0"
|
OSv="freebsd14.0"
|
||||||
URLzs="$FREEBSD/amd64-freebsd-14.2-STABLE.qcow2.zst"
|
URLxz="$FREEBSD_SNAP/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI-ufs.raw.xz"
|
||||||
BASH="/usr/local/bin/bash"
|
KSRC="$FREEBSD_SNAP/../amd64/$FreeBSD/src.txz"
|
||||||
;;
|
;;
|
||||||
freebsd15-0c)
|
freebsd15-0c)
|
||||||
OSNAME="FreeBSD 15.0-CURRENT"
|
FreeBSD="15.0-ALPHA3"
|
||||||
|
OSNAME="FreeBSD $FreeBSD"
|
||||||
OSv="freebsd14.0"
|
OSv="freebsd14.0"
|
||||||
URLzs="$FREEBSD/amd64-freebsd-15.0-CURRENT.qcow2.zst"
|
URLxz="$FREEBSD_SNAP/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI-ufs.raw.xz"
|
||||||
BASH="/usr/local/bin/bash"
|
KSRC="$FREEBSD_SNAP/../amd64/$FreeBSD/src.txz"
|
||||||
;;
|
;;
|
||||||
tumbleweed)
|
tumbleweed)
|
||||||
OSNAME="openSUSE Tumbleweed"
|
OSNAME="openSUSE Tumbleweed"
|
||||||
@ -168,31 +179,37 @@ echo "CPU=\"$CPU\"" >> $ENV
|
|||||||
sudo mkdir -p "/mnt/tests"
|
sudo mkdir -p "/mnt/tests"
|
||||||
sudo chown -R $(whoami) /mnt/tests
|
sudo chown -R $(whoami) /mnt/tests
|
||||||
|
|
||||||
|
DISK="/dev/zvol/zpool/openzfs"
|
||||||
|
sudo zfs create -ps -b 64k -V 80g zpool/openzfs
|
||||||
|
while true; do test -b $DISK && break; sleep 1; done
|
||||||
|
|
||||||
# we are downloading via axel, curl and wget are mostly slower and
|
# we are downloading via axel, curl and wget are mostly slower and
|
||||||
# require more return value checking
|
# require more return value checking
|
||||||
IMG="/mnt/tests/cloudimg.qcow2"
|
IMG="/mnt/tests/cloud-image"
|
||||||
if [ ! -z "$URLzs" ]; then
|
if [ ! -z "$URLxz" ]; then
|
||||||
echo "Loading image $URLzs ..."
|
echo "Loading $URLxz ..."
|
||||||
time axel -q -o "$IMG.zst" "$URLzs"
|
time axel -q -o "$IMG" "$URLxz"
|
||||||
zstd -q -d --rm "$IMG.zst"
|
echo "Loading $KSRC ..."
|
||||||
|
time axel -q -o ~/src.txz $KSRC
|
||||||
else
|
else
|
||||||
echo "Loading image $URL ..."
|
echo "Loading $URL ..."
|
||||||
time axel -q -o "$IMG" "$URL"
|
time axel -q -o "$IMG" "$URL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DISK="/dev/zvol/zpool/openzfs"
|
|
||||||
FORMAT="raw"
|
|
||||||
sudo zfs create -ps -b 64k -V 80g zpool/openzfs
|
|
||||||
while true; do test -b $DISK && break; sleep 1; done
|
|
||||||
echo "Importing VM image to zvol..."
|
echo "Importing VM image to zvol..."
|
||||||
|
if [ ! -z "$URLxz" ]; then
|
||||||
|
xzcat -T0 $IMG | sudo dd of=$DISK bs=4M
|
||||||
|
else
|
||||||
sudo qemu-img dd -f qcow2 -O raw if=$IMG of=$DISK bs=4M
|
sudo qemu-img dd -f qcow2 -O raw if=$IMG of=$DISK bs=4M
|
||||||
|
fi
|
||||||
rm -f $IMG
|
rm -f $IMG
|
||||||
|
|
||||||
PUBKEY=$(cat ~/.ssh/id_ed25519.pub)
|
PUBKEY=$(cat ~/.ssh/id_ed25519.pub)
|
||||||
|
if [ ${OS:0:7} != "freebsd" ]; then
|
||||||
cat <<EOF > /tmp/user-data
|
cat <<EOF > /tmp/user-data
|
||||||
#cloud-config
|
#cloud-config
|
||||||
|
|
||||||
fqdn: $OS
|
hostname: $OS
|
||||||
|
|
||||||
users:
|
users:
|
||||||
- name: root
|
- name: root
|
||||||
@ -208,6 +225,19 @@ growpart:
|
|||||||
devices: ['/']
|
devices: ['/']
|
||||||
ignore_growroot_disabled: false
|
ignore_growroot_disabled: false
|
||||||
EOF
|
EOF
|
||||||
|
else
|
||||||
|
cat <<EOF > /tmp/user-data
|
||||||
|
#cloud-config
|
||||||
|
|
||||||
|
hostname: $OS
|
||||||
|
|
||||||
|
# minimized config without sudo for nuageinit of FreeBSD
|
||||||
|
growpart:
|
||||||
|
mode: auto
|
||||||
|
devices: ['/']
|
||||||
|
ignore_growroot_disabled: false
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
sudo virsh net-update default add ip-dhcp-host \
|
sudo virsh net-update default add ip-dhcp-host \
|
||||||
"<host mac='52:54:00:83:79:00' ip='192.168.122.10'/>" --live --config
|
"<host mac='52:54:00:83:79:00' ip='192.168.122.10'/>" --live --config
|
||||||
@ -223,15 +253,8 @@ sudo virt-install \
|
|||||||
--graphics none \
|
--graphics none \
|
||||||
--network bridge=virbr0,model=$NIC,mac='52:54:00:83:79:00' \
|
--network bridge=virbr0,model=$NIC,mac='52:54:00:83:79:00' \
|
||||||
--cloud-init user-data=/tmp/user-data \
|
--cloud-init user-data=/tmp/user-data \
|
||||||
--disk $DISK,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
--disk $DISK,bus=virtio,cache=none,format=raw,driver.discard=unmap \
|
||||||
--import --noautoconsole >/dev/null
|
--import --noautoconsole ${OPTS[0]} ${OPTS[1]} >/dev/null
|
||||||
|
|
||||||
# enable KSM on Linux
|
|
||||||
if [ ${OS:0:7} != "freebsd" ]; then
|
|
||||||
sudo virsh dommemstat --domain "openzfs" --period 5
|
|
||||||
sudo virsh node-memory-tune 100 50 1
|
|
||||||
echo 1 | sudo tee /sys/kernel/mm/ksm/run > /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Give the VMs hostnames so we don't have to refer to them with
|
# Give the VMs hostnames so we don't have to refer to them with
|
||||||
# hardcoded IP addresses.
|
# hardcoded IP addresses.
|
||||||
@ -252,3 +275,29 @@ StrictHostKeyChecking no
|
|||||||
# small timeout, used in while loops later
|
# small timeout, used in while loops later
|
||||||
ConnectTimeout 1
|
ConnectTimeout 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
if [ ${OS:0:7} != "freebsd" ]; then
|
||||||
|
# enable KSM on Linux
|
||||||
|
sudo virsh dommemstat --domain "openzfs" --period 5
|
||||||
|
sudo virsh node-memory-tune 100 50 1
|
||||||
|
echo 1 | sudo tee /sys/kernel/mm/ksm/run > /dev/null
|
||||||
|
else
|
||||||
|
# on FreeBSD we need some more init stuff, because of nuageinit
|
||||||
|
BASH="/usr/local/bin/bash"
|
||||||
|
while pidof /usr/bin/qemu-system-x86_64 >/dev/null; do
|
||||||
|
ssh 2>/dev/null root@vm0 "uname -a" && break
|
||||||
|
done
|
||||||
|
ssh root@vm0 "pkg install -y bash ca_root_nss git qemu-guest-agent python3 py311-cloud-init"
|
||||||
|
ssh root@vm0 "chsh -s $BASH root"
|
||||||
|
ssh root@vm0 'sysrc qemu_guest_agent_enable="YES"'
|
||||||
|
ssh root@vm0 'sysrc cloudinit_enable="YES"'
|
||||||
|
ssh root@vm0 "pw add user zfs -w no -s $BASH"
|
||||||
|
ssh root@vm0 'mkdir -p ~zfs/.ssh'
|
||||||
|
ssh root@vm0 'echo "zfs ALL=(ALL:ALL) NOPASSWD: ALL" >> /usr/local/etc/sudoers'
|
||||||
|
ssh root@vm0 'echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config'
|
||||||
|
scp ~/.ssh/id_ed25519.pub "root@vm0:~zfs/.ssh/authorized_keys"
|
||||||
|
ssh root@vm0 'chown -R zfs ~zfs'
|
||||||
|
ssh root@vm0 'service sshd restart'
|
||||||
|
scp ~/src.txz "root@vm0:/tmp/src.txz"
|
||||||
|
ssh root@vm0 'tar -C / -zxf /tmp/src.txz'
|
||||||
|
fi
|
||||||
|
16
.github/workflows/scripts/qemu-3-deps-vm.sh
vendored
16
.github/workflows/scripts/qemu-3-deps-vm.sh
vendored
@ -20,7 +20,7 @@ function archlinux() {
|
|||||||
sudo pacman -Sy --noconfirm base-devel bc cpio cryptsetup dhclient dkms \
|
sudo pacman -Sy --noconfirm base-devel bc cpio cryptsetup dhclient dkms \
|
||||||
fakeroot fio gdb inetutils jq less linux linux-headers lsscsi nfs-utils \
|
fakeroot fio gdb inetutils jq less linux linux-headers lsscsi nfs-utils \
|
||||||
parted pax perf python-packaging python-setuptools qemu-guest-agent ksh \
|
parted pax perf python-packaging python-setuptools qemu-guest-agent ksh \
|
||||||
samba sysstat rng-tools rsync wget xxhash
|
samba strace sysstat rng-tools rsync wget xxhash
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,6 +28,7 @@ function debian() {
|
|||||||
export DEBIAN_FRONTEND="noninteractive"
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|
||||||
echo "##[group]Running apt-get update+upgrade"
|
echo "##[group]Running apt-get update+upgrade"
|
||||||
|
sudo sed -i '/[[:alpha:]]-backports/d' /etc/apt/sources.list
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get upgrade -y
|
sudo apt-get upgrade -y
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
@ -40,9 +41,10 @@ function debian() {
|
|||||||
libelf-dev libffi-dev libmount-dev libpam0g-dev libselinux-dev libssl-dev \
|
libelf-dev libffi-dev libmount-dev libpam0g-dev libselinux-dev libssl-dev \
|
||||||
libtool libtool-bin libudev-dev libunwind-dev linux-headers-$(uname -r) \
|
libtool libtool-bin libudev-dev libunwind-dev linux-headers-$(uname -r) \
|
||||||
lsscsi nfs-kernel-server pamtester parted python3 python3-all-dev \
|
lsscsi nfs-kernel-server pamtester parted python3 python3-all-dev \
|
||||||
python3-cffi python3-dev python3-distlib python3-packaging \
|
python3-cffi python3-dev python3-distlib python3-packaging libtirpc-dev \
|
||||||
python3-setuptools python3-sphinx qemu-guest-agent rng-tools rpm2cpio \
|
python3-setuptools python3-sphinx qemu-guest-agent rng-tools rpm2cpio \
|
||||||
rsync samba sysstat uuid-dev watchdog wget xfslibs-dev xxhash zlib1g-dev
|
rsync samba strace sysstat uuid-dev watchdog wget xfslibs-dev xxhash \
|
||||||
|
zlib1g-dev
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +53,7 @@ function freebsd() {
|
|||||||
|
|
||||||
echo "##[group]Install Development Tools"
|
echo "##[group]Install Development Tools"
|
||||||
sudo pkg install -y autoconf automake autotools base64 checkbashisms fio \
|
sudo pkg install -y autoconf automake autotools base64 checkbashisms fio \
|
||||||
gdb gettext gettext-runtime git gmake gsed jq ksh93 lcov libtool lscpu \
|
gdb gettext gettext-runtime git gmake gsed jq ksh lcov libtool lscpu \
|
||||||
pkgconf python python3 pamtester pamtester qemu-guest-agent rsync xxhash
|
pkgconf python python3 pamtester pamtester qemu-guest-agent rsync xxhash
|
||||||
sudo pkg install -xy \
|
sudo pkg install -xy \
|
||||||
'^samba4[[:digit:]]+$' \
|
'^samba4[[:digit:]]+$' \
|
||||||
@ -86,8 +88,8 @@ function rhel() {
|
|||||||
libuuid-devel lsscsi mdadm nfs-utils openssl-devel pam-devel pamtester \
|
libuuid-devel lsscsi mdadm nfs-utils openssl-devel pam-devel pamtester \
|
||||||
parted perf python3 python3-cffi python3-devel python3-packaging \
|
parted perf python3 python3-cffi python3-devel python3-packaging \
|
||||||
kernel-devel python3-setuptools qemu-guest-agent rng-tools rpcgen \
|
kernel-devel python3-setuptools qemu-guest-agent rng-tools rpcgen \
|
||||||
rpm-build rsync samba sysstat systemd watchdog wget xfsprogs-devel xxhash \
|
rpm-build rsync samba strace sysstat systemd watchdog wget xfsprogs-devel \
|
||||||
zlib-devel
|
xxhash zlib-devel
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +105,7 @@ function install_fedora_experimental_kernel {
|
|||||||
our_version="$1"
|
our_version="$1"
|
||||||
sudo dnf -y copr enable @kernel-vanilla/stable
|
sudo dnf -y copr enable @kernel-vanilla/stable
|
||||||
sudo dnf -y copr enable @kernel-vanilla/mainline
|
sudo dnf -y copr enable @kernel-vanilla/mainline
|
||||||
all="$(sudo dnf list --showduplicates kernel-*)"
|
all="$(sudo dnf list --showduplicates kernel-* python3-perf* perf* bpftool*)"
|
||||||
echo "Available versions:"
|
echo "Available versions:"
|
||||||
echo "$all"
|
echo "$all"
|
||||||
|
|
||||||
|
21
.github/workflows/scripts/qemu-4-build-vm.sh
vendored
21
.github/workflows/scripts/qemu-4-build-vm.sh
vendored
@ -5,12 +5,13 @@
|
|||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
#
|
#
|
||||||
# qemu-4-build-vm.sh OS [--enable-debug][--dkms][--poweroff]
|
# qemu-4-build-vm.sh OS [--enable-debug][--dkms][--patch-level NUM]
|
||||||
# [--release][--repo][--tarball]
|
# [--poweroff][--release][--repo][--tarball]
|
||||||
#
|
#
|
||||||
# OS: OS name like 'fedora41'
|
# OS: OS name like 'fedora41'
|
||||||
# --enable-debug: Build RPMs with '--enable-debug' (for testing)
|
# --enable-debug: Build RPMs with '--enable-debug' (for testing)
|
||||||
# --dkms: Build DKMS RPMs as well
|
# --dkms: Build DKMS RPMs as well
|
||||||
|
# --patch-level NUM: Use a custom patch level number for packages.
|
||||||
# --poweroff: Power-off the VM after building
|
# --poweroff: Power-off the VM after building
|
||||||
# --release Build zfs-release*.rpm as well
|
# --release Build zfs-release*.rpm as well
|
||||||
# --repo After building everything, copy RPMs into /tmp/repo
|
# --repo After building everything, copy RPMs into /tmp/repo
|
||||||
@ -21,6 +22,7 @@
|
|||||||
|
|
||||||
ENABLE_DEBUG=""
|
ENABLE_DEBUG=""
|
||||||
DKMS=""
|
DKMS=""
|
||||||
|
PATCH_LEVEL=""
|
||||||
POWEROFF=""
|
POWEROFF=""
|
||||||
RELEASE=""
|
RELEASE=""
|
||||||
REPO=""
|
REPO=""
|
||||||
@ -35,6 +37,11 @@ while [[ $# -gt 0 ]]; do
|
|||||||
DKMS=1
|
DKMS=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--patch-level)
|
||||||
|
PATCH_LEVEL=$2
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--poweroff)
|
--poweroff)
|
||||||
POWEROFF=1
|
POWEROFF=1
|
||||||
shift
|
shift
|
||||||
@ -215,6 +222,10 @@ function rpm_build_and_install() {
|
|||||||
run ./autogen.sh
|
run ./autogen.sh
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
if [ -n "$PATCH_LEVEL" ] ; then
|
||||||
|
sed -i -E 's/(Release:\s+)1/\1'$PATCH_LEVEL'/g' META
|
||||||
|
fi
|
||||||
|
|
||||||
echo "##[group]Configure"
|
echo "##[group]Configure"
|
||||||
run ./configure --enable-debuginfo $extra
|
run ./configure --enable-debuginfo $extra
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
@ -328,7 +339,13 @@ fi
|
|||||||
# almalinux9.5
|
# almalinux9.5
|
||||||
# fedora42
|
# fedora42
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
|
if which hostnamectl &> /dev/null ; then
|
||||||
|
# Fedora 42+ use hostnamectl
|
||||||
|
sudo hostnamectl set-hostname "$ID$VERSION_ID"
|
||||||
|
sudo hostnamectl set-hostname --pretty "$ID$VERSION_ID"
|
||||||
|
else
|
||||||
sudo hostname "$ID$VERSION_ID"
|
sudo hostname "$ID$VERSION_ID"
|
||||||
|
fi
|
||||||
|
|
||||||
# save some sysinfo
|
# save some sysinfo
|
||||||
uname -a > /var/tmp/uname.txt
|
uname -a > /var/tmp/uname.txt
|
||||||
|
39
.github/workflows/scripts/qemu-5-setup.sh
vendored
39
.github/workflows/scripts/qemu-5-setup.sh
vendored
@ -12,16 +12,26 @@ source /var/tmp/env.txt
|
|||||||
# wait for poweroff to succeed
|
# wait for poweroff to succeed
|
||||||
PID=$(pidof /usr/bin/qemu-system-x86_64)
|
PID=$(pidof /usr/bin/qemu-system-x86_64)
|
||||||
tail --pid=$PID -f /dev/null
|
tail --pid=$PID -f /dev/null
|
||||||
sudo virsh undefine openzfs
|
sudo virsh undefine --nvram openzfs
|
||||||
|
|
||||||
# cpu pinning
|
# cpu pinning
|
||||||
CPUSET=("0,1" "2,3")
|
CPUSET=("0,1" "2,3")
|
||||||
|
|
||||||
|
# additional options for virt-install
|
||||||
|
OPTS[0]=""
|
||||||
|
OPTS[1]=""
|
||||||
|
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
freebsd*)
|
freebsd*)
|
||||||
# FreeBSD needs only 6GiB
|
# FreeBSD needs only 6GiB
|
||||||
RAM=6
|
RAM=6
|
||||||
;;
|
;;
|
||||||
|
debian13)
|
||||||
|
RAM=8
|
||||||
|
# Boot Debian 13 with uefi=on and secureboot=off (ZFS Kernel Module not signed)
|
||||||
|
OPTS[0]="--boot"
|
||||||
|
OPTS[1]="firmware=efi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=no"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# Linux needs more memory, but can be optimized to share it via KSM
|
# Linux needs more memory, but can be optimized to share it via KSM
|
||||||
RAM=8
|
RAM=8
|
||||||
@ -79,7 +89,7 @@ EOF
|
|||||||
--network bridge=virbr0,model=$NIC,mac="52:54:00:83:79:0$i" \
|
--network bridge=virbr0,model=$NIC,mac="52:54:00:83:79:0$i" \
|
||||||
--disk $DISK-system,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
--disk $DISK-system,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
||||||
--disk $DISK-tests,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
--disk $DISK-tests,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \
|
||||||
--import --noautoconsole >/dev/null
|
--import --noautoconsole ${OPTS[0]} ${OPTS[1]}
|
||||||
done
|
done
|
||||||
|
|
||||||
# generate some memory stats
|
# generate some memory stats
|
||||||
@ -98,19 +108,30 @@ echo '*/5 * * * * /root/cronjob.sh' > crontab.txt
|
|||||||
sudo crontab crontab.txt
|
sudo crontab crontab.txt
|
||||||
rm crontab.txt
|
rm crontab.txt
|
||||||
|
|
||||||
# check if the machines are okay
|
|
||||||
echo "Waiting for vm's to come up... (${VMs}x CPU=$CPU RAM=$RAM)"
|
|
||||||
for ((i=1; i<=VMs; i++)); do
|
|
||||||
.github/workflows/scripts/qemu-wait-for-vm.sh vm$i
|
|
||||||
done
|
|
||||||
echo "All $VMs VMs are up now."
|
|
||||||
|
|
||||||
# Save the VM's serial output (ttyS0) to /var/tmp/console.txt
|
# Save the VM's serial output (ttyS0) to /var/tmp/console.txt
|
||||||
# - ttyS0 on the VM corresponds to a local /dev/pty/N entry
|
# - ttyS0 on the VM corresponds to a local /dev/pty/N entry
|
||||||
# - use 'virsh ttyconsole' to lookup the /dev/pty/N entry
|
# - use 'virsh ttyconsole' to lookup the /dev/pty/N entry
|
||||||
for ((i=1; i<=VMs; i++)); do
|
for ((i=1; i<=VMs; i++)); do
|
||||||
mkdir -p $RESPATH/vm$i
|
mkdir -p $RESPATH/vm$i
|
||||||
read "pty" <<< $(sudo virsh ttyconsole vm$i)
|
read "pty" <<< $(sudo virsh ttyconsole vm$i)
|
||||||
|
|
||||||
|
# Create the file so we can tail it, even if there's no output.
|
||||||
|
touch $RESPATH/vm$i/console.txt
|
||||||
|
|
||||||
sudo nohup bash -c "cat $pty > $RESPATH/vm$i/console.txt" &
|
sudo nohup bash -c "cat $pty > $RESPATH/vm$i/console.txt" &
|
||||||
|
|
||||||
|
# Write all VM boot lines to the console to aid in debugging failed boots.
|
||||||
|
# The boot lines from all the VMs will be munged together, so prepend each
|
||||||
|
# line with the vm hostname (like 'vm1:').
|
||||||
|
(while IFS=$'\n' read -r line; do echo "vm$i: $line" ; done < <(sudo tail -f $RESPATH/vm$i/console.txt)) &
|
||||||
|
|
||||||
done
|
done
|
||||||
echo "Console logging for ${VMs}x $OS started."
|
echo "Console logging for ${VMs}x $OS started."
|
||||||
|
|
||||||
|
|
||||||
|
# check if the machines are okay
|
||||||
|
echo "Waiting for vm's to come up... (${VMs}x CPU=$CPU RAM=$RAM)"
|
||||||
|
for ((i=1; i<=VMs; i++)); do
|
||||||
|
.github/workflows/scripts/qemu-wait-for-vm.sh vm$i
|
||||||
|
done
|
||||||
|
echo "All $VMs VMs are up now."
|
||||||
|
8
.github/workflows/scripts/qemu-6-tests.sh
vendored
8
.github/workflows/scripts/qemu-6-tests.sh
vendored
@ -21,11 +21,13 @@ function prefix() {
|
|||||||
S=$((DIFF-(M*60)))
|
S=$((DIFF-(M*60)))
|
||||||
|
|
||||||
CTR=$(cat /tmp/ctr)
|
CTR=$(cat /tmp/ctr)
|
||||||
echo $LINE| grep -q "^Test[: ]" && CTR=$((CTR+1)) && echo $CTR > /tmp/ctr
|
echo $LINE| grep -q '^\[.*] Test[: ]' && CTR=$((CTR+1)) && echo $CTR > /tmp/ctr
|
||||||
|
|
||||||
BASE="$HOME/work/zfs/zfs"
|
BASE="$HOME/work/zfs/zfs"
|
||||||
COLOR="$BASE/scripts/zfs-tests-color.sh"
|
COLOR="$BASE/scripts/zfs-tests-color.sh"
|
||||||
CLINE=$(echo $LINE| grep "^Test[ :]" | sed -e 's|/usr/local|/usr|g' \
|
CLINE=$(echo $LINE| grep '^\[.*] Test[: ]' \
|
||||||
|
| sed -e 's|^\[.*] Test|Test|g' \
|
||||||
|
| sed -e 's|/usr/local|/usr|g' \
|
||||||
| sed -e 's| /usr/share/zfs/zfs-tests/tests/| |g' | $COLOR)
|
| sed -e 's| /usr/share/zfs/zfs-tests/tests/| |g' | $COLOR)
|
||||||
if [ -z "$CLINE" ]; then
|
if [ -z "$CLINE" ]; then
|
||||||
printf "vm${ID}: %s\n" "$LINE"
|
printf "vm${ID}: %s\n" "$LINE"
|
||||||
@ -109,7 +111,7 @@ fi
|
|||||||
sudo dmesg -c > dmesg-prerun.txt
|
sudo dmesg -c > dmesg-prerun.txt
|
||||||
mount > mount.txt
|
mount > mount.txt
|
||||||
df -h > df-prerun.txt
|
df -h > df-prerun.txt
|
||||||
$TDIR/zfs-tests.sh -vK -s 3GB -T $TAGS
|
$TDIR/zfs-tests.sh -vKO -s 3GB -T $TAGS
|
||||||
RV=$?
|
RV=$?
|
||||||
df -h > df-postrun.txt
|
df -h > df-postrun.txt
|
||||||
echo $RV > tests-exitcode.txt
|
echo $RV > tests-exitcode.txt
|
||||||
|
13
.github/workflows/zfs-qemu-packages.yml
vendored
13
.github/workflows/zfs-qemu-packages.yml
vendored
@ -32,6 +32,11 @@ on:
|
|||||||
options:
|
options:
|
||||||
- "Build RPMs"
|
- "Build RPMs"
|
||||||
- "Test repo"
|
- "Test repo"
|
||||||
|
patch_level:
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
description: "(optional) patch level number"
|
||||||
repo_url:
|
repo_url:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
@ -78,7 +83,13 @@ jobs:
|
|||||||
mkdir -p /tmp/repo
|
mkdir -p /tmp/repo
|
||||||
ssh zfs@vm0 '$HOME/zfs/.github/workflows/scripts/qemu-test-repo-vm.sh' ${{ github.event.inputs.repo_url }}
|
ssh zfs@vm0 '$HOME/zfs/.github/workflows/scripts/qemu-test-repo-vm.sh' ${{ github.event.inputs.repo_url }}
|
||||||
else
|
else
|
||||||
.github/workflows/scripts/qemu-4-build.sh --repo --release --dkms --tarball ${{ matrix.os }}
|
EXTRA=""
|
||||||
|
if [ -n "${{ github.event.inputs.patch_level }}" ] ; then
|
||||||
|
EXTRA="--patch-level ${{ github.event.inputs.patch_level }}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
.github/workflows/scripts/qemu-4-build.sh $EXTRA \
|
||||||
|
--repo --release --dkms --tarball ${{ matrix.os }}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
|
47
.github/workflows/zfs-qemu.yml
vendored
47
.github/workflows/zfs-qemu.yml
vendored
@ -5,16 +5,6 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
include_stream9:
|
|
||||||
type: boolean
|
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
description: 'Test on CentOS 9 stream'
|
|
||||||
include_stream10:
|
|
||||||
type: boolean
|
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
description: 'Test on CentOS 10 stream'
|
|
||||||
fedora_kernel_ver:
|
fedora_kernel_ver:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
@ -39,8 +29,8 @@ jobs:
|
|||||||
- name: Generate OS config and CI type
|
- name: Generate OS config and CI type
|
||||||
id: os
|
id: os
|
||||||
run: |
|
run: |
|
||||||
FULL_OS='["almalinux8", "almalinux9", "almalinux10", "debian11", "debian12", "fedora41", "fedora42", "freebsd13-4r", "freebsd14-2s", "freebsd15-0c", "ubuntu22", "ubuntu24"]'
|
FULL_OS='["almalinux8", "almalinux9", "almalinux10", "centos-stream9", "centos-stream10", "debian12", "debian13", "fedora41", "fedora42", "freebsd13-5r", "freebsd14-3s", "freebsd15-0c", "ubuntu22", "ubuntu24"]'
|
||||||
QUICK_OS='["almalinux8", "almalinux9", "almalinux10", "debian12", "fedora42", "freebsd14-2r", "ubuntu24"]'
|
QUICK_OS='["almalinux8", "almalinux9", "almalinux10", "debian12", "fedora42", "freebsd14-3s", "ubuntu24"]'
|
||||||
# determine CI type when running on PR
|
# determine CI type when running on PR
|
||||||
ci_type="full"
|
ci_type="full"
|
||||||
if ${{ github.event_name == 'pull_request' }}; then
|
if ${{ github.event_name == 'pull_request' }}; then
|
||||||
@ -54,7 +44,7 @@ jobs:
|
|||||||
os_selection="$FULL_OS"
|
os_selection="$FULL_OS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${{ github.event.inputs.fedora_kernel_ver }} != "" ] ; then
|
if ${{ github.event.inputs.fedora_kernel_ver != '' }}; then
|
||||||
# They specified a custom kernel version for Fedora. Use only
|
# They specified a custom kernel version for Fedora. Use only
|
||||||
# Fedora runners.
|
# Fedora runners.
|
||||||
os_json=$(echo ${os_selection} | jq -c '[.[] | select(startswith("fedora"))]')
|
os_json=$(echo ${os_selection} | jq -c '[.[] | select(startswith("fedora"))]')
|
||||||
@ -63,17 +53,8 @@ jobs:
|
|||||||
os_json=$(echo ${os_selection} | jq -c)
|
os_json=$(echo ${os_selection} | jq -c)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add optional runners
|
echo "os=$os_json" | tee -a $GITHUB_OUTPUT
|
||||||
if [ "${{ github.event.inputs.include_stream9 }}" == 'true' ]; then
|
echo "ci_type=$ci_type" | tee -a $GITHUB_OUTPUT
|
||||||
os_json=$(echo $os_json | jq -c '. += ["centos-stream9"]')
|
|
||||||
fi
|
|
||||||
if [ "${{ github.event.inputs.include_stream10 }}" == 'true' ]; then
|
|
||||||
os_json=$(echo $os_json | jq -c '. += ["centos-stream10"]')
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $os_json
|
|
||||||
echo "os=$os_json" >> $GITHUB_OUTPUT
|
|
||||||
echo "ci_type=$ci_type" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
qemu-vm:
|
qemu-vm:
|
||||||
name: qemu-x86
|
name: qemu-x86
|
||||||
@ -81,12 +62,12 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# rhl: almalinux8, almalinux9, centos-stream9, fedora41
|
# rhl: almalinux8, almalinux9, centos-stream9, fedora4x
|
||||||
# debian: debian11, debian12, ubuntu22, ubuntu24
|
# debian: debian12, debian13, ubuntu22, ubuntu24
|
||||||
# misc: archlinux, tumbleweed
|
# misc: archlinux, tumbleweed
|
||||||
# FreeBSD variants of 2024-12:
|
# FreeBSD variants of 2025-06:
|
||||||
# FreeBSD Release: freebsd13-4r, freebsd14-2r
|
# FreeBSD Release: freebsd13-5r, freebsd14-2r, freebsd14-3r
|
||||||
# FreeBSD Stable: freebsd13-4s, freebsd14-2s
|
# FreeBSD Stable: freebsd13-5s, freebsd14-3s
|
||||||
# FreeBSD Current: freebsd15-0c
|
# FreeBSD Current: freebsd15-0c
|
||||||
os: ${{ fromJson(needs.test-config.outputs.test_os) }}
|
os: ${{ fromJson(needs.test-config.outputs.test_os) }}
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
@ -96,8 +77,12 @@ jobs:
|
|||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
- name: Setup QEMU
|
- name: Setup QEMU
|
||||||
timeout-minutes: 10
|
timeout-minutes: 20
|
||||||
run: .github/workflows/scripts/qemu-1-setup.sh
|
run: |
|
||||||
|
# Add a timestamp to each line to debug timeouts
|
||||||
|
while IFS=$'\n' read -r line; do
|
||||||
|
echo "$(date +'%H:%M:%S') $line"
|
||||||
|
done < <(.github/workflows/scripts/qemu-1-setup.sh)
|
||||||
|
|
||||||
- name: Start build machine
|
- name: Start build machine
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
24
.github/workflows/zloop.yml
vendored
24
.github/workflows/zloop.yml
vendored
@ -12,7 +12,8 @@ jobs:
|
|||||||
zloop:
|
zloop:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
env:
|
env:
|
||||||
TEST_DIR: /var/tmp/zloop
|
WORK_DIR: /mnt/zloop
|
||||||
|
CORE_DIR: /mnt/zloop/cores
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -40,38 +41,37 @@ jobs:
|
|||||||
sudo modprobe zfs
|
sudo modprobe zfs
|
||||||
- name: Tests
|
- name: Tests
|
||||||
run: |
|
run: |
|
||||||
sudo mkdir -p $TEST_DIR
|
sudo truncate -s 256G /mnt/vdev
|
||||||
# run for 10 minutes or at most 6 iterations for a maximum runner
|
sudo zpool create cipool -m $WORK_DIR -O compression=on -o autotrim=on /mnt/vdev
|
||||||
# time of 60 minutes.
|
sudo /usr/share/zfs/zloop.sh -t 600 -I 6 -l -m 1 -c $CORE_DIR -f $WORK_DIR -- -T 120 -P 60
|
||||||
sudo /usr/share/zfs/zloop.sh -t 600 -I 6 -l -m 1 -- -T 120 -P 60
|
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
sudo chmod +r -R $TEST_DIR/
|
sudo chmod +r -R $WORK_DIR/
|
||||||
- name: Ztest log
|
- name: Ztest log
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
grep -B10 -A1000 'ASSERT' $TEST_DIR/*/ztest.out || tail -n 1000 $TEST_DIR/*/ztest.out
|
grep -B10 -A1000 'ASSERT' $CORE_DIR/*/ztest.out || tail -n 1000 $CORE_DIR/*/ztest.out
|
||||||
- name: Gdb log
|
- name: Gdb log
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
sed -n '/Backtraces (full)/q;p' $TEST_DIR/*/ztest.gdb
|
sed -n '/Backtraces (full)/q;p' $CORE_DIR/*/ztest.gdb
|
||||||
- name: Zdb log
|
- name: Zdb log
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
cat $TEST_DIR/*/ztest.zdb
|
cat $CORE_DIR/*/ztest.zdb
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: Logs
|
name: Logs
|
||||||
path: |
|
path: |
|
||||||
/var/tmp/zloop/*/
|
/mnt/zloop/*/
|
||||||
!/var/tmp/zloop/*/vdev/
|
!/mnt/zloop/cores/*/vdev/
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: Pool files
|
name: Pool files
|
||||||
path: |
|
path: |
|
||||||
/var/tmp/zloop/*/vdev/
|
/mnt/zloop/cores/*/vdev/
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
4
.mailmap
4
.mailmap
@ -23,6 +23,7 @@
|
|||||||
# These maps are making names consistent where they have varied but the email
|
# These maps are making names consistent where they have varied but the email
|
||||||
# address has never changed. In most cases, the full name is in the
|
# address has never changed. In most cases, the full name is in the
|
||||||
# Signed-off-by of a commit with a matching author.
|
# Signed-off-by of a commit with a matching author.
|
||||||
|
Achill Gilgenast <achill@achill.org>
|
||||||
Ahelenia Ziemiańska <nabijaczleweli@gmail.com>
|
Ahelenia Ziemiańska <nabijaczleweli@gmail.com>
|
||||||
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
|
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
|
||||||
Alex John <alex@stty.io>
|
Alex John <alex@stty.io>
|
||||||
@ -37,6 +38,7 @@ Crag Wang <crag0715@gmail.com>
|
|||||||
Damian Szuberski <szuberskidamian@gmail.com>
|
Damian Szuberski <szuberskidamian@gmail.com>
|
||||||
Daniel Kolesa <daniel@octaforge.org>
|
Daniel Kolesa <daniel@octaforge.org>
|
||||||
Debabrata Banerjee <dbavatar@gmail.com>
|
Debabrata Banerjee <dbavatar@gmail.com>
|
||||||
|
Diwakar Kristappagari <diwakar-k@hpe.com>
|
||||||
Finix Yan <yanchongwen@hotmail.com>
|
Finix Yan <yanchongwen@hotmail.com>
|
||||||
Gaurav Kumar <gauravk.18@gmail.com>
|
Gaurav Kumar <gauravk.18@gmail.com>
|
||||||
Gionatan Danti <g.danti@assyoma.it>
|
Gionatan Danti <g.danti@assyoma.it>
|
||||||
@ -145,6 +147,7 @@ Gaurav Kumar <gauravk.18@gmail.com> <gaurkuma@users.noreply.github.com>
|
|||||||
George Gaydarov <git@gg7.io> <gg7@users.noreply.github.com>
|
George Gaydarov <git@gg7.io> <gg7@users.noreply.github.com>
|
||||||
Georgy Yakovlev <gyakovlev@gentoo.org> <168902+gyakovlev@users.noreply.github.com>
|
Georgy Yakovlev <gyakovlev@gentoo.org> <168902+gyakovlev@users.noreply.github.com>
|
||||||
Gerardwx <gerardw@alum.mit.edu> <Gerardwx@users.noreply.github.com>
|
Gerardwx <gerardw@alum.mit.edu> <Gerardwx@users.noreply.github.com>
|
||||||
|
Germano Massullo <germano.massullo@gmail.com> <Germano0@users.noreply.github.com>
|
||||||
Gian-Carlo DeFazio <defazio1@llnl.gov> <defaziogiancarlo@users.noreply.github.com>
|
Gian-Carlo DeFazio <defazio1@llnl.gov> <defaziogiancarlo@users.noreply.github.com>
|
||||||
Giuseppe Di Natale <dinatale2@llnl.gov> <dinatale2@users.noreply.github.com>
|
Giuseppe Di Natale <dinatale2@llnl.gov> <dinatale2@users.noreply.github.com>
|
||||||
Hajo Möller <dasjoe@gmail.com> <dasjoe@users.noreply.github.com>
|
Hajo Möller <dasjoe@gmail.com> <dasjoe@users.noreply.github.com>
|
||||||
@ -164,6 +167,7 @@ John Ramsden <johnramsden@riseup.net> <johnramsden@users.noreply.github.com>
|
|||||||
Jonathon Fernyhough <jonathon@m2x.dev> <559369+jonathonf@users.noreply.github.com>
|
Jonathon Fernyhough <jonathon@m2x.dev> <559369+jonathonf@users.noreply.github.com>
|
||||||
Jose Luis Duran <jlduran@gmail.com> <jlduran@users.noreply.github.com>
|
Jose Luis Duran <jlduran@gmail.com> <jlduran@users.noreply.github.com>
|
||||||
Justin Hibbits <chmeeedalf@gmail.com> <chmeeedalf@users.noreply.github.com>
|
Justin Hibbits <chmeeedalf@gmail.com> <chmeeedalf@users.noreply.github.com>
|
||||||
|
Kaitlin Hoang <kthoang@amazon.com> <khoang98@users.noreply.github.com>
|
||||||
Kevin Greene <kevin.greene@delphix.com> <104801862+kxgreene@users.noreply.github.com>
|
Kevin Greene <kevin.greene@delphix.com> <104801862+kxgreene@users.noreply.github.com>
|
||||||
Kevin Jin <lostking2008@hotmail.com> <33590050+jxdking@users.noreply.github.com>
|
Kevin Jin <lostking2008@hotmail.com> <33590050+jxdking@users.noreply.github.com>
|
||||||
Kevin P. Fleming <kevin@km6g.us> <kpfleming@users.noreply.github.com>
|
Kevin P. Fleming <kevin@km6g.us> <kpfleming@users.noreply.github.com>
|
||||||
|
13
AUTHORS
13
AUTHORS
@ -10,6 +10,7 @@ PAST MAINTAINERS:
|
|||||||
CONTRIBUTORS:
|
CONTRIBUTORS:
|
||||||
|
|
||||||
Aaron Fineman <abyxcos@gmail.com>
|
Aaron Fineman <abyxcos@gmail.com>
|
||||||
|
Achill Gilgenast <achill@achill.org>
|
||||||
Adam D. Moss <c@yotes.com>
|
Adam D. Moss <c@yotes.com>
|
||||||
Adam Leventhal <ahl@delphix.com>
|
Adam Leventhal <ahl@delphix.com>
|
||||||
Adam Stevko <adam.stevko@gmail.com>
|
Adam Stevko <adam.stevko@gmail.com>
|
||||||
@ -59,6 +60,7 @@ CONTRIBUTORS:
|
|||||||
Andreas Buschmann <andreas.buschmann@tech.net.de>
|
Andreas Buschmann <andreas.buschmann@tech.net.de>
|
||||||
Andreas Dilger <adilger@intel.com>
|
Andreas Dilger <adilger@intel.com>
|
||||||
Andreas Vögele <andreas@andreasvoegele.com>
|
Andreas Vögele <andreas@andreasvoegele.com>
|
||||||
|
Andres <a-d-j-i@users.noreply.github.com>
|
||||||
Andrew Barnes <barnes333@gmail.com>
|
Andrew Barnes <barnes333@gmail.com>
|
||||||
Andrew Hamilton <ahamilto@tjhsst.edu>
|
Andrew Hamilton <ahamilto@tjhsst.edu>
|
||||||
Andrew Innes <andrew.c12@gmail.com>
|
Andrew Innes <andrew.c12@gmail.com>
|
||||||
@ -72,6 +74,7 @@ CONTRIBUTORS:
|
|||||||
Andrey Prokopenko <job@terem.fr>
|
Andrey Prokopenko <job@terem.fr>
|
||||||
Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
|
Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
|
||||||
Andriy Gapon <avg@freebsd.org>
|
Andriy Gapon <avg@freebsd.org>
|
||||||
|
Andriy Tkachuk <andriy.tkachuk@seagate.com>
|
||||||
Andy Bakun <github@thwartedefforts.org>
|
Andy Bakun <github@thwartedefforts.org>
|
||||||
Andy Fiddaman <omnios@citrus-it.co.uk>
|
Andy Fiddaman <omnios@citrus-it.co.uk>
|
||||||
Aniruddha Shankar <k@191a.net>
|
Aniruddha Shankar <k@191a.net>
|
||||||
@ -120,6 +123,7 @@ CONTRIBUTORS:
|
|||||||
Caleb James DeLisle <calebdelisle@lavabit.com>
|
Caleb James DeLisle <calebdelisle@lavabit.com>
|
||||||
Cameron Harr <harr1@llnl.gov>
|
Cameron Harr <harr1@llnl.gov>
|
||||||
Cao Xuewen <cao.xuewen@zte.com.cn>
|
Cao Xuewen <cao.xuewen@zte.com.cn>
|
||||||
|
Carl George <carlwgeorge@gmail.com>
|
||||||
Carlo Landmeter <clandmeter@gmail.com>
|
Carlo Landmeter <clandmeter@gmail.com>
|
||||||
Carlos Alberto Lopez Perez <clopez@igalia.com>
|
Carlos Alberto Lopez Perez <clopez@igalia.com>
|
||||||
Cedric Maunoury <cedric.maunoury@gmail.com>
|
Cedric Maunoury <cedric.maunoury@gmail.com>
|
||||||
@ -200,6 +204,7 @@ CONTRIBUTORS:
|
|||||||
Dimitri John Ledkov <xnox@ubuntu.com>
|
Dimitri John Ledkov <xnox@ubuntu.com>
|
||||||
Dimitry Andric <dimitry@andric.com>
|
Dimitry Andric <dimitry@andric.com>
|
||||||
Dirkjan Bussink <d.bussink@gmail.com>
|
Dirkjan Bussink <d.bussink@gmail.com>
|
||||||
|
Diwakar Kristappagari <diwakar-k@hpe.com>
|
||||||
Dmitry Khasanov <pik4ez@gmail.com>
|
Dmitry Khasanov <pik4ez@gmail.com>
|
||||||
Dominic Pearson <dsp@technoanimal.net>
|
Dominic Pearson <dsp@technoanimal.net>
|
||||||
Dominik Hassler <hadfl@omniosce.org>
|
Dominik Hassler <hadfl@omniosce.org>
|
||||||
@ -250,6 +255,7 @@ CONTRIBUTORS:
|
|||||||
George Wilson <gwilson@delphix.com>
|
George Wilson <gwilson@delphix.com>
|
||||||
Georgy Yakovlev <ya@sysdump.net>
|
Georgy Yakovlev <ya@sysdump.net>
|
||||||
Gerardwx <gerardw@alum.mit.edu>
|
Gerardwx <gerardw@alum.mit.edu>
|
||||||
|
Germano Massullo <germano.massullo@gmail.com>
|
||||||
Gian-Carlo DeFazio <defazio1@llnl.gov>
|
Gian-Carlo DeFazio <defazio1@llnl.gov>
|
||||||
Gionatan Danti <g.danti@assyoma.it>
|
Gionatan Danti <g.danti@assyoma.it>
|
||||||
Giuseppe Di Natale <guss80@gmail.com>
|
Giuseppe Di Natale <guss80@gmail.com>
|
||||||
@ -287,6 +293,7 @@ CONTRIBUTORS:
|
|||||||
Igor K <igor@dilos.org>
|
Igor K <igor@dilos.org>
|
||||||
Igor Kozhukhov <ikozhukhov@gmail.com>
|
Igor Kozhukhov <ikozhukhov@gmail.com>
|
||||||
Igor Lvovsky <ilvovsky@gmail.com>
|
Igor Lvovsky <ilvovsky@gmail.com>
|
||||||
|
Igor Ostapenko <pm@igoro.pro>
|
||||||
ilbsmart <wgqimut@gmail.com>
|
ilbsmart <wgqimut@gmail.com>
|
||||||
Ilkka Sovanto <github@ilkka.kapsi.fi>
|
Ilkka Sovanto <github@ilkka.kapsi.fi>
|
||||||
illiliti <illiliti@protonmail.com>
|
illiliti <illiliti@protonmail.com>
|
||||||
@ -326,6 +333,7 @@ CONTRIBUTORS:
|
|||||||
Jinshan Xiong <jinshan.xiong@intel.com>
|
Jinshan Xiong <jinshan.xiong@intel.com>
|
||||||
Jitendra Patidar <jitendra.patidar@nutanix.com>
|
Jitendra Patidar <jitendra.patidar@nutanix.com>
|
||||||
JK Dingwall <james@dingwall.me.uk>
|
JK Dingwall <james@dingwall.me.uk>
|
||||||
|
Joel Low <joel@joelsplace.sg>
|
||||||
Joe Stein <joe.stein@delphix.com>
|
Joe Stein <joe.stein@delphix.com>
|
||||||
John-Mark Gurney <jmg@funkthat.com>
|
John-Mark Gurney <jmg@funkthat.com>
|
||||||
John Albietz <inthecloud247@gmail.com>
|
John Albietz <inthecloud247@gmail.com>
|
||||||
@ -374,6 +382,7 @@ CONTRIBUTORS:
|
|||||||
Kevin Jin <lostking2008@hotmail.com>
|
Kevin Jin <lostking2008@hotmail.com>
|
||||||
Kevin P. Fleming <kevin@km6g.us>
|
Kevin P. Fleming <kevin@km6g.us>
|
||||||
Kevin Tanguy <kevin.tanguy@ovh.net>
|
Kevin Tanguy <kevin.tanguy@ovh.net>
|
||||||
|
khoang98 <khoang98@users.noreply.github.com>
|
||||||
KireinaHoro <i@jsteward.moe>
|
KireinaHoro <i@jsteward.moe>
|
||||||
Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
|
Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
|
||||||
Kleber Tarcísio <klebertarcisio@yahoo.com.br>
|
Kleber Tarcísio <klebertarcisio@yahoo.com.br>
|
||||||
@ -447,6 +456,7 @@ CONTRIBUTORS:
|
|||||||
Max Zettlmeißl <max@zettlmeissl.de>
|
Max Zettlmeißl <max@zettlmeissl.de>
|
||||||
Md Islam <mdnahian@outlook.com>
|
Md Islam <mdnahian@outlook.com>
|
||||||
megari <megari@iki.fi>
|
megari <megari@iki.fi>
|
||||||
|
Meriel Luna Mittelbach <lunarlambda@gmail.com>
|
||||||
Michael D Labriola <michael.d.labriola@gmail.com>
|
Michael D Labriola <michael.d.labriola@gmail.com>
|
||||||
Michael Franzl <michael@franzl.name>
|
Michael Franzl <michael@franzl.name>
|
||||||
Michael Gebetsroither <michael@mgeb.org>
|
Michael Gebetsroither <michael@mgeb.org>
|
||||||
@ -494,6 +504,7 @@ CONTRIBUTORS:
|
|||||||
Orivej Desh <orivej@gmx.fr>
|
Orivej Desh <orivej@gmx.fr>
|
||||||
Pablo Correa Gómez <ablocorrea@hotmail.com>
|
Pablo Correa Gómez <ablocorrea@hotmail.com>
|
||||||
Palash Gandhi <pbg4930@rit.edu>
|
Palash Gandhi <pbg4930@rit.edu>
|
||||||
|
Patrick Fasano <patrick@patrickfasano.com>
|
||||||
Patrick Mooney <pmooney@pfmooney.com>
|
Patrick Mooney <pmooney@pfmooney.com>
|
||||||
Patrik Greco <sikevux@sikevux.se>
|
Patrik Greco <sikevux@sikevux.se>
|
||||||
Paul B. Henson <henson@acm.org>
|
Paul B. Henson <henson@acm.org>
|
||||||
@ -535,6 +546,7 @@ CONTRIBUTORS:
|
|||||||
Remy Blank <remy.blank@pobox.com>
|
Remy Blank <remy.blank@pobox.com>
|
||||||
renelson <bnelson@nelsonbe.com>
|
renelson <bnelson@nelsonbe.com>
|
||||||
Reno Reckling <e-github@wthack.de>
|
Reno Reckling <e-github@wthack.de>
|
||||||
|
René Wirnata <rene.wirnata@pandascience.net>
|
||||||
Ricardo M. Correia <ricardo.correia@oracle.com>
|
Ricardo M. Correia <ricardo.correia@oracle.com>
|
||||||
Riccardo Schirone <rschirone91@gmail.com>
|
Riccardo Schirone <rschirone91@gmail.com>
|
||||||
Richard Allen <belperite@gmail.com>
|
Richard Allen <belperite@gmail.com>
|
||||||
@ -640,6 +652,7 @@ CONTRIBUTORS:
|
|||||||
tleydxdy <shironeko.github@tesaguri.club>
|
tleydxdy <shironeko.github@tesaguri.club>
|
||||||
Tobin Harding <me@tobin.cc>
|
Tobin Harding <me@tobin.cc>
|
||||||
Todd Seidelmann <seidelma@users.noreply.github.com>
|
Todd Seidelmann <seidelma@users.noreply.github.com>
|
||||||
|
Todd Zullinger <tmz@pobox.com>
|
||||||
Tom Caputi <tcaputi@datto.com>
|
Tom Caputi <tcaputi@datto.com>
|
||||||
Tom Matthews <tom@axiom-partners.com>
|
Tom Matthews <tom@axiom-partners.com>
|
||||||
Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
|
Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
|
||||||
|
4
META
4
META
@ -1,10 +1,10 @@
|
|||||||
Meta: 1
|
Meta: 1
|
||||||
Name: zfs
|
Name: zfs
|
||||||
Branch: 1.0
|
Branch: 1.0
|
||||||
Version: 2.3.3
|
Version: 2.4.99
|
||||||
Release: 1
|
Release: 1
|
||||||
Release-Tags: relext
|
Release-Tags: relext
|
||||||
License: CDDL
|
License: CDDL
|
||||||
Author: OpenZFS
|
Author: OpenZFS
|
||||||
Linux-Maximum: 6.15
|
Linux-Maximum: 6.17
|
||||||
Linux-Minimum: 4.18
|
Linux-Minimum: 4.18
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
CLEANFILES =
|
CLEANFILES =
|
||||||
dist_noinst_DATA =
|
dist_noinst_DATA =
|
||||||
INSTALL_DATA_HOOKS =
|
INSTALL_DATA_HOOKS =
|
||||||
|
INSTALL_EXEC_HOOKS =
|
||||||
ALL_LOCAL =
|
ALL_LOCAL =
|
||||||
CLEAN_LOCAL =
|
CLEAN_LOCAL =
|
||||||
CHECKS = shellcheck checkbashisms
|
CHECKS = shellcheck checkbashisms
|
||||||
@ -71,6 +72,9 @@ all: gitrev
|
|||||||
PHONY += install-data-hook $(INSTALL_DATA_HOOKS)
|
PHONY += install-data-hook $(INSTALL_DATA_HOOKS)
|
||||||
install-data-hook: $(INSTALL_DATA_HOOKS)
|
install-data-hook: $(INSTALL_DATA_HOOKS)
|
||||||
|
|
||||||
|
PHONY += install-exec-hook $(INSTALL_EXEC_HOOKS)
|
||||||
|
install-exec-hook: $(INSTALL_EXEC_HOOKS)
|
||||||
|
|
||||||
PHONY += maintainer-clean-local
|
PHONY += maintainer-clean-local
|
||||||
maintainer-clean-local:
|
maintainer-clean-local:
|
||||||
-$(RM) $(GITREV)
|
-$(RM) $(GITREV)
|
||||||
|
@ -98,17 +98,16 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
if USING_PYTHON
|
if USING_PYTHON
|
||||||
bin_SCRIPTS += arc_summary arcstat dbufstat zilstat
|
bin_SCRIPTS += zarcsummary zarcstat dbufstat zilstat
|
||||||
CLEANFILES += arc_summary arcstat dbufstat zilstat
|
CLEANFILES += zarcsummary zarcstat dbufstat zilstat
|
||||||
dist_noinst_DATA += %D%/arc_summary %D%/arcstat.in %D%/dbufstat.in %D%/zilstat.in
|
dist_noinst_DATA += %D%/zarcsummary %D%/zarcstat.in %D%/dbufstat.in %D%/zilstat.in
|
||||||
|
|
||||||
$(call SUBST,arcstat,%D%/)
|
$(call SUBST,zarcstat,%D%/)
|
||||||
$(call SUBST,dbufstat,%D%/)
|
$(call SUBST,dbufstat,%D%/)
|
||||||
$(call SUBST,zilstat,%D%/)
|
$(call SUBST,zilstat,%D%/)
|
||||||
arc_summary: %D%/arc_summary
|
zarcsummary: %D%/zarcsummary
|
||||||
$(AM_V_at)cp $< $@
|
$(AM_V_at)cp $< $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
PHONY += cmd
|
PHONY += cmd
|
||||||
cmd: $(bin_SCRIPTS) $(bin_PROGRAMS) $(sbin_SCRIPTS) $(sbin_PROGRAMS) $(dist_bin_SCRIPTS) $(zfsexec_PROGRAMS) $(mounthelper_PROGRAMS)
|
cmd: $(bin_SCRIPTS) $(bin_PROGRAMS) $(sbin_SCRIPTS) $(sbin_PROGRAMS) $(dist_bin_SCRIPTS) $(zfsexec_PROGRAMS) $(mounthelper_PROGRAMS)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# SPDX-License-Identifier: CDDL-1.0
|
# SPDX-License-Identifier: CDDL-1.0
|
||||||
#
|
#
|
||||||
# Print out ZFS ARC Statistics exported via kstat(1)
|
# Print out ZFS ARC Statistics exported via kstat(1)
|
||||||
# For a definition of fields, or usage, use arcstat -v
|
# For a definition of fields, or usage, use zarcstat -v
|
||||||
#
|
#
|
||||||
# This script was originally a fork of the original arcstat.pl (0.1)
|
# This script was originally a fork of the original arcstat.pl (0.1)
|
||||||
# by Neelakanth Nadgir, originally published on his Sun blog on
|
# by Neelakanth Nadgir, originally published on his Sun blog on
|
||||||
@ -56,6 +56,7 @@ import time
|
|||||||
import getopt
|
import getopt
|
||||||
import re
|
import re
|
||||||
import copy
|
import copy
|
||||||
|
import os
|
||||||
|
|
||||||
from signal import signal, SIGINT, SIGWINCH, SIG_DFL
|
from signal import signal, SIGINT, SIGWINCH, SIG_DFL
|
||||||
|
|
||||||
@ -171,7 +172,7 @@ cols = {
|
|||||||
"zactive": [7, 1000, "zfetch prefetches active per second"],
|
"zactive": [7, 1000, "zfetch prefetches active per second"],
|
||||||
}
|
}
|
||||||
|
|
||||||
# ARC structural breakdown from arc_summary
|
# ARC structural breakdown from zarcsummary
|
||||||
structfields = {
|
structfields = {
|
||||||
"cmp": ["compressed", "Compressed"],
|
"cmp": ["compressed", "Compressed"],
|
||||||
"ovh": ["overhead", "Overhead"],
|
"ovh": ["overhead", "Overhead"],
|
||||||
@ -187,7 +188,7 @@ structstats = { # size stats
|
|||||||
"sz": ["_size", "size"],
|
"sz": ["_size", "size"],
|
||||||
}
|
}
|
||||||
|
|
||||||
# ARC types breakdown from arc_summary
|
# ARC types breakdown from zarcsummary
|
||||||
typefields = {
|
typefields = {
|
||||||
"data": ["data", "ARC data"],
|
"data": ["data", "ARC data"],
|
||||||
"meta": ["metadata", "ARC metadata"],
|
"meta": ["metadata", "ARC metadata"],
|
||||||
@ -198,7 +199,7 @@ typestats = { # size stats
|
|||||||
"sz": ["_size", "size"],
|
"sz": ["_size", "size"],
|
||||||
}
|
}
|
||||||
|
|
||||||
# ARC states breakdown from arc_summary
|
# ARC states breakdown from zarcsummary
|
||||||
statefields = {
|
statefields = {
|
||||||
"ano": ["anon", "Anonymous"],
|
"ano": ["anon", "Anonymous"],
|
||||||
"mfu": ["mfu", "MFU"],
|
"mfu": ["mfu", "MFU"],
|
||||||
@ -261,7 +262,7 @@ hdr_intr = 20 # Print header every 20 lines of output
|
|||||||
opfile = None
|
opfile = None
|
||||||
sep = " " # Default separator is 2 spaces
|
sep = " " # Default separator is 2 spaces
|
||||||
l2exist = False
|
l2exist = False
|
||||||
cmd = ("Usage: arcstat [-havxp] [-f fields] [-o file] [-s string] [interval "
|
cmd = ("Usage: zarcstat [-havxp] [-f fields] [-o file] [-s string] [interval "
|
||||||
"[count]]\n")
|
"[count]]\n")
|
||||||
cur = {}
|
cur = {}
|
||||||
d = {}
|
d = {}
|
||||||
@ -348,10 +349,10 @@ def usage():
|
|||||||
"character or string\n")
|
"character or string\n")
|
||||||
sys.stderr.write("\t -p : Disable auto-scaling of numerical fields\n")
|
sys.stderr.write("\t -p : Disable auto-scaling of numerical fields\n")
|
||||||
sys.stderr.write("\nExamples:\n")
|
sys.stderr.write("\nExamples:\n")
|
||||||
sys.stderr.write("\tarcstat -o /tmp/a.log 2 10\n")
|
sys.stderr.write("\tzarcstat -o /tmp/a.log 2 10\n")
|
||||||
sys.stderr.write("\tarcstat -s \",\" -o /tmp/a.log 2 10\n")
|
sys.stderr.write("\tzarcstat -s \",\" -o /tmp/a.log 2 10\n")
|
||||||
sys.stderr.write("\tarcstat -v\n")
|
sys.stderr.write("\tzarcstat -v\n")
|
||||||
sys.stderr.write("\tarcstat -f time,hit%,dh%,ph%,mh% 1\n")
|
sys.stderr.write("\tzarcstat -f time,hit%,dh%,ph%,mh% 1\n")
|
||||||
sys.stderr.write("\n")
|
sys.stderr.write("\n")
|
||||||
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -366,7 +367,7 @@ def snap_stats():
|
|||||||
|
|
||||||
cur = kstat
|
cur = kstat
|
||||||
|
|
||||||
# fill in additional values from arc_summary
|
# fill in additional values from zarcsummary
|
||||||
cur["caches_size"] = caches_size = cur["anon_data"]+cur["anon_metadata"]+\
|
cur["caches_size"] = caches_size = cur["anon_data"]+cur["anon_metadata"]+\
|
||||||
cur["mfu_data"]+cur["mfu_metadata"]+cur["mru_data"]+cur["mru_metadata"]+\
|
cur["mfu_data"]+cur["mfu_metadata"]+cur["mru_data"]+cur["mru_metadata"]+\
|
||||||
cur["uncached_data"]+cur["uncached_metadata"]
|
cur["uncached_data"]+cur["uncached_metadata"]
|
||||||
@ -766,6 +767,7 @@ def calculate():
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
global sint
|
global sint
|
||||||
global count
|
global count
|
||||||
global hdr_intr
|
global hdr_intr
|
@ -34,7 +34,7 @@ Provides basic information on the ARC, its efficiency, the L2ARC (if present),
|
|||||||
the Data Management Unit (DMU), Virtual Devices (VDEVs), and tunables. See
|
the Data Management Unit (DMU), Virtual Devices (VDEVs), and tunables. See
|
||||||
the in-source documentation and code at
|
the in-source documentation and code at
|
||||||
https://github.com/openzfs/zfs/blob/master/module/zfs/arc.c for details.
|
https://github.com/openzfs/zfs/blob/master/module/zfs/arc.c for details.
|
||||||
The original introduction to arc_summary can be found at
|
The original introduction to zarcsummary can be found at
|
||||||
http://cuddletech.com/?p=454
|
http://cuddletech.com/?p=454
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ elif sys.platform.startswith('linux'):
|
|||||||
return get_params(TUNABLES_PATH)
|
return get_params(TUNABLES_PATH)
|
||||||
|
|
||||||
def get_version_impl(request):
|
def get_version_impl(request):
|
||||||
# The original arc_summary called /sbin/modinfo/{spl,zfs} to get
|
# The original zarcsummary called /sbin/modinfo/{spl,zfs} to get
|
||||||
# the version information. We switch to /sys/module/{spl,zfs}/version
|
# the version information. We switch to /sys/module/{spl,zfs}/version
|
||||||
# to make sure we get what is really loaded in the kernel
|
# to make sure we get what is really loaded in the kernel
|
||||||
try:
|
try:
|
||||||
@ -439,7 +439,7 @@ def print_header():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# datetime is now recommended over time but we keep the exact formatting
|
# datetime is now recommended over time but we keep the exact formatting
|
||||||
# from the older version of arc_summary in case there are scripts
|
# from the older version of zarcsummary in case there are scripts
|
||||||
# that expect it in this way
|
# that expect it in this way
|
||||||
daydate = time.strftime(DATE_FORMAT)
|
daydate = time.strftime(DATE_FORMAT)
|
||||||
spc_date = LINE_LENGTH-len(daydate)
|
spc_date = LINE_LENGTH-len(daydate)
|
||||||
@ -559,6 +559,7 @@ def section_arc(kstats_dict):
|
|||||||
print()
|
print()
|
||||||
|
|
||||||
compressed_size = arc_stats['compressed_size']
|
compressed_size = arc_stats['compressed_size']
|
||||||
|
uncompressed_size = arc_stats['uncompressed_size']
|
||||||
overhead_size = arc_stats['overhead_size']
|
overhead_size = arc_stats['overhead_size']
|
||||||
bonus_size = arc_stats['bonus_size']
|
bonus_size = arc_stats['bonus_size']
|
||||||
dnode_size = arc_stats['dnode_size']
|
dnode_size = arc_stats['dnode_size']
|
||||||
@ -671,6 +672,8 @@ def section_arc(kstats_dict):
|
|||||||
print()
|
print()
|
||||||
|
|
||||||
print('ARC misc:')
|
print('ARC misc:')
|
||||||
|
prt_i2('Uncompressed size:', f_perc(uncompressed_size, compressed_size),
|
||||||
|
f_bytes(uncompressed_size))
|
||||||
prt_i1('Memory throttles:', arc_stats['memory_throttle_count'])
|
prt_i1('Memory throttles:', arc_stats['memory_throttle_count'])
|
||||||
prt_i1('Memory direct reclaims:', arc_stats['memory_direct_count'])
|
prt_i1('Memory direct reclaims:', arc_stats['memory_direct_count'])
|
||||||
prt_i1('Memory indirect reclaims:', arc_stats['memory_indirect_count'])
|
prt_i1('Memory indirect reclaims:', arc_stats['memory_indirect_count'])
|
308
cmd/zdb/zdb.c
308
cmd/zdb/zdb.c
@ -107,7 +107,9 @@ extern uint_t zfs_reconstruct_indirect_combinations_max;
|
|||||||
extern uint_t zfs_btree_verify_intensity;
|
extern uint_t zfs_btree_verify_intensity;
|
||||||
|
|
||||||
static const char cmdname[] = "zdb";
|
static const char cmdname[] = "zdb";
|
||||||
uint8_t dump_opt[256];
|
uint8_t dump_opt[512];
|
||||||
|
|
||||||
|
#define ALLOCATED_OPT 256
|
||||||
|
|
||||||
typedef void object_viewer_t(objset_t *, uint64_t, void *data, size_t size);
|
typedef void object_viewer_t(objset_t *, uint64_t, void *data, size_t size);
|
||||||
|
|
||||||
@ -127,6 +129,7 @@ static zfs_range_tree_t *mos_refd_objs;
|
|||||||
static spa_t *spa;
|
static spa_t *spa;
|
||||||
static objset_t *os;
|
static objset_t *os;
|
||||||
static boolean_t kernel_init_done;
|
static boolean_t kernel_init_done;
|
||||||
|
static boolean_t corruption_found = B_FALSE;
|
||||||
|
|
||||||
static void snprintf_blkptr_compact(char *, size_t, const blkptr_t *,
|
static void snprintf_blkptr_compact(char *, size_t, const blkptr_t *,
|
||||||
boolean_t);
|
boolean_t);
|
||||||
@ -176,7 +179,7 @@ static int
|
|||||||
sublivelist_verify_blkptr(void *arg, const blkptr_t *bp, boolean_t free,
|
sublivelist_verify_blkptr(void *arg, const blkptr_t *bp, boolean_t free,
|
||||||
dmu_tx_t *tx)
|
dmu_tx_t *tx)
|
||||||
{
|
{
|
||||||
ASSERT3P(tx, ==, NULL);
|
ASSERT0P(tx);
|
||||||
struct sublivelist_verify *sv = arg;
|
struct sublivelist_verify *sv = arg;
|
||||||
sublivelist_verify_block_refcnt_t current = {
|
sublivelist_verify_block_refcnt_t current = {
|
||||||
.svbr_blk = *bp,
|
.svbr_blk = *bp,
|
||||||
@ -208,7 +211,7 @@ sublivelist_verify_blkptr(void *arg, const blkptr_t *bp, boolean_t free,
|
|||||||
sublivelist_verify_block_t svb = {
|
sublivelist_verify_block_t svb = {
|
||||||
.svb_dva = bp->blk_dva[i],
|
.svb_dva = bp->blk_dva[i],
|
||||||
.svb_allocated_txg =
|
.svb_allocated_txg =
|
||||||
BP_GET_LOGICAL_BIRTH(bp)
|
BP_GET_BIRTH(bp)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (zfs_btree_find(&sv->sv_leftover, &svb,
|
if (zfs_btree_find(&sv->sv_leftover, &svb,
|
||||||
@ -250,6 +253,7 @@ sublivelist_verify_func(void *args, dsl_deadlist_entry_t *dle)
|
|||||||
&e->svbr_blk, B_TRUE);
|
&e->svbr_blk, B_TRUE);
|
||||||
(void) printf("\tERROR: %d unmatched FREE(s): %s\n",
|
(void) printf("\tERROR: %d unmatched FREE(s): %s\n",
|
||||||
e->svbr_refcnt, blkbuf);
|
e->svbr_refcnt, blkbuf);
|
||||||
|
corruption_found = B_TRUE;
|
||||||
}
|
}
|
||||||
zfs_btree_destroy(&sv->sv_pair);
|
zfs_btree_destroy(&sv->sv_pair);
|
||||||
|
|
||||||
@ -381,7 +385,7 @@ verify_livelist_allocs(metaslab_verify_t *mv, uint64_t txg,
|
|||||||
sublivelist_verify_block_t svb = {{{0}}};
|
sublivelist_verify_block_t svb = {{{0}}};
|
||||||
DVA_SET_VDEV(&svb.svb_dva, mv->mv_vdid);
|
DVA_SET_VDEV(&svb.svb_dva, mv->mv_vdid);
|
||||||
DVA_SET_OFFSET(&svb.svb_dva, offset);
|
DVA_SET_OFFSET(&svb.svb_dva, offset);
|
||||||
DVA_SET_ASIZE(&svb.svb_dva, size);
|
DVA_SET_ASIZE(&svb.svb_dva, 0);
|
||||||
zfs_btree_index_t where;
|
zfs_btree_index_t where;
|
||||||
uint64_t end_offset = offset + size;
|
uint64_t end_offset = offset + size;
|
||||||
|
|
||||||
@ -405,6 +409,7 @@ verify_livelist_allocs(metaslab_verify_t *mv, uint64_t txg,
|
|||||||
(u_longlong_t)DVA_GET_ASIZE(&found->svb_dva),
|
(u_longlong_t)DVA_GET_ASIZE(&found->svb_dva),
|
||||||
(u_longlong_t)found->svb_allocated_txg,
|
(u_longlong_t)found->svb_allocated_txg,
|
||||||
(u_longlong_t)txg);
|
(u_longlong_t)txg);
|
||||||
|
corruption_found = B_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -426,6 +431,7 @@ metaslab_spacemap_validation_cb(space_map_entry_t *sme, void *arg)
|
|||||||
(u_longlong_t)txg, (u_longlong_t)offset,
|
(u_longlong_t)txg, (u_longlong_t)offset,
|
||||||
(u_longlong_t)size, (u_longlong_t)mv->mv_vdid,
|
(u_longlong_t)size, (u_longlong_t)mv->mv_vdid,
|
||||||
(u_longlong_t)mv->mv_msid);
|
(u_longlong_t)mv->mv_msid);
|
||||||
|
corruption_found = B_TRUE;
|
||||||
} else {
|
} else {
|
||||||
zfs_range_tree_add(mv->mv_allocated,
|
zfs_range_tree_add(mv->mv_allocated,
|
||||||
offset, size);
|
offset, size);
|
||||||
@ -439,6 +445,7 @@ metaslab_spacemap_validation_cb(space_map_entry_t *sme, void *arg)
|
|||||||
(u_longlong_t)txg, (u_longlong_t)offset,
|
(u_longlong_t)txg, (u_longlong_t)offset,
|
||||||
(u_longlong_t)size, (u_longlong_t)mv->mv_vdid,
|
(u_longlong_t)size, (u_longlong_t)mv->mv_vdid,
|
||||||
(u_longlong_t)mv->mv_msid);
|
(u_longlong_t)mv->mv_msid);
|
||||||
|
corruption_found = B_TRUE;
|
||||||
} else {
|
} else {
|
||||||
zfs_range_tree_remove(mv->mv_allocated,
|
zfs_range_tree_remove(mv->mv_allocated,
|
||||||
offset, size);
|
offset, size);
|
||||||
@ -526,6 +533,7 @@ mv_populate_livelist_allocs(metaslab_verify_t *mv, sublivelist_verify_t *sv)
|
|||||||
(u_longlong_t)DVA_GET_VDEV(&svb->svb_dva),
|
(u_longlong_t)DVA_GET_VDEV(&svb->svb_dva),
|
||||||
(u_longlong_t)DVA_GET_OFFSET(&svb->svb_dva),
|
(u_longlong_t)DVA_GET_OFFSET(&svb->svb_dva),
|
||||||
(u_longlong_t)DVA_GET_ASIZE(&svb->svb_dva));
|
(u_longlong_t)DVA_GET_ASIZE(&svb->svb_dva));
|
||||||
|
corruption_found = B_TRUE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -542,6 +550,7 @@ mv_populate_livelist_allocs(metaslab_verify_t *mv, sublivelist_verify_t *sv)
|
|||||||
(u_longlong_t)DVA_GET_VDEV(&svb->svb_dva),
|
(u_longlong_t)DVA_GET_VDEV(&svb->svb_dva),
|
||||||
(u_longlong_t)DVA_GET_OFFSET(&svb->svb_dva),
|
(u_longlong_t)DVA_GET_OFFSET(&svb->svb_dva),
|
||||||
(u_longlong_t)DVA_GET_ASIZE(&svb->svb_dva));
|
(u_longlong_t)DVA_GET_ASIZE(&svb->svb_dva));
|
||||||
|
corruption_found = B_TRUE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -619,8 +628,9 @@ livelist_metaslab_validate(spa_t *spa)
|
|||||||
metaslab_calculate_range_tree_type(vd, m,
|
metaslab_calculate_range_tree_type(vd, m,
|
||||||
&start, &shift);
|
&start, &shift);
|
||||||
metaslab_verify_t mv;
|
metaslab_verify_t mv;
|
||||||
mv.mv_allocated = zfs_range_tree_create(NULL,
|
mv.mv_allocated = zfs_range_tree_create_flags(
|
||||||
type, NULL, start, shift);
|
NULL, type, NULL, start, shift,
|
||||||
|
0, "livelist_metaslab_validate:mv_allocated");
|
||||||
mv.mv_vdid = vd->vdev_id;
|
mv.mv_vdid = vd->vdev_id;
|
||||||
mv.mv_msid = m->ms_id;
|
mv.mv_msid = m->ms_id;
|
||||||
mv.mv_start = m->ms_start;
|
mv.mv_start = m->ms_start;
|
||||||
@ -654,6 +664,7 @@ livelist_metaslab_validate(spa_t *spa)
|
|||||||
}
|
}
|
||||||
(void) printf("ERROR: Found livelist blocks marked as allocated "
|
(void) printf("ERROR: Found livelist blocks marked as allocated "
|
||||||
"for indirect vdevs:\n");
|
"for indirect vdevs:\n");
|
||||||
|
corruption_found = B_TRUE;
|
||||||
|
|
||||||
zfs_btree_index_t *where = NULL;
|
zfs_btree_index_t *where = NULL;
|
||||||
sublivelist_verify_block_t *svb;
|
sublivelist_verify_block_t *svb;
|
||||||
@ -797,8 +808,8 @@ usage(void)
|
|||||||
"[default is 200]\n");
|
"[default is 200]\n");
|
||||||
(void) fprintf(stderr, " -K --key=KEY "
|
(void) fprintf(stderr, " -K --key=KEY "
|
||||||
"decryption key for encrypted dataset\n");
|
"decryption key for encrypted dataset\n");
|
||||||
(void) fprintf(stderr, " -o --option=\"OPTION=INTEGER\" "
|
(void) fprintf(stderr, " -o --option=\"NAME=VALUE\" "
|
||||||
"set global variable to an unsigned 32-bit integer\n");
|
"set the named tunable to the given value\n");
|
||||||
(void) fprintf(stderr, " -p --path==PATH "
|
(void) fprintf(stderr, " -p --path==PATH "
|
||||||
"use one or more with -e to specify path to vdev dir\n");
|
"use one or more with -e to specify path to vdev dir\n");
|
||||||
(void) fprintf(stderr, " -P --parseable "
|
(void) fprintf(stderr, " -P --parseable "
|
||||||
@ -826,7 +837,7 @@ usage(void)
|
|||||||
(void) fprintf(stderr, "Specify an option more than once (e.g. -bb) "
|
(void) fprintf(stderr, "Specify an option more than once (e.g. -bb) "
|
||||||
"to make only that option verbose\n");
|
"to make only that option verbose\n");
|
||||||
(void) fprintf(stderr, "Default is to dump everything non-verbosely\n");
|
(void) fprintf(stderr, "Default is to dump everything non-verbosely\n");
|
||||||
zdb_exit(1);
|
zdb_exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -891,9 +902,9 @@ dump_packed_nvlist(objset_t *os, uint64_t object, void *data, size_t size)
|
|||||||
size_t nvsize = *(uint64_t *)data;
|
size_t nvsize = *(uint64_t *)data;
|
||||||
char *packed = umem_alloc(nvsize, UMEM_NOFAIL);
|
char *packed = umem_alloc(nvsize, UMEM_NOFAIL);
|
||||||
|
|
||||||
VERIFY(0 == dmu_read(os, object, 0, nvsize, packed, DMU_READ_PREFETCH));
|
VERIFY0(dmu_read(os, object, 0, nvsize, packed, DMU_READ_PREFETCH));
|
||||||
|
|
||||||
VERIFY(nvlist_unpack(packed, nvsize, &nv, 0) == 0);
|
VERIFY0(nvlist_unpack(packed, nvsize, &nv, 0));
|
||||||
|
|
||||||
umem_free(packed, nvsize);
|
umem_free(packed, nvsize);
|
||||||
|
|
||||||
@ -1454,8 +1465,8 @@ get_obsolete_refcount(vdev_t *vd)
|
|||||||
refcount++;
|
refcount++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ASSERT3P(vd->vdev_obsolete_sm, ==, NULL);
|
ASSERT0P(vd->vdev_obsolete_sm);
|
||||||
ASSERT3U(obsolete_sm_object, ==, 0);
|
ASSERT0(obsolete_sm_object);
|
||||||
}
|
}
|
||||||
for (unsigned c = 0; c < vd->vdev_children; c++) {
|
for (unsigned c = 0; c < vd->vdev_children; c++) {
|
||||||
refcount += get_obsolete_refcount(vd->vdev_child[c]);
|
refcount += get_obsolete_refcount(vd->vdev_child[c]);
|
||||||
@ -1577,9 +1588,8 @@ dump_spacemap(objset_t *os, space_map_t *sm)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t words;
|
|
||||||
char entry_type;
|
char entry_type;
|
||||||
uint64_t entry_off, entry_run, entry_vdev = SM_NO_VDEVID;
|
uint64_t entry_off, entry_run, entry_vdev;
|
||||||
|
|
||||||
if (sm_entry_is_single_word(word)) {
|
if (sm_entry_is_single_word(word)) {
|
||||||
entry_type = (SM_TYPE_DECODE(word) == SM_ALLOC) ?
|
entry_type = (SM_TYPE_DECODE(word) == SM_ALLOC) ?
|
||||||
@ -1587,35 +1597,43 @@ dump_spacemap(objset_t *os, space_map_t *sm)
|
|||||||
entry_off = (SM_OFFSET_DECODE(word) << mapshift) +
|
entry_off = (SM_OFFSET_DECODE(word) << mapshift) +
|
||||||
sm->sm_start;
|
sm->sm_start;
|
||||||
entry_run = SM_RUN_DECODE(word) << mapshift;
|
entry_run = SM_RUN_DECODE(word) << mapshift;
|
||||||
words = 1;
|
|
||||||
|
(void) printf("\t [%6llu] %c "
|
||||||
|
"range: %012llx-%012llx size: %08llx\n",
|
||||||
|
(u_longlong_t)entry_id, entry_type,
|
||||||
|
(u_longlong_t)entry_off,
|
||||||
|
(u_longlong_t)(entry_off + entry_run - 1),
|
||||||
|
(u_longlong_t)entry_run);
|
||||||
} else {
|
} else {
|
||||||
/* it is a two-word entry so we read another word */
|
/* it is a two-word entry so we read another word */
|
||||||
ASSERT(sm_entry_is_double_word(word));
|
ASSERT(sm_entry_is_double_word(word));
|
||||||
|
|
||||||
uint64_t extra_word;
|
uint64_t extra_word;
|
||||||
offset += sizeof (extra_word);
|
offset += sizeof (extra_word);
|
||||||
|
ASSERT3U(offset, <, space_map_length(sm));
|
||||||
VERIFY0(dmu_read(os, space_map_object(sm), offset,
|
VERIFY0(dmu_read(os, space_map_object(sm), offset,
|
||||||
sizeof (extra_word), &extra_word,
|
sizeof (extra_word), &extra_word,
|
||||||
DMU_READ_PREFETCH));
|
DMU_READ_PREFETCH));
|
||||||
|
|
||||||
ASSERT3U(offset, <=, space_map_length(sm));
|
|
||||||
|
|
||||||
entry_run = SM2_RUN_DECODE(word) << mapshift;
|
entry_run = SM2_RUN_DECODE(word) << mapshift;
|
||||||
entry_vdev = SM2_VDEV_DECODE(word);
|
entry_vdev = SM2_VDEV_DECODE(word);
|
||||||
entry_type = (SM2_TYPE_DECODE(extra_word) == SM_ALLOC) ?
|
entry_type = (SM2_TYPE_DECODE(extra_word) == SM_ALLOC) ?
|
||||||
'A' : 'F';
|
'A' : 'F';
|
||||||
entry_off = (SM2_OFFSET_DECODE(extra_word) <<
|
entry_off = (SM2_OFFSET_DECODE(extra_word) <<
|
||||||
mapshift) + sm->sm_start;
|
mapshift) + sm->sm_start;
|
||||||
words = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
(void) printf("\t [%6llu] %c range:"
|
if (zopt_metaslab_args == 0 ||
|
||||||
" %010llx-%010llx size: %06llx vdev: %06llu words: %u\n",
|
zopt_metaslab[0] == entry_vdev) {
|
||||||
(u_longlong_t)entry_id,
|
(void) printf("\t [%6llu] %c "
|
||||||
entry_type, (u_longlong_t)entry_off,
|
"range: %012llx-%012llx size: %08llx "
|
||||||
(u_longlong_t)(entry_off + entry_run),
|
"vdev: %llu\n",
|
||||||
|
(u_longlong_t)entry_id, entry_type,
|
||||||
|
(u_longlong_t)entry_off,
|
||||||
|
(u_longlong_t)(entry_off + entry_run - 1),
|
||||||
(u_longlong_t)entry_run,
|
(u_longlong_t)entry_run,
|
||||||
(u_longlong_t)entry_vdev, words);
|
(u_longlong_t)entry_vdev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (entry_type == 'A')
|
if (entry_type == 'A')
|
||||||
alloc += entry_run;
|
alloc += entry_run;
|
||||||
@ -1650,6 +1668,16 @@ dump_metaslab_stats(metaslab_t *msp)
|
|||||||
dump_histogram(rt->rt_histogram, ZFS_RANGE_TREE_HISTOGRAM_SIZE, 0);
|
dump_histogram(rt->rt_histogram, ZFS_RANGE_TREE_HISTOGRAM_SIZE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
dump_allocated(void *arg, uint64_t start, uint64_t size)
|
||||||
|
{
|
||||||
|
uint64_t *off = arg;
|
||||||
|
if (*off != start)
|
||||||
|
(void) printf("ALLOC: %"PRIu64" %"PRIu64"\n", *off,
|
||||||
|
start - *off);
|
||||||
|
*off = start + size;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dump_metaslab(metaslab_t *msp)
|
dump_metaslab(metaslab_t *msp)
|
||||||
{
|
{
|
||||||
@ -1666,13 +1694,24 @@ dump_metaslab(metaslab_t *msp)
|
|||||||
(u_longlong_t)msp->ms_id, (u_longlong_t)msp->ms_start,
|
(u_longlong_t)msp->ms_id, (u_longlong_t)msp->ms_start,
|
||||||
(u_longlong_t)space_map_object(sm), freebuf);
|
(u_longlong_t)space_map_object(sm), freebuf);
|
||||||
|
|
||||||
if (dump_opt['m'] > 2 && !dump_opt['L']) {
|
if (dump_opt[ALLOCATED_OPT] ||
|
||||||
|
(dump_opt['m'] > 2 && !dump_opt['L'])) {
|
||||||
mutex_enter(&msp->ms_lock);
|
mutex_enter(&msp->ms_lock);
|
||||||
VERIFY0(metaslab_load(msp));
|
VERIFY0(metaslab_load(msp));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dump_opt['m'] > 2 && !dump_opt['L']) {
|
||||||
zfs_range_tree_stat_verify(msp->ms_allocatable);
|
zfs_range_tree_stat_verify(msp->ms_allocatable);
|
||||||
dump_metaslab_stats(msp);
|
dump_metaslab_stats(msp);
|
||||||
metaslab_unload(msp);
|
}
|
||||||
mutex_exit(&msp->ms_lock);
|
|
||||||
|
if (dump_opt[ALLOCATED_OPT]) {
|
||||||
|
uint64_t off = msp->ms_start;
|
||||||
|
zfs_range_tree_walk(msp->ms_allocatable, dump_allocated,
|
||||||
|
&off);
|
||||||
|
if (off != msp->ms_start + msp->ms_size)
|
||||||
|
(void) printf("ALLOC: %"PRIu64" %"PRIu64"\n", off,
|
||||||
|
msp->ms_size - off);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dump_opt['m'] > 1 && sm != NULL &&
|
if (dump_opt['m'] > 1 && sm != NULL &&
|
||||||
@ -1687,6 +1726,12 @@ dump_metaslab(metaslab_t *msp)
|
|||||||
SPACE_MAP_HISTOGRAM_SIZE, sm->sm_shift);
|
SPACE_MAP_HISTOGRAM_SIZE, sm->sm_shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dump_opt[ALLOCATED_OPT] ||
|
||||||
|
(dump_opt['m'] > 2 && !dump_opt['L'])) {
|
||||||
|
metaslab_unload(msp);
|
||||||
|
mutex_exit(&msp->ms_lock);
|
||||||
|
}
|
||||||
|
|
||||||
if (vd->vdev_ops == &vdev_draid_ops)
|
if (vd->vdev_ops == &vdev_draid_ops)
|
||||||
ASSERT3U(msp->ms_size, <=, 1ULL << vd->vdev_ms_shift);
|
ASSERT3U(msp->ms_size, <=, 1ULL << vd->vdev_ms_shift);
|
||||||
else
|
else
|
||||||
@ -1723,8 +1768,9 @@ print_vdev_metaslab_header(vdev_t *vd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) printf("\tvdev %10llu %s",
|
(void) printf("\tvdev %10llu\t%s metaslab shift %4llu",
|
||||||
(u_longlong_t)vd->vdev_id, bias_str);
|
(u_longlong_t)vd->vdev_id, bias_str,
|
||||||
|
(u_longlong_t)vd->vdev_ms_shift);
|
||||||
|
|
||||||
if (ms_flush_data_obj != 0) {
|
if (ms_flush_data_obj != 0) {
|
||||||
(void) printf(" ms_unflushed_phys object %llu",
|
(void) printf(" ms_unflushed_phys object %llu",
|
||||||
@ -1791,7 +1837,7 @@ print_vdev_indirect(vdev_t *vd)
|
|||||||
vdev_indirect_births_t *vib = vd->vdev_indirect_births;
|
vdev_indirect_births_t *vib = vd->vdev_indirect_births;
|
||||||
|
|
||||||
if (vim == NULL) {
|
if (vim == NULL) {
|
||||||
ASSERT3P(vib, ==, NULL);
|
ASSERT0P(vib);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1864,7 +1910,7 @@ dump_metaslabs(spa_t *spa)
|
|||||||
|
|
||||||
(void) printf("\nMetaslabs:\n");
|
(void) printf("\nMetaslabs:\n");
|
||||||
|
|
||||||
if (!dump_opt['d'] && zopt_metaslab_args > 0) {
|
if (zopt_metaslab_args > 0) {
|
||||||
c = zopt_metaslab[0];
|
c = zopt_metaslab[0];
|
||||||
|
|
||||||
if (c >= children)
|
if (c >= children)
|
||||||
@ -1991,7 +2037,7 @@ dump_ddt_log(ddt_t *ddt)
|
|||||||
c += strlcpy(&flagstr[c], " UNKNOWN",
|
c += strlcpy(&flagstr[c], " UNKNOWN",
|
||||||
sizeof (flagstr) - c);
|
sizeof (flagstr) - c);
|
||||||
flagstr[1] = '[';
|
flagstr[1] = '[';
|
||||||
flagstr[c++] = ']';
|
flagstr[c] = ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t count = avl_numnodes(&ddl->ddl_tree);
|
uint64_t count = avl_numnodes(&ddl->ddl_tree);
|
||||||
@ -2042,10 +2088,10 @@ dump_ddt_object(ddt_t *ddt, ddt_type_t type, ddt_class_t class)
|
|||||||
|
|
||||||
if (error == ENOENT)
|
if (error == ENOENT)
|
||||||
return;
|
return;
|
||||||
ASSERT(error == 0);
|
ASSERT0(error);
|
||||||
|
|
||||||
error = ddt_object_count(ddt, type, class, &count);
|
error = ddt_object_count(ddt, type, class, &count);
|
||||||
ASSERT(error == 0);
|
ASSERT0(error);
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -2545,12 +2591,14 @@ snprintf_blkptr_compact(char *blkbuf, size_t buflen, const blkptr_t *bp,
|
|||||||
|
|
||||||
blkbuf[0] = '\0';
|
blkbuf[0] = '\0';
|
||||||
|
|
||||||
for (i = 0; i < ndvas; i++)
|
for (i = 0; i < ndvas; i++) {
|
||||||
(void) snprintf(blkbuf + strlen(blkbuf),
|
(void) snprintf(blkbuf + strlen(blkbuf),
|
||||||
buflen - strlen(blkbuf), "%llu:%llx:%llx ",
|
buflen - strlen(blkbuf), "%llu:%llx:%llx%s ",
|
||||||
(u_longlong_t)DVA_GET_VDEV(&dva[i]),
|
(u_longlong_t)DVA_GET_VDEV(&dva[i]),
|
||||||
(u_longlong_t)DVA_GET_OFFSET(&dva[i]),
|
(u_longlong_t)DVA_GET_OFFSET(&dva[i]),
|
||||||
(u_longlong_t)DVA_GET_ASIZE(&dva[i]));
|
(u_longlong_t)DVA_GET_ASIZE(&dva[i]),
|
||||||
|
(DVA_GET_GANG(&dva[i]) ? "G" : ""));
|
||||||
|
}
|
||||||
|
|
||||||
if (BP_IS_HOLE(bp)) {
|
if (BP_IS_HOLE(bp)) {
|
||||||
(void) snprintf(blkbuf + strlen(blkbuf),
|
(void) snprintf(blkbuf + strlen(blkbuf),
|
||||||
@ -2566,7 +2614,7 @@ snprintf_blkptr_compact(char *blkbuf, size_t buflen, const blkptr_t *bp,
|
|||||||
(u_longlong_t)BP_GET_PSIZE(bp),
|
(u_longlong_t)BP_GET_PSIZE(bp),
|
||||||
(u_longlong_t)BP_GET_FILL(bp),
|
(u_longlong_t)BP_GET_FILL(bp),
|
||||||
(u_longlong_t)BP_GET_LOGICAL_BIRTH(bp),
|
(u_longlong_t)BP_GET_LOGICAL_BIRTH(bp),
|
||||||
(u_longlong_t)BP_GET_BIRTH(bp));
|
(u_longlong_t)BP_GET_PHYSICAL_BIRTH(bp));
|
||||||
if (bp_freed)
|
if (bp_freed)
|
||||||
(void) snprintf(blkbuf + strlen(blkbuf),
|
(void) snprintf(blkbuf + strlen(blkbuf),
|
||||||
buflen - strlen(blkbuf), " %s", "FREE");
|
buflen - strlen(blkbuf), " %s", "FREE");
|
||||||
@ -2580,19 +2628,17 @@ snprintf_blkptr_compact(char *blkbuf, size_t buflen, const blkptr_t *bp,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static u_longlong_t
|
||||||
print_indirect(spa_t *spa, blkptr_t *bp, const zbookmark_phys_t *zb,
|
print_indirect(spa_t *spa, blkptr_t *bp, const zbookmark_phys_t *zb,
|
||||||
const dnode_phys_t *dnp)
|
const dnode_phys_t *dnp)
|
||||||
{
|
{
|
||||||
char blkbuf[BP_SPRINTF_LEN];
|
char blkbuf[BP_SPRINTF_LEN];
|
||||||
|
u_longlong_t offset;
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
if (!BP_IS_EMBEDDED(bp)) {
|
offset = (u_longlong_t)blkid2offset(dnp, bp, zb);
|
||||||
ASSERT3U(BP_GET_TYPE(bp), ==, dnp->dn_type);
|
|
||||||
ASSERT3U(BP_GET_LEVEL(bp), ==, zb->zb_level);
|
|
||||||
}
|
|
||||||
|
|
||||||
(void) printf("%16llx ", (u_longlong_t)blkid2offset(dnp, bp, zb));
|
(void) printf("%16llx ", offset);
|
||||||
|
|
||||||
ASSERT(zb->zb_level >= 0);
|
ASSERT(zb->zb_level >= 0);
|
||||||
|
|
||||||
@ -2607,19 +2653,38 @@ print_indirect(spa_t *spa, blkptr_t *bp, const zbookmark_phys_t *zb,
|
|||||||
snprintf_blkptr_compact(blkbuf, sizeof (blkbuf), bp, B_FALSE);
|
snprintf_blkptr_compact(blkbuf, sizeof (blkbuf), bp, B_FALSE);
|
||||||
if (dump_opt['Z'] && BP_GET_COMPRESS(bp) == ZIO_COMPRESS_ZSTD)
|
if (dump_opt['Z'] && BP_GET_COMPRESS(bp) == ZIO_COMPRESS_ZSTD)
|
||||||
snprintf_zstd_header(spa, blkbuf, sizeof (blkbuf), bp);
|
snprintf_zstd_header(spa, blkbuf, sizeof (blkbuf), bp);
|
||||||
(void) printf("%s\n", blkbuf);
|
(void) printf("%s", blkbuf);
|
||||||
|
|
||||||
|
if (!BP_IS_EMBEDDED(bp)) {
|
||||||
|
if (BP_GET_TYPE(bp) != dnp->dn_type) {
|
||||||
|
(void) printf(" (ERROR: Block pointer type "
|
||||||
|
"(%llu) does not match dnode type (%hhu))",
|
||||||
|
BP_GET_TYPE(bp), dnp->dn_type);
|
||||||
|
corruption_found = B_TRUE;
|
||||||
|
}
|
||||||
|
if (BP_GET_LEVEL(bp) != zb->zb_level) {
|
||||||
|
(void) printf(" (ERROR: Block pointer level "
|
||||||
|
"(%llu) does not match bookmark level (%lld))",
|
||||||
|
BP_GET_LEVEL(bp), (longlong_t)zb->zb_level);
|
||||||
|
corruption_found = B_TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
(void) printf("\n");
|
||||||
|
|
||||||
|
return (offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
visit_indirect(spa_t *spa, const dnode_phys_t *dnp,
|
visit_indirect(spa_t *spa, const dnode_phys_t *dnp,
|
||||||
blkptr_t *bp, const zbookmark_phys_t *zb)
|
blkptr_t *bp, const zbookmark_phys_t *zb)
|
||||||
{
|
{
|
||||||
|
u_longlong_t offset;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
if (BP_GET_LOGICAL_BIRTH(bp) == 0)
|
if (BP_GET_BIRTH(bp) == 0)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
print_indirect(spa, bp, zb, dnp);
|
offset = print_indirect(spa, bp, zb, dnp);
|
||||||
|
|
||||||
if (BP_GET_LEVEL(bp) > 0 && !BP_IS_HOLE(bp)) {
|
if (BP_GET_LEVEL(bp) > 0 && !BP_IS_HOLE(bp)) {
|
||||||
arc_flags_t flags = ARC_FLAG_WAIT;
|
arc_flags_t flags = ARC_FLAG_WAIT;
|
||||||
@ -2649,8 +2714,15 @@ visit_indirect(spa_t *spa, const dnode_phys_t *dnp,
|
|||||||
break;
|
break;
|
||||||
fill += BP_GET_FILL(cbp);
|
fill += BP_GET_FILL(cbp);
|
||||||
}
|
}
|
||||||
if (!err)
|
if (!err) {
|
||||||
ASSERT3U(fill, ==, BP_GET_FILL(bp));
|
if (fill != BP_GET_FILL(bp)) {
|
||||||
|
(void) printf("%16llx: Block pointer "
|
||||||
|
"fill (%llu) does not match calculated "
|
||||||
|
"value (%llu)\n", offset, BP_GET_FILL(bp),
|
||||||
|
(u_longlong_t)fill);
|
||||||
|
corruption_found = B_TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
arc_buf_destroy(buf, &buf);
|
arc_buf_destroy(buf, &buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2804,7 +2876,7 @@ dump_bptree_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx)
|
|||||||
(void) arg, (void) tx;
|
(void) arg, (void) tx;
|
||||||
char blkbuf[BP_SPRINTF_LEN];
|
char blkbuf[BP_SPRINTF_LEN];
|
||||||
|
|
||||||
if (BP_GET_LOGICAL_BIRTH(bp) != 0) {
|
if (BP_GET_BIRTH(bp) != 0) {
|
||||||
snprintf_blkptr(blkbuf, sizeof (blkbuf), bp);
|
snprintf_blkptr(blkbuf, sizeof (blkbuf), bp);
|
||||||
(void) printf("\t%s\n", blkbuf);
|
(void) printf("\t%s\n", blkbuf);
|
||||||
}
|
}
|
||||||
@ -2845,7 +2917,7 @@ dump_bpobj_cb(void *arg, const blkptr_t *bp, boolean_t bp_freed, dmu_tx_t *tx)
|
|||||||
(void) arg, (void) tx;
|
(void) arg, (void) tx;
|
||||||
char blkbuf[BP_SPRINTF_LEN];
|
char blkbuf[BP_SPRINTF_LEN];
|
||||||
|
|
||||||
ASSERT(BP_GET_LOGICAL_BIRTH(bp) != 0);
|
ASSERT(BP_GET_BIRTH(bp) != 0);
|
||||||
snprintf_blkptr_compact(blkbuf, sizeof (blkbuf), bp, bp_freed);
|
snprintf_blkptr_compact(blkbuf, sizeof (blkbuf), bp, bp_freed);
|
||||||
(void) printf("\t%s\n", blkbuf);
|
(void) printf("\t%s\n", blkbuf);
|
||||||
return (0);
|
return (0);
|
||||||
@ -2906,6 +2978,7 @@ dump_full_bpobj(bpobj_t *bpo, const char *name, int indent)
|
|||||||
(void) printf("ERROR %u while trying to open "
|
(void) printf("ERROR %u while trying to open "
|
||||||
"subobj id %llu\n",
|
"subobj id %llu\n",
|
||||||
error, (u_longlong_t)subobj);
|
error, (u_longlong_t)subobj);
|
||||||
|
corruption_found = B_TRUE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
dump_full_bpobj(&subbpo, "subobj", indent + 1);
|
dump_full_bpobj(&subbpo, "subobj", indent + 1);
|
||||||
@ -3085,6 +3158,7 @@ bpobj_count_refd(bpobj_t *bpo)
|
|||||||
(void) printf("ERROR %u while trying to open "
|
(void) printf("ERROR %u while trying to open "
|
||||||
"subobj id %llu\n",
|
"subobj id %llu\n",
|
||||||
error, (u_longlong_t)subobj);
|
error, (u_longlong_t)subobj);
|
||||||
|
corruption_found = B_TRUE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
bpobj_count_refd(&subbpo);
|
bpobj_count_refd(&subbpo);
|
||||||
@ -3106,7 +3180,7 @@ dsl_deadlist_entry_count_refd(void *arg, dsl_deadlist_entry_t *dle)
|
|||||||
static int
|
static int
|
||||||
dsl_deadlist_entry_dump(void *arg, dsl_deadlist_entry_t *dle)
|
dsl_deadlist_entry_dump(void *arg, dsl_deadlist_entry_t *dle)
|
||||||
{
|
{
|
||||||
ASSERT(arg == NULL);
|
ASSERT0P(arg);
|
||||||
if (dump_opt['d'] >= 5) {
|
if (dump_opt['d'] >= 5) {
|
||||||
char buf[128];
|
char buf[128];
|
||||||
(void) snprintf(buf, sizeof (buf),
|
(void) snprintf(buf, sizeof (buf),
|
||||||
@ -3227,6 +3301,7 @@ zdb_derive_key(dsl_dir_t *dd, uint8_t *key_out)
|
|||||||
uint64_t keyformat, salt, iters;
|
uint64_t keyformat, salt, iters;
|
||||||
int i;
|
int i;
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
|
FILE *f;
|
||||||
|
|
||||||
VERIFY0(zap_lookup(dd->dd_pool->dp_meta_objset, dd->dd_crypto_obj,
|
VERIFY0(zap_lookup(dd->dd_pool->dp_meta_objset, dd->dd_crypto_obj,
|
||||||
zfs_prop_to_name(ZFS_PROP_KEYFORMAT), sizeof (uint64_t),
|
zfs_prop_to_name(ZFS_PROP_KEYFORMAT), sizeof (uint64_t),
|
||||||
@ -3259,6 +3334,25 @@ zdb_derive_key(dsl_dir_t *dd, uint8_t *key_out)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ZFS_KEYFORMAT_RAW:
|
||||||
|
if ((f = fopen(key_material, "r")) == NULL)
|
||||||
|
return (B_FALSE);
|
||||||
|
|
||||||
|
if (fread(key_out, 1, WRAPPING_KEY_LEN, f) !=
|
||||||
|
WRAPPING_KEY_LEN) {
|
||||||
|
(void) fclose(f);
|
||||||
|
return (B_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check the key length */
|
||||||
|
if (fgetc(f) != EOF) {
|
||||||
|
(void) fclose(f);
|
||||||
|
return (B_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
(void) fclose(f);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatal("no support for key format %u\n",
|
fatal("no support for key format %u\n",
|
||||||
(unsigned int) keyformat);
|
(unsigned int) keyformat);
|
||||||
@ -3344,7 +3438,7 @@ open_objset(const char *path, const void *tag, objset_t **osp)
|
|||||||
uint64_t sa_attrs = 0;
|
uint64_t sa_attrs = 0;
|
||||||
uint64_t version = 0;
|
uint64_t version = 0;
|
||||||
|
|
||||||
VERIFY3P(sa_os, ==, NULL);
|
VERIFY0P(sa_os);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We can't own an objset if it's redacted. Therefore, we do this
|
* We can't own an objset if it's redacted. Therefore, we do this
|
||||||
@ -3517,8 +3611,8 @@ dump_uidgid(objset_t *os, uint64_t uid, uint64_t gid)
|
|||||||
uint64_t fuid_obj;
|
uint64_t fuid_obj;
|
||||||
|
|
||||||
/* first find the fuid object. It lives in the master node */
|
/* first find the fuid object. It lives in the master node */
|
||||||
VERIFY(zap_lookup(os, MASTER_NODE_OBJ, ZFS_FUID_TABLES,
|
VERIFY0(zap_lookup(os, MASTER_NODE_OBJ, ZFS_FUID_TABLES,
|
||||||
8, 1, &fuid_obj) == 0);
|
8, 1, &fuid_obj));
|
||||||
zfs_fuid_avl_tree_create(&idx_tree, &domain_tree);
|
zfs_fuid_avl_tree_create(&idx_tree, &domain_tree);
|
||||||
(void) zfs_fuid_table_load(os, fuid_obj,
|
(void) zfs_fuid_table_load(os, fuid_obj,
|
||||||
&idx_tree, &domain_tree);
|
&idx_tree, &domain_tree);
|
||||||
@ -5919,11 +6013,11 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t *zilog, const blkptr_t *bp,
|
|||||||
* entry back to the block pointer before we claim it.
|
* entry back to the block pointer before we claim it.
|
||||||
*/
|
*/
|
||||||
if (v == DDT_PHYS_FLAT) {
|
if (v == DDT_PHYS_FLAT) {
|
||||||
ASSERT3U(BP_GET_BIRTH(bp), ==,
|
ASSERT3U(BP_GET_PHYSICAL_BIRTH(bp), ==,
|
||||||
ddt_phys_birth(dde->dde_phys, v));
|
ddt_phys_birth(dde->dde_phys, v));
|
||||||
tempbp = *bp;
|
tempbp = *bp;
|
||||||
ddt_bp_fill(dde->dde_phys, v, &tempbp,
|
ddt_bp_fill(dde->dde_phys, v, &tempbp,
|
||||||
BP_GET_BIRTH(bp));
|
BP_GET_PHYSICAL_BIRTH(bp));
|
||||||
bp = &tempbp;
|
bp = &tempbp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6149,7 +6243,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
|
|||||||
if (zb->zb_level == ZB_DNODE_LEVEL)
|
if (zb->zb_level == ZB_DNODE_LEVEL)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
if (dump_opt['b'] >= 5 && BP_GET_LOGICAL_BIRTH(bp) > 0) {
|
if (dump_opt['b'] >= 5 && BP_GET_BIRTH(bp) > 0) {
|
||||||
char blkbuf[BP_SPRINTF_LEN];
|
char blkbuf[BP_SPRINTF_LEN];
|
||||||
snprintf_blkptr(blkbuf, sizeof (blkbuf), bp);
|
snprintf_blkptr(blkbuf, sizeof (blkbuf), bp);
|
||||||
(void) printf("objset %llu object %llu "
|
(void) printf("objset %llu object %llu "
|
||||||
@ -6320,8 +6414,9 @@ zdb_claim_removing(spa_t *spa, zdb_cb_t *zcb)
|
|||||||
|
|
||||||
ASSERT0(zfs_range_tree_space(svr->svr_allocd_segs));
|
ASSERT0(zfs_range_tree_space(svr->svr_allocd_segs));
|
||||||
|
|
||||||
zfs_range_tree_t *allocs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64,
|
zfs_range_tree_t *allocs = zfs_range_tree_create_flags(
|
||||||
NULL, 0, 0);
|
NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
|
||||||
|
0, "zdb_claim_removing:allocs");
|
||||||
for (uint64_t msi = 0; msi < vd->vdev_ms_count; msi++) {
|
for (uint64_t msi = 0; msi < vd->vdev_ms_count; msi++) {
|
||||||
metaslab_t *msp = vd->vdev_ms[msi];
|
metaslab_t *msp = vd->vdev_ms[msi];
|
||||||
|
|
||||||
@ -6748,6 +6843,7 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
|
|||||||
spa->spa_normal_class->mc_ops = &zdb_metaslab_ops;
|
spa->spa_normal_class->mc_ops = &zdb_metaslab_ops;
|
||||||
spa->spa_log_class->mc_ops = &zdb_metaslab_ops;
|
spa->spa_log_class->mc_ops = &zdb_metaslab_ops;
|
||||||
spa->spa_embedded_log_class->mc_ops = &zdb_metaslab_ops;
|
spa->spa_embedded_log_class->mc_ops = &zdb_metaslab_ops;
|
||||||
|
spa->spa_special_embedded_log_class->mc_ops = &zdb_metaslab_ops;
|
||||||
|
|
||||||
zcb->zcb_vd_obsolete_counts =
|
zcb->zcb_vd_obsolete_counts =
|
||||||
umem_zalloc(rvd->vdev_children * sizeof (uint32_t *),
|
umem_zalloc(rvd->vdev_children * sizeof (uint32_t *),
|
||||||
@ -6885,7 +6981,9 @@ zdb_leak_fini(spa_t *spa, zdb_cb_t *zcb)
|
|||||||
for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
|
for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
|
||||||
metaslab_t *msp = vd->vdev_ms[m];
|
metaslab_t *msp = vd->vdev_ms[m];
|
||||||
ASSERT3P(msp->ms_group, ==, (msp->ms_group->mg_class ==
|
ASSERT3P(msp->ms_group, ==, (msp->ms_group->mg_class ==
|
||||||
spa_embedded_log_class(spa)) ?
|
spa_embedded_log_class(spa) ||
|
||||||
|
msp->ms_group->mg_class ==
|
||||||
|
spa_special_embedded_log_class(spa)) ?
|
||||||
vd->vdev_log_mg : vd->vdev_mg);
|
vd->vdev_log_mg : vd->vdev_mg);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -7009,7 +7107,7 @@ deleted_livelists_count_blocks(spa_t *spa, zdb_cb_t *zbc)
|
|||||||
static void
|
static void
|
||||||
dump_livelist_cb(dsl_deadlist_t *ll, void *arg)
|
dump_livelist_cb(dsl_deadlist_t *ll, void *arg)
|
||||||
{
|
{
|
||||||
ASSERT3P(arg, ==, NULL);
|
ASSERT0P(arg);
|
||||||
global_feature_count[SPA_FEATURE_LIVELIST]++;
|
global_feature_count[SPA_FEATURE_LIVELIST]++;
|
||||||
dump_blkptr_list(ll, "Deleted Livelist");
|
dump_blkptr_list(ll, "Deleted Livelist");
|
||||||
dsl_deadlist_iterate(ll, sublivelist_verify_lightweight, NULL);
|
dsl_deadlist_iterate(ll, sublivelist_verify_lightweight, NULL);
|
||||||
@ -7119,6 +7217,8 @@ dump_block_stats(spa_t *spa)
|
|||||||
zcb->zcb_totalasize += metaslab_class_get_alloc(spa_dedup_class(spa));
|
zcb->zcb_totalasize += metaslab_class_get_alloc(spa_dedup_class(spa));
|
||||||
zcb->zcb_totalasize +=
|
zcb->zcb_totalasize +=
|
||||||
metaslab_class_get_alloc(spa_embedded_log_class(spa));
|
metaslab_class_get_alloc(spa_embedded_log_class(spa));
|
||||||
|
zcb->zcb_totalasize +=
|
||||||
|
metaslab_class_get_alloc(spa_special_embedded_log_class(spa));
|
||||||
zcb->zcb_start = zcb->zcb_lastprint = gethrtime();
|
zcb->zcb_start = zcb->zcb_lastprint = gethrtime();
|
||||||
err = traverse_pool(spa, 0, flags, zdb_blkptr_cb, zcb);
|
err = traverse_pool(spa, 0, flags, zdb_blkptr_cb, zcb);
|
||||||
|
|
||||||
@ -7167,6 +7267,7 @@ dump_block_stats(spa_t *spa)
|
|||||||
total_alloc = norm_alloc +
|
total_alloc = norm_alloc +
|
||||||
metaslab_class_get_alloc(spa_log_class(spa)) +
|
metaslab_class_get_alloc(spa_log_class(spa)) +
|
||||||
metaslab_class_get_alloc(spa_embedded_log_class(spa)) +
|
metaslab_class_get_alloc(spa_embedded_log_class(spa)) +
|
||||||
|
metaslab_class_get_alloc(spa_special_embedded_log_class(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);
|
||||||
@ -7250,6 +7351,18 @@ dump_block_stats(spa_t *spa)
|
|||||||
100.0 * alloc / space);
|
100.0 * alloc / space);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (spa_special_embedded_log_class(spa)->mc_allocator[0].mca_rotor
|
||||||
|
!= NULL) {
|
||||||
|
uint64_t alloc = metaslab_class_get_alloc(
|
||||||
|
spa_special_embedded_log_class(spa));
|
||||||
|
uint64_t space = metaslab_class_get_space(
|
||||||
|
spa_special_embedded_log_class(spa));
|
||||||
|
|
||||||
|
(void) printf("\t%-16s %14llu used: %5.2f%%\n",
|
||||||
|
"Special embedded log", (u_longlong_t)alloc,
|
||||||
|
100.0 * alloc / space);
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < NUM_BP_EMBEDDED_TYPES; i++) {
|
for (i = 0; i < NUM_BP_EMBEDDED_TYPES; i++) {
|
||||||
if (zcb->zcb_embedded_blocks[i] == 0)
|
if (zcb->zcb_embedded_blocks[i] == 0)
|
||||||
continue;
|
continue;
|
||||||
@ -7704,7 +7817,8 @@ zdb_set_skip_mmp(char *target)
|
|||||||
* applies to the new_path parameter if allocated.
|
* applies to the new_path parameter if allocated.
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
import_checkpointed_state(char *target, nvlist_t *cfg, char **new_path)
|
import_checkpointed_state(char *target, nvlist_t *cfg, boolean_t target_is_spa,
|
||||||
|
char **new_path)
|
||||||
{
|
{
|
||||||
int error = 0;
|
int error = 0;
|
||||||
char *poolname, *bogus_name = NULL;
|
char *poolname, *bogus_name = NULL;
|
||||||
@ -7712,11 +7826,11 @@ import_checkpointed_state(char *target, nvlist_t *cfg, char **new_path)
|
|||||||
|
|
||||||
/* If the target is not a pool, the extract the pool name */
|
/* If the target is not a pool, the extract the pool name */
|
||||||
char *path_start = strchr(target, '/');
|
char *path_start = strchr(target, '/');
|
||||||
if (path_start != NULL) {
|
if (target_is_spa || path_start == NULL) {
|
||||||
|
poolname = target;
|
||||||
|
} else {
|
||||||
size_t poolname_len = path_start - target;
|
size_t poolname_len = path_start - target;
|
||||||
poolname = strndup(target, poolname_len);
|
poolname = strndup(target, poolname_len);
|
||||||
} else {
|
|
||||||
poolname = target;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg == NULL) {
|
if (cfg == NULL) {
|
||||||
@ -7747,10 +7861,11 @@ import_checkpointed_state(char *target, nvlist_t *cfg, char **new_path)
|
|||||||
"with error %d\n", bogus_name, error);
|
"with error %d\n", bogus_name, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_path != NULL && path_start != NULL) {
|
if (new_path != NULL && !target_is_spa) {
|
||||||
if (asprintf(new_path, "%s%s", bogus_name, path_start) == -1) {
|
if (asprintf(new_path, "%s%s", bogus_name,
|
||||||
|
path_start != NULL ? path_start : "") == -1) {
|
||||||
free(bogus_name);
|
free(bogus_name);
|
||||||
if (path_start != NULL)
|
if (!target_is_spa && path_start != NULL)
|
||||||
free(poolname);
|
free(poolname);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
@ -7889,7 +8004,7 @@ verify_checkpoint_vdev_spacemaps(spa_t *checkpoint, spa_t *current)
|
|||||||
for (uint64_t c = ckpoint_rvd->vdev_children;
|
for (uint64_t c = ckpoint_rvd->vdev_children;
|
||||||
c < current_rvd->vdev_children; c++) {
|
c < current_rvd->vdev_children; c++) {
|
||||||
vdev_t *current_vd = current_rvd->vdev_child[c];
|
vdev_t *current_vd = current_rvd->vdev_child[c];
|
||||||
VERIFY3P(current_vd->vdev_checkpoint_sm, ==, NULL);
|
VERIFY0P(current_vd->vdev_checkpoint_sm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7979,7 +8094,7 @@ verify_checkpoint_blocks(spa_t *spa)
|
|||||||
* name) so we can do verification on it against the current state
|
* name) so we can do verification on it against the current state
|
||||||
* of the pool.
|
* of the pool.
|
||||||
*/
|
*/
|
||||||
checkpoint_pool = import_checkpointed_state(spa->spa_name, NULL,
|
checkpoint_pool = import_checkpointed_state(spa->spa_name, NULL, B_TRUE,
|
||||||
NULL);
|
NULL);
|
||||||
ASSERT(strcmp(spa->spa_name, checkpoint_pool) != 0);
|
ASSERT(strcmp(spa->spa_name, checkpoint_pool) != 0);
|
||||||
|
|
||||||
@ -8449,8 +8564,9 @@ dump_zpool(spa_t *spa)
|
|||||||
|
|
||||||
if (dump_opt['d'] || dump_opt['i']) {
|
if (dump_opt['d'] || dump_opt['i']) {
|
||||||
spa_feature_t f;
|
spa_feature_t f;
|
||||||
mos_refd_objs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64,
|
mos_refd_objs = zfs_range_tree_create_flags(
|
||||||
NULL, 0, 0);
|
NULL, ZFS_RANGE_SEG64, NULL, 0, 0,
|
||||||
|
0, "dump_zpool:mos_refd_objs");
|
||||||
dump_objset(dp->dp_meta_objset);
|
dump_objset(dp->dp_meta_objset);
|
||||||
|
|
||||||
if (dump_opt['d'] >= 3) {
|
if (dump_opt['d'] >= 3) {
|
||||||
@ -8586,9 +8702,9 @@ zdb_dump_indirect(blkptr_t *bp, int nbps, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
zdb_dump_gbh(void *buf, int flags)
|
zdb_dump_gbh(void *buf, uint64_t size, int flags)
|
||||||
{
|
{
|
||||||
zdb_dump_indirect((blkptr_t *)buf, SPA_GBH_NBLKPTRS, flags);
|
zdb_dump_indirect((blkptr_t *)buf, gbh_nblkptrs(size), flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -8778,7 +8894,6 @@ zdb_decompress_block(abd_t *pabd, void *buf, void *lbuf, uint64_t lsize,
|
|||||||
(void) buf;
|
(void) buf;
|
||||||
uint64_t orig_lsize = lsize;
|
uint64_t orig_lsize = lsize;
|
||||||
boolean_t tryzle = ((getenv("ZDB_NO_ZLE") == NULL));
|
boolean_t tryzle = ((getenv("ZDB_NO_ZLE") == NULL));
|
||||||
boolean_t found = B_FALSE;
|
|
||||||
/*
|
/*
|
||||||
* We don't know how the data was compressed, so just try
|
* We don't know how the data was compressed, so just try
|
||||||
* every decompress function at every inflated blocksize.
|
* every decompress function at every inflated blocksize.
|
||||||
@ -8821,20 +8936,19 @@ zdb_decompress_block(abd_t *pabd, void *buf, void *lbuf, uint64_t lsize,
|
|||||||
for (cfuncp = cfuncs; *cfuncp; cfuncp++) {
|
for (cfuncp = cfuncs; *cfuncp; cfuncp++) {
|
||||||
if (try_decompress_block(pabd, lsize, psize, flags,
|
if (try_decompress_block(pabd, lsize, psize, flags,
|
||||||
*cfuncp, lbuf, lbuf2)) {
|
*cfuncp, lbuf, lbuf2)) {
|
||||||
found = B_TRUE;
|
tryzle = B_FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (*cfuncp != 0)
|
if (*cfuncp != 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!found && tryzle) {
|
if (tryzle) {
|
||||||
for (lsize = orig_lsize; lsize <= maxlsize;
|
for (lsize = orig_lsize; lsize <= maxlsize;
|
||||||
lsize += SPA_MINBLOCKSIZE) {
|
lsize += SPA_MINBLOCKSIZE) {
|
||||||
if (try_decompress_block(pabd, lsize, psize, flags,
|
if (try_decompress_block(pabd, lsize, psize, flags,
|
||||||
ZIO_COMPRESS_ZLE, lbuf, lbuf2)) {
|
ZIO_COMPRESS_ZLE, lbuf, lbuf2)) {
|
||||||
*cfuncp = ZIO_COMPRESS_ZLE;
|
*cfuncp = ZIO_COMPRESS_ZLE;
|
||||||
found = B_TRUE;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8981,7 +9095,7 @@ zdb_read_block(char *thing, spa_t *spa)
|
|||||||
|
|
||||||
DVA_SET_VDEV(&dva[0], vd->vdev_id);
|
DVA_SET_VDEV(&dva[0], vd->vdev_id);
|
||||||
DVA_SET_OFFSET(&dva[0], offset);
|
DVA_SET_OFFSET(&dva[0], offset);
|
||||||
DVA_SET_GANG(&dva[0], !!(flags & ZDB_FLAG_GBH));
|
DVA_SET_GANG(&dva[0], 0);
|
||||||
DVA_SET_ASIZE(&dva[0], vdev_psize_to_asize(vd, psize));
|
DVA_SET_ASIZE(&dva[0], vdev_psize_to_asize(vd, psize));
|
||||||
|
|
||||||
BP_SET_BIRTH(bp, TXG_INITIAL, TXG_INITIAL);
|
BP_SET_BIRTH(bp, TXG_INITIAL, TXG_INITIAL);
|
||||||
@ -8996,7 +9110,7 @@ zdb_read_block(char *thing, spa_t *spa)
|
|||||||
BP_SET_BYTEORDER(bp, ZFS_HOST_BYTEORDER);
|
BP_SET_BYTEORDER(bp, ZFS_HOST_BYTEORDER);
|
||||||
|
|
||||||
spa_config_enter(spa, SCL_STATE, FTAG, RW_READER);
|
spa_config_enter(spa, SCL_STATE, FTAG, RW_READER);
|
||||||
zio = zio_root(spa, NULL, NULL, 0);
|
zio = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL);
|
||||||
|
|
||||||
if (vd == vd->vdev_top) {
|
if (vd == vd->vdev_top) {
|
||||||
/*
|
/*
|
||||||
@ -9071,7 +9185,7 @@ zdb_read_block(char *thing, spa_t *spa)
|
|||||||
zdb_dump_indirect((blkptr_t *)buf,
|
zdb_dump_indirect((blkptr_t *)buf,
|
||||||
orig_lsize / sizeof (blkptr_t), flags);
|
orig_lsize / sizeof (blkptr_t), flags);
|
||||||
else if (flags & ZDB_FLAG_GBH)
|
else if (flags & ZDB_FLAG_GBH)
|
||||||
zdb_dump_gbh(buf, flags);
|
zdb_dump_gbh(buf, lsize, flags);
|
||||||
else
|
else
|
||||||
zdb_dump_block(thing, buf, lsize, flags);
|
zdb_dump_block(thing, buf, lsize, flags);
|
||||||
|
|
||||||
@ -9118,7 +9232,7 @@ zdb_read_block(char *thing, spa_t *spa)
|
|||||||
ck_zio->io_offset =
|
ck_zio->io_offset =
|
||||||
DVA_GET_OFFSET(&bp->blk_dva[0]);
|
DVA_GET_OFFSET(&bp->blk_dva[0]);
|
||||||
ck_zio->io_bp = bp;
|
ck_zio->io_bp = bp;
|
||||||
zio_checksum_compute(ck_zio, ck, pabd, lsize);
|
zio_checksum_compute(ck_zio, ck, pabd, psize);
|
||||||
printf(
|
printf(
|
||||||
"%12s\t"
|
"%12s\t"
|
||||||
"cksum=%016llx:%016llx:%016llx:%016llx\n",
|
"cksum=%016llx:%016llx:%016llx:%016llx\n",
|
||||||
@ -9311,6 +9425,8 @@ main(int argc, char **argv)
|
|||||||
{"all-reconstruction", no_argument, NULL, 'Y'},
|
{"all-reconstruction", no_argument, NULL, 'Y'},
|
||||||
{"livelist", no_argument, NULL, 'y'},
|
{"livelist", no_argument, NULL, 'y'},
|
||||||
{"zstd-headers", no_argument, NULL, 'Z'},
|
{"zstd-headers", no_argument, NULL, 'Z'},
|
||||||
|
{"allocated-map", no_argument, NULL,
|
||||||
|
ALLOCATED_OPT},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -9341,6 +9457,7 @@ main(int argc, char **argv)
|
|||||||
case 'u':
|
case 'u':
|
||||||
case 'y':
|
case 'y':
|
||||||
case 'Z':
|
case 'Z':
|
||||||
|
case ALLOCATED_OPT:
|
||||||
dump_opt[c]++;
|
dump_opt[c]++;
|
||||||
dump_all = 0;
|
dump_all = 0;
|
||||||
break;
|
break;
|
||||||
@ -9375,9 +9492,11 @@ main(int argc, char **argv)
|
|||||||
while (*optarg != '\0') { *optarg++ = '*'; }
|
while (*optarg != '\0') { *optarg++ = '*'; }
|
||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
error = set_global_var(optarg);
|
dump_opt[c]++;
|
||||||
|
dump_all = 0;
|
||||||
|
error = handle_tunable_option(optarg, B_FALSE);
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
usage();
|
zdb_exit(1);
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
if (searchdirs == NULL) {
|
if (searchdirs == NULL) {
|
||||||
@ -9543,6 +9662,12 @@ main(int argc, char **argv)
|
|||||||
error = 0;
|
error = 0;
|
||||||
goto fini;
|
goto fini;
|
||||||
}
|
}
|
||||||
|
if (dump_opt['o'])
|
||||||
|
/*
|
||||||
|
* Avoid blasting tunable options off the top of the
|
||||||
|
* screen.
|
||||||
|
*/
|
||||||
|
zdb_exit(1);
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9603,7 +9728,7 @@ main(int argc, char **argv)
|
|||||||
} else if (objset_str && !zdb_numeric(objset_str + 1) &&
|
} else if (objset_str && !zdb_numeric(objset_str + 1) &&
|
||||||
dump_opt['N']) {
|
dump_opt['N']) {
|
||||||
printf("Supply a numeric objset ID with -N\n");
|
printf("Supply a numeric objset ID with -N\n");
|
||||||
error = 1;
|
error = 2;
|
||||||
goto fini;
|
goto fini;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -9695,7 +9820,7 @@ main(int argc, char **argv)
|
|||||||
char *checkpoint_target = NULL;
|
char *checkpoint_target = NULL;
|
||||||
if (dump_opt['k']) {
|
if (dump_opt['k']) {
|
||||||
checkpoint_pool = import_checkpointed_state(target, cfg,
|
checkpoint_pool = import_checkpointed_state(target, cfg,
|
||||||
&checkpoint_target);
|
target_is_spa, &checkpoint_target);
|
||||||
|
|
||||||
if (checkpoint_target != NULL)
|
if (checkpoint_target != NULL)
|
||||||
target = checkpoint_target;
|
target = checkpoint_target;
|
||||||
@ -9712,7 +9837,7 @@ main(int argc, char **argv)
|
|||||||
if (error == 0) {
|
if (error == 0) {
|
||||||
if (dump_opt['k'] && (target_is_spa || dump_opt['R'])) {
|
if (dump_opt['k'] && (target_is_spa || dump_opt['R'])) {
|
||||||
ASSERT(checkpoint_pool != NULL);
|
ASSERT(checkpoint_pool != NULL);
|
||||||
ASSERT(checkpoint_target == NULL);
|
ASSERT0P(checkpoint_target);
|
||||||
|
|
||||||
error = spa_open(checkpoint_pool, &spa, FTAG);
|
error = spa_open(checkpoint_pool, &spa, FTAG);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
@ -9905,5 +10030,8 @@ fini:
|
|||||||
if (kernel_init_done)
|
if (kernel_init_done)
|
||||||
kernel_fini();
|
kernel_fini();
|
||||||
|
|
||||||
|
if (corruption_found && error == 0)
|
||||||
|
error = 3;
|
||||||
|
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,6 @@
|
|||||||
#define _ZDB_H
|
#define _ZDB_H
|
||||||
|
|
||||||
void dump_intent_log(zilog_t *);
|
void dump_intent_log(zilog_t *);
|
||||||
extern uint8_t dump_opt[256];
|
extern uint8_t dump_opt[512];
|
||||||
|
|
||||||
#endif /* _ZDB_H */
|
#endif /* _ZDB_H */
|
||||||
|
@ -48,8 +48,6 @@
|
|||||||
|
|
||||||
#include "zdb.h"
|
#include "zdb.h"
|
||||||
|
|
||||||
extern uint8_t dump_opt[256];
|
|
||||||
|
|
||||||
static char tab_prefix[4] = "\t\t\t";
|
static char tab_prefix[4] = "\t\t\t";
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -176,7 +174,7 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
|
|||||||
|
|
||||||
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
|
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
|
||||||
(void) printf("%shas blkptr, %s\n", tab_prefix,
|
(void) printf("%shas blkptr, %s\n", tab_prefix,
|
||||||
!BP_IS_HOLE(bp) && BP_GET_LOGICAL_BIRTH(bp) >=
|
!BP_IS_HOLE(bp) && BP_GET_BIRTH(bp) >=
|
||||||
spa_min_claim_txg(zilog->zl_spa) ?
|
spa_min_claim_txg(zilog->zl_spa) ?
|
||||||
"will claim" : "won't claim");
|
"will claim" : "won't claim");
|
||||||
print_log_bp(bp, tab_prefix);
|
print_log_bp(bp, tab_prefix);
|
||||||
@ -189,7 +187,7 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
|
|||||||
(void) printf("%s<hole>\n", tab_prefix);
|
(void) printf("%s<hole>\n", tab_prefix);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (BP_GET_LOGICAL_BIRTH(bp) < zilog->zl_header->zh_claim_txg) {
|
if (BP_GET_BIRTH(bp) < zilog->zl_header->zh_claim_txg) {
|
||||||
(void) printf("%s<block already committed>\n",
|
(void) printf("%s<block already committed>\n",
|
||||||
tab_prefix);
|
tab_prefix);
|
||||||
return;
|
return;
|
||||||
@ -240,7 +238,7 @@ zil_prt_rec_write_enc(zilog_t *zilog, int txtype, const void *arg)
|
|||||||
|
|
||||||
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
|
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
|
||||||
(void) printf("%shas blkptr, %s\n", tab_prefix,
|
(void) printf("%shas blkptr, %s\n", tab_prefix,
|
||||||
!BP_IS_HOLE(bp) && BP_GET_LOGICAL_BIRTH(bp) >=
|
!BP_IS_HOLE(bp) && BP_GET_BIRTH(bp) >=
|
||||||
spa_min_claim_txg(zilog->zl_spa) ?
|
spa_min_claim_txg(zilog->zl_spa) ?
|
||||||
"will claim" : "won't claim");
|
"will claim" : "won't claim");
|
||||||
print_log_bp(bp, tab_prefix);
|
print_log_bp(bp, tab_prefix);
|
||||||
@ -476,7 +474,7 @@ print_log_block(zilog_t *zilog, const blkptr_t *bp, void *arg,
|
|||||||
|
|
||||||
if (claim_txg != 0)
|
if (claim_txg != 0)
|
||||||
claim = "already claimed";
|
claim = "already claimed";
|
||||||
else if (BP_GET_LOGICAL_BIRTH(bp) >= spa_min_claim_txg(zilog->zl_spa))
|
else if (BP_GET_BIRTH(bp) >= spa_min_claim_txg(zilog->zl_spa))
|
||||||
claim = "will claim";
|
claim = "will claim";
|
||||||
else
|
else
|
||||||
claim = "won't claim";
|
claim = "won't claim";
|
||||||
|
@ -134,11 +134,13 @@ zfs_agent_iter_vdev(zpool_handle_t *zhp, nvlist_t *nvl, void *arg)
|
|||||||
* of blkid cache and L2ARC VDEV does not contain pool guid in its
|
* of blkid cache and L2ARC VDEV does not contain pool guid in its
|
||||||
* blkid, so this is a special case for L2ARC VDEV.
|
* blkid, so this is a special case for L2ARC VDEV.
|
||||||
*/
|
*/
|
||||||
else if (gsp->gs_vdev_guid != 0 && gsp->gs_devid == NULL &&
|
else if (gsp->gs_vdev_guid != 0 &&
|
||||||
nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_GUID, &vdev_guid) == 0 &&
|
nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_GUID, &vdev_guid) == 0 &&
|
||||||
gsp->gs_vdev_guid == vdev_guid) {
|
gsp->gs_vdev_guid == vdev_guid) {
|
||||||
|
if (gsp->gs_devid == NULL) {
|
||||||
(void) nvlist_lookup_string(nvl, ZPOOL_CONFIG_DEVID,
|
(void) nvlist_lookup_string(nvl, ZPOOL_CONFIG_DEVID,
|
||||||
&gsp->gs_devid);
|
&gsp->gs_devid);
|
||||||
|
}
|
||||||
(void) nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_EXPANSION_TIME,
|
(void) nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_EXPANSION_TIME,
|
||||||
&gsp->gs_vdev_expandtime);
|
&gsp->gs_vdev_expandtime);
|
||||||
return (B_TRUE);
|
return (B_TRUE);
|
||||||
@ -156,22 +158,28 @@ zfs_agent_iter_pool(zpool_handle_t *zhp, void *arg)
|
|||||||
/*
|
/*
|
||||||
* For each vdev in this pool, look for a match by devid
|
* For each vdev in this pool, look for a match by devid
|
||||||
*/
|
*/
|
||||||
if ((config = zpool_get_config(zhp, NULL)) != NULL) {
|
boolean_t found = B_FALSE;
|
||||||
if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
|
uint64_t pool_guid;
|
||||||
&nvl) == 0) {
|
|
||||||
(void) zfs_agent_iter_vdev(zhp, nvl, gsp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* if a match was found then grab the pool guid
|
|
||||||
*/
|
|
||||||
if (gsp->gs_vdev_guid && gsp->gs_devid) {
|
|
||||||
(void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
|
|
||||||
&gsp->gs_pool_guid);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/* Get pool configuration and extract pool GUID */
|
||||||
|
if ((config = zpool_get_config(zhp, NULL)) == NULL ||
|
||||||
|
nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
|
||||||
|
&pool_guid) != 0)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
/* Skip this pool if we're looking for a specific pool */
|
||||||
|
if (gsp->gs_pool_guid != 0 && pool_guid != gsp->gs_pool_guid)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvl) == 0)
|
||||||
|
found = zfs_agent_iter_vdev(zhp, nvl, gsp);
|
||||||
|
|
||||||
|
if (found && gsp->gs_pool_guid == 0)
|
||||||
|
gsp->gs_pool_guid = pool_guid;
|
||||||
|
|
||||||
|
out:
|
||||||
zpool_close(zhp);
|
zpool_close(zhp);
|
||||||
return (gsp->gs_devid != NULL && gsp->gs_vdev_guid != 0);
|
return (found);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -233,11 +241,9 @@ zfs_agent_post_event(const char *class, const char *subclass, nvlist_t *nvl)
|
|||||||
* For multipath, spare and l2arc devices ZFS_EV_VDEV_GUID or
|
* For multipath, spare and l2arc devices ZFS_EV_VDEV_GUID or
|
||||||
* ZFS_EV_POOL_GUID may be missing so find them.
|
* ZFS_EV_POOL_GUID may be missing so find them.
|
||||||
*/
|
*/
|
||||||
if (devid == NULL || pool_guid == 0 || vdev_guid == 0) {
|
|
||||||
if (devid == NULL)
|
|
||||||
search.gs_vdev_guid = vdev_guid;
|
|
||||||
else
|
|
||||||
search.gs_devid = devid;
|
search.gs_devid = devid;
|
||||||
|
search.gs_vdev_guid = vdev_guid;
|
||||||
|
search.gs_pool_guid = pool_guid;
|
||||||
zpool_iter(g_zfs_hdl, zfs_agent_iter_pool, &search);
|
zpool_iter(g_zfs_hdl, zfs_agent_iter_pool, &search);
|
||||||
if (devid == NULL)
|
if (devid == NULL)
|
||||||
devid = search.gs_devid;
|
devid = search.gs_devid;
|
||||||
@ -246,7 +252,6 @@ zfs_agent_post_event(const char *class, const char *subclass, nvlist_t *nvl)
|
|||||||
if (vdev_guid == 0)
|
if (vdev_guid == 0)
|
||||||
vdev_guid = search.gs_vdev_guid;
|
vdev_guid = search.gs_vdev_guid;
|
||||||
devtype = search.gs_vdev_type;
|
devtype = search.gs_vdev_type;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We want to avoid reporting "remove" events coming from
|
* We want to avoid reporting "remove" events coming from
|
||||||
|
@ -9,18 +9,18 @@ dist_zedexec_SCRIPTS = \
|
|||||||
%D%/all-debug.sh \
|
%D%/all-debug.sh \
|
||||||
%D%/all-syslog.sh \
|
%D%/all-syslog.sh \
|
||||||
%D%/data-notify.sh \
|
%D%/data-notify.sh \
|
||||||
%D%/deadman-slot_off.sh \
|
%D%/deadman-sync-slot_off.sh \
|
||||||
%D%/generic-notify.sh \
|
%D%/generic-notify.sh \
|
||||||
%D%/pool_import-led.sh \
|
%D%/pool_import-sync-led.sh \
|
||||||
%D%/resilver_finish-notify.sh \
|
%D%/resilver_finish-notify.sh \
|
||||||
%D%/resilver_finish-start-scrub.sh \
|
%D%/resilver_finish-start-scrub.sh \
|
||||||
%D%/scrub_finish-notify.sh \
|
%D%/scrub_finish-notify.sh \
|
||||||
%D%/statechange-led.sh \
|
%D%/statechange-sync-led.sh \
|
||||||
%D%/statechange-notify.sh \
|
%D%/statechange-notify.sh \
|
||||||
%D%/statechange-slot_off.sh \
|
%D%/statechange-sync-slot_off.sh \
|
||||||
%D%/trim_finish-notify.sh \
|
%D%/trim_finish-notify.sh \
|
||||||
%D%/vdev_attach-led.sh \
|
%D%/vdev_attach-sync-led.sh \
|
||||||
%D%/vdev_clear-led.sh
|
%D%/vdev_clear-sync-led.sh
|
||||||
|
|
||||||
nodist_zedexec_SCRIPTS = \
|
nodist_zedexec_SCRIPTS = \
|
||||||
%D%/history_event-zfs-list-cacher.sh
|
%D%/history_event-zfs-list-cacher.sh
|
||||||
@ -30,17 +30,17 @@ SUBSTFILES += $(nodist_zedexec_SCRIPTS)
|
|||||||
zedconfdefaults = \
|
zedconfdefaults = \
|
||||||
all-syslog.sh \
|
all-syslog.sh \
|
||||||
data-notify.sh \
|
data-notify.sh \
|
||||||
deadman-slot_off.sh \
|
deadman-sync-slot_off.sh \
|
||||||
history_event-zfs-list-cacher.sh \
|
history_event-zfs-list-cacher.sh \
|
||||||
pool_import-led.sh \
|
pool_import-sync-led.sh \
|
||||||
resilver_finish-notify.sh \
|
resilver_finish-notify.sh \
|
||||||
resilver_finish-start-scrub.sh \
|
resilver_finish-start-scrub.sh \
|
||||||
scrub_finish-notify.sh \
|
scrub_finish-notify.sh \
|
||||||
statechange-led.sh \
|
statechange-sync-led.sh \
|
||||||
statechange-notify.sh \
|
statechange-notify.sh \
|
||||||
statechange-slot_off.sh \
|
statechange-sync-slot_off.sh \
|
||||||
vdev_attach-led.sh \
|
vdev_attach-sync-led.sh \
|
||||||
vdev_clear-led.sh
|
vdev_clear-sync-led.sh
|
||||||
|
|
||||||
dist_noinst_DATA += %D%/README
|
dist_noinst_DATA += %D%/README
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
statechange-led.sh
|
|
1
cmd/zed/zed.d/pool_import-sync-led.sh
Symbolic link
1
cmd/zed/zed.d/pool_import-sync-led.sh
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
statechange-sync-led.sh
|
@ -1 +0,0 @@
|
|||||||
statechange-led.sh
|
|
1
cmd/zed/zed.d/vdev_attach-sync-led.sh
Symbolic link
1
cmd/zed/zed.d/vdev_attach-sync-led.sh
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
statechange-sync-led.sh
|
@ -1 +0,0 @@
|
|||||||
statechange-led.sh
|
|
1
cmd/zed/zed.d/vdev_clear-sync-led.sh
Symbolic link
1
cmd/zed/zed.d/vdev_clear-sync-led.sh
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
statechange-sync-led.sh
|
@ -441,8 +441,9 @@ zed_notify_slack_webhook()
|
|||||||
"${pathname}")"
|
"${pathname}")"
|
||||||
|
|
||||||
# Construct the JSON message for posting.
|
# Construct the JSON message for posting.
|
||||||
|
# shellcheck disable=SC2016
|
||||||
#
|
#
|
||||||
msg_json="$(printf '{"text": "*%s*\\n%s"}' "${subject}" "${msg_body}" )"
|
msg_json="$(printf '{"text": "*%s*\\n```%s```"}' "${subject}" "${msg_body}" )"
|
||||||
|
|
||||||
# Send the POST request and check for errors.
|
# Send the POST request and check for errors.
|
||||||
#
|
#
|
||||||
|
@ -110,7 +110,7 @@ zed_event_fini(struct zed_conf *zcp)
|
|||||||
static void
|
static void
|
||||||
_bump_event_queue_length(void)
|
_bump_event_queue_length(void)
|
||||||
{
|
{
|
||||||
int zzlm = -1, wr;
|
int zzlm, wr;
|
||||||
char qlen_buf[12] = {0}; /* parameter is int => max "-2147483647\n" */
|
char qlen_buf[12] = {0}; /* parameter is int => max "-2147483647\n" */
|
||||||
long int qlen, orig_qlen;
|
long int qlen, orig_qlen;
|
||||||
|
|
||||||
|
@ -196,37 +196,29 @@ _nop(int sig)
|
|||||||
(void) sig;
|
(void) sig;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void
|
||||||
_reap_children(void *arg)
|
wait_for_children(boolean_t do_pause, boolean_t wait)
|
||||||
{
|
{
|
||||||
(void) arg;
|
|
||||||
struct launched_process_node node, *pnode;
|
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int status;
|
|
||||||
struct rusage usage;
|
struct rusage usage;
|
||||||
struct sigaction sa = {};
|
int status;
|
||||||
|
struct launched_process_node node, *pnode;
|
||||||
(void) sigfillset(&sa.sa_mask);
|
|
||||||
(void) sigdelset(&sa.sa_mask, SIGCHLD);
|
|
||||||
(void) pthread_sigmask(SIG_SETMASK, &sa.sa_mask, NULL);
|
|
||||||
|
|
||||||
(void) sigemptyset(&sa.sa_mask);
|
|
||||||
sa.sa_handler = _nop;
|
|
||||||
sa.sa_flags = SA_NOCLDSTOP;
|
|
||||||
(void) sigaction(SIGCHLD, &sa, NULL);
|
|
||||||
|
|
||||||
for (_reap_children_stop = B_FALSE; !_reap_children_stop; ) {
|
for (_reap_children_stop = B_FALSE; !_reap_children_stop; ) {
|
||||||
(void) pthread_mutex_lock(&_launched_processes_lock);
|
(void) pthread_mutex_lock(&_launched_processes_lock);
|
||||||
pid = wait4(0, &status, WNOHANG, &usage);
|
pid = wait4(0, &status, wait ? 0 : WNOHANG, &usage);
|
||||||
|
|
||||||
if (pid == 0 || pid == (pid_t)-1) {
|
if (pid == 0 || pid == (pid_t)-1) {
|
||||||
(void) pthread_mutex_unlock(&_launched_processes_lock);
|
(void) pthread_mutex_unlock(&_launched_processes_lock);
|
||||||
if (pid == 0 || errno == ECHILD)
|
if ((pid == 0) || (errno == ECHILD)) {
|
||||||
|
if (do_pause)
|
||||||
pause();
|
pause();
|
||||||
else if (errno != EINTR)
|
} else if (errno != EINTR)
|
||||||
zed_log_msg(LOG_WARNING,
|
zed_log_msg(LOG_WARNING,
|
||||||
"Failed to wait for children: %s",
|
"Failed to wait for children: %s",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
if (!do_pause)
|
||||||
|
return;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
memset(&node, 0, sizeof (node));
|
memset(&node, 0, sizeof (node));
|
||||||
node.pid = pid;
|
node.pid = pid;
|
||||||
@ -278,6 +270,25 @@ _reap_children(void *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *
|
||||||
|
_reap_children(void *arg)
|
||||||
|
{
|
||||||
|
(void) arg;
|
||||||
|
struct sigaction sa = {};
|
||||||
|
|
||||||
|
(void) sigfillset(&sa.sa_mask);
|
||||||
|
(void) sigdelset(&sa.sa_mask, SIGCHLD);
|
||||||
|
(void) pthread_sigmask(SIG_SETMASK, &sa.sa_mask, NULL);
|
||||||
|
|
||||||
|
(void) sigemptyset(&sa.sa_mask);
|
||||||
|
sa.sa_handler = _nop;
|
||||||
|
sa.sa_flags = SA_NOCLDSTOP;
|
||||||
|
(void) sigaction(SIGCHLD, &sa, NULL);
|
||||||
|
|
||||||
|
wait_for_children(B_TRUE, B_FALSE);
|
||||||
|
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,6 +317,45 @@ zed_exec_fini(void)
|
|||||||
_reap_children_tid = (pthread_t)-1;
|
_reap_children_tid = (pthread_t)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check if the zedlet name indicates if it is a synchronous zedlet
|
||||||
|
*
|
||||||
|
* Synchronous zedlets have a "-sync-" immediately following the event name in
|
||||||
|
* their zedlet filename, like:
|
||||||
|
*
|
||||||
|
* EVENT_NAME-sync-ZEDLETNAME.sh
|
||||||
|
*
|
||||||
|
* For example, if you wanted a synchronous statechange script:
|
||||||
|
*
|
||||||
|
* statechange-sync-myzedlet.sh
|
||||||
|
*
|
||||||
|
* Synchronous zedlets are guaranteed to be the only zedlet running. No other
|
||||||
|
* zedlets may run in parallel with a synchronous zedlet. A synchronous
|
||||||
|
* zedlet will wait for all previously spawned zedlets to finish before running.
|
||||||
|
* Users should be careful to only use synchronous zedlets when needed, since
|
||||||
|
* they decrease parallelism.
|
||||||
|
*/
|
||||||
|
static boolean_t
|
||||||
|
zedlet_is_sync(const char *zedlet, const char *event)
|
||||||
|
{
|
||||||
|
const char *sync_str = "-sync-";
|
||||||
|
size_t sync_str_len;
|
||||||
|
size_t zedlet_len;
|
||||||
|
size_t event_len;
|
||||||
|
|
||||||
|
sync_str_len = strlen(sync_str);
|
||||||
|
zedlet_len = strlen(zedlet);
|
||||||
|
event_len = strlen(event);
|
||||||
|
|
||||||
|
if (event_len + sync_str_len >= zedlet_len)
|
||||||
|
return (B_FALSE);
|
||||||
|
|
||||||
|
if (strncmp(&zedlet[event_len], sync_str, sync_str_len) == 0)
|
||||||
|
return (B_TRUE);
|
||||||
|
|
||||||
|
return (B_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Process the event [eid] by synchronously invoking all zedlets with a
|
* Process the event [eid] by synchronously invoking all zedlets with a
|
||||||
* matching class prefix.
|
* matching class prefix.
|
||||||
@ -368,9 +418,28 @@ zed_exec_process(uint64_t eid, const char *class, const char *subclass,
|
|||||||
z = zed_strings_next(zcp->zedlets)) {
|
z = zed_strings_next(zcp->zedlets)) {
|
||||||
for (csp = class_strings; *csp; csp++) {
|
for (csp = class_strings; *csp; csp++) {
|
||||||
n = strlen(*csp);
|
n = strlen(*csp);
|
||||||
if ((strncmp(z, *csp, n) == 0) && !isalpha(z[n]))
|
if ((strncmp(z, *csp, n) == 0) && !isalpha(z[n])) {
|
||||||
|
boolean_t is_sync = zedlet_is_sync(z, *csp);
|
||||||
|
|
||||||
|
if (is_sync) {
|
||||||
|
/*
|
||||||
|
* Wait for previous zedlets to
|
||||||
|
* finish
|
||||||
|
*/
|
||||||
|
wait_for_children(B_FALSE, B_TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
_zed_exec_fork_child(eid, zcp->zedlet_dir,
|
_zed_exec_fork_child(eid, zcp->zedlet_dir,
|
||||||
z, e, zcp->zevent_fd, zcp->do_foreground);
|
z, e, zcp->zevent_fd, zcp->do_foreground);
|
||||||
|
|
||||||
|
if (is_sync) {
|
||||||
|
/*
|
||||||
|
* Wait for sync zedlet we just launched
|
||||||
|
* to finish.
|
||||||
|
*/
|
||||||
|
wait_for_children(B_FALSE, B_TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(e);
|
free(e);
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/debug.h>
|
#include <sys/debug.h>
|
||||||
|
#include <dirent.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
@ -121,6 +122,7 @@ static int zfs_do_change_key(int argc, char **argv);
|
|||||||
static int zfs_do_project(int argc, char **argv);
|
static int zfs_do_project(int argc, char **argv);
|
||||||
static int zfs_do_version(int argc, char **argv);
|
static int zfs_do_version(int argc, char **argv);
|
||||||
static int zfs_do_redact(int argc, char **argv);
|
static int zfs_do_redact(int argc, char **argv);
|
||||||
|
static int zfs_do_rewrite(int argc, char **argv);
|
||||||
static int zfs_do_wait(int argc, char **argv);
|
static int zfs_do_wait(int argc, char **argv);
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
@ -193,6 +195,7 @@ typedef enum {
|
|||||||
HELP_CHANGE_KEY,
|
HELP_CHANGE_KEY,
|
||||||
HELP_VERSION,
|
HELP_VERSION,
|
||||||
HELP_REDACT,
|
HELP_REDACT,
|
||||||
|
HELP_REWRITE,
|
||||||
HELP_JAIL,
|
HELP_JAIL,
|
||||||
HELP_UNJAIL,
|
HELP_UNJAIL,
|
||||||
HELP_WAIT,
|
HELP_WAIT,
|
||||||
@ -227,7 +230,7 @@ static zfs_command_t command_table[] = {
|
|||||||
{ "promote", zfs_do_promote, HELP_PROMOTE },
|
{ "promote", zfs_do_promote, HELP_PROMOTE },
|
||||||
{ "rename", zfs_do_rename, HELP_RENAME },
|
{ "rename", zfs_do_rename, HELP_RENAME },
|
||||||
{ "bookmark", zfs_do_bookmark, HELP_BOOKMARK },
|
{ "bookmark", zfs_do_bookmark, HELP_BOOKMARK },
|
||||||
{ "program", zfs_do_channel_program, HELP_CHANNEL_PROGRAM },
|
{ "diff", zfs_do_diff, HELP_DIFF },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
{ "list", zfs_do_list, HELP_LIST },
|
{ "list", zfs_do_list, HELP_LIST },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
@ -249,27 +252,31 @@ static zfs_command_t command_table[] = {
|
|||||||
{ NULL },
|
{ NULL },
|
||||||
{ "send", zfs_do_send, HELP_SEND },
|
{ "send", zfs_do_send, HELP_SEND },
|
||||||
{ "receive", zfs_do_receive, HELP_RECEIVE },
|
{ "receive", zfs_do_receive, HELP_RECEIVE },
|
||||||
|
{ "redact", zfs_do_redact, HELP_REDACT },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
{ "allow", zfs_do_allow, HELP_ALLOW },
|
{ "allow", zfs_do_allow, HELP_ALLOW },
|
||||||
{ NULL },
|
|
||||||
{ "unallow", zfs_do_unallow, HELP_UNALLOW },
|
{ "unallow", zfs_do_unallow, HELP_UNALLOW },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
{ "hold", zfs_do_hold, HELP_HOLD },
|
{ "hold", zfs_do_hold, HELP_HOLD },
|
||||||
{ "holds", zfs_do_holds, HELP_HOLDS },
|
{ "holds", zfs_do_holds, HELP_HOLDS },
|
||||||
{ "release", zfs_do_release, HELP_RELEASE },
|
{ "release", zfs_do_release, HELP_RELEASE },
|
||||||
{ "diff", zfs_do_diff, HELP_DIFF },
|
{ NULL },
|
||||||
{ "load-key", zfs_do_load_key, HELP_LOAD_KEY },
|
{ "load-key", zfs_do_load_key, HELP_LOAD_KEY },
|
||||||
{ "unload-key", zfs_do_unload_key, HELP_UNLOAD_KEY },
|
{ "unload-key", zfs_do_unload_key, HELP_UNLOAD_KEY },
|
||||||
{ "change-key", zfs_do_change_key, HELP_CHANGE_KEY },
|
{ "change-key", zfs_do_change_key, HELP_CHANGE_KEY },
|
||||||
{ "redact", zfs_do_redact, HELP_REDACT },
|
{ NULL },
|
||||||
|
{ "program", zfs_do_channel_program, HELP_CHANNEL_PROGRAM },
|
||||||
|
{ "rewrite", zfs_do_rewrite, HELP_REWRITE },
|
||||||
{ "wait", zfs_do_wait, HELP_WAIT },
|
{ "wait", zfs_do_wait, HELP_WAIT },
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
|
{ NULL },
|
||||||
{ "jail", zfs_do_jail, HELP_JAIL },
|
{ "jail", zfs_do_jail, HELP_JAIL },
|
||||||
{ "unjail", zfs_do_unjail, HELP_UNJAIL },
|
{ "unjail", zfs_do_unjail, HELP_UNJAIL },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
{ NULL },
|
||||||
{ "zone", zfs_do_zone, HELP_ZONE },
|
{ "zone", zfs_do_zone, HELP_ZONE },
|
||||||
{ "unzone", zfs_do_unzone, HELP_UNZONE },
|
{ "unzone", zfs_do_unzone, HELP_UNZONE },
|
||||||
#endif
|
#endif
|
||||||
@ -432,6 +439,9 @@ get_usage(zfs_help_t idx)
|
|||||||
case HELP_REDACT:
|
case HELP_REDACT:
|
||||||
return (gettext("\tredact <snapshot> <bookmark> "
|
return (gettext("\tredact <snapshot> <bookmark> "
|
||||||
"<redaction_snapshot> ...\n"));
|
"<redaction_snapshot> ...\n"));
|
||||||
|
case HELP_REWRITE:
|
||||||
|
return (gettext("\trewrite [-Prvx] [-o <offset>] [-l <length>] "
|
||||||
|
"<directory|file ...>\n"));
|
||||||
case HELP_JAIL:
|
case HELP_JAIL:
|
||||||
return (gettext("\tjail <jailid|jailname> <filesystem>\n"));
|
return (gettext("\tjail <jailid|jailname> <filesystem>\n"));
|
||||||
case HELP_UNJAIL:
|
case HELP_UNJAIL:
|
||||||
@ -913,26 +923,22 @@ zfs_do_clone(int argc, char **argv)
|
|||||||
return (!!ret);
|
return (!!ret);
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
ASSERT3P(zhp, ==, NULL);
|
ASSERT0P(zhp);
|
||||||
nvlist_free(props);
|
nvlist_free(props);
|
||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return a default volblocksize for the pool which always uses more than
|
* Calculate the minimum allocation size based on the top-level vdevs.
|
||||||
* half of the data sectors. This primarily applies to dRAID which always
|
|
||||||
* writes full stripe widths.
|
|
||||||
*/
|
*/
|
||||||
static uint64_t
|
static uint64_t
|
||||||
default_volblocksize(zpool_handle_t *zhp, nvlist_t *props)
|
calculate_volblocksize(nvlist_t *config)
|
||||||
{
|
{
|
||||||
uint64_t volblocksize, asize = SPA_MINBLOCKSIZE;
|
uint64_t asize = SPA_MINBLOCKSIZE;
|
||||||
nvlist_t *tree, **vdevs;
|
nvlist_t *tree, **vdevs;
|
||||||
uint_t nvdevs;
|
uint_t nvdevs;
|
||||||
|
|
||||||
nvlist_t *config = zpool_get_config(zhp, NULL);
|
|
||||||
|
|
||||||
if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &tree) != 0 ||
|
if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &tree) != 0 ||
|
||||||
nvlist_lookup_nvlist_array(tree, ZPOOL_CONFIG_CHILDREN,
|
nvlist_lookup_nvlist_array(tree, ZPOOL_CONFIG_CHILDREN,
|
||||||
&vdevs, &nvdevs) != 0) {
|
&vdevs, &nvdevs) != 0) {
|
||||||
@ -963,6 +969,24 @@ default_volblocksize(zpool_handle_t *zhp, nvlist_t *props)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return (asize);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return a default volblocksize for the pool which always uses more than
|
||||||
|
* half of the data sectors. This primarily applies to dRAID which always
|
||||||
|
* writes full stripe widths.
|
||||||
|
*/
|
||||||
|
static uint64_t
|
||||||
|
default_volblocksize(zpool_handle_t *zhp, nvlist_t *props)
|
||||||
|
{
|
||||||
|
uint64_t volblocksize, asize = SPA_MINBLOCKSIZE;
|
||||||
|
|
||||||
|
nvlist_t *config = zpool_get_config(zhp, NULL);
|
||||||
|
|
||||||
|
if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_MAX_ALLOC, &asize) != 0)
|
||||||
|
asize = calculate_volblocksize(config);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculate the target volblocksize such that more than half
|
* Calculate the target volblocksize such that more than half
|
||||||
* of the asize is used. The following table is for 4k sectors.
|
* of the asize is used. The following table is for 4k sectors.
|
||||||
@ -1964,9 +1988,8 @@ fill_dataset_info(nvlist_t *list, zfs_handle_t *zhp, boolean_t as_int)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (type == ZFS_TYPE_SNAPSHOT) {
|
if (type == ZFS_TYPE_SNAPSHOT) {
|
||||||
char *ds, *snap;
|
char *snap = strdup(zfs_get_name(zhp));
|
||||||
ds = snap = strdup(zfs_get_name(zhp));
|
char *ds = strsep(&snap, "@");
|
||||||
ds = strsep(&snap, "@");
|
|
||||||
fnvlist_add_string(list, "dataset", ds);
|
fnvlist_add_string(list, "dataset", ds);
|
||||||
fnvlist_add_string(list, "snapshot_name", snap);
|
fnvlist_add_string(list, "snapshot_name", snap);
|
||||||
free(ds);
|
free(ds);
|
||||||
@ -2009,8 +2032,7 @@ get_callback(zfs_handle_t *zhp, void *data)
|
|||||||
nvlist_t *user_props = zfs_get_user_props(zhp);
|
nvlist_t *user_props = zfs_get_user_props(zhp);
|
||||||
zprop_list_t *pl = cbp->cb_proplist;
|
zprop_list_t *pl = cbp->cb_proplist;
|
||||||
nvlist_t *propval;
|
nvlist_t *propval;
|
||||||
nvlist_t *item, *d, *props;
|
nvlist_t *item, *d = NULL, *props = NULL;
|
||||||
item = d = props = NULL;
|
|
||||||
const char *strval;
|
const char *strval;
|
||||||
const char *sourceval;
|
const char *sourceval;
|
||||||
boolean_t received = is_recvd_column(cbp);
|
boolean_t received = is_recvd_column(cbp);
|
||||||
@ -2986,7 +3008,8 @@ us_type2str(unsigned field_type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
userspace_cb(void *arg, const char *domain, uid_t rid, uint64_t space)
|
userspace_cb(void *arg, const char *domain, uid_t rid, uint64_t space,
|
||||||
|
uint64_t default_quota)
|
||||||
{
|
{
|
||||||
us_cbdata_t *cb = (us_cbdata_t *)arg;
|
us_cbdata_t *cb = (us_cbdata_t *)arg;
|
||||||
zfs_userquota_prop_t prop = cb->cb_prop;
|
zfs_userquota_prop_t prop = cb->cb_prop;
|
||||||
@ -3142,7 +3165,7 @@ userspace_cb(void *arg, const char *domain, uid_t rid, uint64_t space)
|
|||||||
prop == ZFS_PROP_PROJECTUSED) {
|
prop == ZFS_PROP_PROJECTUSED) {
|
||||||
propname = "used";
|
propname = "used";
|
||||||
if (!nvlist_exists(props, "quota"))
|
if (!nvlist_exists(props, "quota"))
|
||||||
(void) nvlist_add_uint64(props, "quota", 0);
|
(void) nvlist_add_uint64(props, "quota", default_quota);
|
||||||
} else if (prop == ZFS_PROP_USERQUOTA || prop == ZFS_PROP_GROUPQUOTA ||
|
} else if (prop == ZFS_PROP_USERQUOTA || prop == ZFS_PROP_GROUPQUOTA ||
|
||||||
prop == ZFS_PROP_PROJECTQUOTA) {
|
prop == ZFS_PROP_PROJECTQUOTA) {
|
||||||
propname = "quota";
|
propname = "quota";
|
||||||
@ -3151,8 +3174,10 @@ userspace_cb(void *arg, const char *domain, uid_t rid, uint64_t space)
|
|||||||
} else if (prop == ZFS_PROP_USEROBJUSED ||
|
} else if (prop == ZFS_PROP_USEROBJUSED ||
|
||||||
prop == ZFS_PROP_GROUPOBJUSED || prop == ZFS_PROP_PROJECTOBJUSED) {
|
prop == ZFS_PROP_GROUPOBJUSED || prop == ZFS_PROP_PROJECTOBJUSED) {
|
||||||
propname = "objused";
|
propname = "objused";
|
||||||
if (!nvlist_exists(props, "objquota"))
|
if (!nvlist_exists(props, "objquota")) {
|
||||||
(void) nvlist_add_uint64(props, "objquota", 0);
|
(void) nvlist_add_uint64(props, "objquota",
|
||||||
|
default_quota);
|
||||||
|
}
|
||||||
} else if (prop == ZFS_PROP_USEROBJQUOTA ||
|
} else if (prop == ZFS_PROP_USEROBJQUOTA ||
|
||||||
prop == ZFS_PROP_GROUPOBJQUOTA ||
|
prop == ZFS_PROP_GROUPOBJQUOTA ||
|
||||||
prop == ZFS_PROP_PROJECTOBJQUOTA) {
|
prop == ZFS_PROP_PROJECTOBJQUOTA) {
|
||||||
@ -5292,6 +5317,7 @@ zfs_do_receive(int argc, char **argv)
|
|||||||
#define ZFS_DELEG_PERM_MOUNT "mount"
|
#define ZFS_DELEG_PERM_MOUNT "mount"
|
||||||
#define ZFS_DELEG_PERM_SHARE "share"
|
#define ZFS_DELEG_PERM_SHARE "share"
|
||||||
#define ZFS_DELEG_PERM_SEND "send"
|
#define ZFS_DELEG_PERM_SEND "send"
|
||||||
|
#define ZFS_DELEG_PERM_SEND_RAW "send:raw"
|
||||||
#define ZFS_DELEG_PERM_RECEIVE "receive"
|
#define ZFS_DELEG_PERM_RECEIVE "receive"
|
||||||
#define ZFS_DELEG_PERM_RECEIVE_APPEND "receive:append"
|
#define ZFS_DELEG_PERM_RECEIVE_APPEND "receive:append"
|
||||||
#define ZFS_DELEG_PERM_ALLOW "allow"
|
#define ZFS_DELEG_PERM_ALLOW "allow"
|
||||||
@ -5334,6 +5360,7 @@ static zfs_deleg_perm_tab_t zfs_deleg_perm_tbl[] = {
|
|||||||
{ ZFS_DELEG_PERM_RENAME, ZFS_DELEG_NOTE_RENAME },
|
{ ZFS_DELEG_PERM_RENAME, ZFS_DELEG_NOTE_RENAME },
|
||||||
{ ZFS_DELEG_PERM_ROLLBACK, ZFS_DELEG_NOTE_ROLLBACK },
|
{ ZFS_DELEG_PERM_ROLLBACK, ZFS_DELEG_NOTE_ROLLBACK },
|
||||||
{ ZFS_DELEG_PERM_SEND, ZFS_DELEG_NOTE_SEND },
|
{ ZFS_DELEG_PERM_SEND, ZFS_DELEG_NOTE_SEND },
|
||||||
|
{ ZFS_DELEG_PERM_SEND_RAW, ZFS_DELEG_NOTE_SEND_RAW },
|
||||||
{ ZFS_DELEG_PERM_SHARE, ZFS_DELEG_NOTE_SHARE },
|
{ ZFS_DELEG_PERM_SHARE, ZFS_DELEG_NOTE_SHARE },
|
||||||
{ ZFS_DELEG_PERM_SNAPSHOT, ZFS_DELEG_NOTE_SNAPSHOT },
|
{ ZFS_DELEG_PERM_SNAPSHOT, ZFS_DELEG_NOTE_SNAPSHOT },
|
||||||
{ ZFS_DELEG_PERM_BOOKMARK, ZFS_DELEG_NOTE_BOOKMARK },
|
{ ZFS_DELEG_PERM_BOOKMARK, ZFS_DELEG_NOTE_BOOKMARK },
|
||||||
@ -5866,7 +5893,7 @@ parse_fs_perm_set(fs_perm_set_t *fspset, nvlist_t *nvl)
|
|||||||
static inline const char *
|
static inline const char *
|
||||||
deleg_perm_comment(zfs_deleg_note_t note)
|
deleg_perm_comment(zfs_deleg_note_t note)
|
||||||
{
|
{
|
||||||
const char *str = "";
|
const char *str;
|
||||||
|
|
||||||
/* subcommands */
|
/* subcommands */
|
||||||
switch (note) {
|
switch (note) {
|
||||||
@ -5918,6 +5945,10 @@ deleg_perm_comment(zfs_deleg_note_t note)
|
|||||||
case ZFS_DELEG_NOTE_SEND:
|
case ZFS_DELEG_NOTE_SEND:
|
||||||
str = gettext("");
|
str = gettext("");
|
||||||
break;
|
break;
|
||||||
|
case ZFS_DELEG_NOTE_SEND_RAW:
|
||||||
|
str = gettext("Allow sending ONLY encrypted (raw) replication"
|
||||||
|
"\n\t\t\t\tstreams");
|
||||||
|
break;
|
||||||
case ZFS_DELEG_NOTE_SHARE:
|
case ZFS_DELEG_NOTE_SHARE:
|
||||||
str = gettext("Allows sharing file systems over NFS or SMB"
|
str = gettext("Allows sharing file systems over NFS or SMB"
|
||||||
"\n\t\t\t\tprotocols");
|
"\n\t\t\t\tprotocols");
|
||||||
@ -6847,17 +6878,17 @@ print_holds(boolean_t scripted, int nwidth, int tagwidth, nvlist_t *nvl,
|
|||||||
|
|
||||||
if (scripted) {
|
if (scripted) {
|
||||||
if (parsable) {
|
if (parsable) {
|
||||||
(void) printf("%s\t%s\t%ld\n", zname,
|
(void) printf("%s\t%s\t%lld\n", zname,
|
||||||
tagname, time);
|
tagname, (long long)time);
|
||||||
} else {
|
} else {
|
||||||
(void) printf("%s\t%s\t%s\n", zname,
|
(void) printf("%s\t%s\t%s\n", zname,
|
||||||
tagname, tsbuf);
|
tagname, tsbuf);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (parsable) {
|
if (parsable) {
|
||||||
(void) printf("%-*s %-*s %ld\n",
|
(void) printf("%-*s %-*s %lld\n",
|
||||||
nwidth, zname, tagwidth,
|
nwidth, zname, tagwidth,
|
||||||
tagname, time);
|
tagname, (long long)time);
|
||||||
} else {
|
} else {
|
||||||
(void) printf("%-*s %-*s %s\n",
|
(void) printf("%-*s %-*s %s\n",
|
||||||
nwidth, zname, tagwidth,
|
nwidth, zname, tagwidth,
|
||||||
@ -7716,6 +7747,7 @@ unshare_unmount_path(int op, char *path, int flags, boolean_t is_manual)
|
|||||||
struct extmnttab entry;
|
struct extmnttab entry;
|
||||||
const char *cmdname = (op == OP_SHARE) ? "unshare" : "unmount";
|
const char *cmdname = (op == OP_SHARE) ? "unshare" : "unmount";
|
||||||
ino_t path_inode;
|
ino_t path_inode;
|
||||||
|
char *zfs_mntpnt, *entry_mntpnt;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Search for the given (major,minor) pair in the mount table.
|
* Search for the given (major,minor) pair in the mount table.
|
||||||
@ -7757,6 +7789,24 @@ unshare_unmount_path(int op, char *path, int flags, boolean_t is_manual)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If the filesystem is mounted, check that the mountpoint matches
|
||||||
|
* the one in the mnttab entry w.r.t. provided path. If it doesn't,
|
||||||
|
* then we should not proceed further.
|
||||||
|
*/
|
||||||
|
entry_mntpnt = strdup(entry.mnt_mountp);
|
||||||
|
if (zfs_is_mounted(zhp, &zfs_mntpnt)) {
|
||||||
|
if (strcmp(zfs_mntpnt, entry_mntpnt) != 0) {
|
||||||
|
(void) fprintf(stderr, gettext("cannot %s '%s': "
|
||||||
|
"not an original mountpoint\n"), cmdname, path);
|
||||||
|
free(zfs_mntpnt);
|
||||||
|
free(entry_mntpnt);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
free(zfs_mntpnt);
|
||||||
|
}
|
||||||
|
free(entry_mntpnt);
|
||||||
|
|
||||||
if (op == OP_SHARE) {
|
if (op == OP_SHARE) {
|
||||||
char nfs_mnt_prop[ZFS_MAXPROPLEN];
|
char nfs_mnt_prop[ZFS_MAXPROPLEN];
|
||||||
char smbshare_prop[ZFS_MAXPROPLEN];
|
char smbshare_prop[ZFS_MAXPROPLEN];
|
||||||
@ -9013,6 +9063,195 @@ zfs_do_project(int argc, char **argv)
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
zfs_rewrite_file(const char *path, boolean_t verbose, zfs_rewrite_args_t *args)
|
||||||
|
{
|
||||||
|
int fd, ret = 0;
|
||||||
|
|
||||||
|
fd = open(path, O_WRONLY);
|
||||||
|
if (fd < 0) {
|
||||||
|
ret = errno;
|
||||||
|
(void) fprintf(stderr, gettext("failed to open %s: %s\n"),
|
||||||
|
path, strerror(errno));
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ioctl(fd, ZFS_IOC_REWRITE, args) < 0) {
|
||||||
|
ret = errno;
|
||||||
|
(void) fprintf(stderr, gettext("failed to rewrite %s: %s\n"),
|
||||||
|
path, strerror(errno));
|
||||||
|
} else if (verbose) {
|
||||||
|
printf("%s\n", path);
|
||||||
|
}
|
||||||
|
|
||||||
|
close(fd);
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
zfs_rewrite_dir(const char *path, boolean_t verbose, boolean_t xdev, dev_t dev,
|
||||||
|
zfs_rewrite_args_t *args, nvlist_t *dirs)
|
||||||
|
{
|
||||||
|
struct dirent *ent;
|
||||||
|
DIR *dir;
|
||||||
|
int ret = 0, err;
|
||||||
|
|
||||||
|
dir = opendir(path);
|
||||||
|
if (dir == NULL) {
|
||||||
|
if (errno == ENOENT)
|
||||||
|
return (0);
|
||||||
|
ret = errno;
|
||||||
|
(void) fprintf(stderr, gettext("failed to opendir %s: %s\n"),
|
||||||
|
path, strerror(errno));
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t plen = strlen(path) + 1;
|
||||||
|
while ((ent = readdir(dir)) != NULL) {
|
||||||
|
char *fullname;
|
||||||
|
struct stat st;
|
||||||
|
|
||||||
|
if (ent->d_type != DT_REG && ent->d_type != DT_DIR)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (strcmp(ent->d_name, ".") == 0 ||
|
||||||
|
strcmp(ent->d_name, "..") == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (plen + strlen(ent->d_name) >= PATH_MAX) {
|
||||||
|
(void) fprintf(stderr, gettext("path too long %s/%s\n"),
|
||||||
|
path, ent->d_name);
|
||||||
|
ret = ENAMETOOLONG;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (asprintf(&fullname, "%s/%s", path, ent->d_name) == -1) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
gettext("failed to allocate memory\n"));
|
||||||
|
ret = ENOMEM;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xdev) {
|
||||||
|
if (lstat(fullname, &st) < 0) {
|
||||||
|
ret = errno;
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
gettext("failed to stat %s: %s\n"),
|
||||||
|
fullname, strerror(errno));
|
||||||
|
free(fullname);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (st.st_dev != dev) {
|
||||||
|
free(fullname);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ent->d_type == DT_REG) {
|
||||||
|
err = zfs_rewrite_file(fullname, verbose, args);
|
||||||
|
if (err)
|
||||||
|
ret = err;
|
||||||
|
} else { /* DT_DIR */
|
||||||
|
fnvlist_add_uint64(dirs, fullname, dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
free(fullname);
|
||||||
|
}
|
||||||
|
|
||||||
|
closedir(dir);
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
zfs_rewrite_path(const char *path, boolean_t verbose, boolean_t recurse,
|
||||||
|
boolean_t xdev, zfs_rewrite_args_t *args, nvlist_t *dirs)
|
||||||
|
{
|
||||||
|
struct stat st;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
if (lstat(path, &st) < 0) {
|
||||||
|
ret = errno;
|
||||||
|
(void) fprintf(stderr, gettext("failed to stat %s: %s\n"),
|
||||||
|
path, strerror(errno));
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (S_ISREG(st.st_mode)) {
|
||||||
|
ret = zfs_rewrite_file(path, verbose, args);
|
||||||
|
} else if (S_ISDIR(st.st_mode) && recurse) {
|
||||||
|
ret = zfs_rewrite_dir(path, verbose, xdev, st.st_dev, args,
|
||||||
|
dirs);
|
||||||
|
}
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
zfs_do_rewrite(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int ret = 0, err, c;
|
||||||
|
boolean_t recurse = B_FALSE, verbose = B_FALSE, xdev = B_FALSE;
|
||||||
|
|
||||||
|
if (argc < 2)
|
||||||
|
usage(B_FALSE);
|
||||||
|
|
||||||
|
zfs_rewrite_args_t args;
|
||||||
|
memset(&args, 0, sizeof (args));
|
||||||
|
|
||||||
|
while ((c = getopt(argc, argv, "Pl:o:rvx")) != -1) {
|
||||||
|
switch (c) {
|
||||||
|
case 'P':
|
||||||
|
args.flags |= ZFS_REWRITE_PHYSICAL;
|
||||||
|
break;
|
||||||
|
case 'l':
|
||||||
|
args.len = strtoll(optarg, NULL, 0);
|
||||||
|
break;
|
||||||
|
case 'o':
|
||||||
|
args.off = strtoll(optarg, NULL, 0);
|
||||||
|
break;
|
||||||
|
case 'r':
|
||||||
|
recurse = B_TRUE;
|
||||||
|
break;
|
||||||
|
case 'v':
|
||||||
|
verbose = B_TRUE;
|
||||||
|
break;
|
||||||
|
case 'x':
|
||||||
|
xdev = B_TRUE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
||||||
|
optopt);
|
||||||
|
usage(B_FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
argv += optind;
|
||||||
|
argc -= optind;
|
||||||
|
if (argc == 0) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
gettext("missing file or directory target(s)\n"));
|
||||||
|
usage(B_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
nvlist_t *dirs = fnvlist_alloc();
|
||||||
|
for (int i = 0; i < argc; i++) {
|
||||||
|
err = zfs_rewrite_path(argv[i], verbose, recurse, xdev, &args,
|
||||||
|
dirs);
|
||||||
|
if (err)
|
||||||
|
ret = err;
|
||||||
|
}
|
||||||
|
nvpair_t *dir;
|
||||||
|
while ((dir = nvlist_next_nvpair(dirs, NULL)) != NULL) {
|
||||||
|
err = zfs_rewrite_dir(nvpair_name(dir), verbose, xdev,
|
||||||
|
fnvpair_value_uint64(dir), &args, dirs);
|
||||||
|
if (err)
|
||||||
|
ret = err;
|
||||||
|
fnvlist_remove_nvpair(dirs, dir);
|
||||||
|
}
|
||||||
|
fnvlist_free(dirs);
|
||||||
|
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
zfs_do_wait(int argc, char **argv)
|
zfs_do_wait(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
345
cmd/zhack.c
345
cmd/zhack.c
@ -54,6 +54,7 @@
|
|||||||
#include <sys/dmu_tx.h>
|
#include <sys/dmu_tx.h>
|
||||||
#include <zfeature_common.h>
|
#include <zfeature_common.h>
|
||||||
#include <libzutil.h>
|
#include <libzutil.h>
|
||||||
|
#include <sys/metaslab_impl.h>
|
||||||
|
|
||||||
static importargs_t g_importargs;
|
static importargs_t g_importargs;
|
||||||
static char *g_pool;
|
static char *g_pool;
|
||||||
@ -69,7 +70,8 @@ static __attribute__((noreturn)) void
|
|||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"Usage: zhack [-c cachefile] [-d dir] <subcommand> <args> ...\n"
|
"Usage: zhack [-o tunable] [-c cachefile] [-d dir] <subcommand> "
|
||||||
|
"<args> ...\n"
|
||||||
"where <subcommand> <args> is one of the following:\n"
|
"where <subcommand> <args> is one of the following:\n"
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
@ -93,7 +95,10 @@ usage(void)
|
|||||||
" -c repair corrupted label checksums\n"
|
" -c repair corrupted label checksums\n"
|
||||||
" -u restore the label on a detached device\n"
|
" -u restore the label on a detached device\n"
|
||||||
"\n"
|
"\n"
|
||||||
" <device> : path to vdev\n");
|
" <device> : path to vdev\n"
|
||||||
|
"\n"
|
||||||
|
" metaslab leak <pool>\n"
|
||||||
|
" apply allocation map from zdb to specified pool\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,9 +167,9 @@ zhack_import(char *target, boolean_t readonly)
|
|||||||
|
|
||||||
props = NULL;
|
props = NULL;
|
||||||
if (readonly) {
|
if (readonly) {
|
||||||
VERIFY(nvlist_alloc(&props, NV_UNIQUE_NAME, 0) == 0);
|
VERIFY0(nvlist_alloc(&props, NV_UNIQUE_NAME, 0));
|
||||||
VERIFY(nvlist_add_uint64(props,
|
VERIFY0(nvlist_add_uint64(props,
|
||||||
zpool_prop_to_name(ZPOOL_PROP_READONLY), 1) == 0);
|
zpool_prop_to_name(ZPOOL_PROP_READONLY), 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
zfeature_checks_disable = B_TRUE;
|
zfeature_checks_disable = B_TRUE;
|
||||||
@ -218,8 +223,8 @@ dump_obj(objset_t *os, uint64_t obj, const char *name)
|
|||||||
} else {
|
} else {
|
||||||
ASSERT(za->za_integer_length == 1);
|
ASSERT(za->za_integer_length == 1);
|
||||||
char val[1024];
|
char val[1024];
|
||||||
VERIFY(zap_lookup(os, obj, za->za_name,
|
VERIFY0(zap_lookup(os, obj, za->za_name,
|
||||||
1, sizeof (val), val) == 0);
|
1, sizeof (val), val));
|
||||||
(void) printf("\t%s = %s\n", za->za_name, val);
|
(void) printf("\t%s = %s\n", za->za_name, val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -363,10 +368,12 @@ feature_incr_sync(void *arg, dmu_tx_t *tx)
|
|||||||
zfeature_info_t *feature = arg;
|
zfeature_info_t *feature = arg;
|
||||||
uint64_t refcount;
|
uint64_t refcount;
|
||||||
|
|
||||||
|
mutex_enter(&spa->spa_feat_stats_lock);
|
||||||
VERIFY0(feature_get_refcount_from_disk(spa, feature, &refcount));
|
VERIFY0(feature_get_refcount_from_disk(spa, feature, &refcount));
|
||||||
feature_sync(spa, feature, refcount + 1, tx);
|
feature_sync(spa, feature, refcount + 1, tx);
|
||||||
spa_history_log_internal(spa, "zhack feature incr", tx,
|
spa_history_log_internal(spa, "zhack feature incr", tx,
|
||||||
"name=%s", feature->fi_guid);
|
"name=%s", feature->fi_guid);
|
||||||
|
mutex_exit(&spa->spa_feat_stats_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -376,10 +383,12 @@ feature_decr_sync(void *arg, dmu_tx_t *tx)
|
|||||||
zfeature_info_t *feature = arg;
|
zfeature_info_t *feature = arg;
|
||||||
uint64_t refcount;
|
uint64_t refcount;
|
||||||
|
|
||||||
|
mutex_enter(&spa->spa_feat_stats_lock);
|
||||||
VERIFY0(feature_get_refcount_from_disk(spa, feature, &refcount));
|
VERIFY0(feature_get_refcount_from_disk(spa, feature, &refcount));
|
||||||
feature_sync(spa, feature, refcount - 1, tx);
|
feature_sync(spa, feature, refcount - 1, tx);
|
||||||
spa_history_log_internal(spa, "zhack feature decr", tx,
|
spa_history_log_internal(spa, "zhack feature decr", tx,
|
||||||
"name=%s", feature->fi_guid);
|
"name=%s", feature->fi_guid);
|
||||||
|
mutex_exit(&spa->spa_feat_stats_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -496,6 +505,186 @@ zhack_do_feature(int argc, char **argv)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static boolean_t
|
||||||
|
strstarts(const char *a, const char *b)
|
||||||
|
{
|
||||||
|
return (strncmp(a, b, strlen(b)) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
metaslab_force_alloc(metaslab_t *msp, uint64_t start, uint64_t size,
|
||||||
|
dmu_tx_t *tx)
|
||||||
|
{
|
||||||
|
ASSERT(msp->ms_disabled);
|
||||||
|
ASSERT(MUTEX_HELD(&msp->ms_lock));
|
||||||
|
uint64_t txg = dmu_tx_get_txg(tx);
|
||||||
|
|
||||||
|
uint64_t off = start;
|
||||||
|
while (off < start + size) {
|
||||||
|
uint64_t ostart, osize;
|
||||||
|
boolean_t found = zfs_range_tree_find_in(msp->ms_allocatable,
|
||||||
|
off, start + size - off, &ostart, &osize);
|
||||||
|
if (!found)
|
||||||
|
break;
|
||||||
|
zfs_range_tree_remove(msp->ms_allocatable, ostart, osize);
|
||||||
|
|
||||||
|
if (zfs_range_tree_is_empty(msp->ms_allocating[txg & TXG_MASK]))
|
||||||
|
vdev_dirty(msp->ms_group->mg_vd, VDD_METASLAB, msp,
|
||||||
|
txg);
|
||||||
|
|
||||||
|
zfs_range_tree_add(msp->ms_allocating[txg & TXG_MASK], ostart,
|
||||||
|
osize);
|
||||||
|
msp->ms_allocating_total += osize;
|
||||||
|
off = ostart + osize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
zhack_do_metaslab_leak(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int c;
|
||||||
|
char *target;
|
||||||
|
spa_t *spa;
|
||||||
|
|
||||||
|
optind = 1;
|
||||||
|
boolean_t force = B_FALSE;
|
||||||
|
while ((c = getopt(argc, argv, "f")) != -1) {
|
||||||
|
switch (c) {
|
||||||
|
case 'f':
|
||||||
|
force = B_TRUE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
usage();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
argc -= optind;
|
||||||
|
argv += optind;
|
||||||
|
|
||||||
|
if (argc < 1) {
|
||||||
|
(void) fprintf(stderr, "error: missing pool name\n");
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
target = argv[0];
|
||||||
|
|
||||||
|
zhack_spa_open(target, B_FALSE, FTAG, &spa);
|
||||||
|
spa_config_enter(spa, SCL_VDEV | SCL_ALLOC, FTAG, RW_READER);
|
||||||
|
|
||||||
|
char *line = NULL;
|
||||||
|
size_t cap = 0;
|
||||||
|
|
||||||
|
vdev_t *vd = NULL;
|
||||||
|
metaslab_t *prev = NULL;
|
||||||
|
dmu_tx_t *tx = NULL;
|
||||||
|
while (getline(&line, &cap, stdin) > 0) {
|
||||||
|
if (strstarts(line, "\tvdev ")) {
|
||||||
|
uint64_t vdev_id, ms_shift;
|
||||||
|
if (sscanf(line,
|
||||||
|
"\tvdev %10"PRIu64"\t%*s metaslab shift %4"PRIu64,
|
||||||
|
&vdev_id, &ms_shift) == 1) {
|
||||||
|
VERIFY3U(sscanf(line, "\tvdev %"PRIu64
|
||||||
|
"\t metaslab shift %4"PRIu64,
|
||||||
|
&vdev_id, &ms_shift), ==, 2);
|
||||||
|
}
|
||||||
|
vd = vdev_lookup_top(spa, vdev_id);
|
||||||
|
if (vd == NULL) {
|
||||||
|
fprintf(stderr, "error: no such vdev with "
|
||||||
|
"id %"PRIu64"\n", vdev_id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (tx) {
|
||||||
|
dmu_tx_commit(tx);
|
||||||
|
mutex_exit(&prev->ms_lock);
|
||||||
|
metaslab_enable(prev, B_FALSE, B_FALSE);
|
||||||
|
tx = NULL;
|
||||||
|
prev = NULL;
|
||||||
|
}
|
||||||
|
if (vd->vdev_ms_shift != ms_shift) {
|
||||||
|
fprintf(stderr, "error: ms_shift mismatch: %"
|
||||||
|
PRIu64" != %"PRIu64"\n", vd->vdev_ms_shift,
|
||||||
|
ms_shift);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (strstarts(line, "\tmetaslabs ")) {
|
||||||
|
uint64_t ms_count;
|
||||||
|
VERIFY3U(sscanf(line, "\tmetaslabs %"PRIu64, &ms_count),
|
||||||
|
==, 1);
|
||||||
|
ASSERT(vd);
|
||||||
|
if (!force && vd->vdev_ms_count != ms_count) {
|
||||||
|
fprintf(stderr, "error: ms_count mismatch: %"
|
||||||
|
PRIu64" != %"PRIu64"\n", vd->vdev_ms_count,
|
||||||
|
ms_count);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (strstarts(line, "ALLOC:")) {
|
||||||
|
uint64_t start, size;
|
||||||
|
VERIFY3U(sscanf(line, "ALLOC: %"PRIu64" %"PRIu64"\n",
|
||||||
|
&start, &size), ==, 2);
|
||||||
|
|
||||||
|
ASSERT(vd);
|
||||||
|
metaslab_t *cur =
|
||||||
|
vd->vdev_ms[start >> vd->vdev_ms_shift];
|
||||||
|
if (prev != cur) {
|
||||||
|
if (prev) {
|
||||||
|
dmu_tx_commit(tx);
|
||||||
|
mutex_exit(&prev->ms_lock);
|
||||||
|
metaslab_enable(prev, B_FALSE, B_FALSE);
|
||||||
|
}
|
||||||
|
ASSERT(cur);
|
||||||
|
metaslab_disable(cur);
|
||||||
|
mutex_enter(&cur->ms_lock);
|
||||||
|
metaslab_load(cur);
|
||||||
|
prev = cur;
|
||||||
|
tx = dmu_tx_create_dd(
|
||||||
|
spa_get_dsl(vd->vdev_spa)->dp_root_dir);
|
||||||
|
dmu_tx_assign(tx, DMU_TX_WAIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
metaslab_force_alloc(cur, start, size, tx);
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tx) {
|
||||||
|
dmu_tx_commit(tx);
|
||||||
|
mutex_exit(&prev->ms_lock);
|
||||||
|
metaslab_enable(prev, B_FALSE, B_FALSE);
|
||||||
|
tx = NULL;
|
||||||
|
prev = NULL;
|
||||||
|
}
|
||||||
|
if (line)
|
||||||
|
free(line);
|
||||||
|
|
||||||
|
spa_config_exit(spa, SCL_VDEV | SCL_ALLOC, FTAG);
|
||||||
|
spa_close(spa, FTAG);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
zhack_do_metaslab(int argc, char **argv)
|
||||||
|
{
|
||||||
|
char *subcommand;
|
||||||
|
|
||||||
|
argc--;
|
||||||
|
argv++;
|
||||||
|
if (argc == 0) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
"error: no metaslab operation specified\n");
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
|
||||||
|
subcommand = argv[0];
|
||||||
|
if (strcmp(subcommand, "leak") == 0) {
|
||||||
|
zhack_do_metaslab_leak(argc, argv);
|
||||||
|
} else {
|
||||||
|
(void) fprintf(stderr, "error: unknown subcommand: %s\n",
|
||||||
|
subcommand);
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
#define ASHIFT_UBERBLOCK_SHIFT(ashift) \
|
#define ASHIFT_UBERBLOCK_SHIFT(ashift) \
|
||||||
MIN(MAX(ashift, UBERBLOCK_SHIFT), \
|
MIN(MAX(ashift, UBERBLOCK_SHIFT), \
|
||||||
MAX_UBERBLOCK_SHIFT)
|
MAX_UBERBLOCK_SHIFT)
|
||||||
@ -525,6 +714,23 @@ zhack_repair_read_label(const int fd, vdev_label_t *vl,
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
zhack_repair_get_byteswap(const zio_eck_t *vdev_eck, const int l, int *byteswap)
|
||||||
|
{
|
||||||
|
if (vdev_eck->zec_magic == ZEC_MAGIC) {
|
||||||
|
*byteswap = B_FALSE;
|
||||||
|
} else if (vdev_eck->zec_magic == BSWAP_64((uint64_t)ZEC_MAGIC)) {
|
||||||
|
*byteswap = B_TRUE;
|
||||||
|
} else {
|
||||||
|
(void) fprintf(stderr, "error: label %d: "
|
||||||
|
"Expected the nvlist checksum magic number but instead got "
|
||||||
|
"0x%" PRIx64 "\n",
|
||||||
|
l, vdev_eck->zec_magic);
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
zhack_repair_calc_cksum(const int byteswap, void *data, const uint64_t offset,
|
zhack_repair_calc_cksum(const int byteswap, void *data, const uint64_t offset,
|
||||||
const uint64_t abdsize, zio_eck_t *eck, zio_cksum_t *cksum)
|
const uint64_t abdsize, zio_eck_t *eck, zio_cksum_t *cksum)
|
||||||
@ -551,33 +757,10 @@ zhack_repair_calc_cksum(const int byteswap, void *data, const uint64_t offset,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
zhack_repair_check_label(uberblock_t *ub, const int l, const char **cfg_keys,
|
zhack_repair_get_ashift(nvlist_t *cfg, const int l, uint64_t *ashift)
|
||||||
const size_t cfg_keys_len, nvlist_t *cfg, nvlist_t *vdev_tree_cfg,
|
|
||||||
uint64_t *ashift)
|
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
nvlist_t *vdev_tree_cfg;
|
||||||
if (ub->ub_txg != 0) {
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
"error: label %d: UB TXG of 0 expected, but got %"
|
|
||||||
PRIu64 "\n",
|
|
||||||
l, ub->ub_txg);
|
|
||||||
(void) fprintf(stderr, "It would appear the device was not "
|
|
||||||
"properly removed.\n");
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < cfg_keys_len; i++) {
|
|
||||||
uint64_t val;
|
|
||||||
err = nvlist_lookup_uint64(cfg, cfg_keys[i], &val);
|
|
||||||
if (err) {
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
"error: label %d, %d: "
|
|
||||||
"cannot find nvlist key %s\n",
|
|
||||||
l, i, cfg_keys[i]);
|
|
||||||
return (err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
err = nvlist_lookup_nvlist(cfg,
|
err = nvlist_lookup_nvlist(cfg,
|
||||||
ZPOOL_CONFIG_VDEV_TREE, &vdev_tree_cfg);
|
ZPOOL_CONFIG_VDEV_TREE, &vdev_tree_cfg);
|
||||||
@ -601,7 +784,7 @@ zhack_repair_check_label(uberblock_t *ub, const int l, const char **cfg_keys,
|
|||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"error: label %d: nvlist key %s is zero\n",
|
"error: label %d: nvlist key %s is zero\n",
|
||||||
l, ZPOOL_CONFIG_ASHIFT);
|
l, ZPOOL_CONFIG_ASHIFT);
|
||||||
return (err);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
@ -616,30 +799,35 @@ zhack_repair_undetach(uberblock_t *ub, nvlist_t *cfg, const int l)
|
|||||||
*/
|
*/
|
||||||
if (BP_GET_LOGICAL_BIRTH(&ub->ub_rootbp) != 0) {
|
if (BP_GET_LOGICAL_BIRTH(&ub->ub_rootbp) != 0) {
|
||||||
const uint64_t txg = BP_GET_LOGICAL_BIRTH(&ub->ub_rootbp);
|
const uint64_t txg = BP_GET_LOGICAL_BIRTH(&ub->ub_rootbp);
|
||||||
|
int err;
|
||||||
|
|
||||||
ub->ub_txg = txg;
|
ub->ub_txg = txg;
|
||||||
|
|
||||||
if (nvlist_remove_all(cfg, ZPOOL_CONFIG_CREATE_TXG) != 0) {
|
err = nvlist_remove_all(cfg, ZPOOL_CONFIG_CREATE_TXG);
|
||||||
|
if (err) {
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"error: label %d: "
|
"error: label %d: "
|
||||||
"Failed to remove pool creation TXG\n",
|
"Failed to remove pool creation TXG\n",
|
||||||
l);
|
l);
|
||||||
return (1);
|
return (err);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nvlist_remove_all(cfg, ZPOOL_CONFIG_POOL_TXG) != 0) {
|
err = nvlist_remove_all(cfg, ZPOOL_CONFIG_POOL_TXG);
|
||||||
|
if (err) {
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"error: label %d: Failed to remove pool TXG to "
|
"error: label %d: Failed to remove pool TXG to "
|
||||||
"be replaced.\n",
|
"be replaced.\n",
|
||||||
l);
|
l);
|
||||||
return (1);
|
return (err);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nvlist_add_uint64(cfg, ZPOOL_CONFIG_POOL_TXG, txg) != 0) {
|
err = nvlist_add_uint64(cfg, ZPOOL_CONFIG_POOL_TXG, txg);
|
||||||
|
if (err) {
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
"error: label %d: "
|
"error: label %d: "
|
||||||
"Failed to add pool TXG of %" PRIu64 "\n",
|
"Failed to add pool TXG of %" PRIu64 "\n",
|
||||||
l, txg);
|
l, txg);
|
||||||
return (1);
|
return (err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -733,6 +921,7 @@ zhack_repair_test_cksum(const int byteswap, void *vdev_data,
|
|||||||
BSWAP_64(ZEC_MAGIC) : ZEC_MAGIC;
|
BSWAP_64(ZEC_MAGIC) : ZEC_MAGIC;
|
||||||
const uint64_t actual_magic = vdev_eck->zec_magic;
|
const uint64_t actual_magic = vdev_eck->zec_magic;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
if (actual_magic != expected_magic) {
|
if (actual_magic != expected_magic) {
|
||||||
(void) fprintf(stderr, "error: label %d: "
|
(void) fprintf(stderr, "error: label %d: "
|
||||||
"Expected "
|
"Expected "
|
||||||
@ -754,6 +943,36 @@ zhack_repair_test_cksum(const int byteswap, void *vdev_data,
|
|||||||
return (err);
|
return (err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
zhack_repair_unpack_cfg(vdev_label_t *vl, const int l, nvlist_t **cfg)
|
||||||
|
{
|
||||||
|
const char *cfg_keys[] = { ZPOOL_CONFIG_VERSION,
|
||||||
|
ZPOOL_CONFIG_POOL_STATE, ZPOOL_CONFIG_GUID };
|
||||||
|
int err;
|
||||||
|
|
||||||
|
err = nvlist_unpack(vl->vl_vdev_phys.vp_nvlist,
|
||||||
|
VDEV_PHYS_SIZE - sizeof (zio_eck_t), cfg, 0);
|
||||||
|
if (err) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
"error: cannot unpack nvlist label %d\n", l);
|
||||||
|
return (err);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < ARRAY_SIZE(cfg_keys); i++) {
|
||||||
|
uint64_t val;
|
||||||
|
err = nvlist_lookup_uint64(*cfg, cfg_keys[i], &val);
|
||||||
|
if (err) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
"error: label %d, %d: "
|
||||||
|
"cannot find nvlist key %s\n",
|
||||||
|
l, i, cfg_keys[i]);
|
||||||
|
return (err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
zhack_repair_one_label(const zhack_repair_op_t op, const int fd,
|
zhack_repair_one_label(const zhack_repair_op_t op, const int fd,
|
||||||
vdev_label_t *vl, const uint64_t label_offset, const int l,
|
vdev_label_t *vl, const uint64_t label_offset, const int l,
|
||||||
@ -767,10 +986,7 @@ zhack_repair_one_label(const zhack_repair_op_t op, const int fd,
|
|||||||
(zio_eck_t *)((char *)(vdev_data) + VDEV_PHYS_SIZE) - 1;
|
(zio_eck_t *)((char *)(vdev_data) + VDEV_PHYS_SIZE) - 1;
|
||||||
const uint64_t vdev_phys_offset =
|
const uint64_t vdev_phys_offset =
|
||||||
label_offset + offsetof(vdev_label_t, vl_vdev_phys);
|
label_offset + offsetof(vdev_label_t, vl_vdev_phys);
|
||||||
const char *cfg_keys[] = { ZPOOL_CONFIG_VERSION,
|
|
||||||
ZPOOL_CONFIG_POOL_STATE, ZPOOL_CONFIG_GUID };
|
|
||||||
nvlist_t *cfg;
|
nvlist_t *cfg;
|
||||||
nvlist_t *vdev_tree_cfg = NULL;
|
|
||||||
uint64_t ashift;
|
uint64_t ashift;
|
||||||
int byteswap;
|
int byteswap;
|
||||||
|
|
||||||
@ -778,18 +994,9 @@ zhack_repair_one_label(const zhack_repair_op_t op, const int fd,
|
|||||||
if (err)
|
if (err)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (vdev_eck->zec_magic == 0) {
|
err = zhack_repair_get_byteswap(vdev_eck, l, &byteswap);
|
||||||
(void) fprintf(stderr, "error: label %d: "
|
if (err)
|
||||||
"Expected the nvlist checksum magic number to not be zero"
|
|
||||||
"\n",
|
|
||||||
l);
|
|
||||||
(void) fprintf(stderr, "There should already be a checksum "
|
|
||||||
"for the label.\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
byteswap =
|
|
||||||
(vdev_eck->zec_magic == BSWAP_64((uint64_t)ZEC_MAGIC));
|
|
||||||
|
|
||||||
if (byteswap) {
|
if (byteswap) {
|
||||||
byteswap_uint64_array(&vdev_eck->zec_cksum,
|
byteswap_uint64_array(&vdev_eck->zec_cksum,
|
||||||
@ -805,16 +1012,7 @@ zhack_repair_one_label(const zhack_repair_op_t op, const int fd,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = nvlist_unpack(vl->vl_vdev_phys.vp_nvlist,
|
err = zhack_repair_unpack_cfg(vl, l, &cfg);
|
||||||
VDEV_PHYS_SIZE - sizeof (zio_eck_t), &cfg, 0);
|
|
||||||
if (err) {
|
|
||||||
(void) fprintf(stderr,
|
|
||||||
"error: cannot unpack nvlist label %d\n", l);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = zhack_repair_check_label(ub,
|
|
||||||
l, cfg_keys, ARRAY_SIZE(cfg_keys), cfg, vdev_tree_cfg, &ashift);
|
|
||||||
if (err)
|
if (err)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -822,6 +1020,19 @@ zhack_repair_one_label(const zhack_repair_op_t op, const int fd,
|
|||||||
char *buf;
|
char *buf;
|
||||||
size_t buflen;
|
size_t buflen;
|
||||||
|
|
||||||
|
if (ub->ub_txg != 0) {
|
||||||
|
(void) fprintf(stderr,
|
||||||
|
"error: label %d: UB TXG of 0 expected, but got %"
|
||||||
|
PRIu64 "\n", l, ub->ub_txg);
|
||||||
|
(void) fprintf(stderr, "It would appear the device was "
|
||||||
|
"not properly detached.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
err = zhack_repair_get_ashift(cfg, l, &ashift);
|
||||||
|
if (err)
|
||||||
|
return;
|
||||||
|
|
||||||
err = zhack_repair_undetach(ub, cfg, l);
|
err = zhack_repair_undetach(ub, cfg, l);
|
||||||
if (err)
|
if (err)
|
||||||
return;
|
return;
|
||||||
@ -981,7 +1192,7 @@ main(int argc, char **argv)
|
|||||||
dprintf_setup(&argc, argv);
|
dprintf_setup(&argc, argv);
|
||||||
zfs_prop_init();
|
zfs_prop_init();
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "+c:d:")) != -1) {
|
while ((c = getopt(argc, argv, "+c:d:o:")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'c':
|
case 'c':
|
||||||
g_importargs.cachefile = optarg;
|
g_importargs.cachefile = optarg;
|
||||||
@ -990,6 +1201,10 @@ main(int argc, char **argv)
|
|||||||
assert(g_importargs.paths < MAX_NUM_PATHS);
|
assert(g_importargs.paths < MAX_NUM_PATHS);
|
||||||
g_importargs.path[g_importargs.paths++] = optarg;
|
g_importargs.path[g_importargs.paths++] = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'o':
|
||||||
|
if (handle_tunable_option(optarg, B_FALSE) != 0)
|
||||||
|
exit(1);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
break;
|
break;
|
||||||
@ -1011,6 +1226,8 @@ main(int argc, char **argv)
|
|||||||
rv = zhack_do_feature(argc, argv);
|
rv = zhack_do_feature(argc, argv);
|
||||||
} else if (strcmp(subcommand, "label") == 0) {
|
} else if (strcmp(subcommand, "label") == 0) {
|
||||||
return (zhack_do_label(argc, argv));
|
return (zhack_do_label(argc, argv));
|
||||||
|
} else if (strcmp(subcommand, "metaslab") == 0) {
|
||||||
|
rv = zhack_do_metaslab(argc, argv);
|
||||||
} else {
|
} else {
|
||||||
(void) fprintf(stderr, "error: unknown subcommand: %s\n",
|
(void) fprintf(stderr, "error: unknown subcommand: %s\n",
|
||||||
subcommand);
|
subcommand);
|
||||||
|
@ -47,6 +47,7 @@ cols = {
|
|||||||
"cec": [5, 1000, "zil_commit_error_count"],
|
"cec": [5, 1000, "zil_commit_error_count"],
|
||||||
"csc": [5, 1000, "zil_commit_stall_count"],
|
"csc": [5, 1000, "zil_commit_stall_count"],
|
||||||
"cSc": [5, 1000, "zil_commit_suspend_count"],
|
"cSc": [5, 1000, "zil_commit_suspend_count"],
|
||||||
|
"cCc": [5, 1000, "zil_commit_crash_count"],
|
||||||
"ic": [5, 1000, "zil_itx_count"],
|
"ic": [5, 1000, "zil_itx_count"],
|
||||||
"iic": [5, 1000, "zil_itx_indirect_count"],
|
"iic": [5, 1000, "zil_itx_indirect_count"],
|
||||||
"iib": [5, 1024, "zil_itx_indirect_bytes"],
|
"iib": [5, 1024, "zil_itx_indirect_bytes"],
|
||||||
|
@ -107,6 +107,8 @@
|
|||||||
* zinject
|
* zinject
|
||||||
* zinject <-a | -u pool>
|
* zinject <-a | -u pool>
|
||||||
* zinject -c <id|all>
|
* zinject -c <id|all>
|
||||||
|
* zinject -E <delay> [-a] [-m] [-f freq] [-l level] [-r range]
|
||||||
|
* [-T iotype] [-t type object | -b bookmark pool]
|
||||||
* zinject [-q] <-t type> [-f freq] [-u] [-a] [-m] [-e errno] [-l level]
|
* zinject [-q] <-t type> [-f freq] [-u] [-a] [-m] [-e errno] [-l level]
|
||||||
* [-r range] <object>
|
* [-r range] <object>
|
||||||
* zinject [-f freq] [-a] [-m] [-u] -b objset:object:level:start:end pool
|
* zinject [-f freq] [-a] [-m] [-u] -b objset:object:level:start:end pool
|
||||||
@ -132,14 +134,18 @@
|
|||||||
* The '-f' flag controls the frequency of errors injected, expressed as a
|
* The '-f' flag controls the frequency of errors injected, expressed as a
|
||||||
* real number percentage between 0.0001 and 100. The default is 100.
|
* real number percentage between 0.0001 and 100. The default is 100.
|
||||||
*
|
*
|
||||||
* The this form is responsible for actually injecting the handler into the
|
* The <object> form is responsible for actually injecting the handler into the
|
||||||
* framework. It takes the arguments described above, translates them to the
|
* framework. It takes the arguments described above, translates them to the
|
||||||
* internal tuple using libzpool, and then issues an ioctl() to register the
|
* internal tuple using libzpool, and then issues an ioctl() to register the
|
||||||
* handler.
|
* handler.
|
||||||
*
|
*
|
||||||
* The final form can target a specific bookmark, regardless of whether a
|
* The '-b' option can target a specific bookmark, regardless of whether a
|
||||||
* human-readable interface has been designed. It allows developers to specify
|
* human-readable interface has been designed. It allows developers to specify
|
||||||
* a particular block by number.
|
* a particular block by number.
|
||||||
|
*
|
||||||
|
* The '-E' option injects pipeline ready stage delays for the given object or
|
||||||
|
* bookmark. The delay is specified in milliseconds, and it supports I/O type
|
||||||
|
* and range filters.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -346,6 +352,13 @@ usage(void)
|
|||||||
"\t\tsuch that the operation takes a minimum of supplied seconds\n"
|
"\t\tsuch that the operation takes a minimum of supplied seconds\n"
|
||||||
"\t\tto complete.\n"
|
"\t\tto complete.\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
"\tzinject -E <delay> [-a] [-m] [-f freq] [-l level] [-r range]\n"
|
||||||
|
"\t\t[-T iotype] [-t type object | -b bookmark pool]\n"
|
||||||
|
"\n"
|
||||||
|
"\t\tInject pipeline ready stage delays for the given object path\n"
|
||||||
|
"\t\t(data or dnode) or raw bookmark. The delay is specified in\n"
|
||||||
|
"\t\tmilliseconds.\n"
|
||||||
|
"\n"
|
||||||
"\tzinject -I [-s <seconds> | -g <txgs>] pool\n"
|
"\tzinject -I [-s <seconds> | -g <txgs>] pool\n"
|
||||||
"\t\tCause the pool to stop writing blocks yet not\n"
|
"\t\tCause the pool to stop writing blocks yet not\n"
|
||||||
"\t\treport errors for a duration. Simulates buggy hardware\n"
|
"\t\treport errors for a duration. Simulates buggy hardware\n"
|
||||||
@ -435,27 +448,31 @@ print_data_handler(int id, const char *pool, zinject_record_t *record,
|
|||||||
|
|
||||||
if (*count == 0) {
|
if (*count == 0) {
|
||||||
(void) printf("%3s %-15s %-6s %-6s %-8s %3s %-4s "
|
(void) printf("%3s %-15s %-6s %-6s %-8s %3s %-4s "
|
||||||
"%-15s\n", "ID", "POOL", "OBJSET", "OBJECT", "TYPE",
|
"%-15s %-6s %-15s\n", "ID", "POOL", "OBJSET", "OBJECT",
|
||||||
"LVL", "DVAs", "RANGE");
|
"TYPE", "LVL", "DVAs", "RANGE", "MATCH", "INJECT");
|
||||||
(void) printf("--- --------------- ------ "
|
(void) printf("--- --------------- ------ "
|
||||||
"------ -------- --- ---- ---------------\n");
|
"------ -------- --- ---- --------------- "
|
||||||
|
"------ ------\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
*count += 1;
|
*count += 1;
|
||||||
|
|
||||||
(void) printf("%3d %-15s %-6llu %-6llu %-8s %-3d 0x%02x ",
|
char rangebuf[32];
|
||||||
id, pool, (u_longlong_t)record->zi_objset,
|
if (record->zi_start == 0 && record->zi_end == -1ULL)
|
||||||
(u_longlong_t)record->zi_object, type_to_name(record->zi_type),
|
snprintf(rangebuf, sizeof (rangebuf), "all");
|
||||||
record->zi_level, record->zi_dvas);
|
|
||||||
|
|
||||||
|
|
||||||
if (record->zi_start == 0 &&
|
|
||||||
record->zi_end == -1ULL)
|
|
||||||
(void) printf("all\n");
|
|
||||||
else
|
else
|
||||||
(void) printf("[%llu, %llu]\n", (u_longlong_t)record->zi_start,
|
snprintf(rangebuf, sizeof (rangebuf), "[%llu, %llu]",
|
||||||
|
(u_longlong_t)record->zi_start,
|
||||||
(u_longlong_t)record->zi_end);
|
(u_longlong_t)record->zi_end);
|
||||||
|
|
||||||
|
|
||||||
|
(void) printf("%3d %-15s %-6llu %-6llu %-8s %-3d 0x%02x %-15s "
|
||||||
|
"%6" PRIu64 " %6" PRIu64 "\n", id, pool,
|
||||||
|
(u_longlong_t)record->zi_objset,
|
||||||
|
(u_longlong_t)record->zi_object, type_to_name(record->zi_type),
|
||||||
|
record->zi_level, record->zi_dvas, rangebuf,
|
||||||
|
record->zi_match_count, record->zi_inject_count);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,11 +489,14 @@ print_device_handler(int id, const char *pool, zinject_record_t *record,
|
|||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
if (*count == 0) {
|
if (*count == 0) {
|
||||||
(void) printf("%3s %-15s %-16s %-5s %-10s %-9s\n",
|
(void) printf("%3s %-15s %-16s %-5s %-10s %-9s "
|
||||||
"ID", "POOL", "GUID", "TYPE", "ERROR", "FREQ");
|
"%-6s %-6s\n",
|
||||||
|
"ID", "POOL", "GUID", "TYPE", "ERROR", "FREQ",
|
||||||
|
"MATCH", "INJECT");
|
||||||
(void) printf(
|
(void) printf(
|
||||||
"--- --------------- ---------------- "
|
"--- --------------- ---------------- "
|
||||||
"----- ---------- ---------\n");
|
"----- ---------- --------- "
|
||||||
|
"------ ------\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
*count += 1;
|
*count += 1;
|
||||||
@ -484,9 +504,11 @@ print_device_handler(int id, const char *pool, zinject_record_t *record,
|
|||||||
double freq = record->zi_freq == 0 ? 100.0f :
|
double freq = record->zi_freq == 0 ? 100.0f :
|
||||||
(((double)record->zi_freq) / ZI_PERCENTAGE_MAX) * 100.0f;
|
(((double)record->zi_freq) / ZI_PERCENTAGE_MAX) * 100.0f;
|
||||||
|
|
||||||
(void) printf("%3d %-15s %llx %-5s %-10s %8.4f%%\n", id, pool,
|
(void) printf("%3d %-15s %llx %-5s %-10s %8.4f%% "
|
||||||
(u_longlong_t)record->zi_guid, iotype_to_str(record->zi_iotype),
|
"%6" PRIu64 " %6" PRIu64 "\n", id, pool,
|
||||||
err_to_str(record->zi_error), freq);
|
(u_longlong_t)record->zi_guid,
|
||||||
|
iotype_to_str(record->zi_iotype), err_to_str(record->zi_error),
|
||||||
|
freq, record->zi_match_count, record->zi_inject_count);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@ -504,18 +526,26 @@ print_delay_handler(int id, const char *pool, zinject_record_t *record,
|
|||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
if (*count == 0) {
|
if (*count == 0) {
|
||||||
(void) printf("%3s %-15s %-15s %-15s %s\n",
|
(void) printf("%3s %-15s %-16s %-10s %-5s %-9s "
|
||||||
"ID", "POOL", "DELAY (ms)", "LANES", "GUID");
|
"%-6s %-6s\n",
|
||||||
(void) printf("--- --------------- --------------- "
|
"ID", "POOL", "GUID", "DELAY (ms)", "LANES", "FREQ",
|
||||||
"--------------- ----------------\n");
|
"MATCH", "INJECT");
|
||||||
|
(void) printf("--- --------------- ---------------- "
|
||||||
|
"---------- ----- --------- "
|
||||||
|
"------ ------\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
*count += 1;
|
*count += 1;
|
||||||
|
|
||||||
(void) printf("%3d %-15s %-15llu %-15llu %llx\n", id, pool,
|
double freq = record->zi_freq == 0 ? 100.0f :
|
||||||
|
(((double)record->zi_freq) / ZI_PERCENTAGE_MAX) * 100.0f;
|
||||||
|
|
||||||
|
(void) printf("%3d %-15s %llx %10llu %5llu %8.4f%% "
|
||||||
|
"%6" PRIu64 " %6" PRIu64 "\n", id, pool,
|
||||||
|
(u_longlong_t)record->zi_guid,
|
||||||
(u_longlong_t)NSEC2MSEC(record->zi_timer),
|
(u_longlong_t)NSEC2MSEC(record->zi_timer),
|
||||||
(u_longlong_t)record->zi_nlanes,
|
(u_longlong_t)record->zi_nlanes,
|
||||||
(u_longlong_t)record->zi_guid);
|
freq, record->zi_match_count, record->zi_inject_count);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@ -707,12 +737,15 @@ register_handler(const char *pool, int flags, zinject_record_t *record,
|
|||||||
if (quiet) {
|
if (quiet) {
|
||||||
(void) printf("%llu\n", (u_longlong_t)zc.zc_guid);
|
(void) printf("%llu\n", (u_longlong_t)zc.zc_guid);
|
||||||
} else {
|
} else {
|
||||||
|
boolean_t show_object = B_FALSE;
|
||||||
|
boolean_t show_iotype = B_FALSE;
|
||||||
(void) printf("Added handler %llu with the following "
|
(void) printf("Added handler %llu with the following "
|
||||||
"properties:\n", (u_longlong_t)zc.zc_guid);
|
"properties:\n", (u_longlong_t)zc.zc_guid);
|
||||||
(void) printf(" pool: %s\n", pool);
|
(void) printf(" pool: %s\n", pool);
|
||||||
if (record->zi_guid) {
|
if (record->zi_guid) {
|
||||||
(void) printf(" vdev: %llx\n",
|
(void) printf(" vdev: %llx\n",
|
||||||
(u_longlong_t)record->zi_guid);
|
(u_longlong_t)record->zi_guid);
|
||||||
|
show_iotype = B_TRUE;
|
||||||
} else if (record->zi_func[0] != '\0') {
|
} else if (record->zi_func[0] != '\0') {
|
||||||
(void) printf(" panic function: %s\n",
|
(void) printf(" panic function: %s\n",
|
||||||
record->zi_func);
|
record->zi_func);
|
||||||
@ -725,7 +758,18 @@ register_handler(const char *pool, int flags, zinject_record_t *record,
|
|||||||
} else if (record->zi_timer > 0) {
|
} else if (record->zi_timer > 0) {
|
||||||
(void) printf(" timer: %lld ms\n",
|
(void) printf(" timer: %lld ms\n",
|
||||||
(u_longlong_t)NSEC2MSEC(record->zi_timer));
|
(u_longlong_t)NSEC2MSEC(record->zi_timer));
|
||||||
|
if (record->zi_cmd == ZINJECT_DELAY_READY) {
|
||||||
|
show_object = B_TRUE;
|
||||||
|
show_iotype = B_TRUE;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
show_object = B_TRUE;
|
||||||
|
}
|
||||||
|
if (show_iotype) {
|
||||||
|
(void) printf("iotype: %s\n",
|
||||||
|
iotype_to_str(record->zi_iotype));
|
||||||
|
}
|
||||||
|
if (show_object) {
|
||||||
(void) printf("objset: %llu\n",
|
(void) printf("objset: %llu\n",
|
||||||
(u_longlong_t)record->zi_objset);
|
(u_longlong_t)record->zi_objset);
|
||||||
(void) printf("object: %llu\n",
|
(void) printf("object: %llu\n",
|
||||||
@ -893,6 +937,7 @@ main(int argc, char **argv)
|
|||||||
int ret;
|
int ret;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
uint32_t dvas = 0;
|
uint32_t dvas = 0;
|
||||||
|
hrtime_t ready_delay = -1;
|
||||||
|
|
||||||
if ((g_zfs = libzfs_init()) == NULL) {
|
if ((g_zfs = libzfs_init()) == NULL) {
|
||||||
(void) fprintf(stderr, "%s\n", libzfs_error_init(errno));
|
(void) fprintf(stderr, "%s\n", libzfs_error_init(errno));
|
||||||
@ -923,7 +968,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while ((c = getopt(argc, argv,
|
while ((c = getopt(argc, argv,
|
||||||
":aA:b:C:d:D:f:Fg:qhIc:t:T:l:mr:s:e:uL:p:P:")) != -1) {
|
":aA:b:C:d:D:E:f:Fg:qhIc:t:T:l:mr:s:e:uL:p:P:")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'a':
|
case 'a':
|
||||||
flags |= ZINJECT_FLUSH_ARC;
|
flags |= ZINJECT_FLUSH_ARC;
|
||||||
@ -1096,6 +1141,18 @@ main(int argc, char **argv)
|
|||||||
case 'u':
|
case 'u':
|
||||||
flags |= ZINJECT_UNLOAD_SPA;
|
flags |= ZINJECT_UNLOAD_SPA;
|
||||||
break;
|
break;
|
||||||
|
case 'E':
|
||||||
|
ready_delay = MSEC2NSEC(strtol(optarg, &end, 10));
|
||||||
|
if (ready_delay <= 0 || *end != '\0') {
|
||||||
|
(void) fprintf(stderr, "invalid delay '%s': "
|
||||||
|
"must be a positive duration\n", optarg);
|
||||||
|
usage();
|
||||||
|
libzfs_fini(g_zfs);
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
record.zi_cmd = ZINJECT_DELAY_READY;
|
||||||
|
record.zi_timer = ready_delay;
|
||||||
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
if ((label = name_to_type(optarg)) == TYPE_INVAL &&
|
if ((label = name_to_type(optarg)) == TYPE_INVAL &&
|
||||||
!LABEL_TYPE(type)) {
|
!LABEL_TYPE(type)) {
|
||||||
@ -1133,7 +1190,7 @@ main(int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
||||||
level != 0 || record.zi_cmd != ZINJECT_UNINITIALIZED ||
|
level != 0 || record.zi_cmd != ZINJECT_UNINITIALIZED ||
|
||||||
record.zi_freq > 0 || dvas != 0) {
|
record.zi_freq > 0 || dvas != 0 || ready_delay >= 0) {
|
||||||
(void) fprintf(stderr, "cancel (-c) incompatible with "
|
(void) fprintf(stderr, "cancel (-c) incompatible with "
|
||||||
"any other options\n");
|
"any other options\n");
|
||||||
usage();
|
usage();
|
||||||
@ -1169,7 +1226,7 @@ main(int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
||||||
level != 0 || record.zi_cmd != ZINJECT_UNINITIALIZED ||
|
level != 0 || record.zi_cmd != ZINJECT_UNINITIALIZED ||
|
||||||
dvas != 0) {
|
dvas != 0 || ready_delay >= 0) {
|
||||||
(void) fprintf(stderr, "device (-d) incompatible with "
|
(void) fprintf(stderr, "device (-d) incompatible with "
|
||||||
"data error injection\n");
|
"data error injection\n");
|
||||||
usage();
|
usage();
|
||||||
@ -1259,13 +1316,23 @@ main(int argc, char **argv)
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (record.zi_cmd == ZINJECT_UNINITIALIZED) {
|
||||||
record.zi_cmd = ZINJECT_DATA_FAULT;
|
record.zi_cmd = ZINJECT_DATA_FAULT;
|
||||||
|
if (!error)
|
||||||
|
error = EIO;
|
||||||
|
} else if (error != 0) {
|
||||||
|
(void) fprintf(stderr, "error type -e incompatible "
|
||||||
|
"with delay injection\n");
|
||||||
|
libzfs_fini(g_zfs);
|
||||||
|
return (1);
|
||||||
|
} else {
|
||||||
|
record.zi_iotype = io_type;
|
||||||
|
}
|
||||||
|
|
||||||
if (translate_raw(raw, &record) != 0) {
|
if (translate_raw(raw, &record) != 0) {
|
||||||
libzfs_fini(g_zfs);
|
libzfs_fini(g_zfs);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
if (!error)
|
|
||||||
error = EIO;
|
|
||||||
} else if (record.zi_cmd == ZINJECT_PANIC) {
|
} else if (record.zi_cmd == ZINJECT_PANIC) {
|
||||||
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
||||||
level != 0 || device != NULL || record.zi_freq > 0 ||
|
level != 0 || device != NULL || record.zi_freq > 0 ||
|
||||||
@ -1393,6 +1460,13 @@ main(int argc, char **argv)
|
|||||||
record.zi_dvas = dvas;
|
record.zi_dvas = dvas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (record.zi_cmd != ZINJECT_UNINITIALIZED && error != 0) {
|
||||||
|
(void) fprintf(stderr, "error type -e incompatible "
|
||||||
|
"with delay injection\n");
|
||||||
|
libzfs_fini(g_zfs);
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
|
||||||
if (error == EACCES) {
|
if (error == EACCES) {
|
||||||
if (type != TYPE_DATA) {
|
if (type != TYPE_DATA) {
|
||||||
(void) fprintf(stderr, "decryption errors "
|
(void) fprintf(stderr, "decryption errors "
|
||||||
@ -1408,8 +1482,12 @@ main(int argc, char **argv)
|
|||||||
* not found.
|
* not found.
|
||||||
*/
|
*/
|
||||||
error = ECKSUM;
|
error = ECKSUM;
|
||||||
} else {
|
} else if (record.zi_cmd == ZINJECT_UNINITIALIZED) {
|
||||||
record.zi_cmd = ZINJECT_DATA_FAULT;
|
record.zi_cmd = ZINJECT_DATA_FAULT;
|
||||||
|
if (!error)
|
||||||
|
error = EIO;
|
||||||
|
} else {
|
||||||
|
record.zi_iotype = io_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (translate_record(type, argv[0], range, level, &record, pool,
|
if (translate_record(type, argv[0], range, level, &record, pool,
|
||||||
@ -1417,8 +1495,6 @@ main(int argc, char **argv)
|
|||||||
libzfs_fini(g_zfs);
|
libzfs_fini(g_zfs);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
if (!error)
|
|
||||||
error = EIO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -148,6 +148,7 @@ dist_zpoolcompat_DATA = \
|
|||||||
%D%/compatibility.d/openzfs-2.1-linux \
|
%D%/compatibility.d/openzfs-2.1-linux \
|
||||||
%D%/compatibility.d/openzfs-2.2 \
|
%D%/compatibility.d/openzfs-2.2 \
|
||||||
%D%/compatibility.d/openzfs-2.3 \
|
%D%/compatibility.d/openzfs-2.3 \
|
||||||
|
%D%/compatibility.d/openzfs-2.4 \
|
||||||
%D%/compatibility.d/openzfsonosx-1.7.0 \
|
%D%/compatibility.d/openzfsonosx-1.7.0 \
|
||||||
%D%/compatibility.d/openzfsonosx-1.8.1 \
|
%D%/compatibility.d/openzfsonosx-1.8.1 \
|
||||||
%D%/compatibility.d/openzfsonosx-1.9.3 \
|
%D%/compatibility.d/openzfsonosx-1.9.3 \
|
||||||
@ -187,7 +188,9 @@ zpoolcompatlinks = \
|
|||||||
"openzfs-2.2 openzfs-2.2-linux" \
|
"openzfs-2.2 openzfs-2.2-linux" \
|
||||||
"openzfs-2.2 openzfs-2.2-freebsd" \
|
"openzfs-2.2 openzfs-2.2-freebsd" \
|
||||||
"openzfs-2.3 openzfs-2.3-linux" \
|
"openzfs-2.3 openzfs-2.3-linux" \
|
||||||
"openzfs-2.3 openzfs-2.3-freebsd"
|
"openzfs-2.3 openzfs-2.3-freebsd" \
|
||||||
|
"openzfs-2.4 openzfs-2.4-linux" \
|
||||||
|
"openzfs-2.4 openzfs-2.4-freebsd"
|
||||||
|
|
||||||
zpoolconfdir = $(sysconfdir)/zfs/zpool.d
|
zpoolconfdir = $(sysconfdir)/zfs/zpool.d
|
||||||
INSTALL_DATA_HOOKS += zpool-install-data-hook
|
INSTALL_DATA_HOOKS += zpool-install-data-hook
|
||||||
|
48
cmd/zpool/compatibility.d/openzfs-2.4
Normal file
48
cmd/zpool/compatibility.d/openzfs-2.4
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# Features supported by OpenZFS 2.4 on Linux and FreeBSD
|
||||||
|
allocation_classes
|
||||||
|
async_destroy
|
||||||
|
blake3
|
||||||
|
block_cloning
|
||||||
|
block_cloning_endian
|
||||||
|
bookmark_v2
|
||||||
|
bookmark_written
|
||||||
|
bookmarks
|
||||||
|
device_rebuild
|
||||||
|
device_removal
|
||||||
|
draid
|
||||||
|
dynamic_gang_header
|
||||||
|
edonr
|
||||||
|
embedded_data
|
||||||
|
empty_bpobj
|
||||||
|
enabled_txg
|
||||||
|
encryption
|
||||||
|
extensible_dataset
|
||||||
|
fast_dedup
|
||||||
|
filesystem_limits
|
||||||
|
head_errlog
|
||||||
|
hole_birth
|
||||||
|
large_blocks
|
||||||
|
large_dnode
|
||||||
|
large_microzap
|
||||||
|
livelist
|
||||||
|
log_spacemap
|
||||||
|
longname
|
||||||
|
lz4_compress
|
||||||
|
multi_vdev_crash_dump
|
||||||
|
obsolete_counts
|
||||||
|
physical_rewrite
|
||||||
|
project_quota
|
||||||
|
raidz_expansion
|
||||||
|
redacted_datasets
|
||||||
|
redaction_bookmarks
|
||||||
|
redaction_list_spill
|
||||||
|
resilver_defer
|
||||||
|
sha512
|
||||||
|
skein
|
||||||
|
spacemap_histogram
|
||||||
|
spacemap_v2
|
||||||
|
userobj_accounting
|
||||||
|
vdev_zaps_v2
|
||||||
|
zilsaxattr
|
||||||
|
zpool_checkpoint
|
||||||
|
zstd_compress
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>.
|
* Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>.
|
||||||
|
* Copyright (c) 2025, Klara, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
@ -52,7 +53,7 @@
|
|||||||
typedef struct zpool_node {
|
typedef struct zpool_node {
|
||||||
zpool_handle_t *zn_handle;
|
zpool_handle_t *zn_handle;
|
||||||
uu_avl_node_t zn_avlnode;
|
uu_avl_node_t zn_avlnode;
|
||||||
int zn_mark;
|
hrtime_t zn_last_refresh;
|
||||||
} zpool_node_t;
|
} zpool_node_t;
|
||||||
|
|
||||||
struct zpool_list {
|
struct zpool_list {
|
||||||
@ -62,6 +63,7 @@ struct zpool_list {
|
|||||||
uu_avl_pool_t *zl_pool;
|
uu_avl_pool_t *zl_pool;
|
||||||
zprop_list_t **zl_proplist;
|
zprop_list_t **zl_proplist;
|
||||||
zfs_type_t zl_type;
|
zfs_type_t zl_type;
|
||||||
|
hrtime_t zl_last_refresh;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -81,32 +83,47 @@ zpool_compare(const void *larg, const void *rarg, void *unused)
|
|||||||
* of known pools.
|
* of known pools.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
add_pool(zpool_handle_t *zhp, void *data)
|
add_pool(zpool_handle_t *zhp, zpool_list_t *zlp)
|
||||||
{
|
{
|
||||||
zpool_list_t *zlp = data;
|
zpool_node_t *node, *new = safe_malloc(sizeof (zpool_node_t));
|
||||||
zpool_node_t *node = safe_malloc(sizeof (zpool_node_t));
|
|
||||||
uu_avl_index_t idx;
|
uu_avl_index_t idx;
|
||||||
|
|
||||||
node->zn_handle = zhp;
|
new->zn_handle = zhp;
|
||||||
uu_avl_node_init(node, &node->zn_avlnode, zlp->zl_pool);
|
uu_avl_node_init(new, &new->zn_avlnode, zlp->zl_pool);
|
||||||
if (uu_avl_find(zlp->zl_avl, node, NULL, &idx) == NULL) {
|
|
||||||
|
node = uu_avl_find(zlp->zl_avl, new, NULL, &idx);
|
||||||
|
if (node == NULL) {
|
||||||
if (zlp->zl_proplist &&
|
if (zlp->zl_proplist &&
|
||||||
zpool_expand_proplist(zhp, zlp->zl_proplist,
|
zpool_expand_proplist(zhp, zlp->zl_proplist,
|
||||||
zlp->zl_type, zlp->zl_literal) != 0) {
|
zlp->zl_type, zlp->zl_literal) != 0) {
|
||||||
zpool_close(zhp);
|
zpool_close(zhp);
|
||||||
free(node);
|
free(new);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
uu_avl_insert(zlp->zl_avl, node, idx);
|
new->zn_last_refresh = zlp->zl_last_refresh;
|
||||||
|
uu_avl_insert(zlp->zl_avl, new, idx);
|
||||||
} else {
|
} else {
|
||||||
|
node->zn_last_refresh = zlp->zl_last_refresh;
|
||||||
zpool_close(zhp);
|
zpool_close(zhp);
|
||||||
free(node);
|
free(new);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* add_pool(), but always returns 0. This allows zpool_iter() to continue
|
||||||
|
* even if a pool exists in the tree, or we fail to get the properties for
|
||||||
|
* a new one.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
add_pool_cb(zpool_handle_t *zhp, void *data)
|
||||||
|
{
|
||||||
|
(void) add_pool(zhp, data);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a list of pools based on the given arguments. If we're given no
|
* Create a list of pools based on the given arguments. If we're given no
|
||||||
* arguments, then iterate over all pools in the system and add them to the AVL
|
* arguments, then iterate over all pools in the system and add them to the AVL
|
||||||
@ -135,9 +152,10 @@ pool_list_get(int argc, char **argv, zprop_list_t **proplist, zfs_type_t type,
|
|||||||
zlp->zl_type = type;
|
zlp->zl_type = type;
|
||||||
|
|
||||||
zlp->zl_literal = literal;
|
zlp->zl_literal = literal;
|
||||||
|
zlp->zl_last_refresh = gethrtime();
|
||||||
|
|
||||||
if (argc == 0) {
|
if (argc == 0) {
|
||||||
(void) zpool_iter(g_zfs, add_pool, zlp);
|
(void) zpool_iter(g_zfs, add_pool_cb, zlp);
|
||||||
zlp->zl_findall = B_TRUE;
|
zlp->zl_findall = B_TRUE;
|
||||||
} else {
|
} else {
|
||||||
int i;
|
int i;
|
||||||
@ -159,15 +177,69 @@ pool_list_get(int argc, char **argv, zprop_list_t **proplist, zfs_type_t type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Search for any new pools, adding them to the list. We only add pools when no
|
* Refresh the state of all pools on the list. Additionally, if no options were
|
||||||
* options were given on the command line. Otherwise, we keep the list fixed as
|
* given on the command line, add any new pools and remove any that are no
|
||||||
* those that were explicitly specified.
|
* longer available.
|
||||||
*/
|
*/
|
||||||
void
|
int
|
||||||
pool_list_update(zpool_list_t *zlp)
|
pool_list_refresh(zpool_list_t *zlp)
|
||||||
{
|
{
|
||||||
if (zlp->zl_findall)
|
zlp->zl_last_refresh = gethrtime();
|
||||||
(void) zpool_iter(g_zfs, add_pool, zlp);
|
|
||||||
|
if (!zlp->zl_findall) {
|
||||||
|
/*
|
||||||
|
* This list is a fixed list of pools, so we must not add
|
||||||
|
* or remove any. Just walk over them and refresh their
|
||||||
|
* state.
|
||||||
|
*/
|
||||||
|
int navail = 0;
|
||||||
|
for (zpool_node_t *node = uu_avl_first(zlp->zl_avl);
|
||||||
|
node != NULL; node = uu_avl_next(zlp->zl_avl, node)) {
|
||||||
|
boolean_t missing;
|
||||||
|
zpool_refresh_stats(node->zn_handle, &missing);
|
||||||
|
navail += !missing;
|
||||||
|
node->zn_last_refresh = zlp->zl_last_refresh;
|
||||||
|
}
|
||||||
|
return (navail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Search for any new pools and add them to the list. zpool_iter()
|
||||||
|
* will call zpool_refresh_stats() as part of its work, so this has
|
||||||
|
* the side effect of updating all active handles.
|
||||||
|
*/
|
||||||
|
(void) zpool_iter(g_zfs, add_pool_cb, zlp);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Walk the list for any that weren't refreshed, and update and remove
|
||||||
|
* them. It's not enough to just skip available ones, as zpool_iter()
|
||||||
|
* won't update them, so they'll still appear active in our list.
|
||||||
|
*/
|
||||||
|
zpool_node_t *node, *next;
|
||||||
|
for (node = uu_avl_first(zlp->zl_avl); node != NULL; node = next) {
|
||||||
|
next = uu_avl_next(zlp->zl_avl, node);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Skip any that were refreshed and are online; they're already
|
||||||
|
* handled.
|
||||||
|
*/
|
||||||
|
if (node->zn_last_refresh == zlp->zl_last_refresh &&
|
||||||
|
zpool_get_state(node->zn_handle) != POOL_STATE_UNAVAIL)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* Do the refresh ourselves, just in case. */
|
||||||
|
boolean_t missing;
|
||||||
|
zpool_refresh_stats(node->zn_handle, &missing);
|
||||||
|
if (missing) {
|
||||||
|
uu_avl_remove(zlp->zl_avl, node);
|
||||||
|
zpool_close(node->zn_handle);
|
||||||
|
free(node);
|
||||||
|
} else {
|
||||||
|
node->zn_last_refresh = zlp->zl_last_refresh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (uu_avl_numnodes(zlp->zl_avl));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -190,23 +262,6 @@ pool_list_iter(zpool_list_t *zlp, int unavail, zpool_iter_f func,
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Remove the given pool from the list. When running iostat, we want to remove
|
|
||||||
* those pools that no longer exist.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
pool_list_remove(zpool_list_t *zlp, zpool_handle_t *zhp)
|
|
||||||
{
|
|
||||||
zpool_node_t search, *node;
|
|
||||||
|
|
||||||
search.zn_handle = zhp;
|
|
||||||
if ((node = uu_avl_find(zlp->zl_avl, &search, NULL, NULL)) != NULL) {
|
|
||||||
uu_avl_remove(zlp->zl_avl, node);
|
|
||||||
zpool_close(node->zn_handle);
|
|
||||||
free(node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Free all the handles associated with this list.
|
* Free all the handles associated with this list.
|
||||||
*/
|
*/
|
||||||
@ -379,8 +434,8 @@ process_unique_cmd_columns(vdev_cmd_data_list_t *vcdl)
|
|||||||
static int
|
static int
|
||||||
vdev_process_cmd_output(vdev_cmd_data_t *data, char *line)
|
vdev_process_cmd_output(vdev_cmd_data_t *data, char *line)
|
||||||
{
|
{
|
||||||
char *col = NULL;
|
char *col;
|
||||||
char *val = line;
|
char *val;
|
||||||
char *equals;
|
char *equals;
|
||||||
char **tmp;
|
char **tmp;
|
||||||
|
|
||||||
@ -397,6 +452,7 @@ vdev_process_cmd_output(vdev_cmd_data_t *data, char *line)
|
|||||||
col = line;
|
col = line;
|
||||||
val = equals + 1;
|
val = equals + 1;
|
||||||
} else {
|
} else {
|
||||||
|
col = NULL;
|
||||||
val = line;
|
val = line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
* Copyright (c) 2017, Intel Corporation.
|
* Copyright (c) 2017, Intel Corporation.
|
||||||
* Copyright (c) 2019, loli10K <ezomori.nozomu@gmail.com>
|
* Copyright (c) 2019, loli10K <ezomori.nozomu@gmail.com>
|
||||||
* Copyright (c) 2021, Colm Buckley <colm@tuatha.org>
|
* Copyright (c) 2021, Colm Buckley <colm@tuatha.org>
|
||||||
* Copyright (c) 2021, 2023, Klara Inc.
|
* Copyright (c) 2021, 2023, 2025, Klara, Inc.
|
||||||
* Copyright [2021] Hewlett Packard Enterprise Development LP
|
* Copyright (c) 2021, 2025 Hewlett Packard Enterprise Development LP.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -456,7 +456,7 @@ get_usage(zpool_help_t idx)
|
|||||||
"<pool> <vdev> ...\n"));
|
"<pool> <vdev> ...\n"));
|
||||||
case HELP_ATTACH:
|
case HELP_ATTACH:
|
||||||
return (gettext("\tattach [-fsw] [-o property=value] "
|
return (gettext("\tattach [-fsw] [-o property=value] "
|
||||||
"<pool> <device> <new-device>\n"));
|
"<pool> <vdev> <new-device>\n"));
|
||||||
case HELP_CLEAR:
|
case HELP_CLEAR:
|
||||||
return (gettext("\tclear [[--power]|[-nF]] <pool> [device]\n"));
|
return (gettext("\tclear [[--power]|[-nF]] <pool> [device]\n"));
|
||||||
case HELP_CREATE:
|
case HELP_CREATE:
|
||||||
@ -510,16 +510,16 @@ get_usage(zpool_help_t idx)
|
|||||||
case HELP_REOPEN:
|
case HELP_REOPEN:
|
||||||
return (gettext("\treopen [-n] <pool>\n"));
|
return (gettext("\treopen [-n] <pool>\n"));
|
||||||
case HELP_INITIALIZE:
|
case HELP_INITIALIZE:
|
||||||
return (gettext("\tinitialize [-c | -s | -u] [-w] <pool> "
|
return (gettext("\tinitialize [-c | -s | -u] [-w] <-a | <pool> "
|
||||||
"[<device> ...]\n"));
|
"[<device> ...]>\n"));
|
||||||
case HELP_SCRUB:
|
case HELP_SCRUB:
|
||||||
return (gettext("\tscrub [-e | -s | -p | -C] [-w] "
|
return (gettext("\tscrub [-e | -s | -p | -C | -E | -S] [-w] "
|
||||||
"<pool> ...\n"));
|
"<-a | <pool> [<pool> ...]>\n"));
|
||||||
case HELP_RESILVER:
|
case HELP_RESILVER:
|
||||||
return (gettext("\tresilver <pool> ...\n"));
|
return (gettext("\tresilver <pool> ...\n"));
|
||||||
case HELP_TRIM:
|
case HELP_TRIM:
|
||||||
return (gettext("\ttrim [-dw] [-r <rate>] [-c | -s] <pool> "
|
return (gettext("\ttrim [-dw] [-r <rate>] [-c | -s] "
|
||||||
"[<device> ...]\n"));
|
"<-a | <pool> [<device> ...]>\n"));
|
||||||
case HELP_STATUS:
|
case HELP_STATUS:
|
||||||
return (gettext("\tstatus [-DdegiLPpstvx] "
|
return (gettext("\tstatus [-DdegiLPpstvx] "
|
||||||
"[-c script1[,script2,...]] ...\n"
|
"[-c script1[,script2,...]] ...\n"
|
||||||
@ -560,33 +560,6 @@ get_usage(zpool_help_t idx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
zpool_collect_leaves(zpool_handle_t *zhp, nvlist_t *nvroot, nvlist_t *res)
|
|
||||||
{
|
|
||||||
uint_t children = 0;
|
|
||||||
nvlist_t **child;
|
|
||||||
uint_t i;
|
|
||||||
|
|
||||||
(void) nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN,
|
|
||||||
&child, &children);
|
|
||||||
|
|
||||||
if (children == 0) {
|
|
||||||
char *path = zpool_vdev_name(g_zfs, zhp, nvroot,
|
|
||||||
VDEV_NAME_PATH);
|
|
||||||
|
|
||||||
if (strcmp(path, VDEV_TYPE_INDIRECT) != 0 &&
|
|
||||||
strcmp(path, VDEV_TYPE_HOLE) != 0)
|
|
||||||
fnvlist_add_boolean(res, path);
|
|
||||||
|
|
||||||
free(path);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < children; i++) {
|
|
||||||
zpool_collect_leaves(zhp, child[i], res);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Callback routine that will print out a pool property value.
|
* Callback routine that will print out a pool property value.
|
||||||
*/
|
*/
|
||||||
@ -779,10 +752,11 @@ usage(boolean_t requested)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* zpool initialize [-c | -s | -u] [-w] <pool> [<vdev> ...]
|
* zpool initialize [-c | -s | -u] [-w] <-a | pool> [<vdev> ...]
|
||||||
* Initialize all unused blocks in the specified vdevs, or all vdevs in the pool
|
* Initialize all unused blocks in the specified vdevs, or all vdevs in the pool
|
||||||
* if none specified.
|
* if none specified.
|
||||||
*
|
*
|
||||||
|
* -a Use all pools.
|
||||||
* -c Cancel. Ends active initializing.
|
* -c Cancel. Ends active initializing.
|
||||||
* -s Suspend. Initializing can then be restarted with no flags.
|
* -s Suspend. Initializing can then be restarted with no flags.
|
||||||
* -u Uninitialize. Clears initialization state.
|
* -u Uninitialize. Clears initialization state.
|
||||||
@ -794,22 +768,26 @@ zpool_do_initialize(int argc, char **argv)
|
|||||||
int c;
|
int c;
|
||||||
char *poolname;
|
char *poolname;
|
||||||
zpool_handle_t *zhp;
|
zpool_handle_t *zhp;
|
||||||
nvlist_t *vdevs;
|
|
||||||
int err = 0;
|
int err = 0;
|
||||||
boolean_t wait = B_FALSE;
|
boolean_t wait = B_FALSE;
|
||||||
|
boolean_t initialize_all = B_FALSE;
|
||||||
|
|
||||||
struct option long_options[] = {
|
struct option long_options[] = {
|
||||||
{"cancel", no_argument, NULL, 'c'},
|
{"cancel", no_argument, NULL, 'c'},
|
||||||
{"suspend", no_argument, NULL, 's'},
|
{"suspend", no_argument, NULL, 's'},
|
||||||
{"uninit", no_argument, NULL, 'u'},
|
{"uninit", no_argument, NULL, 'u'},
|
||||||
{"wait", no_argument, NULL, 'w'},
|
{"wait", no_argument, NULL, 'w'},
|
||||||
|
{"all", no_argument, NULL, 'a'},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
pool_initialize_func_t cmd_type = POOL_INITIALIZE_START;
|
pool_initialize_func_t cmd_type = POOL_INITIALIZE_START;
|
||||||
while ((c = getopt_long(argc, argv, "csuw", long_options,
|
while ((c = getopt_long(argc, argv, "acsuw", long_options,
|
||||||
NULL)) != -1) {
|
NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
case 'a':
|
||||||
|
initialize_all = B_TRUE;
|
||||||
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
if (cmd_type != POOL_INITIALIZE_START &&
|
if (cmd_type != POOL_INITIALIZE_START &&
|
||||||
cmd_type != POOL_INITIALIZE_CANCEL) {
|
cmd_type != POOL_INITIALIZE_CANCEL) {
|
||||||
@ -856,7 +834,18 @@ zpool_do_initialize(int argc, char **argv)
|
|||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
if (argc < 1) {
|
initialize_cbdata_t cbdata = {
|
||||||
|
.wait = wait,
|
||||||
|
.cmd_type = cmd_type
|
||||||
|
};
|
||||||
|
|
||||||
|
if (initialize_all && argc > 0) {
|
||||||
|
(void) fprintf(stderr, gettext("-a cannot be combined with "
|
||||||
|
"individual pools or vdevs\n"));
|
||||||
|
usage(B_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argc < 1 && !initialize_all) {
|
||||||
(void) fprintf(stderr, gettext("missing pool name argument\n"));
|
(void) fprintf(stderr, gettext("missing pool name argument\n"));
|
||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
return (-1);
|
return (-1);
|
||||||
@ -868,30 +857,35 @@ zpool_do_initialize(int argc, char **argv)
|
|||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argc == 0 && initialize_all) {
|
||||||
|
/* Initilize each pool recursively */
|
||||||
|
err = for_each_pool(argc, argv, B_TRUE, NULL, ZFS_TYPE_POOL,
|
||||||
|
B_FALSE, zpool_initialize_one, &cbdata);
|
||||||
|
return (err);
|
||||||
|
} else if (argc == 1) {
|
||||||
|
/* no individual leaf vdevs specified, initialize the pool */
|
||||||
poolname = argv[0];
|
poolname = argv[0];
|
||||||
zhp = zpool_open(g_zfs, poolname);
|
zhp = zpool_open(g_zfs, poolname);
|
||||||
if (zhp == NULL)
|
if (zhp == NULL)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
err = zpool_initialize_one(zhp, &cbdata);
|
||||||
vdevs = fnvlist_alloc();
|
|
||||||
if (argc == 1) {
|
|
||||||
/* no individual leaf vdevs specified, so add them all */
|
|
||||||
nvlist_t *config = zpool_get_config(zhp, NULL);
|
|
||||||
nvlist_t *nvroot = fnvlist_lookup_nvlist(config,
|
|
||||||
ZPOOL_CONFIG_VDEV_TREE);
|
|
||||||
zpool_collect_leaves(zhp, nvroot, vdevs);
|
|
||||||
} else {
|
} else {
|
||||||
|
/* individual leaf vdevs specified, initialize them */
|
||||||
|
poolname = argv[0];
|
||||||
|
zhp = zpool_open(g_zfs, poolname);
|
||||||
|
if (zhp == NULL)
|
||||||
|
return (-1);
|
||||||
|
nvlist_t *vdevs = fnvlist_alloc();
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
fnvlist_add_boolean(vdevs, argv[i]);
|
fnvlist_add_boolean(vdevs, argv[i]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (wait)
|
if (wait)
|
||||||
err = zpool_initialize_wait(zhp, cmd_type, vdevs);
|
err = zpool_initialize_wait(zhp, cmd_type, vdevs);
|
||||||
else
|
else
|
||||||
err = zpool_initialize(zhp, cmd_type, vdevs);
|
err = zpool_initialize(zhp, cmd_type, vdevs);
|
||||||
|
|
||||||
fnvlist_free(vdevs);
|
fnvlist_free(vdevs);
|
||||||
|
}
|
||||||
|
|
||||||
zpool_close(zhp);
|
zpool_close(zhp);
|
||||||
|
|
||||||
return (err);
|
return (err);
|
||||||
@ -1788,7 +1782,7 @@ zpool_do_labelclear(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
char vdev[MAXPATHLEN];
|
char vdev[MAXPATHLEN];
|
||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
int c, fd = -1, ret = 0;
|
int c, fd, ret = 0;
|
||||||
nvlist_t *config;
|
nvlist_t *config;
|
||||||
pool_state_t state;
|
pool_state_t state;
|
||||||
boolean_t inuse = B_FALSE;
|
boolean_t inuse = B_FALSE;
|
||||||
@ -5767,24 +5761,6 @@ children:
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
refresh_iostat(zpool_handle_t *zhp, void *data)
|
|
||||||
{
|
|
||||||
iostat_cbdata_t *cb = data;
|
|
||||||
boolean_t missing;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If the pool has disappeared, remove it from the list and continue.
|
|
||||||
*/
|
|
||||||
if (zpool_refresh_stats(zhp, &missing) != 0)
|
|
||||||
return (-1);
|
|
||||||
|
|
||||||
if (missing)
|
|
||||||
pool_list_remove(cb->cb_list, zhp);
|
|
||||||
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Callback to print out the iostats for the given pool.
|
* Callback to print out the iostats for the given pool.
|
||||||
*/
|
*/
|
||||||
@ -6157,7 +6133,6 @@ static void
|
|||||||
get_interval_count_filter_guids(int *argc, char **argv, float *interval,
|
get_interval_count_filter_guids(int *argc, char **argv, float *interval,
|
||||||
unsigned long *count, iostat_cbdata_t *cb)
|
unsigned long *count, iostat_cbdata_t *cb)
|
||||||
{
|
{
|
||||||
char **tmpargv = argv;
|
|
||||||
int argc_for_interval = 0;
|
int argc_for_interval = 0;
|
||||||
|
|
||||||
/* Is the last arg an interval value? Or a guid? */
|
/* Is the last arg an interval value? Or a guid? */
|
||||||
@ -6181,7 +6156,7 @@ get_interval_count_filter_guids(int *argc, char **argv, float *interval,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Point to our list of possible intervals */
|
/* Point to our list of possible intervals */
|
||||||
tmpargv = &argv[*argc - argc_for_interval];
|
char **tmpargv = &argv[*argc - argc_for_interval];
|
||||||
|
|
||||||
*argc = *argc - argc_for_interval;
|
*argc = *argc - argc_for_interval;
|
||||||
get_interval_count(&argc_for_interval, tmpargv,
|
get_interval_count(&argc_for_interval, tmpargv,
|
||||||
@ -6366,18 +6341,16 @@ get_namewidth_iostat(zpool_handle_t *zhp, void *data)
|
|||||||
* This command can be tricky because we want to be able to deal with pool
|
* This command can be tricky because we want to be able to deal with pool
|
||||||
* creation/destruction as well as vdev configuration changes. The bulk of this
|
* creation/destruction as well as vdev configuration changes. The bulk of this
|
||||||
* processing is handled by the pool_list_* routines in zpool_iter.c. We rely
|
* processing is handled by the pool_list_* routines in zpool_iter.c. We rely
|
||||||
* on pool_list_update() to detect the addition of new pools. Configuration
|
* on pool_list_refresh() to detect the addition and removal of pools.
|
||||||
* changes are all handled within libzfs.
|
* Configuration changes are all handled within libzfs.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
zpool_do_iostat(int argc, char **argv)
|
zpool_do_iostat(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
int ret;
|
int ret;
|
||||||
int npools;
|
|
||||||
float interval = 0;
|
float interval = 0;
|
||||||
unsigned long count = 0;
|
unsigned long count = 0;
|
||||||
int winheight = 24;
|
|
||||||
zpool_list_t *list;
|
zpool_list_t *list;
|
||||||
boolean_t verbose = B_FALSE;
|
boolean_t verbose = B_FALSE;
|
||||||
boolean_t latency = B_FALSE, l_histo = B_FALSE, rq_histo = B_FALSE;
|
boolean_t latency = B_FALSE, l_histo = B_FALSE, rq_histo = B_FALSE;
|
||||||
@ -6626,10 +6599,24 @@ zpool_do_iostat(int argc, char **argv)
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int last_npools = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if ((npools = pool_list_count(list)) == 0)
|
/*
|
||||||
|
* Refresh all pools in list, adding or removing pools as
|
||||||
|
* necessary.
|
||||||
|
*/
|
||||||
|
int npools = pool_list_refresh(list);
|
||||||
|
if (npools == 0) {
|
||||||
(void) fprintf(stderr, gettext("no pools available\n"));
|
(void) fprintf(stderr, gettext("no pools available\n"));
|
||||||
else {
|
} else {
|
||||||
|
/*
|
||||||
|
* If the list of pools has changed since last time
|
||||||
|
* around, reset the iteration count to force the
|
||||||
|
* header to be redisplayed.
|
||||||
|
*/
|
||||||
|
if (last_npools != npools)
|
||||||
|
cb.cb_iteration = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this is the first iteration and -y was supplied
|
* If this is the first iteration and -y was supplied
|
||||||
* we skip any printing.
|
* we skip any printing.
|
||||||
@ -6637,15 +6624,6 @@ zpool_do_iostat(int argc, char **argv)
|
|||||||
boolean_t skip = (omit_since_boot &&
|
boolean_t skip = (omit_since_boot &&
|
||||||
cb.cb_iteration == 0);
|
cb.cb_iteration == 0);
|
||||||
|
|
||||||
/*
|
|
||||||
* Refresh all statistics. This is done as an
|
|
||||||
* explicit step before calculating the maximum name
|
|
||||||
* width, so that any * configuration changes are
|
|
||||||
* properly accounted for.
|
|
||||||
*/
|
|
||||||
(void) pool_list_iter(list, B_FALSE, refresh_iostat,
|
|
||||||
&cb);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Iterate over all pools to determine the maximum width
|
* Iterate over all pools to determine the maximum width
|
||||||
* for the pool / device name column across all pools.
|
* for the pool / device name column across all pools.
|
||||||
@ -6673,7 +6651,7 @@ zpool_do_iostat(int argc, char **argv)
|
|||||||
* even when terminal window has its height
|
* even when terminal window has its height
|
||||||
* changed.
|
* changed.
|
||||||
*/
|
*/
|
||||||
winheight = terminal_height();
|
int winheight = terminal_height();
|
||||||
/*
|
/*
|
||||||
* Are we connected to TTY? If not, headers_once
|
* Are we connected to TTY? If not, headers_once
|
||||||
* should be true, to avoid breaking scripts.
|
* should be true, to avoid breaking scripts.
|
||||||
@ -6736,6 +6714,8 @@ zpool_do_iostat(int argc, char **argv)
|
|||||||
|
|
||||||
(void) fflush(stdout);
|
(void) fflush(stdout);
|
||||||
(void) fsleep(interval);
|
(void) fsleep(interval);
|
||||||
|
|
||||||
|
last_npools = npools;
|
||||||
}
|
}
|
||||||
|
|
||||||
pool_list_free(list);
|
pool_list_free(list);
|
||||||
@ -7652,7 +7632,7 @@ zpool_do_replace(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* zpool attach [-fsw] [-o property=value] <pool> <device>|<vdev> <new_device>
|
* zpool attach [-fsw] [-o property=value] <pool> <vdev> <new_device>
|
||||||
*
|
*
|
||||||
* -f Force attach, even if <new_device> appears to be in use.
|
* -f Force attach, even if <new_device> appears to be in use.
|
||||||
* -s Use sequential instead of healing reconstruction for resilver.
|
* -s Use sequential instead of healing reconstruction for resilver.
|
||||||
@ -7660,9 +7640,9 @@ zpool_do_replace(int argc, char **argv)
|
|||||||
* -w Wait for resilvering (mirror) or expansion (raidz) to complete
|
* -w Wait for resilvering (mirror) or expansion (raidz) to complete
|
||||||
* before returning.
|
* before returning.
|
||||||
*
|
*
|
||||||
* Attach <new_device> to a <device> or <vdev>, where the vdev can be of type
|
* Attach <new_device> to a <vdev>, where the vdev can be of type
|
||||||
* mirror or raidz. If <device> is not part of a mirror, then <device> will
|
* device, mirror or raidz. If <vdev> is not part of a mirror, then <vdev> will
|
||||||
* be transformed into a mirror of <device> and <new_device>. When a mirror
|
* be transformed into a mirror of <vdev> and <new_device>. When a mirror
|
||||||
* is involved, <new_device> will begin life with a DTL of [0, now], and will
|
* is involved, <new_device> will begin life with a DTL of [0, now], and will
|
||||||
* immediately begin to resilver itself. For the raidz case, a expansion will
|
* immediately begin to resilver itself. For the raidz case, a expansion will
|
||||||
* commence and reflow the raidz data across all the disks including the
|
* commence and reflow the raidz data across all the disks including the
|
||||||
@ -8368,6 +8348,8 @@ zpool_do_reopen(int argc, char **argv)
|
|||||||
typedef struct scrub_cbdata {
|
typedef struct scrub_cbdata {
|
||||||
int cb_type;
|
int cb_type;
|
||||||
pool_scrub_cmd_t cb_scrub_cmd;
|
pool_scrub_cmd_t cb_scrub_cmd;
|
||||||
|
time_t cb_date_start;
|
||||||
|
time_t cb_date_end;
|
||||||
} scrub_cbdata_t;
|
} scrub_cbdata_t;
|
||||||
|
|
||||||
static boolean_t
|
static boolean_t
|
||||||
@ -8411,8 +8393,8 @@ scrub_callback(zpool_handle_t *zhp, void *data)
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
err = zpool_scan(zhp, cb->cb_type, cb->cb_scrub_cmd);
|
err = zpool_scan_range(zhp, cb->cb_type, cb->cb_scrub_cmd,
|
||||||
|
cb->cb_date_start, cb->cb_date_end);
|
||||||
if (err == 0 && zpool_has_checkpoint(zhp) &&
|
if (err == 0 && zpool_has_checkpoint(zhp) &&
|
||||||
cb->cb_type == POOL_SCAN_SCRUB) {
|
cb->cb_type == POOL_SCAN_SCRUB) {
|
||||||
(void) printf(gettext("warning: will not scrub state that "
|
(void) printf(gettext("warning: will not scrub state that "
|
||||||
@ -8430,10 +8412,35 @@ wait_callback(zpool_handle_t *zhp, void *data)
|
|||||||
return (zpool_wait(zhp, *act));
|
return (zpool_wait(zhp, *act));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static time_t
|
||||||
|
date_string_to_sec(const char *timestr, boolean_t rounding)
|
||||||
|
{
|
||||||
|
struct tm tm = {0};
|
||||||
|
int adjustment = rounding ? 1 : 0;
|
||||||
|
|
||||||
|
/* Allow mktime to determine timezone. */
|
||||||
|
tm.tm_isdst = -1;
|
||||||
|
|
||||||
|
if (strptime(timestr, "%Y-%m-%d %H:%M", &tm) == NULL) {
|
||||||
|
if (strptime(timestr, "%Y-%m-%d", &tm) == NULL) {
|
||||||
|
fprintf(stderr, gettext("Failed to parse the date.\n"));
|
||||||
|
usage(B_FALSE);
|
||||||
|
}
|
||||||
|
adjustment *= 24 * 60 * 60;
|
||||||
|
} else {
|
||||||
|
adjustment *= 60;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (mktime(&tm) + adjustment);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* zpool scrub [-e | -s | -p | -C] [-w] <pool> ...
|
* zpool scrub [-e | -s | -p | -C | -E | -S] [-w] [-a | <pool> ...]
|
||||||
*
|
*
|
||||||
|
* -a Scrub all pools.
|
||||||
* -e Only scrub blocks in the error log.
|
* -e Only scrub blocks in the error log.
|
||||||
|
* -E End date of scrub.
|
||||||
|
* -S Start date of scrub.
|
||||||
* -s Stop. Stops any in-progress scrub.
|
* -s Stop. Stops any in-progress scrub.
|
||||||
* -p Pause. Pause in-progress scrub.
|
* -p Pause. Pause in-progress scrub.
|
||||||
* -w Wait. Blocks until scrub has completed.
|
* -w Wait. Blocks until scrub has completed.
|
||||||
@ -8449,21 +8456,36 @@ zpool_do_scrub(int argc, char **argv)
|
|||||||
|
|
||||||
cb.cb_type = POOL_SCAN_SCRUB;
|
cb.cb_type = POOL_SCAN_SCRUB;
|
||||||
cb.cb_scrub_cmd = POOL_SCRUB_NORMAL;
|
cb.cb_scrub_cmd = POOL_SCRUB_NORMAL;
|
||||||
|
cb.cb_date_start = cb.cb_date_end = 0;
|
||||||
|
|
||||||
boolean_t is_error_scrub = B_FALSE;
|
boolean_t is_error_scrub = B_FALSE;
|
||||||
boolean_t is_pause = B_FALSE;
|
boolean_t is_pause = B_FALSE;
|
||||||
boolean_t is_stop = B_FALSE;
|
boolean_t is_stop = B_FALSE;
|
||||||
boolean_t is_txg_continue = B_FALSE;
|
boolean_t is_txg_continue = B_FALSE;
|
||||||
|
boolean_t scrub_all = B_FALSE;
|
||||||
|
|
||||||
/* check options */
|
/* check options */
|
||||||
while ((c = getopt(argc, argv, "spweC")) != -1) {
|
while ((c = getopt(argc, argv, "aspweCE:S:")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
case 'a':
|
||||||
|
scrub_all = B_TRUE;
|
||||||
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
is_error_scrub = B_TRUE;
|
is_error_scrub = B_TRUE;
|
||||||
break;
|
break;
|
||||||
|
case 'E':
|
||||||
|
/*
|
||||||
|
* Round the date. It's better to scrub more data than
|
||||||
|
* less. This also makes the date inclusive.
|
||||||
|
*/
|
||||||
|
cb.cb_date_end = date_string_to_sec(optarg, B_TRUE);
|
||||||
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
is_stop = B_TRUE;
|
is_stop = B_TRUE;
|
||||||
break;
|
break;
|
||||||
|
case 'S':
|
||||||
|
cb.cb_date_start = date_string_to_sec(optarg, B_FALSE);
|
||||||
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
is_pause = B_TRUE;
|
is_pause = B_TRUE;
|
||||||
break;
|
break;
|
||||||
@ -8511,6 +8533,19 @@ zpool_do_scrub(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((cb.cb_date_start != 0 || cb.cb_date_end != 0) &&
|
||||||
|
cb.cb_scrub_cmd != POOL_SCRUB_NORMAL) {
|
||||||
|
(void) fprintf(stderr, gettext("invalid option combination: "
|
||||||
|
"start/end date is available only with normal scrub\n"));
|
||||||
|
usage(B_FALSE);
|
||||||
|
}
|
||||||
|
if (cb.cb_date_start != 0 && cb.cb_date_end != 0 &&
|
||||||
|
cb.cb_date_start > cb.cb_date_end) {
|
||||||
|
(void) fprintf(stderr, gettext("invalid arguments: "
|
||||||
|
"end date has to be later than start date\n"));
|
||||||
|
usage(B_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
if (wait && (cb.cb_type == POOL_SCAN_NONE ||
|
if (wait && (cb.cb_type == POOL_SCAN_NONE ||
|
||||||
cb.cb_scrub_cmd == POOL_SCRUB_PAUSE)) {
|
cb.cb_scrub_cmd == POOL_SCRUB_PAUSE)) {
|
||||||
(void) fprintf(stderr, gettext("invalid option combination: "
|
(void) fprintf(stderr, gettext("invalid option combination: "
|
||||||
@ -8521,7 +8556,7 @@ zpool_do_scrub(int argc, char **argv)
|
|||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
if (argc < 1) {
|
if (argc < 1 && !scrub_all) {
|
||||||
(void) fprintf(stderr, gettext("missing pool name argument\n"));
|
(void) fprintf(stderr, gettext("missing pool name argument\n"));
|
||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
}
|
}
|
||||||
@ -8551,6 +8586,7 @@ zpool_do_resilver(int argc, char **argv)
|
|||||||
|
|
||||||
cb.cb_type = POOL_SCAN_RESILVER;
|
cb.cb_type = POOL_SCAN_RESILVER;
|
||||||
cb.cb_scrub_cmd = POOL_SCRUB_NORMAL;
|
cb.cb_scrub_cmd = POOL_SCRUB_NORMAL;
|
||||||
|
cb.cb_date_start = cb.cb_date_end = 0;
|
||||||
|
|
||||||
/* check options */
|
/* check options */
|
||||||
while ((c = getopt(argc, argv, "")) != -1) {
|
while ((c = getopt(argc, argv, "")) != -1) {
|
||||||
@ -8575,8 +8611,9 @@ zpool_do_resilver(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* zpool trim [-d] [-r <rate>] [-c | -s] <pool> [<device> ...]
|
* zpool trim [-d] [-r <rate>] [-c | -s] <-a | pool> [<device> ...]
|
||||||
*
|
*
|
||||||
|
* -a Trim all pools.
|
||||||
* -c Cancel. Ends any in-progress trim.
|
* -c Cancel. Ends any in-progress trim.
|
||||||
* -d Secure trim. Requires kernel and device support.
|
* -d Secure trim. Requires kernel and device support.
|
||||||
* -r <rate> Sets the TRIM rate in bytes (per second). Supports
|
* -r <rate> Sets the TRIM rate in bytes (per second). Supports
|
||||||
@ -8593,6 +8630,7 @@ zpool_do_trim(int argc, char **argv)
|
|||||||
{"rate", required_argument, NULL, 'r'},
|
{"rate", required_argument, NULL, 'r'},
|
||||||
{"suspend", no_argument, NULL, 's'},
|
{"suspend", no_argument, NULL, 's'},
|
||||||
{"wait", no_argument, NULL, 'w'},
|
{"wait", no_argument, NULL, 'w'},
|
||||||
|
{"all", no_argument, NULL, 'a'},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -8600,11 +8638,16 @@ zpool_do_trim(int argc, char **argv)
|
|||||||
uint64_t rate = 0;
|
uint64_t rate = 0;
|
||||||
boolean_t secure = B_FALSE;
|
boolean_t secure = B_FALSE;
|
||||||
boolean_t wait = B_FALSE;
|
boolean_t wait = B_FALSE;
|
||||||
|
boolean_t trimall = B_FALSE;
|
||||||
|
int error;
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
while ((c = getopt_long(argc, argv, "cdr:sw", long_options, NULL))
|
while ((c = getopt_long(argc, argv, "acdr:sw", long_options, NULL))
|
||||||
!= -1) {
|
!= -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
case 'a':
|
||||||
|
trimall = B_TRUE;
|
||||||
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
if (cmd_type != POOL_TRIM_START &&
|
if (cmd_type != POOL_TRIM_START &&
|
||||||
cmd_type != POOL_TRIM_CANCEL) {
|
cmd_type != POOL_TRIM_CANCEL) {
|
||||||
@ -8663,7 +8706,18 @@ zpool_do_trim(int argc, char **argv)
|
|||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
if (argc < 1) {
|
trimflags_t trim_flags = {
|
||||||
|
.secure = secure,
|
||||||
|
.rate = rate,
|
||||||
|
.wait = wait,
|
||||||
|
};
|
||||||
|
|
||||||
|
trim_cbdata_t cbdata = {
|
||||||
|
.trim_flags = trim_flags,
|
||||||
|
.cmd_type = cmd_type
|
||||||
|
};
|
||||||
|
|
||||||
|
if (argc < 1 && !trimall) {
|
||||||
(void) fprintf(stderr, gettext("missing pool name argument\n"));
|
(void) fprintf(stderr, gettext("missing pool name argument\n"));
|
||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
return (-1);
|
return (-1);
|
||||||
@ -8671,40 +8725,45 @@ zpool_do_trim(int argc, char **argv)
|
|||||||
|
|
||||||
if (wait && (cmd_type != POOL_TRIM_START)) {
|
if (wait && (cmd_type != POOL_TRIM_START)) {
|
||||||
(void) fprintf(stderr, gettext("-w cannot be used with -c or "
|
(void) fprintf(stderr, gettext("-w cannot be used with -c or "
|
||||||
"-s\n"));
|
"-s options\n"));
|
||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (trimall && argc > 0) {
|
||||||
|
(void) fprintf(stderr, gettext("-a cannot be combined with "
|
||||||
|
"individual zpools or vdevs\n"));
|
||||||
|
usage(B_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argc == 0 && trimall) {
|
||||||
|
cbdata.trim_flags.fullpool = B_TRUE;
|
||||||
|
/* Trim each pool recursively */
|
||||||
|
error = for_each_pool(argc, argv, B_TRUE, NULL, ZFS_TYPE_POOL,
|
||||||
|
B_FALSE, zpool_trim_one, &cbdata);
|
||||||
|
} else if (argc == 1) {
|
||||||
char *poolname = argv[0];
|
char *poolname = argv[0];
|
||||||
zpool_handle_t *zhp = zpool_open(g_zfs, poolname);
|
zpool_handle_t *zhp = zpool_open(g_zfs, poolname);
|
||||||
if (zhp == NULL)
|
if (zhp == NULL)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
trimflags_t trim_flags = {
|
|
||||||
.secure = secure,
|
|
||||||
.rate = rate,
|
|
||||||
.wait = wait,
|
|
||||||
};
|
|
||||||
|
|
||||||
nvlist_t *vdevs = fnvlist_alloc();
|
|
||||||
if (argc == 1) {
|
|
||||||
/* no individual leaf vdevs specified, so add them all */
|
/* no individual leaf vdevs specified, so add them all */
|
||||||
nvlist_t *config = zpool_get_config(zhp, NULL);
|
error = zpool_trim_one(zhp, &cbdata);
|
||||||
nvlist_t *nvroot = fnvlist_lookup_nvlist(config,
|
zpool_close(zhp);
|
||||||
ZPOOL_CONFIG_VDEV_TREE);
|
|
||||||
zpool_collect_leaves(zhp, nvroot, vdevs);
|
|
||||||
trim_flags.fullpool = B_TRUE;
|
|
||||||
} else {
|
} else {
|
||||||
trim_flags.fullpool = B_FALSE;
|
char *poolname = argv[0];
|
||||||
|
zpool_handle_t *zhp = zpool_open(g_zfs, poolname);
|
||||||
|
if (zhp == NULL)
|
||||||
|
return (-1);
|
||||||
|
/* leaf vdevs specified, trim only those */
|
||||||
|
cbdata.trim_flags.fullpool = B_FALSE;
|
||||||
|
nvlist_t *vdevs = fnvlist_alloc();
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
fnvlist_add_boolean(vdevs, argv[i]);
|
fnvlist_add_boolean(vdevs, argv[i]);
|
||||||
}
|
}
|
||||||
}
|
error = zpool_trim(zhp, cbdata.cmd_type, vdevs,
|
||||||
|
&cbdata.trim_flags);
|
||||||
int error = zpool_trim(zhp, cmd_type, vdevs, &trim_flags);
|
|
||||||
|
|
||||||
fnvlist_free(vdevs);
|
fnvlist_free(vdevs);
|
||||||
zpool_close(zhp);
|
zpool_close(zhp);
|
||||||
|
}
|
||||||
|
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
@ -10706,7 +10765,6 @@ status_callback_json(zpool_handle_t *zhp, void *data)
|
|||||||
uint_t c;
|
uint_t c;
|
||||||
vdev_stat_t *vs;
|
vdev_stat_t *vs;
|
||||||
nvlist_t *item, *d, *load_info, *vds;
|
nvlist_t *item, *d, *load_info, *vds;
|
||||||
item = d = NULL;
|
|
||||||
|
|
||||||
/* If dedup stats were requested, also fetch dedupcached. */
|
/* If dedup stats were requested, also fetch dedupcached. */
|
||||||
if (cbp->cb_dedup_stats > 1)
|
if (cbp->cb_dedup_stats > 1)
|
||||||
@ -11330,7 +11388,8 @@ upgrade_enable_all(zpool_handle_t *zhp, int *countp)
|
|||||||
const char *fname = spa_feature_table[i].fi_uname;
|
const char *fname = spa_feature_table[i].fi_uname;
|
||||||
const char *fguid = spa_feature_table[i].fi_guid;
|
const char *fguid = spa_feature_table[i].fi_guid;
|
||||||
|
|
||||||
if (!spa_feature_table[i].fi_zfs_mod_supported)
|
if (!spa_feature_table[i].fi_zfs_mod_supported ||
|
||||||
|
(spa_feature_table[i].fi_flags & ZFEATURE_FLAG_NO_UPGRADE))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!nvlist_exists(enabled, fguid) && requested_features[i]) {
|
if (!nvlist_exists(enabled, fguid) && requested_features[i]) {
|
||||||
@ -11485,7 +11544,11 @@ upgrade_list_disabled_cb(zpool_handle_t *zhp, void *arg)
|
|||||||
"Note that the pool "
|
"Note that the pool "
|
||||||
"'compatibility' feature can be "
|
"'compatibility' feature can be "
|
||||||
"used to inhibit\nfeature "
|
"used to inhibit\nfeature "
|
||||||
"upgrades.\n\n"));
|
"upgrades.\n\n"
|
||||||
|
"Features marked with (*) are not "
|
||||||
|
"applied automatically on upgrade, "
|
||||||
|
"and\nmust be applied explicitly "
|
||||||
|
"with zpool-set(7).\n\n"));
|
||||||
(void) printf(gettext("POOL "
|
(void) printf(gettext("POOL "
|
||||||
"FEATURE\n"));
|
"FEATURE\n"));
|
||||||
(void) printf(gettext("------"
|
(void) printf(gettext("------"
|
||||||
@ -11499,7 +11562,9 @@ upgrade_list_disabled_cb(zpool_handle_t *zhp, void *arg)
|
|||||||
poolfirst = B_FALSE;
|
poolfirst = B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) printf(gettext(" %s\n"), fname);
|
(void) printf(gettext(" %s%s\n"), fname,
|
||||||
|
spa_feature_table[i].fi_flags &
|
||||||
|
ZFEATURE_FLAG_NO_UPGRADE ? "(*)" : "");
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* If they did "zpool upgrade -a", then we could
|
* If they did "zpool upgrade -a", then we could
|
||||||
@ -12069,6 +12134,11 @@ zpool_do_events_nvprint(nvlist_t *nvl, int depth)
|
|||||||
zfs_valstr_zio_stage(i32, flagstr,
|
zfs_valstr_zio_stage(i32, flagstr,
|
||||||
sizeof (flagstr));
|
sizeof (flagstr));
|
||||||
printf(gettext("0x%x [%s]"), i32, flagstr);
|
printf(gettext("0x%x [%s]"), i32, flagstr);
|
||||||
|
} else if (strcmp(name,
|
||||||
|
FM_EREPORT_PAYLOAD_ZFS_ZIO_TYPE) == 0) {
|
||||||
|
zfs_valstr_zio_type(i32, flagstr,
|
||||||
|
sizeof (flagstr));
|
||||||
|
printf(gettext("0x%x [%s]"), i32, flagstr);
|
||||||
} else if (strcmp(name,
|
} else if (strcmp(name,
|
||||||
FM_EREPORT_PAYLOAD_ZFS_ZIO_PRIORITY) == 0) {
|
FM_EREPORT_PAYLOAD_ZFS_ZIO_PRIORITY) == 0) {
|
||||||
zfs_valstr_zio_priority(i32, flagstr,
|
zfs_valstr_zio_priority(i32, flagstr,
|
||||||
@ -12295,7 +12365,7 @@ zpool_do_events_next(ev_opts_t *opts)
|
|||||||
nvlist_free(nvl);
|
nvlist_free(nvl);
|
||||||
}
|
}
|
||||||
|
|
||||||
VERIFY(0 == close(zevent_fd));
|
VERIFY0(close(zevent_fd));
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
@ -76,11 +76,10 @@ typedef struct zpool_list zpool_list_t;
|
|||||||
|
|
||||||
zpool_list_t *pool_list_get(int, char **, zprop_list_t **, zfs_type_t,
|
zpool_list_t *pool_list_get(int, char **, zprop_list_t **, zfs_type_t,
|
||||||
boolean_t, int *);
|
boolean_t, int *);
|
||||||
void pool_list_update(zpool_list_t *);
|
int pool_list_refresh(zpool_list_t *);
|
||||||
int pool_list_iter(zpool_list_t *, int unavail, zpool_iter_f, void *);
|
int pool_list_iter(zpool_list_t *, int unavail, zpool_iter_f, void *);
|
||||||
void pool_list_free(zpool_list_t *);
|
void pool_list_free(zpool_list_t *);
|
||||||
int pool_list_count(zpool_list_t *);
|
int pool_list_count(zpool_list_t *);
|
||||||
void pool_list_remove(zpool_list_t *, zpool_handle_t *);
|
|
||||||
|
|
||||||
extern libzfs_handle_t *g_zfs;
|
extern libzfs_handle_t *g_zfs;
|
||||||
|
|
||||||
|
@ -574,7 +574,6 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
|
|||||||
nvlist_t *cnv = child[c];
|
nvlist_t *cnv = child[c];
|
||||||
const char *path;
|
const char *path;
|
||||||
struct stat64 statbuf;
|
struct stat64 statbuf;
|
||||||
int64_t size = -1LL;
|
|
||||||
const char *childtype;
|
const char *childtype;
|
||||||
int fd, err;
|
int fd, err;
|
||||||
|
|
||||||
@ -610,22 +609,28 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
|
|||||||
ZPOOL_CONFIG_PATH, &path) == 0);
|
ZPOOL_CONFIG_PATH, &path) == 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we have a raidz/mirror that combines disks
|
* Skip active spares they should never cause
|
||||||
* with files, report it as an error.
|
* the pool to be evaluated as inconsistent.
|
||||||
*/
|
*/
|
||||||
if (!dontreport && type != NULL &&
|
if (is_spare(NULL, path))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we have a raidz/mirror that combines disks
|
||||||
|
* with files, only report it as an error when
|
||||||
|
* fatal is set to ensure all the replication
|
||||||
|
* checks aren't skipped in check_replication().
|
||||||
|
*/
|
||||||
|
if (fatal && !dontreport && type != NULL &&
|
||||||
strcmp(type, childtype) != 0) {
|
strcmp(type, childtype) != 0) {
|
||||||
if (ret != NULL)
|
if (ret != NULL)
|
||||||
free(ret);
|
free(ret);
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
if (fatal)
|
|
||||||
vdev_error(gettext(
|
vdev_error(gettext(
|
||||||
"mismatched replication "
|
"mismatched replication "
|
||||||
"level: %s contains both "
|
"level: %s contains both "
|
||||||
"files and devices\n"),
|
"files and devices\n"),
|
||||||
rep.zprl_type);
|
rep.zprl_type);
|
||||||
else
|
|
||||||
return (NULL);
|
|
||||||
dontreport = B_TRUE;
|
dontreport = B_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -656,7 +661,7 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
|
|||||||
statbuf.st_size == MAXOFFSET_T)
|
statbuf.st_size == MAXOFFSET_T)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
size = statbuf.st_size;
|
int64_t size = statbuf.st_size;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Also make sure that devices and
|
* Also make sure that devices and
|
||||||
@ -876,6 +881,18 @@ check_replication(nvlist_t *config, nvlist_t *newroot)
|
|||||||
(u_longlong_t)mirror->zprl_children);
|
(u_longlong_t)mirror->zprl_children);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
|
} else if (is_raidz_draid(current, new)) {
|
||||||
|
if (current->zprl_parity != new->zprl_parity) {
|
||||||
|
vdev_error(gettext(
|
||||||
|
"mismatched replication level: pool and "
|
||||||
|
"new vdev with different redundancy, %s "
|
||||||
|
"and %s vdevs, %llu vs. %llu\n"),
|
||||||
|
current->zprl_type,
|
||||||
|
new->zprl_type,
|
||||||
|
(u_longlong_t)current->zprl_parity,
|
||||||
|
(u_longlong_t)new->zprl_parity);
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
} else if (strcmp(current->zprl_type, new->zprl_type) != 0) {
|
} else if (strcmp(current->zprl_type, new->zprl_type) != 0) {
|
||||||
vdev_error(gettext(
|
vdev_error(gettext(
|
||||||
"mismatched replication level: pool uses %s "
|
"mismatched replication level: pool uses %s "
|
||||||
@ -1353,7 +1370,7 @@ is_grouping(const char *type, int *mindev, int *maxdev)
|
|||||||
static int
|
static int
|
||||||
draid_config_by_type(nvlist_t *nv, const char *type, uint64_t children)
|
draid_config_by_type(nvlist_t *nv, const char *type, uint64_t children)
|
||||||
{
|
{
|
||||||
uint64_t nparity = 1;
|
uint64_t nparity;
|
||||||
uint64_t nspares = 0;
|
uint64_t nspares = 0;
|
||||||
uint64_t ndata = UINT64_MAX;
|
uint64_t ndata = UINT64_MAX;
|
||||||
uint64_t ngroups = 1;
|
uint64_t ngroups = 1;
|
||||||
@ -1581,13 +1598,12 @@ construct_spec(nvlist_t *props, int argc, char **argv)
|
|||||||
is_dedup = is_spare = B_FALSE;
|
is_dedup = is_spare = B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_log || is_special || is_dedup) {
|
if (is_log) {
|
||||||
if (strcmp(type, VDEV_TYPE_MIRROR) != 0) {
|
if (strcmp(type, VDEV_TYPE_MIRROR) != 0) {
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
gettext("invalid vdev "
|
gettext("invalid vdev "
|
||||||
"specification: unsupported '%s' "
|
"specification: unsupported 'log' "
|
||||||
"device: %s\n"), is_log ? "log" :
|
"device: %s\n"), type);
|
||||||
"special", type);
|
|
||||||
goto spec_out;
|
goto spec_out;
|
||||||
}
|
}
|
||||||
nlogs++;
|
nlogs++;
|
||||||
|
@ -18,6 +18,7 @@ zstream_LDADD = \
|
|||||||
libzpool.la \
|
libzpool.la \
|
||||||
libnvpair.la
|
libnvpair.la
|
||||||
|
|
||||||
PHONY += install-exec-hook
|
cmd-zstream-install-exec-hook:
|
||||||
install-exec-hook:
|
|
||||||
cd $(DESTDIR)$(sbindir) && $(LN_S) -f zstream zstreamdump
|
cd $(DESTDIR)$(sbindir) && $(LN_S) -f zstream zstreamdump
|
||||||
|
|
||||||
|
INSTALL_EXEC_HOOKS += cmd-zstream-install-exec-hook
|
||||||
|
119
cmd/ztest.c
119
cmd/ztest.c
@ -273,7 +273,6 @@ extern int zfs_compressed_arc_enabled;
|
|||||||
extern int zfs_abd_scatter_enabled;
|
extern int zfs_abd_scatter_enabled;
|
||||||
extern uint_t dmu_object_alloc_chunk_shift;
|
extern uint_t dmu_object_alloc_chunk_shift;
|
||||||
extern boolean_t zfs_force_some_double_word_sm_entries;
|
extern boolean_t zfs_force_some_double_word_sm_entries;
|
||||||
extern unsigned long zio_decompress_fail_fraction;
|
|
||||||
extern unsigned long zfs_reconstruct_indirect_damage_fraction;
|
extern unsigned long zfs_reconstruct_indirect_damage_fraction;
|
||||||
extern uint64_t raidz_expand_max_reflow_bytes;
|
extern uint64_t raidz_expand_max_reflow_bytes;
|
||||||
extern uint_t raidz_expand_pause_point;
|
extern uint_t raidz_expand_pause_point;
|
||||||
@ -809,8 +808,8 @@ static ztest_option_t option_table[] = {
|
|||||||
{ 'X', "raidz-expansion", NULL,
|
{ 'X', "raidz-expansion", NULL,
|
||||||
"Perform a dedicated raidz expansion test",
|
"Perform a dedicated raidz expansion test",
|
||||||
NO_DEFAULT, NULL},
|
NO_DEFAULT, NULL},
|
||||||
{ 'o', "option", "\"OPTION=INTEGER\"",
|
{ 'o', "option", "\"NAME=VALUE\"",
|
||||||
"Set global variable to an unsigned 32-bit integer value",
|
"Set the named tunable to the given value",
|
||||||
NO_DEFAULT, NULL},
|
NO_DEFAULT, NULL},
|
||||||
{ 'G', "dump-debug-msg", NULL,
|
{ 'G', "dump-debug-msg", NULL,
|
||||||
"Dump zfs_dbgmsg buffer before exiting due to an error",
|
"Dump zfs_dbgmsg buffer before exiting due to an error",
|
||||||
@ -829,8 +828,8 @@ static char *short_opts = NULL;
|
|||||||
static void
|
static void
|
||||||
init_options(void)
|
init_options(void)
|
||||||
{
|
{
|
||||||
ASSERT3P(long_opts, ==, NULL);
|
ASSERT0P(long_opts);
|
||||||
ASSERT3P(short_opts, ==, NULL);
|
ASSERT0P(short_opts);
|
||||||
|
|
||||||
int count = sizeof (option_table) / sizeof (option_table[0]);
|
int count = sizeof (option_table) / sizeof (option_table[0]);
|
||||||
long_opts = umem_alloc(sizeof (struct option) * count, UMEM_NOFAIL);
|
long_opts = umem_alloc(sizeof (struct option) * count, UMEM_NOFAIL);
|
||||||
@ -919,7 +918,7 @@ ztest_parse_name_value(const char *input, ztest_shared_opts_t *zo)
|
|||||||
{
|
{
|
||||||
char name[32];
|
char name[32];
|
||||||
char *value;
|
char *value;
|
||||||
int state = ZTEST_VDEV_CLASS_RND;
|
int state;
|
||||||
|
|
||||||
(void) strlcpy(name, input, sizeof (name));
|
(void) strlcpy(name, input, sizeof (name));
|
||||||
|
|
||||||
@ -1686,7 +1685,7 @@ ztest_rll_init(rll_t *rll)
|
|||||||
static void
|
static void
|
||||||
ztest_rll_destroy(rll_t *rll)
|
ztest_rll_destroy(rll_t *rll)
|
||||||
{
|
{
|
||||||
ASSERT3P(rll->rll_writer, ==, NULL);
|
ASSERT0P(rll->rll_writer);
|
||||||
ASSERT0(rll->rll_readers);
|
ASSERT0(rll->rll_readers);
|
||||||
mutex_destroy(&rll->rll_lock);
|
mutex_destroy(&rll->rll_lock);
|
||||||
cv_destroy(&rll->rll_cv);
|
cv_destroy(&rll->rll_cv);
|
||||||
@ -1720,7 +1719,7 @@ ztest_rll_unlock(rll_t *rll)
|
|||||||
rll->rll_writer = NULL;
|
rll->rll_writer = NULL;
|
||||||
} else {
|
} else {
|
||||||
ASSERT3S(rll->rll_readers, >, 0);
|
ASSERT3S(rll->rll_readers, >, 0);
|
||||||
ASSERT3P(rll->rll_writer, ==, NULL);
|
ASSERT0P(rll->rll_writer);
|
||||||
rll->rll_readers--;
|
rll->rll_readers--;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1816,7 +1815,7 @@ ztest_zd_fini(ztest_ds_t *zd)
|
|||||||
(ztest_random(10) == 0 ? DMU_TX_NOWAIT : DMU_TX_WAIT)
|
(ztest_random(10) == 0 ? DMU_TX_NOWAIT : DMU_TX_WAIT)
|
||||||
|
|
||||||
static uint64_t
|
static uint64_t
|
||||||
ztest_tx_assign(dmu_tx_t *tx, uint64_t txg_how, const char *tag)
|
ztest_tx_assign(dmu_tx_t *tx, dmu_tx_flag_t txg_how, const char *tag)
|
||||||
{
|
{
|
||||||
uint64_t txg;
|
uint64_t txg;
|
||||||
int error;
|
int error;
|
||||||
@ -1829,9 +1828,10 @@ ztest_tx_assign(dmu_tx_t *tx, uint64_t txg_how, const char *tag)
|
|||||||
if (error == ERESTART) {
|
if (error == ERESTART) {
|
||||||
ASSERT3U(txg_how, ==, DMU_TX_NOWAIT);
|
ASSERT3U(txg_how, ==, DMU_TX_NOWAIT);
|
||||||
dmu_tx_wait(tx);
|
dmu_tx_wait(tx);
|
||||||
} else {
|
} else if (error == ENOSPC) {
|
||||||
ASSERT3U(error, ==, ENOSPC);
|
|
||||||
ztest_record_enospc(tag);
|
ztest_record_enospc(tag);
|
||||||
|
} else {
|
||||||
|
ASSERT(error == EDQUOT || error == EIO);
|
||||||
}
|
}
|
||||||
dmu_tx_abort(tx);
|
dmu_tx_abort(tx);
|
||||||
return (0);
|
return (0);
|
||||||
@ -1993,8 +1993,9 @@ ztest_log_write(ztest_ds_t *zd, dmu_tx_t *tx, lr_write_t *lr)
|
|||||||
|
|
||||||
if (write_state == WR_COPIED &&
|
if (write_state == WR_COPIED &&
|
||||||
dmu_read(zd->zd_os, lr->lr_foid, lr->lr_offset, lr->lr_length,
|
dmu_read(zd->zd_os, lr->lr_foid, lr->lr_offset, lr->lr_length,
|
||||||
((lr_write_t *)&itx->itx_lr) + 1, DMU_READ_NO_PREFETCH) != 0) {
|
((lr_write_t *)&itx->itx_lr) + 1, DMU_READ_NO_PREFETCH |
|
||||||
zil_itx_destroy(itx);
|
DMU_KEEP_CACHING) != 0) {
|
||||||
|
zil_itx_destroy(itx, 0);
|
||||||
itx = zil_itx_create(TX_WRITE, sizeof (*lr));
|
itx = zil_itx_create(TX_WRITE, sizeof (*lr));
|
||||||
write_state = WR_NEED_COPY;
|
write_state = WR_NEED_COPY;
|
||||||
}
|
}
|
||||||
@ -2265,19 +2266,19 @@ ztest_replay_write(void *arg1, void *arg2, boolean_t byteswap)
|
|||||||
ASSERT(doi.doi_data_block_size);
|
ASSERT(doi.doi_data_block_size);
|
||||||
ASSERT0(offset % doi.doi_data_block_size);
|
ASSERT0(offset % doi.doi_data_block_size);
|
||||||
if (ztest_random(4) != 0) {
|
if (ztest_random(4) != 0) {
|
||||||
int prefetch = ztest_random(2) ?
|
dmu_flags_t flags = ztest_random(2) ?
|
||||||
DMU_READ_PREFETCH : DMU_READ_NO_PREFETCH;
|
DMU_READ_PREFETCH : DMU_READ_NO_PREFETCH;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We will randomly set when to do O_DIRECT on a read.
|
* We will randomly set when to do O_DIRECT on a read.
|
||||||
*/
|
*/
|
||||||
if (ztest_random(4) == 0)
|
if (ztest_random(4) == 0)
|
||||||
prefetch |= DMU_DIRECTIO;
|
flags |= DMU_DIRECTIO;
|
||||||
|
|
||||||
ztest_block_tag_t rbt;
|
ztest_block_tag_t rbt;
|
||||||
|
|
||||||
VERIFY(dmu_read(os, lr->lr_foid, offset,
|
VERIFY0(dmu_read(os, lr->lr_foid, offset,
|
||||||
sizeof (rbt), &rbt, prefetch) == 0);
|
sizeof (rbt), &rbt, flags));
|
||||||
if (rbt.bt_magic == BT_MAGIC) {
|
if (rbt.bt_magic == BT_MAGIC) {
|
||||||
ztest_bt_verify(&rbt, os, lr->lr_foid, 0,
|
ztest_bt_verify(&rbt, os, lr->lr_foid, 0,
|
||||||
offset, gen, txg, crtxg);
|
offset, gen, txg, crtxg);
|
||||||
@ -2308,7 +2309,7 @@ ztest_replay_write(void *arg1, void *arg2, boolean_t byteswap)
|
|||||||
dmu_write(os, lr->lr_foid, offset, length, data, tx);
|
dmu_write(os, lr->lr_foid, offset, length, data, tx);
|
||||||
} else {
|
} else {
|
||||||
memcpy(abuf->b_data, data, length);
|
memcpy(abuf->b_data, data, length);
|
||||||
VERIFY0(dmu_assign_arcbuf_by_dbuf(db, offset, abuf, tx));
|
VERIFY0(dmu_assign_arcbuf_by_dbuf(db, offset, abuf, tx, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) ztest_log_write(zd, tx, lr);
|
(void) ztest_log_write(zd, tx, lr);
|
||||||
@ -2533,7 +2534,7 @@ ztest_get_data(void *arg, uint64_t arg2, lr_write_t *lr, char *buf,
|
|||||||
object, offset, size, ZTRL_READER);
|
object, offset, size, ZTRL_READER);
|
||||||
|
|
||||||
error = dmu_read(os, object, offset, size, buf,
|
error = dmu_read(os, object, offset, size, buf,
|
||||||
DMU_READ_NO_PREFETCH);
|
DMU_READ_NO_PREFETCH | DMU_KEEP_CACHING);
|
||||||
ASSERT0(error);
|
ASSERT0(error);
|
||||||
} else {
|
} else {
|
||||||
ASSERT3P(zio, !=, NULL);
|
ASSERT3P(zio, !=, NULL);
|
||||||
@ -2549,7 +2550,6 @@ ztest_get_data(void *arg, uint64_t arg2, lr_write_t *lr, char *buf,
|
|||||||
object, offset, size, ZTRL_READER);
|
object, offset, size, ZTRL_READER);
|
||||||
|
|
||||||
error = dmu_buf_hold_noread(os, object, offset, zgd, &db);
|
error = dmu_buf_hold_noread(os, object, offset, zgd, &db);
|
||||||
|
|
||||||
if (error == 0) {
|
if (error == 0) {
|
||||||
blkptr_t *bp = &lr->lr_blkptr;
|
blkptr_t *bp = &lr->lr_blkptr;
|
||||||
|
|
||||||
@ -2826,7 +2826,7 @@ ztest_io(ztest_ds_t *zd, uint64_t object, uint64_t offset)
|
|||||||
enum ztest_io_type io_type;
|
enum ztest_io_type io_type;
|
||||||
uint64_t blocksize;
|
uint64_t blocksize;
|
||||||
void *data;
|
void *data;
|
||||||
uint32_t dmu_read_flags = DMU_READ_NO_PREFETCH;
|
dmu_flags_t dmu_read_flags = DMU_READ_NO_PREFETCH;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We will randomly set when to do O_DIRECT on a read.
|
* We will randomly set when to do O_DIRECT on a read.
|
||||||
@ -2965,7 +2965,7 @@ ztest_zil_commit(ztest_ds_t *zd, uint64_t id)
|
|||||||
|
|
||||||
(void) pthread_rwlock_rdlock(&zd->zd_zilog_lock);
|
(void) pthread_rwlock_rdlock(&zd->zd_zilog_lock);
|
||||||
|
|
||||||
zil_commit(zilog, ztest_random(ZTEST_OBJECTS));
|
VERIFY0(zil_commit(zilog, ztest_random(ZTEST_OBJECTS)));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remember the committed values in zd, which is in parent/child
|
* Remember the committed values in zd, which is in parent/child
|
||||||
@ -3881,7 +3881,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id)
|
|||||||
* If newvd is too small, it should fail with EOVERFLOW.
|
* If newvd is too small, it should fail with EOVERFLOW.
|
||||||
*
|
*
|
||||||
* If newvd is a distributed spare and it's being attached to a
|
* If newvd is a distributed spare and it's being attached to a
|
||||||
* dRAID which is not its parent it should fail with EINVAL.
|
* dRAID which is not its parent it should fail with ENOTSUP.
|
||||||
*/
|
*/
|
||||||
if (pvd->vdev_ops != &vdev_mirror_ops &&
|
if (pvd->vdev_ops != &vdev_mirror_ops &&
|
||||||
pvd->vdev_ops != &vdev_root_ops && (!replacing ||
|
pvd->vdev_ops != &vdev_root_ops && (!replacing ||
|
||||||
@ -3900,7 +3900,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id)
|
|||||||
else if (ashift > oldvd->vdev_top->vdev_ashift)
|
else if (ashift > oldvd->vdev_top->vdev_ashift)
|
||||||
expected_error = EDOM;
|
expected_error = EDOM;
|
||||||
else if (newvd_is_dspare && pvd != vdev_draid_spare_get_parent(newvd))
|
else if (newvd_is_dspare && pvd != vdev_draid_spare_get_parent(newvd))
|
||||||
expected_error = EINVAL;
|
expected_error = ENOTSUP;
|
||||||
else
|
else
|
||||||
expected_error = 0;
|
expected_error = 0;
|
||||||
|
|
||||||
@ -4006,7 +4006,7 @@ raidz_scratch_verify(void)
|
|||||||
* requested by user, but scratch object was not created.
|
* requested by user, but scratch object was not created.
|
||||||
*/
|
*/
|
||||||
case RRSS_SCRATCH_NOT_IN_USE:
|
case RRSS_SCRATCH_NOT_IN_USE:
|
||||||
ASSERT3U(offset, ==, 0);
|
ASSERT0(offset);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -4916,7 +4916,7 @@ ztest_dsl_dataset_promote_busy(ztest_ds_t *zd, uint64_t id)
|
|||||||
fatal(B_FALSE, "dmu_take_snapshot(%s) = %d", snap1name, error);
|
fatal(B_FALSE, "dmu_take_snapshot(%s) = %d", snap1name, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = dmu_objset_clone(clone1name, snap1name);
|
error = dsl_dataset_clone(clone1name, snap1name);
|
||||||
if (error) {
|
if (error) {
|
||||||
if (error == ENOSPC) {
|
if (error == ENOSPC) {
|
||||||
ztest_record_enospc(FTAG);
|
ztest_record_enospc(FTAG);
|
||||||
@ -4943,7 +4943,7 @@ ztest_dsl_dataset_promote_busy(ztest_ds_t *zd, uint64_t id)
|
|||||||
fatal(B_FALSE, "dmu_open_snapshot(%s) = %d", snap3name, error);
|
fatal(B_FALSE, "dmu_open_snapshot(%s) = %d", snap3name, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = dmu_objset_clone(clone2name, snap3name);
|
error = dsl_dataset_clone(clone2name, snap3name);
|
||||||
if (error) {
|
if (error) {
|
||||||
if (error == ENOSPC) {
|
if (error == ENOSPC) {
|
||||||
ztest_record_enospc(FTAG);
|
ztest_record_enospc(FTAG);
|
||||||
@ -5065,7 +5065,7 @@ ztest_dmu_read_write(ztest_ds_t *zd, uint64_t id)
|
|||||||
uint64_t stride = 123456789ULL;
|
uint64_t stride = 123456789ULL;
|
||||||
uint64_t width = 40;
|
uint64_t width = 40;
|
||||||
int free_percent = 5;
|
int free_percent = 5;
|
||||||
uint32_t dmu_read_flags = DMU_READ_PREFETCH;
|
dmu_flags_t dmu_read_flags = DMU_READ_PREFETCH;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We will randomly set when to do O_DIRECT on a read.
|
* We will randomly set when to do O_DIRECT on a read.
|
||||||
@ -5536,18 +5536,18 @@ ztest_dmu_read_write_zcopy(ztest_ds_t *zd, uint64_t id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
VERIFY(dmu_buf_hold(os, bigobj, off,
|
VERIFY0(dmu_buf_hold(os, bigobj, off,
|
||||||
FTAG, &dbt, DMU_READ_NO_PREFETCH) == 0);
|
FTAG, &dbt, DMU_READ_NO_PREFETCH));
|
||||||
}
|
}
|
||||||
if (i != 5 || chunksize < (SPA_MINBLOCKSIZE * 2)) {
|
if (i != 5 || chunksize < (SPA_MINBLOCKSIZE * 2)) {
|
||||||
VERIFY0(dmu_assign_arcbuf_by_dbuf(bonus_db,
|
VERIFY0(dmu_assign_arcbuf_by_dbuf(bonus_db,
|
||||||
off, bigbuf_arcbufs[j], tx));
|
off, bigbuf_arcbufs[j], tx, 0));
|
||||||
} else {
|
} else {
|
||||||
VERIFY0(dmu_assign_arcbuf_by_dbuf(bonus_db,
|
VERIFY0(dmu_assign_arcbuf_by_dbuf(bonus_db,
|
||||||
off, bigbuf_arcbufs[2 * j], tx));
|
off, bigbuf_arcbufs[2 * j], tx, 0));
|
||||||
VERIFY0(dmu_assign_arcbuf_by_dbuf(bonus_db,
|
VERIFY0(dmu_assign_arcbuf_by_dbuf(bonus_db,
|
||||||
off + chunksize / 2,
|
off + chunksize / 2,
|
||||||
bigbuf_arcbufs[2 * j + 1], tx));
|
bigbuf_arcbufs[2 * j + 1], tx, 0));
|
||||||
}
|
}
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
dmu_buf_rele(dbt, FTAG);
|
dmu_buf_rele(dbt, FTAG);
|
||||||
@ -6334,13 +6334,13 @@ ztest_dmu_snapshot_hold(ztest_ds_t *zd, uint64_t id)
|
|||||||
fatal(B_FALSE, "dmu_objset_snapshot(%s) = %d", fullname, error);
|
fatal(B_FALSE, "dmu_objset_snapshot(%s) = %d", fullname, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = dmu_objset_clone(clonename, fullname);
|
error = dsl_dataset_clone(clonename, fullname);
|
||||||
if (error) {
|
if (error) {
|
||||||
if (error == ENOSPC) {
|
if (error == ENOSPC) {
|
||||||
ztest_record_enospc("dmu_objset_clone");
|
ztest_record_enospc("dsl_dataset_clone");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
fatal(B_FALSE, "dmu_objset_clone(%s) = %d", clonename, error);
|
fatal(B_FALSE, "dsl_dataset_clone(%s) = %d", clonename, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = dsl_destroy_snapshot(fullname, B_TRUE);
|
error = dsl_destroy_snapshot(fullname, B_TRUE);
|
||||||
@ -7068,7 +7068,7 @@ ztest_set_global_vars(void)
|
|||||||
char *kv = ztest_opts.zo_gvars[i];
|
char *kv = ztest_opts.zo_gvars[i];
|
||||||
VERIFY3U(strlen(kv), <=, ZO_GVARS_MAX_ARGLEN);
|
VERIFY3U(strlen(kv), <=, ZO_GVARS_MAX_ARGLEN);
|
||||||
VERIFY3U(strlen(kv), >, 0);
|
VERIFY3U(strlen(kv), >, 0);
|
||||||
int err = set_global_var(kv);
|
int err = handle_tunable_option(kv, B_TRUE);
|
||||||
if (ztest_opts.zo_verbose > 0) {
|
if (ztest_opts.zo_verbose > 0) {
|
||||||
(void) printf("setting global var %s ... %s\n", kv,
|
(void) printf("setting global var %s ... %s\n", kv,
|
||||||
err ? "failed" : "ok");
|
err ? "failed" : "ok");
|
||||||
@ -7812,6 +7812,9 @@ ztest_dataset_open(int d)
|
|||||||
|
|
||||||
ztest_dataset_name(name, ztest_opts.zo_pool, d);
|
ztest_dataset_name(name, ztest_opts.zo_pool, d);
|
||||||
|
|
||||||
|
if (ztest_opts.zo_verbose >= 6)
|
||||||
|
(void) printf("Opening %s\n", name);
|
||||||
|
|
||||||
(void) pthread_rwlock_rdlock(&ztest_name_lock);
|
(void) pthread_rwlock_rdlock(&ztest_name_lock);
|
||||||
|
|
||||||
error = ztest_dataset_create(name);
|
error = ztest_dataset_create(name);
|
||||||
@ -7933,7 +7936,7 @@ ztest_freeze(void)
|
|||||||
*/
|
*/
|
||||||
while (BP_IS_HOLE(&zd->zd_zilog->zl_header->zh_log)) {
|
while (BP_IS_HOLE(&zd->zd_zilog->zl_header->zh_log)) {
|
||||||
ztest_dmu_object_alloc_free(zd, 0);
|
ztest_dmu_object_alloc_free(zd, 0);
|
||||||
zil_commit(zd->zd_zilog, 0);
|
VERIFY0(zil_commit(zd->zd_zilog, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
txg_wait_synced(spa_get_dsl(spa), 0);
|
txg_wait_synced(spa_get_dsl(spa), 0);
|
||||||
@ -7975,7 +7978,7 @@ ztest_freeze(void)
|
|||||||
/*
|
/*
|
||||||
* Commit all of the changes we just generated.
|
* Commit all of the changes we just generated.
|
||||||
*/
|
*/
|
||||||
zil_commit(zd->zd_zilog, 0);
|
VERIFY0(zil_commit(zd->zd_zilog, 0));
|
||||||
txg_wait_synced(spa_get_dsl(spa), 0);
|
txg_wait_synced(spa_get_dsl(spa), 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -8307,41 +8310,44 @@ static void
|
|||||||
ztest_generic_run(ztest_shared_t *zs, spa_t *spa)
|
ztest_generic_run(ztest_shared_t *zs, spa_t *spa)
|
||||||
{
|
{
|
||||||
kthread_t **run_threads;
|
kthread_t **run_threads;
|
||||||
int t;
|
int i, ndatasets;
|
||||||
|
|
||||||
run_threads = umem_zalloc(ztest_opts.zo_threads * sizeof (kthread_t *),
|
run_threads = umem_zalloc(ztest_opts.zo_threads * sizeof (kthread_t *),
|
||||||
UMEM_NOFAIL);
|
UMEM_NOFAIL);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actual number of datasets to be used.
|
||||||
|
*/
|
||||||
|
ndatasets = MIN(ztest_opts.zo_datasets, ztest_opts.zo_threads);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Prepare the datasets first.
|
||||||
|
*/
|
||||||
|
for (i = 0; i < ndatasets; i++)
|
||||||
|
VERIFY0(ztest_dataset_open(i));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Kick off all the tests that run in parallel.
|
* Kick off all the tests that run in parallel.
|
||||||
*/
|
*/
|
||||||
for (t = 0; t < ztest_opts.zo_threads; t++) {
|
for (i = 0; i < ztest_opts.zo_threads; i++) {
|
||||||
if (t < ztest_opts.zo_datasets && ztest_dataset_open(t) != 0) {
|
run_threads[i] = thread_create(NULL, 0, ztest_thread,
|
||||||
umem_free(run_threads, ztest_opts.zo_threads *
|
(void *)(uintptr_t)i, 0, NULL, TS_RUN | TS_JOINABLE,
|
||||||
sizeof (kthread_t *));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
run_threads[t] = thread_create(NULL, 0, ztest_thread,
|
|
||||||
(void *)(uintptr_t)t, 0, NULL, TS_RUN | TS_JOINABLE,
|
|
||||||
defclsyspri);
|
defclsyspri);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wait for all of the tests to complete.
|
* Wait for all of the tests to complete.
|
||||||
*/
|
*/
|
||||||
for (t = 0; t < ztest_opts.zo_threads; t++)
|
for (i = 0; i < ztest_opts.zo_threads; i++)
|
||||||
VERIFY0(thread_join(run_threads[t]));
|
VERIFY0(thread_join(run_threads[i]));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Close all datasets. This must be done after all the threads
|
* Close all datasets. This must be done after all the threads
|
||||||
* are joined so we can be sure none of the datasets are in-use
|
* are joined so we can be sure none of the datasets are in-use
|
||||||
* by any of the threads.
|
* by any of the threads.
|
||||||
*/
|
*/
|
||||||
for (t = 0; t < ztest_opts.zo_threads; t++) {
|
for (i = 0; i < ndatasets; i++)
|
||||||
if (t < ztest_opts.zo_datasets)
|
ztest_dataset_close(i);
|
||||||
ztest_dataset_close(t);
|
|
||||||
}
|
|
||||||
|
|
||||||
txg_wait_synced(spa_get_dsl(spa), 0);
|
txg_wait_synced(spa_get_dsl(spa), 0);
|
||||||
|
|
||||||
@ -8464,6 +8470,7 @@ ztest_run(ztest_shared_t *zs)
|
|||||||
|
|
||||||
int d = ztest_random(ztest_opts.zo_datasets);
|
int d = ztest_random(ztest_opts.zo_datasets);
|
||||||
ztest_dataset_destroy(d);
|
ztest_dataset_destroy(d);
|
||||||
|
txg_wait_synced(spa_get_dsl(spa), 0);
|
||||||
}
|
}
|
||||||
zs->zs_enospc_count = 0;
|
zs->zs_enospc_count = 0;
|
||||||
|
|
||||||
@ -8971,7 +8978,7 @@ main(int argc, char **argv)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
} else {
|
} else {
|
||||||
/* children should not be spawned if setting gvars fails */
|
/* children should not be spawned if setting gvars fails */
|
||||||
VERIFY3S(err, ==, 0);
|
VERIFY0(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Override location of zpool.cache */
|
/* Override location of zpool.cache */
|
||||||
|
@ -16,10 +16,14 @@ SHELLCHECK_OPTS = $(call JUST_SHELLCHECK_OPTS,$(1)) $(call JUST_CHECKBAS
|
|||||||
|
|
||||||
PHONY += shellcheck
|
PHONY += shellcheck
|
||||||
|
|
||||||
|
shellcheck_verbose = $(shellcheck_verbose_@AM_V@)
|
||||||
|
shellcheck_verbose_ = $(shellcheck_verbose_@AM_DEFAULT_V@)
|
||||||
|
shellcheck_verbose_0 = @echo SHELLCHECK $(_STGT);
|
||||||
|
|
||||||
_STGT = $(subst ^,/,$(subst shellcheck-here-,,$@))
|
_STGT = $(subst ^,/,$(subst shellcheck-here-,,$@))
|
||||||
shellcheck-here-%:
|
shellcheck-here-%:
|
||||||
if HAVE_SHELLCHECK
|
if HAVE_SHELLCHECK
|
||||||
shellcheck --format=gcc --enable=all --exclude=SC1090,SC1091,SC2039,SC2250,SC2312,SC2317,SC3043 $$([ -n "$(SHELLCHECK_SHELL)" ] && echo "--shell=$(SHELLCHECK_SHELL)") "$$([ -e "$(_STGT)" ] || echo "$(srcdir)/")$(_STGT)"
|
$(shellcheck_verbose)shellcheck --format=gcc --enable=all --exclude=SC1090,SC1091,SC2039,SC2250,SC2312,SC2317,SC3043 $$([ -n "$(SHELLCHECK_SHELL)" ] && echo "--shell=$(SHELLCHECK_SHELL)") "$$([ -e "$(_STGT)" ] || echo "$(srcdir)/")$(_STGT)"
|
||||||
else
|
else
|
||||||
@echo "skipping shellcheck of" $(_STGT) "because shellcheck is not installed"
|
@echo "skipping shellcheck of" $(_STGT) "because shellcheck is not installed"
|
||||||
endif
|
endif
|
||||||
@ -29,11 +33,15 @@ shellcheck: $(SHELLCHECKSCRIPTS) $(call JUST_SHELLCHECK_OPTS,$(SHELLCHECKSCRIPTS
|
|||||||
|
|
||||||
PHONY += checkbashisms
|
PHONY += checkbashisms
|
||||||
|
|
||||||
|
checkbashisms_verbose = $(checkbashisms_verbose_@AM_V@)
|
||||||
|
checkbashisms_verbose_ = $(checkbashisms_verbose_@AM_DEFAULT_V@)
|
||||||
|
checkbashisms_verbose_0 = @echo CHECKBASHISMS $(_BTGT);
|
||||||
|
|
||||||
# command -v *is* specified by POSIX and every shell in existence supports it
|
# command -v *is* specified by POSIX and every shell in existence supports it
|
||||||
_BTGT = $(subst ^,/,$(subst checkbashisms-here-,,$@))
|
_BTGT = $(subst ^,/,$(subst checkbashisms-here-,,$@))
|
||||||
checkbashisms-here-%:
|
checkbashisms-here-%:
|
||||||
if HAVE_CHECKBASHISMS
|
if HAVE_CHECKBASHISMS
|
||||||
! { [ -n "$(SHELLCHECK_SHELL)" ] && echo '#!/bin/$(SHELLCHECK_SHELL)'; cat "$$([ -e "$(_BTGT)" ] || echo "$(srcdir)/")$(_BTGT)"; } | \
|
$(checkbashisms_verbose)! { [ -n "$(SHELLCHECK_SHELL)" ] && echo '#!/bin/$(SHELLCHECK_SHELL)'; cat "$$([ -e "$(_BTGT)" ] || echo "$(srcdir)/")$(_BTGT)"; } | \
|
||||||
checkbashisms -npx 2>&1 | grep -vFe "'command' with option other than -p" -e 'command -v' -e 'any possible bashisms' $(CHECKBASHISMS_IGNORE) >&2
|
checkbashisms -npx 2>&1 | grep -vFe "'command' with option other than -p" -e 'command -v' -e 'any possible bashisms' $(CHECKBASHISMS_IGNORE) >&2
|
||||||
else
|
else
|
||||||
@echo "skipping checkbashisms of" $(_BTGT) "because checkbashisms is not installed"
|
@echo "skipping checkbashisms of" $(_BTGT) "because checkbashisms is not installed"
|
||||||
|
@ -34,8 +34,26 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_ARCH], [
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
AM_CONDITIONAL([TARGET_CPU_AARCH64], test $TARGET_CPU = aarch64)
|
AM_CONDITIONAL([TARGET_CPU_AARCH64], test $TARGET_CPU = aarch64)
|
||||||
|
AM_CONDITIONAL([TARGET_CPU_I386], test $TARGET_CPU = i386)
|
||||||
AM_CONDITIONAL([TARGET_CPU_X86_64], test $TARGET_CPU = x86_64)
|
AM_CONDITIONAL([TARGET_CPU_X86_64], test $TARGET_CPU = x86_64)
|
||||||
AM_CONDITIONAL([TARGET_CPU_POWERPC], test $TARGET_CPU = powerpc)
|
AM_CONDITIONAL([TARGET_CPU_POWERPC], test $TARGET_CPU = powerpc)
|
||||||
AM_CONDITIONAL([TARGET_CPU_SPARC64], test $TARGET_CPU = sparc64)
|
AM_CONDITIONAL([TARGET_CPU_SPARC64], test $TARGET_CPU = sparc64)
|
||||||
AM_CONDITIONAL([TARGET_CPU_ARM], test $TARGET_CPU = arm)
|
AM_CONDITIONAL([TARGET_CPU_ARM], test $TARGET_CPU = arm)
|
||||||
])
|
])
|
||||||
|
dnl #
|
||||||
|
dnl # Check for conflicting environment variables
|
||||||
|
dnl #
|
||||||
|
dnl # If ARCH env variable is set up, then kernel Makefile in the /usr/src/kernel
|
||||||
|
dnl # can misbehave during the zfs ./configure test of the module compilation.
|
||||||
|
AC_DEFUN([ZFS_AC_CONFIG_CHECK_ARCH_VAR], [
|
||||||
|
AC_MSG_CHECKING([for conflicting environment variables])
|
||||||
|
if test -n "$ARCH"; then
|
||||||
|
AC_MSG_RESULT([warning])
|
||||||
|
AC_MSG_WARN(m4_normalize([ARCH environment variable is set to "$ARCH".
|
||||||
|
This can cause build kernel modules support check failure.
|
||||||
|
Please unset it.]))
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([done])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
@ -155,6 +155,34 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH], [
|
|||||||
AC_SUBST([NO_FORMAT_ZERO_LENGTH])
|
AC_SUBST([NO_FORMAT_ZERO_LENGTH])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # Check if kernel cc supports -Wno-format-zero-length option.
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_NO_FORMAT_ZERO_LENGTH], [
|
||||||
|
saved_cc="$CC"
|
||||||
|
AS_IF(
|
||||||
|
[ test -n "$KERNEL_CC" ], [ CC="$KERNEL_CC" ],
|
||||||
|
[ test -n "$KERNEL_LLVM" ], [ CC="clang" ],
|
||||||
|
[ CC="gcc" ]
|
||||||
|
)
|
||||||
|
AC_MSG_CHECKING([whether $CC supports -Wno-format-zero-length])
|
||||||
|
|
||||||
|
saved_flags="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -Werror -Wno-format-zero-length"
|
||||||
|
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||||
|
KERNEL_NO_FORMAT_ZERO_LENGTH=-Wno-format-zero-length
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
], [
|
||||||
|
KERNEL_NO_FORMAT_ZERO_LENGTH=
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
|
||||||
|
CC="$saved_cc"
|
||||||
|
CFLAGS="$saved_flags"
|
||||||
|
AC_SUBST([KERNEL_NO_FORMAT_ZERO_LENGTH])
|
||||||
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # Check if cc supports -Wno-clobbered option.
|
dnl # Check if cc supports -Wno-clobbered option.
|
||||||
dnl #
|
dnl #
|
||||||
@ -181,6 +209,27 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED], [
|
|||||||
AC_SUBST([NO_CLOBBERED])
|
AC_SUBST([NO_CLOBBERED])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # Check if cc supports -Wno-atomic-alignment option.
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_ATOMIC_ALIGNMENT], [
|
||||||
|
AC_MSG_CHECKING([whether $CC supports -Wno-atomic-alignment])
|
||||||
|
|
||||||
|
saved_flags="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -Werror -Wno-atomic-alignment"
|
||||||
|
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||||
|
NO_ATOMIC_ALIGNMENT=-Wno-atomic-alignment
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
], [
|
||||||
|
NO_ATOMIC_ALIGNMENT=
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
|
||||||
|
CFLAGS="$saved_flags"
|
||||||
|
AC_SUBST([NO_ATOMIC_ALIGNMENT])
|
||||||
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # Check if cc supports -Wimplicit-fallthrough option.
|
dnl # Check if cc supports -Wimplicit-fallthrough option.
|
||||||
dnl #
|
dnl #
|
||||||
@ -231,19 +280,16 @@ dnl #
|
|||||||
dnl # Check if kernel cc supports -Winfinite-recursion option.
|
dnl # Check if kernel cc supports -Winfinite-recursion option.
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION], [
|
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION], [
|
||||||
AC_MSG_CHECKING([whether $KERNEL_CC supports -Winfinite-recursion])
|
|
||||||
|
|
||||||
saved_cc="$CC"
|
saved_cc="$CC"
|
||||||
saved_flags="$CFLAGS"
|
AS_IF(
|
||||||
CC="gcc"
|
[ test -n "$KERNEL_CC" ], [ CC="$KERNEL_CC" ],
|
||||||
CFLAGS="$CFLAGS -Werror -Winfinite-recursion"
|
[ test -n "$KERNEL_LLVM" ], [ CC="clang" ],
|
||||||
|
[ CC="gcc" ]
|
||||||
|
)
|
||||||
|
AC_MSG_CHECKING([whether $CC supports -Winfinite-recursion])
|
||||||
|
|
||||||
AS_IF([ test -n "$KERNEL_CC" ], [
|
saved_flags="$CFLAGS"
|
||||||
CC="$KERNEL_CC"
|
CFLAGS="$CFLAGS -Werror -Winfinite-recursion"
|
||||||
])
|
|
||||||
AS_IF([ test -n "$KERNEL_LLVM" ], [
|
|
||||||
CC="clang"
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||||
KERNEL_INFINITE_RECURSION=-Winfinite-recursion
|
KERNEL_INFINITE_RECURSION=-Winfinite-recursion
|
||||||
@ -329,19 +375,16 @@ dnl #
|
|||||||
dnl # Check if kernel cc supports -fno-ipa-sra option.
|
dnl # Check if kernel cc supports -fno-ipa-sra option.
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_NO_IPA_SRA], [
|
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_NO_IPA_SRA], [
|
||||||
AC_MSG_CHECKING([whether $KERNEL_CC supports -fno-ipa-sra])
|
|
||||||
|
|
||||||
saved_cc="$CC"
|
saved_cc="$CC"
|
||||||
saved_flags="$CFLAGS"
|
AS_IF(
|
||||||
CC="gcc"
|
[ test -n "$KERNEL_CC" ], [ CC="$KERNEL_CC" ],
|
||||||
CFLAGS="$CFLAGS -Werror -fno-ipa-sra"
|
[ test -n "$KERNEL_LLVM" ], [ CC="clang" ],
|
||||||
|
[ CC="gcc" ]
|
||||||
|
)
|
||||||
|
AC_MSG_CHECKING([whether $CC supports -fno-ipa-sra])
|
||||||
|
|
||||||
AS_IF([ test -n "$KERNEL_CC" ], [
|
saved_flags="$CFLAGS"
|
||||||
CC="$KERNEL_CC"
|
CFLAGS="$CFLAGS -Werror -fno-ipa-sra"
|
||||||
])
|
|
||||||
AS_IF([ test -n "$KERNEL_LLVM" ], [
|
|
||||||
CC="clang"
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||||
KERNEL_NO_IPA_SRA=-fno-ipa-sra
|
KERNEL_NO_IPA_SRA=-fno-ipa-sra
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
# modified version of the Autoconf Macro, you may extend this special
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
# exception to the GPL to apply to your modified version as well.
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
#serial 36
|
#serial 37
|
||||||
|
|
||||||
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
|
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
|
||||||
AC_DEFUN([AX_PYTHON_DEVEL],[
|
AC_DEFUN([AX_PYTHON_DEVEL],[
|
||||||
@ -316,7 +316,7 @@ EOD`
|
|||||||
PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
|
PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "PYTHON_LIBS"; then
|
if test -z "$PYTHON_LIBS"; then
|
||||||
AC_MSG_WARN([
|
AC_MSG_WARN([
|
||||||
Cannot determine location of your Python DSO. Please check it was installed with
|
Cannot determine location of your Python DSO. Please check it was installed with
|
||||||
dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
|
dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
|
||||||
|
@ -29,9 +29,8 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG], [
|
|||||||
const char *path = "path";
|
const char *path = "path";
|
||||||
fmode_t mode = 0;
|
fmode_t mode = 0;
|
||||||
void *holder = NULL;
|
void *holder = NULL;
|
||||||
struct blk_holder_ops h;
|
|
||||||
|
|
||||||
bdev = blkdev_get_by_path(path, mode, holder, &h);
|
bdev = blkdev_get_by_path(path, mode, holder, NULL);
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -48,9 +47,8 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_OPEN_BY_PATH], [
|
|||||||
const char *path = "path";
|
const char *path = "path";
|
||||||
fmode_t mode = 0;
|
fmode_t mode = 0;
|
||||||
void *holder = NULL;
|
void *holder = NULL;
|
||||||
struct blk_holder_ops h;
|
|
||||||
|
|
||||||
bdh = bdev_open_by_path(path, mode, holder, &h);
|
bdh = bdev_open_by_path(path, mode, holder, NULL);
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -68,9 +66,8 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BDEV_FILE_OPEN_BY_PATH], [
|
|||||||
const char *path = "path";
|
const char *path = "path";
|
||||||
fmode_t mode = 0;
|
fmode_t mode = 0;
|
||||||
void *holder = NULL;
|
void *holder = NULL;
|
||||||
struct blk_holder_ops h;
|
|
||||||
|
|
||||||
file = bdev_file_open_by_path(path, mode, holder, &h);
|
file = bdev_file_open_by_path(path, mode, holder, NULL);
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -24,6 +24,9 @@ dnl #
|
|||||||
dnl # 2.6.38 API change
|
dnl # 2.6.38 API change
|
||||||
dnl # Added d_set_d_op() helper function.
|
dnl # Added d_set_d_op() helper function.
|
||||||
dnl #
|
dnl #
|
||||||
|
dnl # 6.17 API change
|
||||||
|
dnl # d_set_d_op() removed. No direct replacement.
|
||||||
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_D_SET_D_OP], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_D_SET_D_OP], [
|
||||||
ZFS_LINUX_TEST_SRC([d_set_d_op], [
|
ZFS_LINUX_TEST_SRC([d_set_d_op], [
|
||||||
#include <linux/dcache.h>
|
#include <linux/dcache.h>
|
||||||
@ -34,22 +37,46 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_D_SET_D_OP], [
|
|||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_D_SET_D_OP], [
|
AC_DEFUN([ZFS_AC_KERNEL_D_SET_D_OP], [
|
||||||
AC_MSG_CHECKING([whether d_set_d_op() is available])
|
AC_MSG_CHECKING([whether d_set_d_op() is available])
|
||||||
ZFS_LINUX_TEST_RESULT_SYMBOL([d_set_d_op],
|
ZFS_LINUX_TEST_RESULT([d_set_d_op], [
|
||||||
[d_set_d_op], [fs/dcache.c], [
|
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_D_SET_D_OP, 1,
|
||||||
|
[Define if d_set_d_op() is available])
|
||||||
], [
|
], [
|
||||||
ZFS_LINUX_TEST_ERROR([d_set_d_op])
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # 6.17 API change
|
||||||
|
dnl # sb->s_d_op removed; set_default_d_op(sb, dop) added
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_SET_DEFAULT_D_OP], [
|
||||||
|
ZFS_LINUX_TEST_SRC([set_default_d_op], [
|
||||||
|
#include <linux/dcache.h>
|
||||||
|
], [
|
||||||
|
set_default_d_op(NULL, NULL);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SET_DEFAULT_D_OP], [
|
||||||
|
AC_MSG_CHECKING([whether set_default_d_op() is available])
|
||||||
|
ZFS_LINUX_TEST_RESULT([set_default_d_op], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_SET_DEFAULT_D_OP, 1,
|
||||||
|
[Define if set_default_d_op() is available])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY], [
|
||||||
ZFS_AC_KERNEL_SRC_D_OBTAIN_ALIAS
|
ZFS_AC_KERNEL_SRC_D_OBTAIN_ALIAS
|
||||||
ZFS_AC_KERNEL_SRC_D_SET_D_OP
|
ZFS_AC_KERNEL_SRC_D_SET_D_OP
|
||||||
ZFS_AC_KERNEL_SRC_S_D_OP
|
ZFS_AC_KERNEL_SRC_SET_DEFAULT_D_OP
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_DENTRY], [
|
AC_DEFUN([ZFS_AC_KERNEL_DENTRY], [
|
||||||
ZFS_AC_KERNEL_D_OBTAIN_ALIAS
|
ZFS_AC_KERNEL_D_OBTAIN_ALIAS
|
||||||
ZFS_AC_KERNEL_D_SET_D_OP
|
ZFS_AC_KERNEL_D_SET_D_OP
|
||||||
ZFS_AC_KERNEL_S_D_OP
|
ZFS_AC_KERNEL_SET_DEFAULT_D_OP
|
||||||
])
|
])
|
||||||
|
24
config/kernel-free-inode.m4
Normal file
24
config/kernel-free-inode.m4
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # Linux 5.2 API change
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_SOPS_FREE_INODE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([super_operations_free_inode], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
|
||||||
|
static void free_inode(struct inode *) { }
|
||||||
|
|
||||||
|
static struct super_operations sops __attribute__ ((unused)) = {
|
||||||
|
.free_inode = free_inode,
|
||||||
|
};
|
||||||
|
],[])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SOPS_FREE_INODE], [
|
||||||
|
AC_MSG_CHECKING([whether sops->free_inode() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([super_operations_free_inode], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_SOPS_FREE_INODE, 1, [sops->free_inode() exists])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
])
|
@ -84,6 +84,8 @@ AC_DEFUN([ZFS_AC_KERNEL_MKDIR], [
|
|||||||
AC_DEFINE(HAVE_IOPS_MKDIR_DENTRY, 1,
|
AC_DEFINE(HAVE_IOPS_MKDIR_DENTRY, 1,
|
||||||
[iops->mkdir() returns struct dentry*])
|
[iops->mkdir() returns struct dentry*])
|
||||||
],[
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 6.3 API change
|
dnl # 6.3 API change
|
||||||
dnl # mkdir() takes struct mnt_idmap * as the first arg
|
dnl # mkdir() takes struct mnt_idmap * as the first arg
|
||||||
|
@ -49,6 +49,15 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_OBJTOOL], [
|
|||||||
#error "STACK_FRAME_NON_STANDARD is not defined."
|
#error "STACK_FRAME_NON_STANDARD is not defined."
|
||||||
#endif
|
#endif
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl # 6.15 made CONFIG_OBJTOOL_WERROR=y the default. We need to handle
|
||||||
|
dnl # this or our build will fail.
|
||||||
|
ZFS_LINUX_TEST_SRC([config_objtool_werror], [
|
||||||
|
#if !defined(CONFIG_OBJTOOL_WERROR)
|
||||||
|
#error "CONFIG_OBJTOOL_WERROR is not defined."
|
||||||
|
#endif
|
||||||
|
])
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_OBJTOOL], [
|
AC_DEFUN([ZFS_AC_KERNEL_OBJTOOL], [
|
||||||
@ -84,6 +93,14 @@ AC_DEFUN([ZFS_AC_KERNEL_OBJTOOL], [
|
|||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether CONFIG_OBJTOOL_WERROR is defined])
|
||||||
|
ZFS_LINUX_TEST_RESULT([config_objtool_werror],[
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
CONFIG_OBJTOOL_WERROR_DEFINED=yes
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
|
23
config/kernel-pagemap-readahead-page.m4
Normal file
23
config/kernel-pagemap-readahead-page.m4
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # Linux 6.16 removed readahead_page
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_PAGEMAP_READAHEAD_PAGE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([pagemap_has_readahead_page], [
|
||||||
|
#include <linux/pagemap.h>
|
||||||
|
], [
|
||||||
|
struct page *p __attribute__ ((unused)) = NULL;
|
||||||
|
struct readahead_control *ractl __attribute__ ((unused)) = NULL;
|
||||||
|
p = readahead_page(ractl);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_PAGEMAP_READAHEAD_PAGE], [
|
||||||
|
AC_MSG_CHECKING([whether readahead_page() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([pagemap_has_readahead_page], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_PAGEMAP_READAHEAD_PAGE, 1,
|
||||||
|
[readahead_page() exists])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
24
config/kernel-vfs-writepage.m4
Normal file
24
config/kernel-vfs-writepage.m4
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # Linux 6.16 removes address_space_operations ->writepage
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_WRITEPAGE], [
|
||||||
|
ZFS_LINUX_TEST_SRC([vfs_has_writepage], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
|
||||||
|
static const struct address_space_operations
|
||||||
|
aops __attribute__ ((unused)) = {
|
||||||
|
.writepage = NULL,
|
||||||
|
};
|
||||||
|
],[])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_VFS_WRITEPAGE], [
|
||||||
|
AC_MSG_CHECKING([whether aops->writepage exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([vfs_has_writepage], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_VFS_WRITEPAGE, 1,
|
||||||
|
[address_space_operations->writepage exists])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
@ -70,6 +70,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_COMMIT_METADATA
|
ZFS_AC_KERNEL_SRC_COMMIT_METADATA
|
||||||
ZFS_AC_KERNEL_SRC_SETATTR_PREPARE
|
ZFS_AC_KERNEL_SRC_SETATTR_PREPARE
|
||||||
ZFS_AC_KERNEL_SRC_INSERT_INODE_LOCKED
|
ZFS_AC_KERNEL_SRC_INSERT_INODE_LOCKED
|
||||||
|
ZFS_AC_KERNEL_SRC_DENTRY
|
||||||
ZFS_AC_KERNEL_SRC_TRUNCATE_SETSIZE
|
ZFS_AC_KERNEL_SRC_TRUNCATE_SETSIZE
|
||||||
ZFS_AC_KERNEL_SRC_SECURITY_INODE
|
ZFS_AC_KERNEL_SRC_SECURITY_INODE
|
||||||
ZFS_AC_KERNEL_SRC_FST_MOUNT
|
ZFS_AC_KERNEL_SRC_FST_MOUNT
|
||||||
@ -82,6 +83,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_VFS_MIGRATEPAGE
|
ZFS_AC_KERNEL_SRC_VFS_MIGRATEPAGE
|
||||||
ZFS_AC_KERNEL_SRC_VFS_FSYNC_2ARGS
|
ZFS_AC_KERNEL_SRC_VFS_FSYNC_2ARGS
|
||||||
ZFS_AC_KERNEL_SRC_VFS_READPAGES
|
ZFS_AC_KERNEL_SRC_VFS_READPAGES
|
||||||
|
ZFS_AC_KERNEL_SRC_VFS_WRITEPAGE
|
||||||
ZFS_AC_KERNEL_SRC_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
ZFS_AC_KERNEL_SRC_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
||||||
ZFS_AC_KERNEL_SRC_VFS_IOV_ITER
|
ZFS_AC_KERNEL_SRC_VFS_IOV_ITER
|
||||||
ZFS_AC_KERNEL_SRC_VFS_GENERIC_COPY_FILE_RANGE
|
ZFS_AC_KERNEL_SRC_VFS_GENERIC_COPY_FILE_RANGE
|
||||||
@ -111,6 +113,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_STANDALONE_LINUX_STDARG
|
ZFS_AC_KERNEL_SRC_STANDALONE_LINUX_STDARG
|
||||||
ZFS_AC_KERNEL_SRC_STRLCPY
|
ZFS_AC_KERNEL_SRC_STRLCPY
|
||||||
ZFS_AC_KERNEL_SRC_PAGEMAP_FOLIO_WAIT_BIT
|
ZFS_AC_KERNEL_SRC_PAGEMAP_FOLIO_WAIT_BIT
|
||||||
|
ZFS_AC_KERNEL_SRC_PAGEMAP_READAHEAD_PAGE
|
||||||
ZFS_AC_KERNEL_SRC_ADD_DISK
|
ZFS_AC_KERNEL_SRC_ADD_DISK
|
||||||
ZFS_AC_KERNEL_SRC_KTHREAD
|
ZFS_AC_KERNEL_SRC_KTHREAD
|
||||||
ZFS_AC_KERNEL_SRC_ZERO_PAGE
|
ZFS_AC_KERNEL_SRC_ZERO_PAGE
|
||||||
@ -132,6 +135,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_PIN_USER_PAGES
|
ZFS_AC_KERNEL_SRC_PIN_USER_PAGES
|
||||||
ZFS_AC_KERNEL_SRC_TIMER
|
ZFS_AC_KERNEL_SRC_TIMER
|
||||||
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_WB_ERR
|
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_WB_ERR
|
||||||
|
ZFS_AC_KERNEL_SRC_SOPS_FREE_INODE
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
powerpc*)
|
powerpc*)
|
||||||
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
|
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
|
||||||
@ -185,6 +189,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_COMMIT_METADATA
|
ZFS_AC_KERNEL_COMMIT_METADATA
|
||||||
ZFS_AC_KERNEL_SETATTR_PREPARE
|
ZFS_AC_KERNEL_SETATTR_PREPARE
|
||||||
ZFS_AC_KERNEL_INSERT_INODE_LOCKED
|
ZFS_AC_KERNEL_INSERT_INODE_LOCKED
|
||||||
|
ZFS_AC_KERNEL_DENTRY
|
||||||
ZFS_AC_KERNEL_TRUNCATE_SETSIZE
|
ZFS_AC_KERNEL_TRUNCATE_SETSIZE
|
||||||
ZFS_AC_KERNEL_SECURITY_INODE
|
ZFS_AC_KERNEL_SECURITY_INODE
|
||||||
ZFS_AC_KERNEL_FST_MOUNT
|
ZFS_AC_KERNEL_FST_MOUNT
|
||||||
@ -197,6 +202,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_VFS_MIGRATEPAGE
|
ZFS_AC_KERNEL_VFS_MIGRATEPAGE
|
||||||
ZFS_AC_KERNEL_VFS_FSYNC_2ARGS
|
ZFS_AC_KERNEL_VFS_FSYNC_2ARGS
|
||||||
ZFS_AC_KERNEL_VFS_READPAGES
|
ZFS_AC_KERNEL_VFS_READPAGES
|
||||||
|
ZFS_AC_KERNEL_VFS_WRITEPAGE
|
||||||
ZFS_AC_KERNEL_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
ZFS_AC_KERNEL_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
||||||
ZFS_AC_KERNEL_VFS_IOV_ITER
|
ZFS_AC_KERNEL_VFS_IOV_ITER
|
||||||
ZFS_AC_KERNEL_VFS_GENERIC_COPY_FILE_RANGE
|
ZFS_AC_KERNEL_VFS_GENERIC_COPY_FILE_RANGE
|
||||||
@ -226,6 +232,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_STANDALONE_LINUX_STDARG
|
ZFS_AC_KERNEL_STANDALONE_LINUX_STDARG
|
||||||
ZFS_AC_KERNEL_STRLCPY
|
ZFS_AC_KERNEL_STRLCPY
|
||||||
ZFS_AC_KERNEL_PAGEMAP_FOLIO_WAIT_BIT
|
ZFS_AC_KERNEL_PAGEMAP_FOLIO_WAIT_BIT
|
||||||
|
ZFS_AC_KERNEL_PAGEMAP_READAHEAD_PAGE
|
||||||
ZFS_AC_KERNEL_ADD_DISK
|
ZFS_AC_KERNEL_ADD_DISK
|
||||||
ZFS_AC_KERNEL_KTHREAD
|
ZFS_AC_KERNEL_KTHREAD
|
||||||
ZFS_AC_KERNEL_ZERO_PAGE
|
ZFS_AC_KERNEL_ZERO_PAGE
|
||||||
@ -248,6 +255,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_PIN_USER_PAGES
|
ZFS_AC_KERNEL_PIN_USER_PAGES
|
||||||
ZFS_AC_KERNEL_TIMER
|
ZFS_AC_KERNEL_TIMER
|
||||||
ZFS_AC_KERNEL_SUPER_BLOCK_S_WB_ERR
|
ZFS_AC_KERNEL_SUPER_BLOCK_S_WB_ERR
|
||||||
|
ZFS_AC_KERNEL_SOPS_FREE_INODE
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
powerpc*)
|
powerpc*)
|
||||||
ZFS_AC_KERNEL_CPU_HAS_FEATURE
|
ZFS_AC_KERNEL_CPU_HAS_FEATURE
|
||||||
|
@ -24,6 +24,8 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_SIMD], [
|
|||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AES
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AES
|
||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_PCLMULQDQ
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_PCLMULQDQ
|
||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_MOVBE
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_MOVBE
|
||||||
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VAES
|
||||||
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VPCLMULQDQ
|
||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE
|
||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVEOPT
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVEOPT
|
||||||
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVES
|
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVES
|
||||||
@ -38,9 +40,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_SSE], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports SSE])
|
AC_MSG_CHECKING([whether host toolchain supports SSE])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("xorps %xmm0, %xmm1");
|
__asm__ __volatile__("xorps %xmm0, %xmm1");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_DEFINE([HAVE_SSE], 1, [Define if host toolchain supports SSE])
|
AC_DEFINE([HAVE_SSE], 1, [Define if host toolchain supports SSE])
|
||||||
@ -57,9 +60,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_SSE2], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports SSE2])
|
AC_MSG_CHECKING([whether host toolchain supports SSE2])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("pxor %xmm0, %xmm1");
|
__asm__ __volatile__("pxor %xmm0, %xmm1");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_DEFINE([HAVE_SSE2], 1, [Define if host toolchain supports SSE2])
|
AC_DEFINE([HAVE_SSE2], 1, [Define if host toolchain supports SSE2])
|
||||||
@ -76,10 +80,11 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_SSE3], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports SSE3])
|
AC_MSG_CHECKING([whether host toolchain supports SSE3])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
char v[16];
|
char v[16];
|
||||||
__asm__ __volatile__("lddqu %0,%%xmm0" :: "m"(v[0]));
|
__asm__ __volatile__("lddqu %0,%%xmm0" :: "m"(v[0]));
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_DEFINE([HAVE_SSE3], 1, [Define if host toolchain supports SSE3])
|
AC_DEFINE([HAVE_SSE3], 1, [Define if host toolchain supports SSE3])
|
||||||
@ -96,9 +101,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_SSSE3], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports SSSE3])
|
AC_MSG_CHECKING([whether host toolchain supports SSSE3])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("pshufb %xmm0,%xmm1");
|
__asm__ __volatile__("pshufb %xmm0,%xmm1");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_DEFINE([HAVE_SSSE3], 1, [Define if host toolchain supports SSSE3])
|
AC_DEFINE([HAVE_SSSE3], 1, [Define if host toolchain supports SSSE3])
|
||||||
@ -115,9 +121,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_SSE4_1], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports SSE4.1])
|
AC_MSG_CHECKING([whether host toolchain supports SSE4.1])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("pmaxsb %xmm0,%xmm1");
|
__asm__ __volatile__("pmaxsb %xmm0,%xmm1");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_DEFINE([HAVE_SSE4_1], 1, [Define if host toolchain supports SSE4.1])
|
AC_DEFINE([HAVE_SSE4_1], 1, [Define if host toolchain supports SSE4.1])
|
||||||
@ -134,9 +141,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_SSE4_2], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports SSE4.2])
|
AC_MSG_CHECKING([whether host toolchain supports SSE4.2])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("pcmpgtq %xmm0, %xmm1");
|
__asm__ __volatile__("pcmpgtq %xmm0, %xmm1");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_DEFINE([HAVE_SSE4_2], 1, [Define if host toolchain supports SSE4.2])
|
AC_DEFINE([HAVE_SSE4_2], 1, [Define if host toolchain supports SSE4.2])
|
||||||
@ -153,10 +161,11 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX], [
|
|||||||
AC_MSG_CHECKING([whether host toolchain supports AVX])
|
AC_MSG_CHECKING([whether host toolchain supports AVX])
|
||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
char v[32];
|
char v[32];
|
||||||
__asm__ __volatile__("vmovdqa %0,%%ymm0" :: "m"(v[0]));
|
__asm__ __volatile__("vmovdqa %0,%%ymm0" :: "m"(v[0]));
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -174,9 +183,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX2], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vpshufb %ymm0,%ymm1,%ymm2");
|
__asm__ __volatile__("vpshufb %ymm0,%ymm1,%ymm2");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -194,9 +204,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512F], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vpandd %zmm0,%zmm1,%zmm2");
|
__asm__ __volatile__("vpandd %zmm0,%zmm1,%zmm2");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -214,9 +225,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512CD], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vplzcntd %zmm0,%zmm1");
|
__asm__ __volatile__("vplzcntd %zmm0,%zmm1");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -234,9 +246,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512DQ], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vandpd %zmm0,%zmm1,%zmm2");
|
__asm__ __volatile__("vandpd %zmm0,%zmm1,%zmm2");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -254,9 +267,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512BW], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vpshufb %zmm0,%zmm1,%zmm2");
|
__asm__ __volatile__("vpshufb %zmm0,%zmm1,%zmm2");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -274,9 +288,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512IFMA], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vpmadd52luq %zmm0,%zmm1,%zmm2");
|
__asm__ __volatile__("vpmadd52luq %zmm0,%zmm1,%zmm2");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -294,9 +309,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512VBMI], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vpermb %zmm0,%zmm1,%zmm2");
|
__asm__ __volatile__("vpermb %zmm0,%zmm1,%zmm2");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -314,9 +330,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512PF], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vgatherpf0dps (%rsi,%zmm0,4){%k1}");
|
__asm__ __volatile__("vgatherpf0dps (%rsi,%zmm0,4){%k1}");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -334,9 +351,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512ER], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vexp2pd %zmm0,%zmm1");
|
__asm__ __volatile__("vexp2pd %zmm0,%zmm1");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -354,9 +372,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AVX512VL], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("vpabsq %zmm0,%zmm1");
|
__asm__ __volatile__("vpabsq %zmm0,%zmm1");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -374,9 +393,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AES], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("aesenc %xmm0, %xmm1");
|
__asm__ __volatile__("aesenc %xmm0, %xmm1");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -394,9 +414,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_PCLMULQDQ], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("pclmulqdq %0, %%xmm0, %%xmm1" :: "i"(0));
|
__asm__ __volatile__("pclmulqdq %0, %%xmm0, %%xmm1" :: "i"(0));
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -414,9 +435,10 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_MOVBE], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("movbe 0(%eax), %eax");
|
__asm__ __volatile__("movbe 0(%eax), %eax");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -426,6 +448,48 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_MOVBE], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VAES
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VAES], [
|
||||||
|
AC_MSG_CHECKING([whether host toolchain supports VAES])
|
||||||
|
|
||||||
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
|
[
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
__asm__ __volatile__("vaesenc %ymm0, %ymm1, %ymm0");
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
]])], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE([HAVE_VAES], 1, [Define if host toolchain supports VAES])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl #
|
||||||
|
dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VPCLMULQDQ
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VPCLMULQDQ], [
|
||||||
|
AC_MSG_CHECKING([whether host toolchain supports VPCLMULQDQ])
|
||||||
|
|
||||||
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
|
[
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
__asm__ __volatile__("vpclmulqdq %0, %%ymm4, %%ymm3, %%ymm5" :: "i"(0));
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
]])], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE([HAVE_VPCLMULQDQ], 1, [Define if host toolchain supports VPCLMULQDQ])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE
|
dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE
|
||||||
dnl #
|
dnl #
|
||||||
@ -434,10 +498,11 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
char b[4096] __attribute__ ((aligned (64)));
|
char b[4096] __attribute__ ((aligned (64)));
|
||||||
__asm__ __volatile__("xsave %[b]\n" : : [b] "m" (*b) : "memory");
|
__asm__ __volatile__("xsave %[b]\n" : : [b] "m" (*b) : "memory");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -455,10 +520,11 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVEOPT], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
char b[4096] __attribute__ ((aligned (64)));
|
char b[4096] __attribute__ ((aligned (64)));
|
||||||
__asm__ __volatile__("xsaveopt %[b]\n" : : [b] "m" (*b) : "memory");
|
__asm__ __volatile__("xsaveopt %[b]\n" : : [b] "m" (*b) : "memory");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -476,10 +542,11 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVES], [
|
|||||||
|
|
||||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
[
|
[
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
char b[4096] __attribute__ ((aligned (64)));
|
char b[4096] __attribute__ ((aligned (64)));
|
||||||
__asm__ __volatile__("xsaves %[b]\n" : : [b] "m" (*b) : "memory");
|
__asm__ __volatile__("xsaves %[b]\n" : : [b] "m" (*b) : "memory");
|
||||||
|
return (0);
|
||||||
}
|
}
|
||||||
]])], [
|
]])], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
|
34
config/user-statx.m4
Normal file
34
config/user-statx.m4
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # Check for statx() function and STATX_MNT_ID availability
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_CONFIG_USER_STATX], [
|
||||||
|
AC_CHECK_HEADERS([sys/stat.h],
|
||||||
|
[have_stat_headers=yes],
|
||||||
|
[have_stat_headers=no])
|
||||||
|
|
||||||
|
AS_IF([test "x$have_stat_headers" = "xyes"], [
|
||||||
|
AC_CHECK_FUNC([statx], [
|
||||||
|
AC_DEFINE([HAVE_STATX], [1], [statx() is available])
|
||||||
|
|
||||||
|
dnl Check for STATX_MNT_ID availability
|
||||||
|
AC_MSG_CHECKING([for STATX_MNT_ID])
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
#include <sys/stat.h>
|
||||||
|
]], [[
|
||||||
|
struct statx stx;
|
||||||
|
int mask = STATX_MNT_ID;
|
||||||
|
(void)mask;
|
||||||
|
(void)stx.stx_mnt_id;
|
||||||
|
]])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE([HAVE_STATX_MNT_ID], [1], [STATX_MNT_ID is available])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
], [
|
||||||
|
AC_MSG_WARN([sys/stat.h not found; skipping statx support])
|
||||||
|
])
|
||||||
|
]) dnl end AC_DEFUN
|
@ -17,6 +17,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER], [
|
|||||||
ZFS_AC_CONFIG_USER_LIBUDEV
|
ZFS_AC_CONFIG_USER_LIBUDEV
|
||||||
ZFS_AC_CONFIG_USER_LIBUUID
|
ZFS_AC_CONFIG_USER_LIBUUID
|
||||||
ZFS_AC_CONFIG_USER_LIBBLKID
|
ZFS_AC_CONFIG_USER_LIBBLKID
|
||||||
|
ZFS_AC_CONFIG_USER_STATX
|
||||||
])
|
])
|
||||||
ZFS_AC_CONFIG_USER_LIBTIRPC
|
ZFS_AC_CONFIG_USER_LIBTIRPC
|
||||||
ZFS_AC_CONFIG_USER_LIBCRYPTO
|
ZFS_AC_CONFIG_USER_LIBCRYPTO
|
||||||
|
@ -205,6 +205,46 @@ AC_DEFUN([ZFS_AC_DEBUG_INVARIANTS], [
|
|||||||
AC_MSG_RESULT([$enable_invariants])
|
AC_MSG_RESULT([$enable_invariants])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl # Disabled by default. If enabled allows a configured "turn objtools
|
||||||
|
dnl # warnings into errors" (CONFIG_OBJTOOL_WERROR) behavior to take effect.
|
||||||
|
dnl # If disabled, objtool warnings are never turned into errors. It can't
|
||||||
|
dnl # be enabled if the kernel wasn't compiled with CONFIG_OBJTOOL_WERROR=y.
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_OBJTOOL_WERROR], [
|
||||||
|
AC_MSG_CHECKING([whether objtool error on warning behavior is enabled])
|
||||||
|
AC_ARG_ENABLE([objtool-werror],
|
||||||
|
[AS_HELP_STRING([--enable-objtool-werror],
|
||||||
|
[Enable objtool's error on warning behaviour if present @<:@default=no@:>@])],
|
||||||
|
[enable_objtool_werror=$enableval],
|
||||||
|
[enable_objtool_werror=no])
|
||||||
|
AC_MSG_RESULT([$enable_objtool_werror])
|
||||||
|
|
||||||
|
AS_IF([test x$CONFIG_OBJTOOL_WERROR_DEFINED = xyes],[
|
||||||
|
AS_IF([test x$enable_objtool_werror = xyes],[
|
||||||
|
AC_MSG_NOTICE([enable-objtool-werror defined, keeping -Werror ])
|
||||||
|
],[
|
||||||
|
AC_MSG_NOTICE([enable-objtool-werror undefined, disabling -Werror ])
|
||||||
|
OBJTOOL_DISABLE_WERROR=y
|
||||||
|
abs_objtool_binary=$kernelsrc/tools/objtool/objtool
|
||||||
|
AS_IF([test -x $abs_objtool_binary],[],[
|
||||||
|
AC_MSG_ERROR([*** objtool binary $abs_objtool_binary not found])
|
||||||
|
])
|
||||||
|
dnl # The path to the wrapper is defined in modules/Makefile.in.
|
||||||
|
])
|
||||||
|
],[
|
||||||
|
dnl # We can't enable --Werror if it's not there.
|
||||||
|
AS_IF([test x$enable_objtool_werror = xyes],[
|
||||||
|
AC_MSG_ERROR([
|
||||||
|
*** Cannot enable objtool-werror,
|
||||||
|
*** a kernel built with CONFIG_OBJTOOL_WERROR=y is required.
|
||||||
|
])
|
||||||
|
],[])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_SUBST(OBJTOOL_DISABLE_WERROR)
|
||||||
|
AC_SUBST(abs_objtool_binary)
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
||||||
AX_COUNT_CPUS([])
|
AX_COUNT_CPUS([])
|
||||||
AC_SUBST(CPU_COUNT)
|
AC_SUBST(CPU_COUNT)
|
||||||
@ -212,10 +252,12 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
|||||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION
|
ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION
|
||||||
ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION
|
ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION
|
||||||
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_ATOMIC_ALIGNMENT
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH
|
ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN
|
ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH
|
||||||
|
ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_NO_FORMAT_ZERO_LENGTH
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_FORMAT_OVERFLOW
|
ZFS_AC_CONFIG_ALWAYS_CC_FORMAT_OVERFLOW
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER
|
||||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_IPA_SRA
|
ZFS_AC_CONFIG_ALWAYS_CC_NO_IPA_SRA
|
||||||
@ -225,6 +267,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
|||||||
ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_SIMD
|
ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_SIMD
|
||||||
ZFS_AC_CONFIG_ALWAYS_SYSTEM
|
ZFS_AC_CONFIG_ALWAYS_SYSTEM
|
||||||
ZFS_AC_CONFIG_ALWAYS_ARCH
|
ZFS_AC_CONFIG_ALWAYS_ARCH
|
||||||
|
ZFS_AC_CONFIG_CHECK_ARCH_VAR
|
||||||
ZFS_AC_CONFIG_ALWAYS_PYTHON
|
ZFS_AC_CONFIG_ALWAYS_PYTHON
|
||||||
ZFS_AC_CONFIG_ALWAYS_PYZFS
|
ZFS_AC_CONFIG_ALWAYS_PYZFS
|
||||||
ZFS_AC_CONFIG_ALWAYS_SED
|
ZFS_AC_CONFIG_ALWAYS_SED
|
||||||
|
@ -65,6 +65,7 @@ ZFS_AC_DEBUGINFO
|
|||||||
ZFS_AC_DEBUG_KMEM
|
ZFS_AC_DEBUG_KMEM
|
||||||
ZFS_AC_DEBUG_KMEM_TRACKING
|
ZFS_AC_DEBUG_KMEM_TRACKING
|
||||||
ZFS_AC_DEBUG_INVARIANTS
|
ZFS_AC_DEBUG_INVARIANTS
|
||||||
|
ZFS_AC_OBJTOOL_WERROR
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
contrib/debian/rules
|
contrib/debian/rules
|
||||||
@ -86,6 +87,7 @@ AC_CONFIG_FILES([
|
|||||||
zfs.release
|
zfs.release
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([scripts/objtool-wrapper], [chmod +x scripts/objtool-wrapper])
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
|
@ -100,8 +100,8 @@ Depends: ${misc:Depends}, ${shlibs:Depends}
|
|||||||
# The libcurl4 is loaded through dlopen("libcurl.so.4").
|
# The libcurl4 is loaded through dlopen("libcurl.so.4").
|
||||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988521
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988521
|
||||||
Recommends: libcurl4
|
Recommends: libcurl4
|
||||||
Breaks: libzfs2, libzfs4, libzfs4linux, libzfs6linux
|
Breaks: libzfs2, libzfs4, libzfs4linux, libzfs6linux, openzfs-libzfs4
|
||||||
Replaces: libzfs2, libzfs4, libzfs4linux, libzfs6linux
|
Replaces: libzfs2, libzfs4, libzfs4linux, libzfs6linux, openzfs-libzfs4
|
||||||
Conflicts: libzfs6linux
|
Conflicts: libzfs6linux
|
||||||
Description: OpenZFS filesystem library for Linux - general support
|
Description: OpenZFS filesystem library for Linux - general support
|
||||||
OpenZFS is a storage platform that encompasses the functionality of
|
OpenZFS is a storage platform that encompasses the functionality of
|
||||||
@ -128,8 +128,8 @@ Package: openzfs-libzpool6
|
|||||||
Section: contrib/libs
|
Section: contrib/libs
|
||||||
Architecture: linux-any
|
Architecture: linux-any
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
Breaks: libzpool2, libzpool5, libzpool5linux, libzpool6linux
|
Breaks: libzpool2, libzpool5, libzpool6linux
|
||||||
Replaces: libzpool2, libzpool5, libzpool5linux, libzpool6linux
|
Replaces: libzpool2, libzpool5, libzpool6linux
|
||||||
Conflicts: libzpool6linux
|
Conflicts: libzpool6linux
|
||||||
Description: OpenZFS pool library for Linux
|
Description: OpenZFS pool library for Linux
|
||||||
OpenZFS is a storage platform that encompasses the functionality of
|
OpenZFS is a storage platform that encompasses the functionality of
|
||||||
|
@ -4,7 +4,7 @@ The detailed contributor information can be found in [2][3].
|
|||||||
|
|
||||||
Files: contrib/debian/*
|
Files: contrib/debian/*
|
||||||
Copyright:
|
Copyright:
|
||||||
2013-2016, Aron Xu <aron@debian.org>
|
2013-2025, Aron Xu <aron@debian.org>
|
||||||
2016, Petter Reinholdtsen <pere@hungry.com>
|
2016, Petter Reinholdtsen <pere@hungry.com>
|
||||||
2013, Carlos Alberto Lopez Perez <clopez@igalia.com>
|
2013, Carlos Alberto Lopez Perez <clopez@igalia.com>
|
||||||
2013, Turbo Fredriksson <turbo@bayour.com>
|
2013, Turbo Fredriksson <turbo@bayour.com>
|
||||||
@ -12,6 +12,8 @@ Copyright:
|
|||||||
2011-2013, Darik Horn <dajhorn@vanadac.com>
|
2011-2013, Darik Horn <dajhorn@vanadac.com>
|
||||||
2018-2019, Mo Zhou <cdluminate@gmail.com>
|
2018-2019, Mo Zhou <cdluminate@gmail.com>
|
||||||
2018-2020, Mo Zhou <lumin@debian.org>
|
2018-2020, Mo Zhou <lumin@debian.org>
|
||||||
|
2023-2024, Shengqi Chen <harry-chen@outlook.com>
|
||||||
|
2024-2025, Shengqi Chen <harry@debian.org>
|
||||||
License: GPL-2+
|
License: GPL-2+
|
||||||
|
|
||||||
[1] https://tracker.debian.org/pkg/zfs-linux
|
[1] https://tracker.debian.org/pkg/zfs-linux
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
usr/bin/arc_summary.py
|
usr/bin/zarcsummary.py
|
||||||
usr/share/zfs/zfs-helpers.sh
|
usr/share/zfs/zfs-helpers.sh
|
||||||
etc/default/zfs
|
etc/default/zfs
|
||||||
etc/init.d
|
etc/init.d
|
||||||
@ -9,4 +9,4 @@ etc/zfs/vdev_id.conf.sas_direct.example
|
|||||||
etc/zfs/vdev_id.conf.sas_switch.example
|
etc/zfs/vdev_id.conf.sas_switch.example
|
||||||
etc/zfs/vdev_id.conf.scsi.example
|
etc/zfs/vdev_id.conf.scsi.example
|
||||||
etc/zfs/zfs-functions
|
etc/zfs/zfs-functions
|
||||||
lib/systemd/system/zfs-import.service
|
usr/lib/systemd/system/zfs-import.service
|
||||||
|
@ -1 +1 @@
|
|||||||
lib/@DEB_HOST_MULTIARCH@/libnvpair.so.*
|
usr/lib/@DEB_HOST_MULTIARCH@/libnvpair.so.*
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
lib/*/security/pam_zfs_key.so
|
usr/lib/*/security/pam_zfs_key.so
|
||||||
usr/share/pam-configs/zfs_key
|
usr/share/pam-configs/zfs_key
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if ! $(ldd "/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/security/pam_zfs_key.so" | grep -q "libasan") ; then
|
if ! $(ldd "/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/security/pam_zfs_key.so" | grep -q "libasan") ; then
|
||||||
pam-auth-update --package
|
pam-auth-update --package
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
lib/@DEB_HOST_MULTIARCH@/libuutil.so.*
|
usr/lib/@DEB_HOST_MULTIARCH@/libuutil.so.*
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
lib/@DEB_HOST_MULTIARCH@/*.a usr/lib/@DEB_HOST_MULTIARCH@
|
usr/lib/@DEB_HOST_MULTIARCH@/*.a
|
||||||
|
usr/lib/@DEB_HOST_MULTIARCH@/*.so
|
||||||
|
usr/lib/@DEB_HOST_MULTIARCH@/pkgconfig
|
||||||
usr/include
|
usr/include
|
||||||
usr/lib/@DEB_HOST_MULTIARCH@
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
lib/@DEB_HOST_MULTIARCH@/libzfs.so.*
|
usr/lib/@DEB_HOST_MULTIARCH@/libzfs.so.*
|
||||||
lib/@DEB_HOST_MULTIARCH@/libzfs_core.so.*
|
usr/lib/@DEB_HOST_MULTIARCH@/libzfs_core.so.*
|
||||||
|
@ -1 +1 @@
|
|||||||
lib/@DEB_HOST_MULTIARCH@/libzfsbootenv.so.*
|
usr/lib/@DEB_HOST_MULTIARCH@/libzfsbootenv.so.*
|
||||||
|
@ -1 +1 @@
|
|||||||
lib/@DEB_HOST_MULTIARCH@/libzpool.so.*
|
usr/lib/@DEB_HOST_MULTIARCH@/libzpool.so.*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
sbin/ztest
|
usr/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
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
etc/zfs/zed.d/*
|
etc/zfs/zed.d/*
|
||||||
lib/systemd/system/zfs-zed.service
|
usr/lib/systemd/system/zfs-zed.service
|
||||||
usr/lib/zfs-linux/zed.d/*
|
usr/lib/zfs-linux/zed.d/*
|
||||||
usr/sbin/zed
|
usr/sbin/zed
|
||||||
usr/share/man/man8/zed.8
|
usr/share/man/man8/zed.8
|
||||||
|
@ -1,47 +1,48 @@
|
|||||||
etc/default/zfs
|
etc/default/zfs
|
||||||
etc/zfs/zfs-functions
|
etc/zfs/zfs-functions
|
||||||
etc/zfs/zpool.d/
|
etc/zfs/zpool.d/
|
||||||
lib/systemd/system-generators/
|
usr/lib/systemd/system-generators/
|
||||||
lib/systemd/system-preset/
|
usr/lib/systemd/system-preset/
|
||||||
lib/systemd/system/zfs-import-cache.service
|
usr/lib/systemd/system/zfs-import-cache.service
|
||||||
lib/systemd/system/zfs-import-scan.service
|
usr/lib/systemd/system/zfs-import-scan.service
|
||||||
lib/systemd/system/zfs-import.target
|
usr/lib/systemd/system/zfs-import.target
|
||||||
lib/systemd/system/zfs-load-key.service
|
usr/lib/systemd/system/zfs-load-key.service
|
||||||
lib/systemd/system/zfs-mount.service
|
usr/lib/systemd/system/zfs-mount.service
|
||||||
lib/systemd/system/zfs-scrub-monthly@.timer
|
usr/lib/systemd/system/zfs-mount@.service
|
||||||
lib/systemd/system/zfs-scrub-weekly@.timer
|
usr/lib/systemd/system/zfs-scrub-monthly@.timer
|
||||||
lib/systemd/system/zfs-scrub@.service
|
usr/lib/systemd/system/zfs-scrub-weekly@.timer
|
||||||
lib/systemd/system/zfs-trim-monthly@.timer
|
usr/lib/systemd/system/zfs-scrub@.service
|
||||||
lib/systemd/system/zfs-trim-weekly@.timer
|
usr/lib/systemd/system/zfs-trim-monthly@.timer
|
||||||
lib/systemd/system/zfs-trim@.service
|
usr/lib/systemd/system/zfs-trim-weekly@.timer
|
||||||
lib/systemd/system/zfs-share.service
|
usr/lib/systemd/system/zfs-trim@.service
|
||||||
lib/systemd/system/zfs-volume-wait.service
|
usr/lib/systemd/system/zfs-share.service
|
||||||
lib/systemd/system/zfs-volumes.target
|
usr/lib/systemd/system/zfs-volume-wait.service
|
||||||
lib/systemd/system/zfs.target
|
usr/lib/systemd/system/zfs-volumes.target
|
||||||
lib/udev/
|
usr/lib/systemd/system/zfs.target
|
||||||
sbin/fsck.zfs
|
usr/lib/udev/
|
||||||
sbin/mount.zfs
|
usr/sbin/fsck.zfs
|
||||||
sbin/zdb
|
usr/sbin/mount.zfs
|
||||||
sbin/zfs
|
usr/sbin/zdb
|
||||||
sbin/zfs_ids_to_path
|
usr/sbin/zfs
|
||||||
sbin/zgenhostid
|
usr/sbin/zfs_ids_to_path
|
||||||
sbin/zhack
|
usr/sbin/zgenhostid
|
||||||
sbin/zinject
|
usr/sbin/zhack
|
||||||
sbin/zpool
|
usr/sbin/zinject
|
||||||
sbin/zstream
|
usr/sbin/zpool
|
||||||
sbin/zstreamdump
|
usr/sbin/zstream
|
||||||
|
usr/sbin/zstreamdump
|
||||||
usr/bin/zvol_wait
|
usr/bin/zvol_wait
|
||||||
usr/lib/modules-load.d/ lib/
|
usr/lib/modules-load.d/
|
||||||
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/lib/zfs-linux/zfs_prepare_disk
|
||||||
usr/sbin/arc_summary
|
usr/bin/zarcsummary
|
||||||
usr/sbin/arcstat
|
usr/bin/zarcstat
|
||||||
usr/sbin/dbufstat
|
usr/bin/dbufstat usr/sbin
|
||||||
usr/sbin/zilstat
|
usr/bin/zilstat
|
||||||
usr/share/zfs/compatibility.d/
|
usr/share/zfs/compatibility.d/
|
||||||
usr/share/bash-completion/completions
|
usr/share/bash-completion/completions
|
||||||
usr/share/man/man1/arcstat.1
|
usr/share/man/man1/zarcstat.1
|
||||||
usr/share/man/man1/zhack.1
|
usr/share/man/man1/zhack.1
|
||||||
usr/share/man/man1/zvol_wait.1
|
usr/share/man/man1/zvol_wait.1
|
||||||
usr/share/man/man5/
|
usr/share/man/man5/
|
||||||
@ -73,6 +74,7 @@ usr/share/man/man8/zfs-recv.8
|
|||||||
usr/share/man/man8/zfs-redact.8
|
usr/share/man/man8/zfs-redact.8
|
||||||
usr/share/man/man8/zfs-release.8
|
usr/share/man/man8/zfs-release.8
|
||||||
usr/share/man/man8/zfs-rename.8
|
usr/share/man/man8/zfs-rename.8
|
||||||
|
usr/share/man/man8/zfs-rewrite.8
|
||||||
usr/share/man/man8/zfs-rollback.8
|
usr/share/man/man8/zfs-rollback.8
|
||||||
usr/share/man/man8/zfs-send.8
|
usr/share/man/man8/zfs-send.8
|
||||||
usr/share/man/man8/zfs-set.8
|
usr/share/man/man8/zfs-set.8
|
||||||
|
3
contrib/debian/openzfs-zfsutils.links
Normal file
3
contrib/debian/openzfs-zfsutils.links
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
usr/sbin/zfs usr/bin/zfs
|
||||||
|
usr/sbin/zpool usr/bin/zpool
|
||||||
|
usr/lib/zfs-linux/zpool_influxdb usr/bin/zpool_influxdb
|
@ -37,18 +37,19 @@ override_dh_auto_configure:
|
|||||||
@# Build the userland, but don't build the kernel modules.
|
@# Build the userland, but don't build the kernel modules.
|
||||||
dh_auto_configure -- @CFGOPTS@ \
|
dh_auto_configure -- @CFGOPTS@ \
|
||||||
--bindir=/usr/bin \
|
--bindir=/usr/bin \
|
||||||
--sbindir=/sbin \
|
--sbindir=/usr/sbin \
|
||||||
--libdir=/lib/"$(DEB_HOST_MULTIARCH)" \
|
--with-mounthelperdir=/usr/sbin \
|
||||||
--with-udevdir=/lib/udev \
|
--libdir=/usr/lib/"$(DEB_HOST_MULTIARCH)" \
|
||||||
|
--with-udevdir=/usr/lib/udev \
|
||||||
--with-zfsexecdir=/usr/lib/zfs-linux \
|
--with-zfsexecdir=/usr/lib/zfs-linux \
|
||||||
--enable-systemd \
|
--enable-systemd \
|
||||||
--enable-pyzfs \
|
--enable-pyzfs \
|
||||||
--with-python=python3 \
|
--with-python=python3 \
|
||||||
--with-pammoduledir='/lib/$(DEB_HOST_MULTIARCH)/security' \
|
--with-pammoduledir='/usr/lib/$(DEB_HOST_MULTIARCH)/security' \
|
||||||
--with-pkgconfigdir='/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig' \
|
--with-pkgconfigdir='/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig' \
|
||||||
--with-systemdunitdir=/lib/systemd/system \
|
--with-systemdunitdir=/usr/lib/systemd/system \
|
||||||
--with-systemdpresetdir=/lib/systemd/system-preset \
|
--with-systemdpresetdir=/usr/lib/systemd/system-preset \
|
||||||
--with-systemdgeneratordir=/lib/systemd/system-generators \
|
--with-systemdgeneratordir=/usr/lib/systemd/system-generators \
|
||||||
--with-config=user
|
--with-config=user
|
||||||
|
|
||||||
for i in $(wildcard $(CURDIR)/debian/*.install.in) ; do \
|
for i in $(wildcard $(CURDIR)/debian/*.install.in) ; do \
|
||||||
@ -77,23 +78,10 @@ override_dh_auto_install:
|
|||||||
@# Install the utilities.
|
@# Install the utilities.
|
||||||
$(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
|
$(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
|
||||||
|
|
||||||
# Move from bin_dir to /usr/sbin
|
|
||||||
# Remove suffix (.py) as per policy 10.4 - Scripts
|
|
||||||
# https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
|
|
||||||
mkdir -p '$(CURDIR)/debian/tmp/usr/sbin/'
|
|
||||||
mv '$(CURDIR)/debian/tmp/usr/bin/arc_summary' '$(CURDIR)/debian/tmp/usr/sbin/arc_summary'
|
|
||||||
mv '$(CURDIR)/debian/tmp/usr/bin/arcstat' '$(CURDIR)/debian/tmp/usr/sbin/arcstat'
|
|
||||||
mv '$(CURDIR)/debian/tmp/usr/bin/dbufstat' '$(CURDIR)/debian/tmp/usr/sbin/dbufstat'
|
|
||||||
mv '$(CURDIR)/debian/tmp/usr/bin/zilstat' '$(CURDIR)/debian/tmp/usr/sbin/zilstat'
|
|
||||||
|
|
||||||
@# Zed has dependencies outside of the system root.
|
|
||||||
mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
|
|
||||||
sed -i 's|ExecStart=/sbin/|ExecStart=/usr/sbin/|g' '$(CURDIR)/debian/tmp/lib/systemd/system/zfs-zed.service'
|
|
||||||
|
|
||||||
@# Install the DKMS source.
|
@# Install the DKMS source.
|
||||||
@# We only want the files needed to build the modules
|
@# We only want the files needed to build the modules
|
||||||
install -D -t '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts' \
|
install -D -t '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts' \
|
||||||
'$(CURDIR)/scripts/dkms.postbuild'
|
'$(CURDIR)/scripts/dkms.postbuild' '$(CURDIR)/scripts/objtool-wrapper.in'
|
||||||
$(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)' || exit 1;)
|
$(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)' || exit 1;)
|
||||||
|
|
||||||
@# Only ever build Linux modules
|
@# Only ever build Linux modules
|
||||||
@ -108,8 +96,8 @@ override_dh_auto_install:
|
|||||||
@# - zfs.release$
|
@# - zfs.release$
|
||||||
@# * Takes care of spaces and tabs
|
@# * Takes care of spaces and tabs
|
||||||
@# * Remove reference to ZFS_AC_PACKAGE
|
@# * Remove reference to ZFS_AC_PACKAGE
|
||||||
awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ {\
|
awk '/^AC_CONFIG_FILES\(\[/,/\]\)/ {\
|
||||||
if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/(Makefile|sys|os\/(Makefile|linux))|module\/|Makefile([ \t]+)?$$|zfs\.release([ \t]+)?$$))/) \
|
if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/(Makefile|sys|os\/(Makefile|linux))|module\/|Makefile([ \t]+)?$$|zfs\.release([ \t]+)?$$))|scripts\/objtool-wrapper.*\]\)$$/) \
|
||||||
{next} } {print}' \
|
{next} } {print}' \
|
||||||
'$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac' | sed '/ZFS_AC_PACKAGE/d' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac'
|
'$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac' | sed '/ZFS_AC_PACKAGE/d' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac'
|
||||||
@# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs.
|
@# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs.
|
||||||
@ -131,11 +119,6 @@ override_dh_auto_install:
|
|||||||
cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)'; ./autogen.sh
|
cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)'; ./autogen.sh
|
||||||
rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/autom4te.cache'
|
rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/autom4te.cache'
|
||||||
|
|
||||||
for i in `ls $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/*.so`; do \
|
|
||||||
ln -s '/lib/$(DEB_HOST_MULTIARCH)/'`readlink $${i}` '$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/'`basename $${i}`; \
|
|
||||||
rm $${i}; \
|
|
||||||
done
|
|
||||||
|
|
||||||
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'
|
||||||
|
|
||||||
@ -159,7 +142,7 @@ override_dh_auto_clean:
|
|||||||
@if test -e META.orig; then mv META.orig META; fi
|
@if test -e META.orig; then mv META.orig META; fi
|
||||||
|
|
||||||
override_dh_install:
|
override_dh_install:
|
||||||
find debian/tmp/lib -name '*.la' -delete
|
find debian/tmp/usr/lib -name '*.la' -delete
|
||||||
dh_install
|
dh_install
|
||||||
|
|
||||||
override_dh_missing:
|
override_dh_missing:
|
||||||
@ -173,8 +156,8 @@ override_dh_installinit:
|
|||||||
dh_installinit -R --name zfs-zed
|
dh_installinit -R --name zfs-zed
|
||||||
|
|
||||||
override_dh_installsystemd:
|
override_dh_installsystemd:
|
||||||
mkdir -p debian/openzfs-zfsutils/lib/systemd/system
|
mkdir -p debian/openzfs-zfsutils/usr/lib/systemd/system
|
||||||
ln -sr /dev/null debian/openzfs-zfsutils/lib/systemd/system/zfs-import.service
|
ln -sr /dev/null debian/openzfs-zfsutils/usr/lib/systemd/system/zfs-import.service
|
||||||
dh_installsystemd --no-stop-on-upgrade -X zfs-zed.service
|
dh_installsystemd --no-stop-on-upgrade -X zfs-zed.service
|
||||||
dh_installsystemd --name zfs-zed
|
dh_installsystemd --name zfs-zed
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
PREREQ="udev"
|
PREREQ="udev"
|
||||||
PREREQ_UDEV_RULES="60-zvol.rules 69-vdev.rules"
|
PREREQ_UDEV_RULES="60-zvol.rules 69-vdev.rules"
|
||||||
COPY_EXEC_LIST="/lib/udev/zvol_id /lib/udev/vdev_id"
|
COPY_EXEC_LIST="/usr/lib/udev/zvol_id /usr/lib/udev/vdev_id"
|
||||||
|
|
||||||
# Generic result code.
|
# Generic result code.
|
||||||
RC=0
|
RC=0
|
||||||
|
@ -16,7 +16,8 @@ depends() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
installkernel() {
|
installkernel() {
|
||||||
instmods -c zfs
|
hostonly='' instmods -c zfs
|
||||||
|
instmods mpt3sas virtio_blk
|
||||||
}
|
}
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
|
253
contrib/icp/gcm-simd/boringssl/LICENSE
Normal file
253
contrib/icp/gcm-simd/boringssl/LICENSE
Normal file
@ -0,0 +1,253 @@
|
|||||||
|
BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL
|
||||||
|
licensing. Files that are completely new have a Google copyright and an ISC
|
||||||
|
license. This license is reproduced at the bottom of this file.
|
||||||
|
|
||||||
|
Contributors to BoringSSL are required to follow the CLA rules for Chromium:
|
||||||
|
https://cla.developers.google.com/clas
|
||||||
|
|
||||||
|
Files in third_party/ have their own licenses, as described therein. The MIT
|
||||||
|
license, for third_party/fiat, which, unlike other third_party directories, is
|
||||||
|
compiled into non-test libraries, is included below.
|
||||||
|
|
||||||
|
The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the
|
||||||
|
OpenSSL License and the original SSLeay license apply to the toolkit. See below
|
||||||
|
for the actual license texts. Actually both licenses are BSD-style Open Source
|
||||||
|
licenses. In case of any license issues related to OpenSSL please contact
|
||||||
|
openssl-core@openssl.org.
|
||||||
|
|
||||||
|
The following are Google-internal bug numbers where explicit permission from
|
||||||
|
some authors is recorded for use of their work. (This is purely for our own
|
||||||
|
record keeping.)
|
||||||
|
27287199
|
||||||
|
27287880
|
||||||
|
27287883
|
||||||
|
263291445
|
||||||
|
|
||||||
|
|
||||||
|
OpenSSL License
|
||||||
|
---------------
|
||||||
|
|
||||||
|
/* ====================================================================
|
||||||
|
* Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
* the documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* 3. All advertising materials mentioning features or use of this
|
||||||
|
* software must display the following acknowledgment:
|
||||||
|
* "This product includes software developed by the OpenSSL Project
|
||||||
|
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||||
|
*
|
||||||
|
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||||
|
* endorse or promote products derived from this software without
|
||||||
|
* prior written permission. For written permission, please contact
|
||||||
|
* openssl-core@openssl.org.
|
||||||
|
*
|
||||||
|
* 5. Products derived from this software may not be called "OpenSSL"
|
||||||
|
* nor may "OpenSSL" appear in their names without prior written
|
||||||
|
* permission of the OpenSSL Project.
|
||||||
|
*
|
||||||
|
* 6. Redistributions of any form whatsoever must retain the following
|
||||||
|
* acknowledgment:
|
||||||
|
* "This product includes software developed by the OpenSSL Project
|
||||||
|
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||||
|
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||||
|
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||||
|
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
* ====================================================================
|
||||||
|
*
|
||||||
|
* This product includes cryptographic software written by Eric Young
|
||||||
|
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||||
|
* Hudson (tjh@cryptsoft.com).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
Original SSLeay License
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This package is an SSL implementation written
|
||||||
|
* by Eric Young (eay@cryptsoft.com).
|
||||||
|
* The implementation was written so as to conform with Netscapes SSL.
|
||||||
|
*
|
||||||
|
* This library is free for commercial and non-commercial use as long as
|
||||||
|
* the following conditions are aheared to. The following conditions
|
||||||
|
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||||
|
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||||
|
* included with this distribution is covered by the same copyright terms
|
||||||
|
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||||
|
*
|
||||||
|
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||||
|
* the code are not to be removed.
|
||||||
|
* If this package is used in a product, Eric Young should be given attribution
|
||||||
|
* as the author of the parts of the library used.
|
||||||
|
* This can be in the form of a textual message at program startup or
|
||||||
|
* in documentation (online or textual) provided with the package.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
* 1. Redistributions of source code must retain the copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* 3. All advertising materials mentioning features or use of this software
|
||||||
|
* must display the following acknowledgement:
|
||||||
|
* "This product includes cryptographic software written by
|
||||||
|
* Eric Young (eay@cryptsoft.com)"
|
||||||
|
* The word 'cryptographic' can be left out if the rouines from the library
|
||||||
|
* being used are not cryptographic related :-).
|
||||||
|
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||||
|
* the apps directory (application code) you must include an acknowledgement:
|
||||||
|
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
* SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The licence and distribution terms for any publically available version or
|
||||||
|
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||||
|
* copied and put under another distribution licence
|
||||||
|
* [including the GNU Public Licence.]
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
ISC license used for completely new code in BoringSSL:
|
||||||
|
|
||||||
|
/* Copyright 2015 The BoringSSL Authors
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||||
|
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||||
|
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
|
||||||
|
|
||||||
|
|
||||||
|
The code in third_party/fiat carries the MIT license:
|
||||||
|
|
||||||
|
Copyright (c) 2015-2016 the fiat-crypto authors (see
|
||||||
|
https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS).
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
Licenses for support code
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Parts of the TLS test suite are under the Go license. This code is not included
|
||||||
|
in BoringSSL (i.e. libcrypto and libssl) when compiled, however, so
|
||||||
|
distributing code linked against BoringSSL does not trigger this license:
|
||||||
|
|
||||||
|
Copyright (c) 2009 The Go Authors. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
|
in the documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
* Neither the name of Google Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
BoringSSL uses the Chromium test infrastructure to run a continuous build,
|
||||||
|
trybots etc. The scripts which manage this, and the script for generating build
|
||||||
|
metadata, are under the Chromium license. Distributing code linked against
|
||||||
|
BoringSSL does not trigger this license.
|
||||||
|
|
||||||
|
Copyright 2015 The Chromium Authors. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
|
in the documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
* Neither the name of Google Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
11
contrib/icp/gcm-simd/boringssl/README
Normal file
11
contrib/icp/gcm-simd/boringssl/README
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
This directory contains the original BoringSSL [1] GCM x86-64 assembly
|
||||||
|
files [2].
|
||||||
|
|
||||||
|
The assembler files where then further modified to fit the ICP conventions.
|
||||||
|
|
||||||
|
The main purpose to include these files (and the original ones) here, is to
|
||||||
|
serve as a reference if upstream changes need to be applied to the files
|
||||||
|
included and modified in the ICP.
|
||||||
|
|
||||||
|
[1] https://github.com/google/boringssl
|
||||||
|
[2] https://github.com/google/boringssl/blob/d5440dd2c2c500ac2d3bba4afec47a054b4d99ae/gen/bcm/aes-gcm-avx2-x86_64-linux.S
|
1328
contrib/icp/gcm-simd/boringssl/aes-gcm-avx2-x86_64-linux.S
Normal file
1328
contrib/icp/gcm-simd/boringssl/aes-gcm-avx2-x86_64-linux.S
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,3 +8,12 @@ fi
|
|||||||
. /usr/share/initramfs-tools/hook-functions
|
. /usr/share/initramfs-tools/hook-functions
|
||||||
|
|
||||||
copy_exec /usr/share/initramfs-tools/zfsunlock /usr/bin/zfsunlock
|
copy_exec /usr/share/initramfs-tools/zfsunlock /usr/bin/zfsunlock
|
||||||
|
|
||||||
|
if [ -f /etc/initramfs-tools/etc/motd ]; then
|
||||||
|
copy_file text /etc/initramfs-tools/etc/motd /etc/motd
|
||||||
|
else
|
||||||
|
tmpf=$(mktemp)
|
||||||
|
echo "If you use zfs encrypted root filesystems, you can use \`zfsunlock\` to manually unlock it" > "$tmpf"
|
||||||
|
copy_file text "$tmpf" /etc/motd
|
||||||
|
rm -f "$tmpf"
|
||||||
|
fi
|
||||||
|
@ -979,7 +979,8 @@ mountroot()
|
|||||||
|
|
||||||
touch /run/zfs_unlock_complete
|
touch /run/zfs_unlock_complete
|
||||||
if [ -e /run/zfs_unlock_complete_notify ]; then
|
if [ -e /run/zfs_unlock_complete_notify ]; then
|
||||||
read -r < /run/zfs_unlock_complete_notify
|
# shellcheck disable=SC2034
|
||||||
|
read -r zfs_unlock_complete_notify < /run/zfs_unlock_complete_notify
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ------------
|
# ------------
|
||||||
|
@ -8,7 +8,7 @@ This contrib contains community compatibility patches to get Intel QAT working o
|
|||||||
These patches are based on the following Intel QAT version:
|
These patches are based on the following Intel QAT version:
|
||||||
[1.7.l.4.10.0-00014](https://01.org/sites/default/files/downloads/qat1.7.l.4.10.0-00014.tar.gz)
|
[1.7.l.4.10.0-00014](https://01.org/sites/default/files/downloads/qat1.7.l.4.10.0-00014.tar.gz)
|
||||||
|
|
||||||
When using QAT with above kernels versions, the following patches needs to be applied using:
|
When using QAT with the above kernel versions, the following patches need to be applied using:
|
||||||
patch -p1 < _$PATCH_
|
patch -p1 < _$PATCH_
|
||||||
_Where $PATCH refers to the path of the patch in question_
|
_Where $PATCH refers to the path of the patch in question_
|
||||||
|
|
||||||
|
@ -391,7 +391,11 @@ static int
|
|||||||
zfs_key_config_load(pam_handle_t *pamh, zfs_key_config_t *config,
|
zfs_key_config_load(pam_handle_t *pamh, zfs_key_config_t *config,
|
||||||
int argc, const char **argv)
|
int argc, const char **argv)
|
||||||
{
|
{
|
||||||
|
#if defined(__FreeBSD__)
|
||||||
|
config->homes_prefix = strdup("zroot/home");
|
||||||
|
#else
|
||||||
config->homes_prefix = strdup("rpool/home");
|
config->homes_prefix = strdup("rpool/home");
|
||||||
|
#endif
|
||||||
if (config->homes_prefix == NULL) {
|
if (config->homes_prefix == NULL) {
|
||||||
pam_syslog(pamh, LOG_ERR, "strdup failure");
|
pam_syslog(pamh, LOG_ERR, "strdup failure");
|
||||||
return (PAM_SERVICE_ERR);
|
return (PAM_SERVICE_ERR);
|
||||||
|
@ -604,5 +604,4 @@ class RaidzExpansionRunning(ZFSError):
|
|||||||
errno = ZFS_ERR_RAIDZ_EXPAND_IN_PROGRESS
|
errno = ZFS_ERR_RAIDZ_EXPAND_IN_PROGRESS
|
||||||
message = "A raidz device is currently expanding"
|
message = "A raidz device is currently expanding"
|
||||||
|
|
||||||
|
|
||||||
# vim: softtabstop=4 tabstop=4 expandtab shiftwidth=4
|
# vim: softtabstop=4 tabstop=4 expandtab shiftwidth=4
|
||||||
|
@ -4223,7 +4223,7 @@ class _TempPool(object):
|
|||||||
self.getRoot().reset()
|
self.getRoot().reset()
|
||||||
return
|
return
|
||||||
|
|
||||||
# On the Buildbot builders this may fail with "pool is busy"
|
# On the CI builders this may fail with "pool is busy"
|
||||||
# Retry 5 times before raising an error
|
# Retry 5 times before raising an error
|
||||||
retry = 0
|
retry = 0
|
||||||
while True:
|
while True:
|
||||||
|
@ -56,6 +56,7 @@ systemdunit_DATA = \
|
|||||||
%D%/systemd/system/zfs-import-scan.service \
|
%D%/systemd/system/zfs-import-scan.service \
|
||||||
%D%/systemd/system/zfs-import.target \
|
%D%/systemd/system/zfs-import.target \
|
||||||
%D%/systemd/system/zfs-mount.service \
|
%D%/systemd/system/zfs-mount.service \
|
||||||
|
%D%/systemd/system/zfs-mount@.service \
|
||||||
%D%/systemd/system/zfs-scrub-monthly@.timer \
|
%D%/systemd/system/zfs-scrub-monthly@.timer \
|
||||||
%D%/systemd/system/zfs-scrub-weekly@.timer \
|
%D%/systemd/system/zfs-scrub-weekly@.timer \
|
||||||
%D%/systemd/system/zfs-scrub@.service \
|
%D%/systemd/system/zfs-scrub@.service \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
These script were written with the primary intention of being portable and
|
These scripts were written with the primary intention of being portable and
|
||||||
usable on as many systems as possible.
|
usable on as many systems as possible.
|
||||||
|
|
||||||
This is, in practice, usually not possible. But the intention is there.
|
This is, in practice, usually not possible. But the intention is there.
|
||||||
|
26
etc/systemd/system/zfs-mount@.service.in
Normal file
26
etc/systemd/system/zfs-mount@.service.in
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Mount ZFS filesystem %I
|
||||||
|
Documentation=man:zfs(8)
|
||||||
|
DefaultDependencies=no
|
||||||
|
After=systemd-udev-settle.service
|
||||||
|
After=zfs-import.target
|
||||||
|
After=zfs-mount.service
|
||||||
|
After=systemd-remount-fs.service
|
||||||
|
Before=local-fs.target
|
||||||
|
ConditionPathIsDirectory=/sys/module/zfs
|
||||||
|
|
||||||
|
# This merely tells the service manager
|
||||||
|
# that unmounting everything undoes the
|
||||||
|
# effect of this service. No extra logic
|
||||||
|
# is ran as a result of these settings.
|
||||||
|
Conflicts=umount.target
|
||||||
|
Before=umount.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
EnvironmentFile=-@initconfdir@/zfs
|
||||||
|
ExecStart=@sbindir@/zfs mount -R %I
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=zfs.target
|
@ -10,6 +10,7 @@ COMMON_H = \
|
|||||||
cityhash.h \
|
cityhash.h \
|
||||||
zfeature_common.h \
|
zfeature_common.h \
|
||||||
zfs_comutil.h \
|
zfs_comutil.h \
|
||||||
|
zfs_crrd.h \
|
||||||
zfs_deleg.h \
|
zfs_deleg.h \
|
||||||
zfs_fletcher.h \
|
zfs_fletcher.h \
|
||||||
zfs_namecheck.h \
|
zfs_namecheck.h \
|
||||||
@ -69,7 +70,6 @@ COMMON_H = \
|
|||||||
sys/metaslab_impl.h \
|
sys/metaslab_impl.h \
|
||||||
sys/mmp.h \
|
sys/mmp.h \
|
||||||
sys/mntent.h \
|
sys/mntent.h \
|
||||||
sys/mod.h \
|
|
||||||
sys/multilist.h \
|
sys/multilist.h \
|
||||||
sys/nvpair.h \
|
sys/nvpair.h \
|
||||||
sys/nvpair_impl.h \
|
sys/nvpair_impl.h \
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user