- Nicu Pavel personal page

ReiserFS minimal journal patches

    For MediaBox systems a filesystem with journaling capabilities was needed. After some research I choosed ReiserFS because it was more space efficient and had a fast handling of small files. The only problem left was the size of the logging journal which exceeded 33Mb which was too much for a distribution that had to fit into a 64Mb Compact Flash with all encoders and servers.
Modifications of journal size wore pretty simple and consisted in changing values in the #define's from reiserfs include files like this:

1. JOURNAL_BLOCK_COUNT - number of blocks in the journal from 8192 to 512
2. JOURNAL_TRANS_MAX_DEFAULT - biggest journal transaction from 1024 to 128
3. JOURNAL_TRANS_MIN_DEFAULT - minimal journal transaction from 256 to 32
4. JOURNAL_MAX_BATCH_DEFAULT - maximum number of blocks to transfer on a transaction from 900 to 127

These seems to be the safest values I could come up with. Also you need to change the same defines in reiserfstools to create the file system with the smaller journal.

Note: If you create a filesystem with changed logging journal values the reiserfs filesystem won't be accessible under a kernel without a modified reiserfs journal.
Update: Latest reiserfs versions - kernels 2.4.23 and above - are able to mount a filesystem with a modified journal even the kernel hasn't been patched.


Patch against kernel version 2.4.19: here
Patch against kernel version 2.4.23: here
Patch against kernel version 2.4.25: here
Patch against kernel version 2.4.33: here

ReiserFS minimal journal patches