Documentation ¶
Overview ¶
inomap translates (Dev, Tag, Ino) tuples to unique uint64 inode numbers.
Format of the returned inode numbers:
[spill bit = 0][15 bit namespace id][48 bit passthru inode number] [spill bit = 1][63 bit spill inode number ]
Each (Dev, Tag) tuple gets a namespace id assigned. The original inode number is then passed through in the lower 48 bits.
If namespace ids are exhausted, or the original id is larger than 48 bits, the whole (Dev, Tag, Ino) tuple gets mapped in the spill map, and the spill bit is set to 1.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InoMap ¶
InoMap stores the maps using for inode number translation. See package comment for details.
func New ¶
New returns a new InoMap. Inode numbers on device `rootDev` will be passed through as-is. If `rootDev` is zero, the first Translate() call decides the effective rootDev.
func (*InoMap) Translate ¶
Translate maps the passed-in (device, inode) pair to a unique inode number.
func (*InoMap) TranslateStat ¶
TranslateStat translates (device, ino) pair contained in "st" into a unique inode number and overwrites the ino in "st" with it. Convenience wrapper around Translate().
type QIno ¶
type QIno struct { // Stat_t.Ino is uint64 on 32- and 64-bit Linu Ino uint64 // contains filtered or unexported fields }
QIno = Qualified Inode number. Uniquely identifies a backing file through the (device number, tag, inode number) tuple.
func QInoFromStat ¶
QInoFromStat fills a new QIno struct with the passed Stat_t info.