Documentation
¶
Overview ¶
Package loopfs makes, grows, mounts and removes an ext4 filesystem kept in a preallocated file, mounted through a loop device: the volume image (ADR-0262) and the Lake engine's scratch (ADR-0294).
Index ¶
- func Create(ctx context.Context, image string, sizeBytes int64, features string) error
- func Grow(ctx context.Context, image string, sizeBytes int64) error
- func Mount(image, dir string, options ...string) error
- func MountedAt(dir string) (string, bool)
- func Remove(image, dir string) error
- func Unmount(dir string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create makes image: sizeBytes preallocated, then formatted as ext4 with no reserved blocks and the given features ("" for none). A failure removes the file.
func Grow ¶
Grow preallocates image to sizeBytes and resizes its filesystem to fill it; image must not be mounted.
func Mount ¶
Mount mounts image at dir through a loop device, with nosuid, nodev and the extra options. The loop device reads and writes image with direct I/O: buffered, every write is cached a second time, for image, and a 1 GiB worker spilling 0.7 GiB through it took 126 s instead of 5 s.
Types ¶
This section is empty.