FreeBSD The Power to Serve

SquashFS driver for FreeBSD kernel

Contact: Raghav Sharma <raghav@FreeBSD.org>

This quarter we finished SquashFS driver work for the kernel. We now can mount SquashFS archives on FreeBSD 13.2-RELEASE or greater, and perform all basic read-only filesystem operations.

Code work includes:

  • Implementing vop_lookup() and vop_readdir() hooks for directory read support.

  • Implementing vop_read() and vop_strategy() hooks for files read support.

  • Implementing vop_readlink() hook for symlinks read support.

We also implemented extended attributes interface functions for SquashFS. All that remains is to implement their kernel interface hooks.

There were a lot of bug fixes as well. One major issue was to find out why we can not list the first entry of the root directory, it transpires that SquashFS could have inode_number as zero, which the kernel, for some reason, skips while listing dirents. For now, we fixed it by passing dummy inode_number, instead of zero, to dirent.

The code review is currently ongoing with my mentor Chuck Tuffli.

I am happy to say that SquashFS will find its place in upcoming FreeBSD releases.

Sponsor: The Google Summer of Code 2023 program


Last modified on: October 5, 2023 by Raghav Sharma