Subject: Re: RFC: community requirements for a flash filesystem
To: None <>
From: Jochen Kunz <>
List: tech-kern
Date: 03/20/2006 23:18:00
On Mon, 20 Mar 2006 22:29:12 +0100 (CET)
Hubert Feyrer <> wrote:

> ``Squashfs is a compressed read-only filesystem for Linux''...
> Is this like vnd(4) with VND_COMPRESSION?
No. vnd(4) presents a block device to the upper layer, does optional
compression inside and uses a file on an other file system as backing
storage. squashfs is a file system like ffs or lfs that risides on a
block device. The difference is that it is read only and does
compression on all data and I think metadata too. In the Linux world
squashfs is usefull e.g. as file system for the initrd too. squashfs
claims to be very space efficient. To my experience a squashfs image of
a directory tree is only a few % bigger then a tar.gz of that directory

OpenWRT uses a squashfs to store the firmware. This squashfs is mounted
as root. Later it is remounted on /rom and a JFFS2 is mounted on root.
The JFFS contains only links to /rom. e.g. /bin/ls -> /rom/bin/ls. This
makes the system more robust. If the JFFS2 gets garbled and can't be
mounted, the kernel / init script on the squashfs just reinitializes the
JFFS2 from scratch at the next boot.

AFAIK JFFS2 has problems with big filesystem sizes. Garrett pointed out
this already. It needs very long to mount large file systems. At $WORK
we need a flash file system for flash devices in the GB range and JFFS2
faild because of exorbitant delays when the device gets mounted. (IIRC
it was somthing like O(n^2) where O is mount time and n is the FS size.)
You may call JFFS2 on multi GB devices abuse, as it was designed to run
on flashs with only a few MB size to store some bits of firmware and
config data.