ReiserFS explained

ReiserFS 3.6
Full Name:ReiserFS
Developer:Namesys
Introduction Os:Linux 2.4.1
Os:Linux, ReactOS
Directory Struct:B+ tree
File Struct:Bitmap
Max Filename Size:4032 bytes, limited to 255 by Linux VFS
Max Files No:232−3 (~4 billion)
Max Volume Size:16 TiB
Max File Size:1 EiB (8 TiB on 32 bit systems)
Filename Character Set:All bytes except NUL and
Dates Recorded:Modification (mtime), metadata change (ctime), access (atime)
Date Range:December 14, 1901 – January 18, 2038 (32-bit Unix time)
Date Resolution:1 s
Forks Streams:Extended attributes
File System Permissions:Unix permissions, ACLs and arbitrary security attributes
Compression:No
Encryption:No

ReiserFS is a general-purpose, journaling file system initially designed and implemented by a team at Namesys led by Hans Reiser and licensed under 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 for future releases on October 12, 2006.[1]

ReiserFS version 3.6, now occasionally referred to as Reiser3, introduced a new on-disk format allowing larger filesizes. Namesys considered ReiserFS stable and feature-complete and ceased development on it to concentrate on its successor, Reiser4, though it continued to release security updates and critical bug fixes. Namesys went out of business in 2008 after Reiser's conviction for murder. The product is now maintained as open source by volunteers.[2] The reiserfsprogs 3.6.27 were released on 25 July 2017.[3]

ReiserFS is currently supported on Linux without quota support. It has been discussed for removal from the Linux kernel since early 2022 due to a lack of maintenance upstream, and technical issues inherent to the filesystem, such as suffering from the year 2038 problem;[4] [5] [6] it was deprecated in Linux 5.18,[7] and marked as obsolete in Linux 6.6.[8] It is planned for removal in 2025.[9] [10]

Features

At the time of its introduction, ReiserFS offered features that had not been available in existing Linux file systems. These include tail packing—a scheme to reduce internal fragmentation at cost of performance. Reiser4 may have improved this by packing tails where it does not negatively affect performance.[11]

Design

ReiserFS stores file metadata ("stat items"), directory entries ("directory items"), inode block lists ("indirect items"), and tails of files ("direct items") 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 (in which items are packed end-to-end) 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.[12] 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.

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.[13]

Before Linux 2.6.33,[14] ReiserFS heavily used the big kernel lock (BKL)—a global kernel-wide lock—which does not scale well for systems with multiple cores,[15] 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 (released in 2000),[16] [17] until switching to ext3 in SUSE Linux Enterprise 10.2 and openSUSE 11, announced in 2006.[18] [19]

Jeff Mahoney of SUSE wrote a post on 14 September 2006 proposing to move from ReiserFS to ext3 for the default installation file system. The reasons he mentioned included 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.[20] He wrote that his proposal for the switch was unrelated to Hans Reiser being under trial for murder.[21] 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 (including (2)) are not synchronous on ReiserFS, which can result in data corruption with applications relying heavily on file-based locks (such as mail transfer agents like qmail[22] and Postfix[23]) if the machine halts before it has synchronized the disk.[24]

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.[25] Fragmentation is still an issue with SSD regardless of file system.[26]

fsck

ReiserFS 3's fsck is capable of rebuilding the whole tree as part of the rescue in case of its total corruption. This action has to be explicitly initiated by administrator and is not part of normal operation. Predictably, the process is destructive and may further corrupt existing files or introduce new entries with unexpected contents, which has been criticized as a less than optimal method.[27]

ReiserFS v3 images should not be stored on a ReiserFS v3 partition (e.g. backups or disk images for emulators) without transforming them (e.g., by compressing or encrypting) 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. This is similar to the FSID problem in btrfs. The ReiserFS successor, Reiser4, fixes this problem.

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.[28]

Early implementations of ReiserFS (prior to that in Linux 2.6.2) 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.

See also

External links

Notes and References

  1. News: Stephen . Shankland . Novell makes file storage software shift . Business Tech . cnet . 2006-10-16. .
  2. Web site: Namesys vanishes, but Reiser project lives on . https://web.archive.org/web/20160327005558/http://www.cnet.com/news/namesys-vanishes-but-reiser-project-lives-on/ . dead . March 27, 2016 . CNet . January 16, 2008 . 2008-01-26 . Stephen . Shankland.
  3. Web site: "Fossies" - the Fresh Open Source Software Archive . July 25, 2017 . 2019-07-25 .
  4. Web site: Linux Developers Discuss Deprecating & Removing ReiserFS . 2022-03-10 . www.phoronix.com . en.
  5. Web site: Is it time to remove reiserfs? - Matthew Wilcox. 2022-02-24. lore.kernel.org.
  6. Web site: Re: Is it time to remove reiserfs? - Dave Chinner . 2022-03-10 . lore.kernel.org.
  7. Web site: Linux_5.18 . 2022-05-23 . Linux Kernel Newbies.
  8. Web site: Purdy . Kevin . 2023-08-31 . ReiserFS is now "obsolete" in the Linux kernel and should be gone by 2025 . 2023-09-01 . Ars Technica . en-us.
  9. Web site: Larabel . Michael . Linux's ReiserFS Plan Is To Deprecate It, Remove The File-System In 2025 . . 20 June 2023.
  10. Web site: kernel/git/torvalds/linux.git - Linux kernel source tree . 2022-05-22 . git.kernel.org.
  11. Web site: Reiser4 is Released! . 2006-07-15 . Reiser . Hans . dead . https://web.archive.org/web/20071024001500/http://www.namesys.com/v4/v4.html#BLOBs . 2007-10-24 .
  12. Mingming Cao . Theodore Y. Ts'o . Theodore Y. Ts'o . Badari Pulavarty . Suparna Bhattacharya . Suparna Bhattacharya . 2005-07-26 . State of the Art: Where we are with the Ext3 file system . IBM Linux Technology Center . 2005 Linux Symposium . Ottawa, Canada . 2007-03-08 .
  13. Web site: PHP Manual . php.net . The PHP Group . 5 December 2018.
  14. Web site: kill-the-BKL . git.kernel.org.
  15. Web site: Jeff Mahoney . Proposal: Change in Default FS for Releases >= 10.2 . 2006-09-14 . 2009-08-23 . gmane.org . .
  16. Web site: Archive:SuSE Linux 6.4. openSUSE wiki. 2017-06-28.
  17. Web site: SUSE LINUX 9.1 Administration Guide: Major File Systems in Linux. Novell. 2017-06-28.
  18. News: Novell makes file storage software shift. Shankland. Stephen. 16 October 2006. CNET.
  19. Web site: Novell will switch from ReiserFS to ext3. Sharma. Mayank. 12 October 2006. Linux.com.
  20. Web site: SUSE 10.2 Ditching ReiserFS as default FS? (comment 29). 2006-10-04. linux.wordpress.com . https://web.archive.org/web/20061109162537/http://linux.wordpress.com/2006/09/27/suse-102-ditching-reiserfs-as-it-default-fs/#comment-28534. 2006-11-09. 2009-08-23. comment by Jeff Mahoney.
  21. Web site: Oakland Police Search Home Of Missing Woman's Ex. 2006-09-14. https://web.archive.org/web/20061106173127/http://cbs5.com/topstories/local_story_256204954.html. CBS 5 / AP / BCN. 2006-11-06. 2009-08-23. dead.
  22. Daniel Robbins (2001), "Advanced file system implementor's guide". Retrieved 5. July 2006
  23. Matthias Andree (2001), LKML post on Postfix synchronity assumptions. Retrieved 15. July 2006
  24. http://archives.neohapsis.com/archives/postfix/2001-05/1749.html NEOHAPSIS - Peace of Mind Through Integrity and Insight
  25. Hans Reiser, Reiser4 design, repacker . Retrieved 5. July 2006
  26. Martín Farach-Colton, "File System Aging", archived webarchive, 2021
  27. http://www.uwsg.iu.edu/hypermail/linux/kernel/0506.3/0219.html Theodore Ts'o LKML post
  28. http://namesys.com/download.html ReiserFS download page