[Week 3-4] Squashfs port status report

From: Raghav Sharma <raghav_at_freebsd.org>
Date: Wed, 28 Jun 2023 17:21:33 UTC
Hello!

In the past two weeks, a lot of Squashfs internal work has been
completed which includes:

* Decompressor support - Since the Linux kernel already deprecated
uncompressed squashfs image support it was natural for me to first add
block decompressor support.
Squashfs compresses inodes, data blocks, and directory blocks through
compression algorithms like zlib, lzo2, zstd, etc...
I added decompression support for all types of compression that
Squashfs supports.

* Block read API - This API call will be made to read data block at
particular position in squashfs disk file to buffer. It will handle
decompression, metadata, and data reading of blocks, and return the
resultant buffer.
In further work cache support can be added on top of these functions.

* Tables initialization - Squashfs uses a table to store
inode_numbers, lookups, inodes, xattrs, etc... so completed support for
it.
All necessary tables are now in the struct sqsh_mount structure.

* Inode initialization/read - All types of inodes supported by squashfs can
now be read. I use the structure present in the Fuse implementation as
it was better than Linux one.

Note that while compiling build errors might occur due to the absence
of decompressor header files like zlib etc...
Since I added all decompressor types support I installed them on my
FreeBSD local system but it might fail for someone who doesn't have
it.
I think later we need to look for a way to set up flags during
compilation if the user system has the necessary header files or not.

Anyways we are able to generate squashfs.ko module and I will be
wrapping up mount(8) work this week.

Thanks
Raghav