-
Notifications
You must be signed in to change notification settings - Fork 810
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweaked file types/name tag encoding to be a bit less quirky
The intention behind the quirky encoding was to leverage bit 1 to indicate if the underlying file type would be backed by the common file B-tree data structure. Looking forward, there may be several of these types, compressed files, contiguous files, etc, that for all intents and purposes are just normal files interpreted differently. But trying to leverage too many bits like this is probably going to give us a sparse, awkward, and confusing tag encoding, so I've reverted to a hopefully more normal encoding: LFSR_TAG_NAME 0x02tt v--- --1- -ttt tttt LFSR_TAG_NAME 0x0200 v--- --1- ---- ---- LFSR_TAG_REG 0x0201 v--- --1- ---- ---1 LFSR_TAG_DIR 0x0202 v--- --1- ---- --1- LFSR_TAG_SYMLINK* 0x0203 v--- --1- ---- --11 LFSR_TAG_BOOKMARK 0x0204 v--- --1- ---- -1-- LFSR_TAG_ORPHAN 0x0205 v--- --1- ---- -1-1 LFSR_TAG_COMPR* 0x0206 v--- --1- ---- -11- LFSR_TAG_CONTIG* 0x0207 v--- --1- ---- -111 * Hypothetical Note the carve-out for the hypothetical symlink tag. Symlinks are actually incredibly low in the priority list, but they are also the only current hypothetical file type that would need to be exposed to users. Grouping these up makes sense. This will get a bit messy if we ever end up with a 4th user-facing type, but there isn't any in POSIX at least (ignoring non-fs types, socket, fifo, character, block, etc). The gap also helps line things up so reg/orphan are a single bit flip, and the non-user facing types all share a bit. This had no impact on code size: code stack before: 33564 2832 after: 33564 (+0.0%) 2832 (+0.0%)
- Loading branch information
Showing
7 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters