ReiserFS


ReiserFS is a general-purpose, journaled computer file system initially designed and implemented by a team at Namesys led by Hans Reiser. ReiserFS is currently supported on Linux licensed as GPLv2. Introduced in version 2.4.1 of the Linux kernel, it was the first journaling file system to be included in the standard kernel. ReiserFS was the default file system in Novell's SUSE Linux Enterprise until Novell decided to move to ext3 on October 12, 2006 for future releases.
Namesys considered ReiserFS version 3.6 which introduced a new on-disk format allowing bigger filesizes, now occasionally referred to as Reiser3, as stable and feature-complete and, with the exception of security updates and critical bug fixes, ceased development on it to concentrate on its successor, Reiser4. Namesys went out of business in 2008 after Reiser's conviction for murder. The product is now maintained as open source by volunteers. The reiserfsprogs 3.6.27 were released on 25 July 2017.

Features

At the time of its introduction, ReiserFS offered features that had not been available in existing Linux file systems:
ReiserFS stores file metadata, directory entries, inode block lists, and tails of files in a single, combined B+ tree keyed by a universal object ID. Disk blocks allocated to nodes of the tree are "formatted internal blocks". Blocks for leaf nodes are "formatted leaf blocks". All other blocks are "unformatted blocks" containing file contents. Directory items with too many entries or indirect items which are too long to fit into a node spill over into the right leaf neighbour. Block allocation is tracked by free space bitmaps in fixed locations.
By contrast, ext2 and other Berkeley FFS-like file systems of that time simply used a fixed formula for computing inode locations, hence limiting the number of files they may contain. Most such file systems also store directories as simple lists of entries, which makes directory lookups and updates linear time operations and degrades performance on very large directories. The single B+ tree design in ReiserFS avoids both of these problems due to better scalability properties.

Version history

Regarding the development of a filesystem, three fields have to be considered separately:
Therefore this section contains three tables: one for the 3.5.x series of the filesystem driver that was used to read and write the 3.5 on-disk format, another one for the 3.6.x series of the filsystem driver that is used to read and write the 3.6 on-disk format and a third one for the tools contained in the reiserfsprogs package.
Since the on-disk format 3.6 is regarded as feature complete and stable, it is frozen and doesn't get changed anymore. The filesystem driver for Linux, that is part of the official kernel as well as the reiserfsprogs operating in user space are still being maintained and getting updates even nowadays.
The defrag program was never fully implemented, although there were attempts up to the year 2014. One reason why it never was finished was the rise of solid state disks which – contrary to the classic spinning wheel hard disk drives – do not need to be defragmented, or more precisely: shouldn't be defragmented at all, as any unnecessary write operations will shorten the life of an SSD.

Performance

Compared with ext2 and ext3 in version 2.4 of the Linux kernel, when dealing with files under 4 KiB and with tail packing enabled, ReiserFS may be faster. This was said to be of great benefit in Usenet news spools, HTTP caches, mail delivery systems, and other applications where performance with small files is critical. However, in practice news spools use a feature called cycbuf, which holds articles in one large file; fast HTTP caches and several revision control systems use a similar approach, nullifying these performance advantages. For email servers, ReiserFS was problematic due to semantic problems explained below. Also, ReiserFS had a problem with very fast filesystem aging when compared to other filesystems — in several usage scenarios filesystem performance decreased dramatically with time.
Before Linux 2.6.33, ReiserFS heavily used the big kernel lock — a global kernel-wide lock — which does not scale very well for systems with multiple cores, as the critical code parts are only ever executed by one core at a time.

Usage

ReiserFS was the default file system in SuSE Linux since version 6.4, until switching to ext3 in SUSE Linux Enterprise 10.2/openSUSE 11, announced in 2006.
Jeff Mahoney of SUSE wrote a post on 14 September 2006 proposing to move from ReiserFS to ext3 for the default installation file system. Some reasons he mentioned were scalability, "performance problems with extended attributes and ACLs", "a small and shrinking development community", and that "Reiser4 is not an incremental update and requires a reformat, which is unreasonable for most people." On October 4 he wrote a response comment on a blog in order to clear up some issues. He wrote that his proposal for the switch was unrelated to Hans Reiser being under trial for murder. Mahoney wrote he "was concerned that people would make a connection where none existed" and that "the timing is entirely coincidental and the motivation is unrelated."

Criticism

Some directory operations are not synchronous on ReiserFS, which can result in data corruption with applications relying heavily on file-based locks if the machine halts before it has synchronized the disk.
There are no programs to specifically defragment a ReiserFS file system, although tools have been written to automatically copy the contents of fragmented files hoping that more contiguous blocks of free space can be found. However, a "repacker" tool was planned for the next Reiser4 file system to deal with file fragmentation. With the rise of Solid State Disks this problem became irrelevant as contrary to Hard Disk Drives there is no slow down caused by fragmentation as SSDs don't use any moving parts. It is even recommended to abstain from any kind of defragmentation on SSDs because it will shorten their lifetime.

fsck

The tree rebuild process of ReiserFS's fsck has attracted much criticism by the *nix community: If the file system becomes so badly corrupted that its internal tree is unusable, performing a tree rebuild operation may further corrupt existing files or introduce new entries with unexpected contents, but this action is not part of normal operation or a normal file system check and has to be explicitly initiated and confirmed by the administrator.
ReiserFS v3 images should not be stored on a ReiserFS v3 partition without transforming them in order to avoid confusing the rebuild. Reformatting an existing ReiserFS v3 partition can also leave behind data that could confuse the rebuild operation and make files from the old system reappear. This also allows malicious users to intentionally store files that will confuse the rebuilder. As the metadata is always in a consistent state after a file system check, corruption here means that contents of files are merged in unexpected ways with the contained file system's metadata. The ReiserFS successor, Reiser4, fixes this problem.

Earlier issues

ReiserFS in versions of the Linux kernel before 2.4.16 were considered unstable by Namesys and not recommended for production use, especially in conjunction with NFS.
Early implementations of ReiserFS were also susceptible to out-of-order write hazards. But the current journaling implementation in ReiserFS is now on par with that of ext3's "ordered" journaling level.