Reiser File System (Reiser3 and Reiser4)

Discussion in 'Filesystem' started by Jarret W. Buse, Aug 7, 2013.

  1. Jarret W. Buse

    Jarret W. Buse Well-Known Member Staff Writer

    Messages:
    186
    Likes Received:
    270
    Trophy Points:
    63
    Reiser File System (ReiserFS or Reiser3 and Reiser4)

    The Reiser File System (Reiser3) was created by Namesys in 2001 and added to the Linux Kernel in version 2.4.1. Reiser3 was the first Journaling file system included in the Linux Kernel.

    Reiser4 was introduced in 2004 which was an improved Reiser3 file system.

    Reiser3 Reiser4
    File Size 1 EB (8TB on 32-bit system) 8TB
    Max File Name Length 4032 bytes 3976 bytes
    Max Volume Size 16 TB

    REISER3


    Reiser3 supports metadata, or block, journaling. If a crash occurs, the Journal can be used to ‘redo’ the transactions. When the file system is mounted and a previous crash is detected, the recovery of the items in the Journal is automatic.

    When disk space is running low on a Resier3 volume, it is possible to perform an Online Resizing to increase the free space. Extra space is created by using unused partitions on other hard disks. The space is added to the existing file system increasing its size. To reduce size, which is accomplished by removing a hard disk from the set, the shrinkage must be done while the file system is offline.

    Tail Packing is also a feature of Reiser3 to help improve fragmentation. Here the ends of files that are too small to fill a block can be combined with other file “tails” to fill or nearly fill a block. This reduces waste by not filling complete blocks. For example, if a file fills three blocks, but the remaining portion only fills a few bytes of the last block, the “tail” can be placed with other tails. The tails may not completely fill a whole block, but do provide less wasted space.

    For improved performance, the directory listings, file metadata, inode lists and tail packing locations are all stored in a single B+ Tree. When a location on the disk is needed, the B+ Tree can be searched for the necessary information. The B+ Tree provides faster searches than a standard file without indexing.

    The date limitation for files is January 28, 2038. Once this date is reached, the Reiser3 file system will no longer store proper timestamps. Either another file system must be used or a patch must be applied, if one exists.

    REISER4

    The Reiser4 file system supports better journaling ability than Reiser3. The previous journaling system was improved on to provide better performance and fix previous issues.

    Reiser4 supports Block Sub-allocation to improve performance of small files. This process is sometimes referred to as Tail Packing.

    The file system has the ability to support plug-ins to allow compression to save disk space. Future plug-ins may allow for encryption of files.

    The file system supports Allocate on Flush to improve performance on disk writes and improve fragmentation. Data to be written to the disk are held in RAM/cache to wait for the Writeback Time Interval to expire. At this time, a flush occurs where all data in RAM/cache is written at once. The data has already been processed by the CPU and does not require a large block of processing time to accomplish the tasks. A large amount of data is written to disk at once allowing for contiguous blocks to be used to prevent fragmentation.

    Reiser4 supports Transactions. Transactions are a group, or unit, of items to be performed. If one item cannot be performed, the other items which have been performed are undone. For example, if you were to make a payment on a credit card over the Internet to purchase something. The transaction would be to check inventory, remove the item from inventory, charge your account, remove the purchased item from inventory counts and submit paperwork to send the item to you. If the system performs all of the items and then gets to the point of charging your credit card and finds the number is invalid (or the card has been revoked), then all of the other items must be undone. In this case, the inventory numbers are increased by one. Transactions can be one item or many items in the unit. Remember that the unit is treated as an “all or nothing” transaction. Either all items are performed, or none are performed.

    At the time of this writing, Reiser4 is not part of the Linux Kernel.

    Attached Files:

    DevynCJohnson likes this.

Share This Page