Puzzlefs is a container file system designed by Cisco.
Cisco recently announced via the Linux Kernel mailing list a proposal for a new file system which is called "PuzzleFS" and which is proposed to be implemented as a module for the Linux kernel.
puzzleFS, is a file system written in Rust, designed by cisco to house insulated containers and continues the development of the ideas proposed in the AtomfsFS file system, to address the
existing OCI format limitations.
Hi all!
This is a proof-of-concept driver written for the PuzzleFS next-generation container filesystem [1]. I have included a brief overview of PuzzleFS below. This driver is based on the Rust-next branch, and I have also backed up the filesystem abstractions…
Regarding the project's development, it is mentioned that its objective is to overcome the limitations that arise when using container images in OCI (Open Container Initiative) format. PuzzleFS addresses problems such as efficient storage of duplicate data, direct mount capability, the creation of repeatable images, and memory security.
For deduplication of repeated data in different containers, the FastCDC (Fast Content-Defined Chunking) algorithm is used , which works by dividing the data into fragments of arbitrary size and maintaining a hash index of the processed fragments.
Repeated chunks are stored once and indexed together for all FS layers, i.e. deduplication can cover different mount points (you can launch a new FS layer based on the existing one and use the data chunks it contains during deduplication). deduplication).
Repeatable compilation of container images is achieved by defining a canonical representation of the container image format. Direct mounting allows mounting an OCI container image from global shared storage without first unpacking it, using the container manifest's content hash as the identifier.
Direct mount support is a key feature of puzzlefs and, together with fs-verity, provides data integrity. Currently, puzzlefs is implemented as a userspace filesystem (FUSE), although a read-only kernel filesystem driver is in the works.
The fs-verity mechanism can be used to verify data integrity under shared storage usage conditions, which, when accessing files, checks whether the hash values ​​specified in the binary index correspond to the actual content.
Regarding the programming language, it is mentioned that the Rust language was chosen because it combines the high performance of the resulting code with safe memory capabilities, which reduces the risk of vulnerabilities caused by problems such as memory access after freeing and memory overruns. buffer. Using Rust for the kernel module also made it possible to share code across kernel and userspace components to create a single secure implementation.
Finally, it is mentioned that other project goals include very fast image building and mounting , the ability to use an optional intermediate stage for image canonicalization, optional mtree-style FS tree traversals when using a layered structure, casync-style changes, reduced duplication, direct mount support, and memory safety guarantees, some inspired by the OCIv2 design document, among other things.
It is worth mentioning that up to now the implementation of this file system is still in the prototype stage, so its use or implementation in production environments is not recommended, but those interested should know that it is compatible with building with the rust-next Linux kernel branch.
Finally, for those interested in learning more, the project's code is open source under the Apache 2.0 and MIT licenses , and you can find details of the release at the following link.