BeFS is the 64-bit journaled file system of BeOS (1996) with indexed extended attributes and queries. Haiku reimplemented it and still uses it, and it is otherwise legacy.
Overview
BeFS has a superblock at byte offset 512 with the signature BFS1. Storage is divided into allocation groups tracked by a bitmap, and a log area journals metadata. Inodes carry a small area for extended attributes and can point to attribute directories, which let the file system index attributes and answer queries. Directories are B+ trees.
History
Designed by Dominic Giampaolo and Cyril Meurillon at Be Inc. for BeOS (1996-97).
Haiku re-implemented it as an open-source system.
Structures
Offsets are in bytes from the start of the structure named in each heading. Field names are descriptive and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.
Be Fs File System
Offset
Size
Type
Field
Notes
0x28
4
u32 LE/BE
Block Size
0x30
8
u64 LE/BE
Blocks
0x4C
4
u32 LE/BE
Ag Shift
Entries
Offset
Size
Type
Field
Notes
0x0
4
u32 LE/BE
–
0x4
4
u32 LE/BE
Node Size
0x10
8
u64 LE/BE
Node
values
8
u64 LE/BE
–
lengths + k * 2
2
u16 LE/BE
End
at + 8
8
u64 LE/BE
Node
values + k * 8
8
u64 LE/BE
–
at + 16
8
u64 LE/BE
–
at + 24
2
u16 LE/BE
Count
at + 26
2
u16 LE/BE
Key Bytes
Enumerate Lost Entries
Offset
Size
Type
Field
Notes
0x14
4
u32 LE/BE
–
0x18
4
u32 LE/BE
–
Inline Name
Offset
Size
Type
Field
Notes
at
4
u32 LE/BE
Type
at + 4
2
u16 LE/BE
Name Size
at + 6
2
u16 LE/BE
Data Size
at + 8
1
u8
–
Make Entry
Offset
Size
Type
Field
Notes
0xC
4
u32 LE/BE
–
0x10
4
u32 LE/BE
–
0x14
4
u32 LE/BE
Ode
0x18
4
u32 LE/BE
Flags
Read Superblock
Offset
Size
Type
Field
Notes
at
4
u32 LE/BE
–
at
2
u16 LE
–
at
8
u64 LE
–
at + 4
2
u16 LE/BE
–
at + 6
2
u16 LE/BE
–
Probe
Offset
Size
Type
Field
Notes
0x28
4
i32 LE
Block Size
0x30
8
i64 LE
Blocks
Other fields read
Read in
Offset
Size
Type
Field
Notes
Data Runs
72 + 136
8
u64 LE/BE
–
Enumerate Lost Entries
0x14
4
u32 LE/BE
–
Enumerate Lost Entries
0x14
4
u32 LE/BE
–
Is Allocated
(int)(bit / 32) * 4
4
u32 LE/BE
Word
Read Inode
0x0
4
u32 LE/BE
–
Read Superblock
0x38
8
u64 LE/BE
Free Bytes
Read Superblock
at
4
u32 LE
–
Time
at
8
u64 LE/BE
Seconds
Constants
Be Fs File System
Name
Value
Type
Notes
InodeMagic
0x3BBE0AD9, TreeMagic = 0x69F6C2E8
uint
AttributeOrIndexBits
0x08000000 | 0x10000000 | 0x20000000
uint
S_ATTR_DIR, S_ATTR, S_INDEX_DIR
Stream
72
int
Invalid
ulong.MaxValue
ulong
Structures and constants were extracted from the implementation. Prose sections are a summary from public sources; verify details before relying on them.