Crate nydus_rafs

Crate nydus_rafs 

Source
Expand description

RAFS: a chunk dedup, on-demand loading, readonly fuse filesystem.

The Rafs filesystem is blob based readonly filesystem with chunk deduplication. A Rafs filesystem is composed up of a metadata blob and zero or more data blobs. A blob is just a plain object containing data chunks. Data chunks may be compressed, encrypted and deduplicated by chunk content digest value. When Rafs file is used for container images, Rafs metadata blob contains all filesystem metadatas, such as directory, file name, permission etc. Actually file contents are divided into chunks and stored into data blobs. Rafs may built one data blob for each container image layer or build a single data blob for the whole image, according to building options.

There are several versions of Rafs filesystem defined:

  • V4: the original Rafs filesystem format
  • V5: an optimized version based on V4 with metadata direct mapping, data prefetching etc.
  • V6: a redesigned version to reduce metadata blob size and inter-operable with in kernel erofs, better support of virtio-fs.

The nydus-rafs crate depends on the nydus-storage crate to access metadata and data blobs and improve performance by caching data on local storage. The nydus-rafs itself includes two main sub modules:

  • fs: the Rafs core to glue fuse, storage backend and filesystem metadata.
  • metadata: defines and accesses Rafs filesystem metadata.

For more information, please refer to Dragonfly Image Service

Modules§

blobfs
Fuse blob passthrough file system, mirroring an existing FS hierarchy.
fs
The Rafs API layer to glue fuse, storage backend and filesystem metadata together.
metadata
Enums, Structs and Traits to access and manage Rafs filesystem metadata.

Structs§

RafsIterator
Iterator to walk all inodes of a Rafs filesystem.

Enums§

MetaType
RafsError
Error codes for rafs related operations.

Traits§

RafsIoRead
A helper trait for RafsIoReader.
RafsIoWrite
A helper trait for RafsIoWriter.

Type Aliases§

RafsIoReader
Handler to read file system bootstrap.
RafsIoWriter
Handler to write file system bootstrap.
RafsResult
Specialized version of std::result::Result<> for Rafs.