inodes

package
v0.0.0-...-810cf82 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2019 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package inodes contains the logic for allocating inode numbers.

We just store each inode as a key in the database. The overhead is roughly 8 bytes per inode. Inodes are never freed, currently. 2**64 files oughta be enough for a while.

Index

Constants

This section is empty.

Variables

View Source
var ErrOutOfInodes = outOfInodesError{}

Functions

func Allocate

func Allocate(bucket *bolt.Bucket) (uint64, error)

Allocate returns the next available inode number, and marks it used.

Returns ErrOutOfInodes if there are no free inodes.

func Dynamic

func Dynamic(parent uint64, name string) uint64

Dynamic returns a dynamic inode. The result is guaranteed to never collide with inodes returned from Allocate.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL