From 9e75138f7a1b2c09399a4e7dbfe776d8f35aea6f Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Thu, 13 Nov 2025 02:10:59 -0600 Subject: [PATCH] Rearranged O/M/F/GC/I flags Now that we don't need to encode tstate info in our traversal flags, we can move things around to be a bit more comfortable. This is also after some tweaking to make space for planned features: O flags: O_MODE 0x00000003 ---- ---- ---- ---- ---- ---- ---- --11 O_RDONLY 0x00000000 ---- ---- ---- ---- ---- ---- ---- ---- O_WRONLY 0x00000001 ---- ---- ---- ---- ---- ---- ---- ---1 O_RDWR 0x00000002 ---- ---- ---- ---- ---- ---- ---- --1- O_CREAT 0x00000004 ---- ---- ---- ---- ---- ---- ---- -1-- O_EXCL 0x00000008 ---- ---- ---- ---- ---- ---- ---- 1--- O_TRUNC 0x00000010 ---- ---- ---- ---- ---- ---- ---1 ---- O_APPEND 0x00000020 ---- ---- ---- ---- ---- ---- --1- ---- O_FLUSH 0x00000040 ---- ---- ---- ---- ---- ---- -1-- ---- O_SYNC 0x00000080 ---- ---- ---- ---- ---- ---- 1--- ---- O_DESYNC 0x00100000 ---- ---- ---1 ---- ---- ---- ---- ---- O_DEDAG* 0x00000100 ---- ---- ---- ---- ---- ---1 ---- ---- O_DEDUP* 0x00000200 ---- ---- ---- ---- ---- --1- ---- ---- O_COMPR? 0x00000400 ---- ---- ---- ---- ---- -1-- ---- ---- O_CKMETA 0x00010000 ---- ---- ---- ---1 ---- ---- ---- ---- O_CKDATA 0x00020000 ---- ---- ---- --1- ---- ---- ---- ---- O_REPAIRMETA* 0x00040000 ---- ---- ---- -1-- ---- ---- ---- ---- O_REPAIRDATA* 0x00080000 ---- ---- ---- 1--- ---- ---- ---- ---- o_WRSET 0x00000003 ---- ---- ---- ---- ---- ---- ---- --11 o_TYPE 0xf0000000 1111 ---- ---- ---- ---- ---- ---- ---- o_ZOMBIE 0x08000000 ---- 1--- ---- ---- ---- ---- ---- ---- o_UNCREAT 0x04000000 ---- -1-- ---- ---- ---- ---- ---- ---- o_UNSYNC 0x02000000 ---- --1- ---- ---- ---- ---- ---- ---- o_UNCRYST 0x01000000 ---- ---1 ---- ---- ---- ---- ---- ---- o_UNGRAFT 0x00800000 ---- ---- 1--- ---- ---- ---- ---- ---- o_UNFLUSH 0x00400000 ---- ---- -1-- ---- ---- ---- ---- ---- * Planned ? Hypothetical T flags: T_MODE 0x00000001 ---- ---- ---- ---- ---- ---- ---- ---1 T_RDONLY 0x00000000 ---- ---- ---- ---- ---- ---- ---- ---- T_RDWR 0x00000001 ---- ---- ---- ---- ---- ---- ---- ---1 T_MTREEONLY 0x00000002 ---- ---- ---- ---- ---- ---- ---- --1- T_EXCL 0x00000008 ---- ---- ---- ---- ---- ---- ---- 1--- T_MKCONSISTENT 0x00000800 ---- ---- ---- ---- ---- 1--- ---- ---- T_RELOOKAHEAD 0x00001000 ---- ---- ---- ---- ---1 ---- ---- ---- T_REGBMAP 0x00002000 ---- ---- ---- ---- --1- ---- ---- ---- T_PREERASE* 0x00004000 ---- ---- ---- ---- -1-- ---- ---- ---- T_COMPACTMETA 0x00008000 ---- ---- ---- ---- 1--- ---- ---- ---- T_CKMETA 0x00010000 ---- ---- ---- ---1 ---- ---- ---- ---- T_CKDATA 0x00020000 ---- ---- ---- --1- ---- ---- ---- ---- T_REPAIRMETA* 0x00040000 ---- ---- ---- -1-- ---- ---- ---- ---- T_REPAIRDATA* 0x00080000 ---- ---- ---- 1--- ---- ---- ---- ---- t_EVICT* 0x00000010 ---- ---- ---- ---- ---- ---- ---1 ---- t_TYPE 0xf0000000 1111 ---- ---- ---- ---- ---- ---- ---- t_ZOMBIE 0x08000000 ---- 1--- ---- ---- ---- ---- ---- ---- t_CKPOINTED 0x04000000 ---- -1-- ---- ---- ---- ---- ---- ---- t_DIRTY 0x02000000 ---- --1- ---- ---- ---- ---- ---- ---- t_STALE 0x01000000 ---- ---1 ---- ---- ---- ---- ---- ---- t_BTYPE 0x00f00000 ---- ---- 1111 ---- ---- ---- ---- ---- * Planned M/F flags: M_MODE 0x00000001 ---- ---- ---- ---- ---- ---- ---- ---1 M_RDWR 0x00000000 ---- ---- ---- ---- ---- ---- ---- ---- M_RDONLY 0x00000001 ---- ---- ---- ---- ---- ---- ---- ---1 M_STRICT? 0x00000002 ---- ---- ---- ---- ---- ---- ---- --1- M_FORCE? 0x00000004 ---- ---- ---- ---- ---- ---- ---- -1-- M_FORCEWITHRECKLESSABANDON? 0x00000008 ---- ---- ---- ---- ---- ---- ---- 1--- M_FLUSH 0x00000040 ---- ---- ---- ---- ---- ---- -1-- ---- M_SYNC 0x00000080 ---- ---- ---- ---- ---- ---- 1--- ---- M_DEDAG* 0x00000100 ---- ---- ---- ---- ---- ---1 ---- ---- M_DEDUP* 0x00000200 ---- ---- ---- ---- ---- --1- ---- ---- M_COMPR? 0x00000400 ---- ---- ---- ---- ---- -1-- ---- ---- M_REVDBG 0x00000010 ---- ---- ---- ---- ---- ---- ---1 ---- M_REVNOISE 0x00000020 ---- ---- ---- ---- ---- ---- --1- ---- M_CKPROGS 0x00100000 ---- ---- ---1 ---- ---- ---- ---- ---- M_CKFETCHES 0x00200000 ---- ---- --1- ---- ---- ---- ---- ---- M_CKMETAPARITY 0x00400000 ---- ---- -1-- ---- ---- ---- ---- ---- M_CKMETAREDUND* 0x00800000 ---- ---- 1--- ---- ---- ---- ---- ---- M_CKDATACKSUMS 0x01000000 ---- ---1 ---- ---- ---- ---- ---- ---- M_CKREADS* 0x01800000 ---- ---1 1--- ---- ---- ---- ---- ---- M_MKCONSISTENT 0x00000800 ---- ---- ---- ---- ---- 1--- ---- ---- M_RELOOKAHEAD 0x00001000 ---- ---- ---- ---- ---1 ---- ---- ---- M_REGBMAP 0x00002000 ---- ---- ---- ---- --1- ---- ---- ---- M_PREERASE* 0x00004000 ---- ---- ---- ---- -1-- ---- ---- ---- M_COMPACTMETA 0x00008000 ---- ---- ---- ---- 1--- ---- ---- ---- M_CKMETA 0x00010000 ---- ---- ---- ---1 ---- ---- ---- ---- M_CKDATA 0x00020000 ---- ---- ---- --1- ---- ---- ---- ---- M_REPAIRMETA* 0x00040000 ---- ---- ---- -1-- ---- ---- ---- ---- M_REPAIRDATA* 0x00080000 ---- ---- ---- 1--- ---- ---- ---- ---- F_CKFACTORY* 0x00000002 ---- ---- ---- ---- ---- ---- ---- --1- F_GBMAP 0x02000000 ---- --1- ---- ---- ---- ---- ---- ---- F_GDDTREE* 0x04000000 ---- -1-- ---- ---- ---- ---- ---- ---- F_GPTREE* 0x08000000 ---- 1--- ---- ---- ---- ---- ---- ---- F_METAR1* 0x10000000 ---1 ---- ---- ---- ---- ---- ---- ---- F_METAR2* 0x20000000 --1- ---- ---- ---- ---- ---- ---- ---- F_METAR3* 0x30000000 --11 ---- ---- ---- ---- ---- ---- ---- F_DATAR1* 0x40000000 -1-- ---- ---- ---- ---- ---- ---- ---- F_DATAR2* 0x80000000 1--- ---- ---- ---- ---- ---- ---- ---- F_DATAR3* 0xc0000000 11-- ---- ---- ---- ---- ---- ---- ---- * Planned ? Hypothetical It's a bit concerning that _all_ 32-bit mount flags end up used, but what can you do... Code changes minimal: code stack ctx before: 35964 2280 660 after: 35968 (+0.0%) 2280 (+0.0%) 660 (+0.0%) code stack ctx gbmap before: 38828 2296 772 gbmap after: 38828 (+0.0%) 2296 (+0.0%) 772 (+0.0%) --- lfs3.h | 96 ++++++++++++++++++++++----------------------- scripts/dbgflags.py | 96 ++++++++++++++++++++++----------------------- 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/lfs3.h b/lfs3.h index a219e682..2a6c9341 100644 --- a/lfs3.h +++ b/lfs3.h @@ -135,19 +135,19 @@ enum lfs3_type { #endif #define LFS3_O_FLUSH 0x00000040 // Flush data on every write #define LFS3_O_SYNC 0x00000080 // Sync metadata on every write -#define LFS3_O_DESYNC 0x04000000 // Do not sync or recieve file updates -#define LFS3_O_CKMETA 0x00001000 // Check metadata checksums -#define LFS3_O_CKDATA 0x00002000 // Check metadata + data checksums +#define LFS3_O_DESYNC 0x00100000 // Do not sync or recieve file updates +#define LFS3_O_CKMETA 0x00010000 // Check metadata checksums +#define LFS3_O_CKDATA 0x00020000 // Check metadata + data checksums // internally used flags, don't use these #define LFS3_o_WRSET 3 // Open a file as an atomic write #define LFS3_o_TYPE 0xf0000000 // The file's type #define LFS3_o_ZOMBIE 0x08000000 // File has been removed -#define LFS3_o_UNCREAT 0x02000000 // File does not exist yet -#define LFS3_o_UNSYNC 0x01000000 // File's metadata does not match disk -#define LFS3_o_UNCRYST 0x00800000 // File's leaf not fully crystallized -#define LFS3_o_UNGRAFT 0x00400000 // File's leaf does not match disk -#define LFS3_o_UNFLUSH 0x00200000 // File's cache does not match disk +#define LFS3_o_UNCREAT 0x04000000 // File does not exist yet +#define LFS3_o_UNSYNC 0x02000000 // File's metadata does not match disk +#define LFS3_o_UNCRYST 0x01000000 // File's leaf not fully crystallized +#define LFS3_o_UNGRAFT 0x00800000 // File's leaf does not match disk +#define LFS3_o_UNFLUSH 0x00400000 // File's cache does not match disk // File seek flags #define LFS3_SEEK_SET 0 // Seek relative to an absolute position @@ -176,27 +176,27 @@ enum lfs3_type { #define LFS3_F_REVNOISE 0x00000020 // Add noise to revision counts #endif #ifdef LFS3_CKPROGS -#define LFS3_F_CKPROGS 0x00080000 // Check progs by reading back progged data +#define LFS3_F_CKPROGS 0x00100000 // Check progs by reading back progged data #endif #ifdef LFS3_CKFETCHES #define LFS3_F_CKFETCHES \ - 0x00100000 // Check block checksums before first use + 0x00200000 // Check block checksums before first use #endif #ifdef LFS3_CKMETAPARITY #define LFS3_F_CKMETAPARITY \ - 0x00200000 // Check metadata tag parity bits + 0x00400000 // Check metadata tag parity bits #endif #ifdef LFS3_CKDATACKSUMS #define LFS3_F_CKDATACKSUMS \ - 0x00800000 // Check data checksums on reads + 0x01000000 // Check data checksums on reads #endif -#define LFS3_F_CKMETA 0x00001000 // Check metadata checksums -#define LFS3_F_CKDATA 0x00002000 // Check metadata + data checksums +#define LFS3_F_CKMETA 0x00010000 // Check metadata checksums +#define LFS3_F_CKDATA 0x00020000 // Check metadata + data checksums #endif #ifdef LFS3_GBMAP -#define LFS3_F_GBMAP 0x01000000 // Use the global on-disk block-map +#define LFS3_F_GBMAP 0x02000000 // Use the global on-disk block-map #endif // Filesystem mount flags @@ -214,38 +214,38 @@ enum lfs3_type { #define LFS3_M_REVNOISE 0x00000020 // Add noise to revision counts #endif #if !defined(LFS3_RDONLY) && defined(LFS3_CKPROGS) -#define LFS3_M_CKPROGS 0x00080000 // Check progs by reading back progged data +#define LFS3_M_CKPROGS 0x00100000 // Check progs by reading back progged data #endif #ifdef LFS3_CKFETCHES #define LFS3_M_CKFETCHES \ - 0x00100000 // Check block checksums before first use + 0x00200000 // Check block checksums before first use #endif #ifdef LFS3_CKMETAPARITY #define LFS3_M_CKMETAPARITY \ - 0x00200000 // Check metadata tag parity bits + 0x00400000 // Check metadata tag parity bits #endif #ifdef LFS3_CKDATACKSUMS #define LFS3_M_CKDATACKSUMS \ - 0x00800000 // Check data checksums on reads + 0x01000000 // Check data checksums on reads #endif #ifndef LFS3_RDONLY #define LFS3_M_MKCONSISTENT \ - 0x00000100 // Make the filesystem consistent + 0x00000800 // Make the filesystem consistent #endif #ifndef LFS3_RDONLY #define LFS3_M_RELOOKAHEAD \ - 0x00000200 // Repopulate lookahead buffer + 0x00001000 // Repopulate lookahead buffer #endif #if !defined(LFS3_RDONLY) && defined(LFS3_GBMAP) -#define LFS3_M_REGBMAP 0x00000400 // Repopulate the gbmap +#define LFS3_M_REGBMAP 0x00002000 // Repopulate the gbmap #endif #ifndef LFS3_RDONLY #define LFS3_M_COMPACTMETA \ - 0x00000800 // Compact metadata logs + 0x00008000 // Compact metadata logs #endif -#define LFS3_M_CKMETA 0x00001000 // Check metadata checksums -#define LFS3_M_CKDATA 0x00002000 // Check metadata + data checksums +#define LFS3_M_CKMETA 0x00010000 // Check metadata checksums +#define LFS3_M_CKDATA 0x00020000 // Check metadata + data checksums // Filesystem info flags @@ -259,41 +259,41 @@ enum lfs3_type { #define LFS3_I_REVNOISE 0x00000020 // Mounted with LFS3_M_REVNOISE #endif #if !defined(LFS3_RDONLY) && defined(LFS3_CKPROGS) -#define LFS3_I_CKPROGS 0x00080000 // Mounted with LFS3_M_CKPROGS +#define LFS3_I_CKPROGS 0x00100000 // Mounted with LFS3_M_CKPROGS #endif #ifdef LFS3_CKFETCHES #define LFS3_I_CKFETCHES \ - 0x00100000 // Mounted with LFS3_M_CKFETCHES + 0x00200000 // Mounted with LFS3_M_CKFETCHES #endif #ifdef LFS3_CKMETAPARITY #define LFS3_I_CKMETAPARITY \ - 0x00200000 // Mounted with LFS3_M_CKMETAPARITY + 0x00400000 // Mounted with LFS3_M_CKMETAPARITY #endif #ifdef LFS3_CKDATACKSUMS #define LFS3_I_CKDATACKSUMS \ - 0x00800000 // Mounted with LFS3_M_CKDATACKSUMS + 0x01000000 // Mounted with LFS3_M_CKDATACKSUMS #endif #ifndef LFS3_RDONLY #define LFS3_I_MKCONSISTENT \ - 0x00000100 // Filesystem needs mkconsistent to write + 0x00000800 // Filesystem needs mkconsistent to write #endif #ifndef LFS3_RDONLY #define LFS3_I_RELOOKAHEAD \ - 0x00000200 // Lookahead buffer is not full + 0x00001000 // Lookahead buffer is not full #endif #if !defined(LFS3_RDONLY) && defined(LFS3_GBMAP) -#define LFS3_I_REGBMAP 0x00000400 // The gbmap is not full +#define LFS3_I_REGBMAP 0x00002000 // The gbmap is not full #endif #ifndef LFS3_RDONLY #define LFS3_I_COMPACTMETA \ - 0x00000800 // Filesystem may have uncompacted metadata + 0x00008000 // Filesystem may have uncompacted metadata #endif -#define LFS3_I_CKMETA 0x00001000 // Metadata checksums not checked recently -#define LFS3_I_CKDATA 0x00002000 // Data checksums not checked recently +#define LFS3_I_CKMETA 0x00010000 // Metadata checksums not checked recently +#define LFS3_I_CKDATA 0x00020000 // Data checksums not checked recently #ifdef LFS3_GBMAP -#define LFS3_I_GBMAP 0x01000000 // Global on-disk block-map in use +#define LFS3_I_GBMAP 0x02000000 // Global on-disk block-map in use #endif @@ -315,21 +315,21 @@ enum lfs3_btype { #define LFS3_T_EXCL 0x00000008 // Error if filesystem modified #ifndef LFS3_RDONLY #define LFS3_T_MKCONSISTENT \ - 0x00000100 // Make the filesystem consistent + 0x00000800 // Make the filesystem consistent #endif #ifndef LFS3_RDONLY #define LFS3_T_RELOOKAHEAD \ - 0x00000200 // Repopulate lookahead buffer + 0x00001000 // Repopulate lookahead buffer #endif #if !defined(LFS3_RDONLY) && defined(LFS3_GBMAP) -#define LFS3_T_REGBMAP 0x00000400 // Repopulate the gbmap +#define LFS3_T_REGBMAP 0x00002000 // Repopulate the gbmap #endif #ifndef LFS3_RDONLY #define LFS3_T_COMPACTMETA \ - 0x00000800 // Compact metadata logs + 0x00008000 // Compact metadata logs #endif -#define LFS3_T_CKMETA 0x00001000 // Check metadata checksums -#define LFS3_T_CKDATA 0x00002000 // Check metadata + data checksums +#define LFS3_T_CKMETA 0x00010000 // Check metadata checksums +#define LFS3_T_CKDATA 0x00020000 // Check metadata + data checksums // internally used flags, don't use these #define LFS3_t_TYPE 0xf0000000 // The traversal's type @@ -343,21 +343,21 @@ enum lfs3_btype { // GC flags #ifndef LFS3_RDONLY #define LFS3_GC_MKCONSISTENT \ - 0x00000100 // Make the filesystem consistent + 0x00000800 // Make the filesystem consistent #endif #ifndef LFS3_RDONLY #define LFS3_GC_RELOOKAHEAD \ - 0x00000200 // Repopulate lookahead buffer + 0x00001000 // Repopulate lookahead buffer #endif #if !defined(LFS3_RDONLY) && defined(LFS3_GBMAP) -#define LFS3_GC_REGBMAP 0x00000400 // Repopulate the gbmap +#define LFS3_GC_REGBMAP 0x00002000 // Repopulate the gbmap #endif #ifndef LFS3_RDONLY #define LFS3_GC_COMPACTMETA \ - 0x00000800 // Compact metadata logs + 0x00008000 // Compact metadata logs #endif -#define LFS3_GC_CKMETA 0x00001000 // Check metadata checksums -#define LFS3_GC_CKDATA 0x00002000 // Check metadata + data checksums +#define LFS3_GC_CKMETA 0x00010000 // Check metadata checksums +#define LFS3_GC_CKDATA 0x00020000 // Check metadata + data checksums // an alias for all possible GC work #define LFS3_GC_ALL ( \ diff --git a/scripts/dbgflags.py b/scripts/dbgflags.py index 1cca8fea..d2d1a36f 100755 --- a/scripts/dbgflags.py +++ b/scripts/dbgflags.py @@ -34,9 +34,9 @@ O_TRUNC = 0x00000010 # -- Truncate the existing file to zero size O_APPEND = 0x00000020 # -- Move to end of file on every write O_FLUSH = 0x00000040 # y- Flush data on every write O_SYNC = 0x00000080 # y- Sync metadata on every write -O_DESYNC = 0x04000000 # -- Do not sync or recieve file updates -O_CKMETA = 0x00001000 # -- Check metadata checksums -O_CKDATA = 0x00002000 # -- Check metadata + data checksums +O_DESYNC = 0x00100000 # -- Do not sync or recieve file updates +O_CKMETA = 0x00010000 # -- Check metadata checksums +O_CKDATA = 0x00020000 # -- Check metadata + data checksums o_WRSET = 3 # i- Open a file as an atomic write o_TYPE = 0xf0000000 # im The file's type @@ -48,11 +48,11 @@ o_ORPHAN = 0x50000000 # i^ Type = orphan o_TRAVERSAL = 0x60000000 # i^ Type = traversal o_UNKNOWN = 0x70000000 # i^ Type = unknown o_ZOMBIE = 0x08000000 # i- File has been removed -o_UNCREAT = 0x02000000 # i- File does not exist yet -o_UNSYNC = 0x01000000 # i- File's metadata does not match disk -o_UNCRYST = 0x00800000 # i- File's leaf not fully crystallized -o_UNGRAFT = 0x00400000 # i- File's leaf does not match disk -o_UNFLUSH = 0x00200000 # i- File's cache does not match disk +o_UNCREAT = 0x04000000 # i- File does not exist yet +o_UNSYNC = 0x02000000 # i- File's metadata does not match disk +o_UNCRYST = 0x01000000 # i- File's leaf not fully crystallized +o_UNGRAFT = 0x00800000 # i- File's leaf does not match disk +o_UNFLUSH = 0x00400000 # i- File's cache does not match disk # File seek flags seek_MODE = 0xffffffff # im Seek mode @@ -72,15 +72,15 @@ F_MODE = 1 # -m Format's access mode F_RDWR = 0 # -^ Format the filesystem as read and write F_REVDBG = 0x00000010 # y- Add debug info to revision counts F_REVNOISE = 0x00000020 # y- Add noise to revision counts -F_CKPROGS = 0x00080000 # y- Check progs by reading back progged data -F_CKFETCHES = 0x00100000 # y- Check block checksums before first use -F_CKMETAPARITY = 0x00200000 # y- Check metadata tag parity bits -F_CKDATACKSUMS = 0x00800000 # y- Check data checksums on reads +F_CKPROGS = 0x00100000 # y- Check progs by reading back progged data +F_CKFETCHES = 0x00200000 # y- Check block checksums before first use +F_CKMETAPARITY = 0x00400000 # y- Check metadata tag parity bits +F_CKDATACKSUMS = 0x01000000 # y- Check data checksums on reads -F_CKMETA = 0x00001000 # y- Check metadata checksums -F_CKDATA = 0x00002000 # y- Check metadata + data checksums +F_CKMETA = 0x00010000 # y- Check metadata checksums +F_CKDATA = 0x00020000 # y- Check metadata + data checksums -F_GBMAP = 0x01000000 # y- Use the global on-disk block-map +F_GBMAP = 0x02000000 # y- Use the global on-disk block-map # Filesystem mount flags M_MODE = 1 # -m Mount's access mode @@ -90,25 +90,25 @@ M_FLUSH = 0x00000040 # y- Open all files with LFS3_O_FLUSH M_SYNC = 0x00000080 # y- Open all files with LFS3_O_SYNC M_REVDBG = 0x00000010 # y- Add debug info to revision counts M_REVNOISE = 0x00000020 # y- Add noise to revision counts -M_CKPROGS = 0x00080000 # y- Check progs by reading back progged data -M_CKFETCHES = 0x00100000 # y- Check block checksums before first use -M_CKMETAPARITY = 0x00200000 # y- Check metadata tag parity bits -M_CKDATACKSUMS = 0x00800000 # y- Check data checksums on reads +M_CKPROGS = 0x00100000 # y- Check progs by reading back progged data +M_CKFETCHES = 0x00200000 # y- Check block checksums before first use +M_CKMETAPARITY = 0x00400000 # y- Check metadata tag parity bits +M_CKDATACKSUMS = 0x01000000 # y- Check data checksums on reads -M_MKCONSISTENT = 0x00000100 # y- Make the filesystem consistent -M_RELOOKAHEAD = 0x00000200 # y- Repopulate lookahead buffer -M_REGBMAP = 0x00000400 # y- Repopulate the gbmap -M_COMPACTMETA = 0x00000800 # y- Compact metadata logs -M_CKMETA = 0x00001000 # y- Check metadata checksums -M_CKDATA = 0x00002000 # y- Check metadata + data checksums +M_MKCONSISTENT = 0x00000800 # y- Make the filesystem consistent +M_RELOOKAHEAD = 0x00001000 # y- Repopulate lookahead buffer +M_REGBMAP = 0x00002000 # y- Repopulate the gbmap +M_COMPACTMETA = 0x00008000 # y- Compact metadata logs +M_CKMETA = 0x00010000 # y- Check metadata checksums +M_CKDATA = 0x00020000 # y- Check metadata + data checksums # GC flags -GC_MKCONSISTENT = 0x00000100 # -- Make the filesystem consistent -GC_RELOOKAHEAD = 0x00000200 # -- Repopulate lookahead buffer -GC_REGBMAP = 0x00000400 # -- Repopulate the gbmap -GC_COMPACTMETA = 0x00000800 # -- Compact metadata logs -GC_CKMETA = 0x00001000 # -- Check metadata checksums -GC_CKDATA = 0x00002000 # -- Check metadata + data checksums +GC_MKCONSISTENT = 0x00000800 # -- Make the filesystem consistent +GC_RELOOKAHEAD = 0x00001000 # -- Repopulate lookahead buffer +GC_REGBMAP = 0x00002000 # -- Repopulate the gbmap +GC_COMPACTMETA = 0x00008000 # -- Compact metadata logs +GC_CKMETA = 0x00010000 # -- Check metadata checksums +GC_CKDATA = 0x00020000 # -- Check metadata + data checksums # Filesystem info flags I_RDONLY = 0x00000001 # -- Mounted read only @@ -116,19 +116,19 @@ I_FLUSH = 0x00000040 # -- Mounted with LFS3_M_FLUSH I_SYNC = 0x00000080 # -- Mounted with LFS3_M_SYNC I_REVDBG = 0x00000010 # -- Mounted with LFS3_M_REVDBG I_REVNOISE = 0x00000020 # -- Mounted with LFS3_M_REVNOISE -I_CKPROGS = 0x00080000 # -- Mounted with LFS3_M_CKPROGS -I_CKFETCHES = 0x00100000 # -- Mounted with LFS3_M_CKFETCHES -I_CKMETAPARITY = 0x00200000 # -- Mounted with LFS3_M_CKMETAPARITY -I_CKDATACKSUMS = 0x00800000 # -- Mounted with LFS3_M_CKDATACKSUMS +I_CKPROGS = 0x00100000 # -- Mounted with LFS3_M_CKPROGS +I_CKFETCHES = 0x00200000 # -- Mounted with LFS3_M_CKFETCHES +I_CKMETAPARITY = 0x00400000 # -- Mounted with LFS3_M_CKMETAPARITY +I_CKDATACKSUMS = 0x01000000 # -- Mounted with LFS3_M_CKDATACKSUMS -I_MKCONSISTENT = 0x00000100 # -- Filesystem needs mkconsistent to write -I_RELOOKAHEAD = 0x00000200 # -- Lookahead buffer is not full -I_REGBMAP = 0x00000400 # -- The gbmap is not full -I_COMPACTMETA = 0x00000800 # -- Filesystem may have uncompacted metadata -I_CKMETA = 0x00001000 # -- Metadata checksums not checked recently -I_CKDATA = 0x00002000 # -- Data checksums not checked recently +I_MKCONSISTENT = 0x00000800 # -- Filesystem needs mkconsistent to write +I_RELOOKAHEAD = 0x00001000 # -- Lookahead buffer is not full +I_REGBMAP = 0x00002000 # -- The gbmap is not full +I_COMPACTMETA = 0x00008000 # -- Filesystem may have uncompacted metadata +I_CKMETA = 0x00010000 # -- Metadata checksums not checked recently +I_CKDATA = 0x00020000 # -- Data checksums not checked recently -I_GBMAP = 0x01000000 # -- Global on-disk block-map in use +I_GBMAP = 0x02000000 # -- Global on-disk block-map in use # Traversal flags T_MODE = 1 # -m The traversal's access mode @@ -136,12 +136,12 @@ T_RDWR = 0 # -^ Open traversal as read and write T_RDONLY = 1 # -^ Open traversal as read only T_MTREEONLY = 0x00000002 # -- Only traverse the mtree T_EXCL = 0x00000008 # -- Error if filesystem modified -T_MKCONSISTENT = 0x00000100 # -- Make the filesystem consistent -T_RELOOKAHEAD = 0x00000200 # -- Repopulate lookahead buffer -T_REGBMAP = 0x00000400 # -- Repopulate the gbmap -T_COMPACTMETA = 0x00000800 # -- Compact metadata logs -T_CKMETA = 0x00001000 # -- Check metadata checksums -T_CKDATA = 0x00002000 # -- Check metadata + data checksums +T_MKCONSISTENT = 0x00000800 # -- Make the filesystem consistent +T_RELOOKAHEAD = 0x00001000 # -- Repopulate lookahead buffer +T_REGBMAP = 0x00002000 # -- Repopulate the gbmap +T_COMPACTMETA = 0x00008000 # -- Compact metadata logs +T_CKMETA = 0x00010000 # -- Check metadata checksums +T_CKDATA = 0x00020000 # -- Check metadata + data checksums t_TYPE = 0xf0000000 # im The traversal's type t_REG = 0x10000000 # i^ Type = regular-file