Commit ccf54f6
committed
zap: TinyZAP for multi-uint64 entries.
Introduce TinyZAP, a new on-disk ZAP format between MicroZAP and FatZAP.
MicroZAP is limited to 1xuint64 values and 49-char keys, any wider entry
forces a full FatZAP upgrade. TinyZAP avoids this for the common case of
multi-integer values (e.g. Lustre FIDs) and long key names.
TinyZAP reuses mzap_phys_t, repurposing one padding word as mz_flags:
[63:32] 0x54494E59 ("TINY") magic
[31:24] chunk_log2 6=64B / 7=128B / 8=256B
[23:16] stride value width in bytes (multiple of 8)
[15: 0] reserved
Chunk size and stride are stamped automatically on the first zap_add()
based on observed entry geometry. no create-time hint is required.
Subsequent adds must match the stamped geometry or a FatZAP upgrade is
triggered.
All ZAP operations (add, update, remove, lookup, cursor, byteswap,
upgrade to FatZAP) are updated to dispatch to TinyZAP paths when
zap_stride != 0.
Signed-off-by: Akash B <akash-b@hpe.com>1 parent e5473af commit ccf54f6
14 files changed
Lines changed: 1307 additions & 68 deletions
File tree
- cmd/zdb
- include
- sys
- lib/libzpool
- man/man7
- module
- zcommon
- zfs
- tests/zfs-tests/tests/functional/cli_root/zpool_get
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
1032 | 1033 | | |
1033 | 1034 | | |
1034 | 1035 | | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1038 | 1051 | | |
1039 | 1052 | | |
1040 | 1053 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
65 | | - | |
66 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
69 | 83 | | |
70 | 84 | | |
71 | 85 | | |
| |||
181 | 195 | | |
182 | 196 | | |
183 | 197 | | |
184 | | - | |
| 198 | + | |
185 | 199 | | |
186 | 200 | | |
187 | 201 | | |
| |||
262 | 276 | | |
263 | 277 | | |
264 | 278 | | |
265 | | - | |
| 279 | + | |
266 | 280 | | |
267 | 281 | | |
268 | 282 | | |
| |||
533 | 547 | | |
534 | 548 | | |
535 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
536 | 566 | | |
537 | 567 | | |
538 | 568 | | |
| |||
0 commit comments