Adopted lowercase => internal pattern for LFS3_tag_* tags

This includes the mask/rm/grow bits:

- LFS3_tag_RM
- LFS3_tag_GROW
- LFS3_tag_MASK0/2/8/12

Our in-device only handle types:

- LFS3_tag_ORPHAN
- LFS3_tag_TRV
- LFS3_tag_UNKNOWN

And in-device only tags with special behavior:

- LFS3_tag_INTERNAL
- LFS3_tag_RATTRS
- LFS3_tag_SHRUBCOMMIT
- LFS3_tag_GRMPUSH
- LFS3_tag_MOVE
- LFS3_tag_ATTRS

Usually I'm not a big fan of case-sensitive naming patterns, but this
has been useful for self-documenting what compat flags are in-device
only. Might as well extend the idea to our tag definitions.
This commit is contained in:
Christopher Haster
2025-11-15 01:45:15 -06:00
parent 0f30021a0d
commit ca678538d4
8 changed files with 305 additions and 305 deletions
+16 -16
View File
@@ -746,7 +746,7 @@ enum lfs3_tag {
LFS3_TAG_NAMELIMIT = 0x0039,
LFS3_TAG_FILELIMIT = 0x003a,
// in-device only, to help find unknown config tags
LFS3_TAG_UNKNOWNCONFIG = 0x003b,
LFS3_tag_UNKNOWNCONFIG = 0x003b,
// global-state tags
LFS3_TAG_GDELTA = 0x0100,
@@ -761,9 +761,9 @@ enum lfs3_tag {
LFS3_TAG_STICKYNOTE = 0x0203,
LFS3_TAG_BOOKMARK = 0x0204,
// in-device only name tags, these should never get written to disk
LFS3_TAG_ORPHAN = 0x0205,
LFS3_TAG_TRV = 0x0206,
LFS3_TAG_UNKNOWN = 0x0207,
LFS3_tag_ORPHAN = 0x0205,
LFS3_tag_TRV = 0x0206,
LFS3_tag_UNKNOWN = 0x0207,
// non-file name tags
LFS3_TAG_MNAME = 0x0220,
@@ -808,20 +808,20 @@ enum lfs3_tag {
LFS3_TAG_GCKSUMDELTA = 0x3300,
// in-device only tags, these should never get written to disk
LFS3_TAG_INTERNAL = 0x0800,
LFS3_TAG_RATTRS = 0x0800,
LFS3_TAG_SHRUBCOMMIT = 0x0801,
LFS3_TAG_GRMPUSH = 0x0802,
LFS3_TAG_MOVE = 0x0803,
LFS3_TAG_ATTRS = 0x0804,
LFS3_tag_INTERNAL = 0x0800,
LFS3_tag_RATTRS = 0x0800,
LFS3_tag_SHRUBCOMMIT = 0x0801,
LFS3_tag_GRMPUSH = 0x0802,
LFS3_tag_MOVE = 0x0803,
LFS3_tag_ATTRS = 0x0804,
// some in-device only tag modifiers
LFS3_TAG_RM = 0x8000,
LFS3_TAG_GROW = 0x4000,
LFS3_TAG_MASK0 = 0x0000,
LFS3_TAG_MASK2 = 0x1000,
LFS3_TAG_MASK8 = 0x2000,
LFS3_TAG_MASK12 = 0x3000,
LFS3_tag_RM = 0x8000,
LFS3_tag_GROW = 0x4000,
LFS3_tag_MASK0 = 0x0000,
LFS3_tag_MASK2 = 0x1000,
LFS3_tag_MASK8 = 0x2000,
LFS3_tag_MASK12 = 0x3000,
};
// some other tag encodings with their own subfields