[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Block Devices support for JFFS2
I have slightly modified JFFS2 to support standard block devices. Now you can
mount a CompactFlash, a hard disk partition, a floppy, or even a loop device
containing a JFFS2 file-system. This allowed me to replace EXT2 on my firewall
which runs on a 16 MB CompactFlash.
BTW, I had to add more checks since the driver had tendency to reformat the block
device when it didn't recognize it :-(. Now, if you mount a block device, you have
to pass "-o format" to mount to force it to erase the unformated blocks. The MTD
behaviour hasn't changed. I tried to do my best to make minimal changes so that
MTD-only users won't notice a change.
Three mounting options have been added :
-o format (to force erasing of non-formated blocks on a non-MTD block device)
-o blkdev (to force block device behaviour on and MTD block device. may be
useful for debugging only, IMHO)
-o deflate=X : change the compression speed/efficiency when using the deflate
method. 0<= X <=9 (just like gzip).
I could save about 5% using -o deflate=9 compared to deflate=3 (which is the default one).
On many actual systems there's no speed loss between 3 and 9 (even my 386sx firewall
Although it seems stable to me (I'm using it in production here), it's a bit too new so
I would recommend everyone to take care. Anyway, I'm very happy with it ; my 16 MB flash
seems so large now :-)
The following patch applies cleanly to kernel 2.4.8-ac7.
You can also get it from: http://wtarreau.free.fr/linux-patches/
Willy Tarreau - http://wtarreau.free.fr/ - mailto:firstname.lastname@example.org
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to email@example.com