Adopted better struct field names, cast to lfsr_openedmdir_t

- Renamed mdir->u.m to mdir->u.mdir.
- Prefer mdir->u.rbyd.* where possible.
- Changed file/dir mdirs to be stored directly, requiring a cast to
  lfsr_openedmdir_t to enroll in the opened mdir list.
This commit is contained in:
Christopher Haster
2023-11-25 23:17:07 -06:00
parent a89b3e42ba
commit 019044e4c6
4 changed files with 418 additions and 400 deletions
+18 -15
View File
@@ -176,13 +176,14 @@ code = '''
if (tinfo.tag == LFSR_TAG_MDIR) {
printf("traversal: 0x%x mdir 0x{%x,%x}\n",
tinfo.tag,
tinfo.u.mdir.u.m.blocks[0], tinfo.u.mdir.u.m.blocks[1]);
tinfo.u.mdir.u.mdir.blocks[0],
tinfo.u.mdir.u.mdir.blocks[1]);
// keep track of seen blocks
seen[tinfo.u.mdir.u.m.blocks[1] / 8]
|= 1 << (tinfo.u.mdir.u.m.blocks[1] % 8);
seen[tinfo.u.mdir.u.m.blocks[0] / 8]
|= 1 << (tinfo.u.mdir.u.m.blocks[0] % 8);
seen[tinfo.u.mdir.u.mdir.blocks[1] / 8]
|= 1 << (tinfo.u.mdir.u.mdir.blocks[1] % 8);
seen[tinfo.u.mdir.u.mdir.blocks[0] / 8]
|= 1 << (tinfo.u.mdir.u.mdir.blocks[0] % 8);
} else if (tinfo.tag == LFSR_TAG_BRANCH) {
printf("traversal: 0x%x btree 0x%x.%x\n",
@@ -331,13 +332,14 @@ code = '''
if (tinfo.tag == LFSR_TAG_MDIR) {
printf("traversal: 0x%x mdir 0x{%x,%x}\n",
tinfo.tag,
tinfo.u.mdir.u.m.blocks[0], tinfo.u.mdir.u.m.blocks[1]);
tinfo.u.mdir.u.mdir.blocks[0],
tinfo.u.mdir.u.mdir.blocks[1]);
// keep track of seen blocks
seen[tinfo.u.mdir.u.m.blocks[1] / 8]
|= 1 << (tinfo.u.mdir.u.m.blocks[1] % 8);
seen[tinfo.u.mdir.u.m.blocks[0] / 8]
|= 1 << (tinfo.u.mdir.u.m.blocks[0] % 8);
seen[tinfo.u.mdir.u.mdir.blocks[1] / 8]
|= 1 << (tinfo.u.mdir.u.mdir.blocks[1] % 8);
seen[tinfo.u.mdir.u.mdir.blocks[0] / 8]
|= 1 << (tinfo.u.mdir.u.mdir.blocks[0] % 8);
} else if (tinfo.tag == LFSR_TAG_BRANCH) {
printf("traversal: 0x%x btree 0x%x.%x\n",
@@ -476,13 +478,14 @@ code = '''
if (tinfo.tag == LFSR_TAG_MDIR) {
printf("traversal: 0x%x mdir 0x{%x,%x}\n",
tinfo.tag,
tinfo.u.mdir.u.m.blocks[0], tinfo.u.mdir.u.m.blocks[1]);
tinfo.u.mdir.u.mdir.blocks[0],
tinfo.u.mdir.u.mdir.blocks[1]);
// keep track of seen blocks
seen[tinfo.u.mdir.u.m.blocks[1] / 8]
|= 1 << (tinfo.u.mdir.u.m.blocks[1] % 8);
seen[tinfo.u.mdir.u.m.blocks[0] / 8]
|= 1 << (tinfo.u.mdir.u.m.blocks[0] % 8);
seen[tinfo.u.mdir.u.mdir.blocks[1] / 8]
|= 1 << (tinfo.u.mdir.u.mdir.blocks[1] % 8);
seen[tinfo.u.mdir.u.mdir.blocks[0] / 8]
|= 1 << (tinfo.u.mdir.u.mdir.blocks[0] % 8);
} else if (tinfo.tag == LFSR_TAG_BRANCH) {
printf("traversal: 0x%x btree 0x%x.%x\n",