Parity Party File System is a filesystem designed to detect and correct data corruption caused by ionising radiation.
On Ubuntu/Debian, install required packages:
sudo apt update
sudo apt install -y build-essential cmake ninja-build pkg-config libfuse3-dev fuse3 to build the project, use the following commands:
cmake --preset debug
cmake --build --preset debugOther presets you can use:
debugreleasefreertos_debugfreertos_release
To run unit tests, use:
ctest --preset debugTo run the performance benchmark, build the project with the release preset and use:
./build/release/performance_tests/performance_tests --benchmark_counters_tabular=trueUsage simulator creates a filesystem instance and runs threads doing operations on it. Random bit flips are
performed during the simulation.
There is a configuration file allowing to modify simulation parameters. Example configuration can be found in
usage_simulator/simulation_config.txt
./build/release/usage_simulator/usage_simulator <path_to_config_file> <logs_directory>There is also python simulation runner. Simulation runner creates simulation scenarios defined in the script
and runs them in parallel. Then it saves useful plots to plots/ directory
To run it:
- Build program with the
releasepreset - Run the following command:
./.venv/bin/python3 ./simulation_runner/runner.py
To measure the performance of FUSE I/O operations for different ECC configurations, this project uses fio (Flexible I/O Tester). The benchmarks are executed via a dedicated Python script and the results are saved in the fio_plots/ directory To run it:
- Install fio:
sudo apt install fio
- Build program with the
releasepreset - Run the following command:
./.venv/bin/python3 ./fuse_benchmark/runner.py
After building the project, you’ll find two binaries:
mkfs_ppfs– used for creating and formatting a filesystem image.mount_ppfs– used for mounting an existing filesystem image via FUSE.
Both binaries are located in:
./build/<preset_name>/fuse_exec/
To create a new filesystem image, run:
./build/<preset_name>/fuse_exec/mkfs_ppfs <config_file> <disk_file><disk_file>– path to the image file that will store the filesystem (created if it doesn’t exist).<config_file>– path to a configuration file specifying filesystem parameters.
The example configuration file is available at:
fuse_exec/example_config.txt
Example:
./build/debug/fuse_exec/mkfs_ppfs ppfs.img fuse_exec/example_config.txtFilesystem configuration is provided using a plain text file with key = value pairs.
Each configuration option must be specified on a separate line.
- Lines starting with
#or//are treated as comments and ignored - Inline comments are allowed (everything after
#or//is ignored) - Whitespace around keys and values is ignored
- Each line must contain exactly one
=character - Unknown keys cause a configuration error
- Missing required fields cause a configuration error
The following fields are always required:
- Type:
uint64_t - Description: Total size of the filesystem image in bytes, must be a multiple of block size
- Example:
total_size = 1048576
- Type:
uint64_t - Description: Expected average file size, used to tune internal filesystem structures
- Example:
average_file_size = 4096
- Type:
uint32_t - Description: Block size in bytes (must be a power of two)
- Example:
block_size = 512
- Type: enum
- Allowed values:
none,crc,reed_solomon,parity,hamming - Description: Error correction mechanism used by the filesystem
- Example:
ecc_type = crc
Some fields are required only for specific ecc_type values.
- Type:
unsigned long int - Required when:
ecc_type = crc - Description: Polynomial used for CRC error detection. Each bit represents a coefficient in CRC polynomial, with
the most significant bit corresponding to the highest degree. The constant term (
+1) is implicit and is not encoded in this value. - Format: Decimal or hexadecimal (
0xprefix supported) - Examples:
crc_polynomial = 0x9960034c
crc_polynomial = 257
- Type:
uint32_t - Required when:
ecc_type = reed_solomon - Description: Number of bytes that can be corrected per block
- Example:
rs_correctable_bytes = 3
- Type:
bool - Allowed values:
true,false,1,0 - Default:
false - Description: Enables or disables journaling support
- Example:
use_journal = false
# Example filesystem configuration
total_size = 1048576
average_file_size = 4096
block_size = 512
ecc_type = crc
crc_polynomial = 0x9960034c
use_journal = falseTo mount an existing filesystem image, run:
./build/<preset_name>/fuse_exec/mount_ppfs <disk_file> <mount_point> [-- fuse_options]<disk_file>– path to the filesystem image to mount.<mount_point>– path to an existing, empty directory that will serve as the mount point.fuse_options– optional FUSE parameters (for example-ffor foreground or-dfor debug logs). Must be passed * *after--**.
Example:
mkdir -p mnt
./build/debug/fuse_exec/mount_ppfs ppfs.img mnt -- -f -dNow you can add files to mnt
echo "abc" > mnt/file
cat mnt/file
# abcTo unmount:
umount mnt