Commit 4010afe
committed
trv: Reintroduced LFS3_T_EXCL
With the relaxation of traversal behavior under mutation, I think it
makes sense to bring back LFS3_T_EXCL. If only to allow traversals to
gaurantee termination under mutation. Now that traversals no longer
guarantee forward progress, it's possible to get stuck looping
indefinitely if the filesystem is constantly being mutated.
Non-excl traversals are probably still useful for GC work and debugging
threads, but LFS3_T_EXCL now allows traversals to terminate immediately
with LFS3_ERR_BUSY at the first sign of unrelated filesystem mutation:
LFS3_T_EXCL 0x00000008 Error if filesystem modified
Internally, we already track unrelated mutation to avoid corrupt state
(LFS3_t_DIRTY), so this is a very low-cost feature:
code stack ctx
before: 35944 2280 660
after: 35964 (+0.1%) 2280 (+0.0%) 660 (+0.0%)
code stack ctx
gbmap before: 38916 2296 772
gbmap after: 38940 (+0.1%) 2296 (+0.0%) 772 (+0.0%)
code stack ctx
gc before: 36016 2280 768
gc after: 36036 (+0.1%) 2280 (+0.0%) 768 (+0.0%)1 parent 8bb43ac commit 4010afe
File tree
5 files changed
+405
-29
lines changed- scripts
- tests
5 files changed
+405
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7355 | 7355 | | |
7356 | 7356 | | |
7357 | 7357 | | |
| 7358 | + | |
| 7359 | + | |
| 7360 | + | |
| 7361 | + | |
7358 | 7362 | | |
7359 | 7363 | | |
7360 | 7364 | | |
| |||
16914 | 16918 | | |
16915 | 16919 | | |
16916 | 16920 | | |
| 16921 | + | |
16917 | 16922 | | |
16918 | 16923 | | |
16919 | 16924 | | |
| |||
16959 | 16964 | | |
16960 | 16965 | | |
16961 | 16966 | | |
| 16967 | + | |
| 16968 | + | |
| 16969 | + | |
| 16970 | + | |
| 16971 | + | |
| 16972 | + | |
16962 | 16973 | | |
16963 | 16974 | | |
16964 | 16975 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
| 322 | + | |
321 | 323 | | |
322 | 324 | | |
323 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| |||
0 commit comments