Ê×Ò³ | ¹«Ë¾¼ò½é | Êý¾Ý»Ö¸´ | ±¸·Ý·þÎñ | ³É¹¦°¸Àý | ¼¼ÊõÖÐÐÄ | ¿Í»§·þÎñ | ·þÎñ±¨¼Û | Êý¾Ý»Ö¸´Èí¼þ | ÁªÏµÎÒÃÇ | ±±ÑDz©¿Í  
 
  ±±¾©×ܲ¿£º 4006-505-646
  Ìì ½ò ²¿£º 4006-505-646
  ÉÏ º£ ²¿£º 4006-505-646
  Éî ÛÚ ²¿£º 4006-505-646
  ¹ã ÖÝ ²¿£º 4006-505-646
  ÖØ Çì ²¿£º 4006-505-646
  ÄÏ ¾© ²¿£º 4006-505-646
  ÆäËüµØÇø£º 4006-505-646
±±ÑÇÊý¾Ý»Ö¸´Èí¼þWindowsרҵ°æ
ÈýÐÇÊÖ»úÊý¾Ý»Ö¸´Èí¼þV1.0
±±ÑÇÆ»¹ûÊÖ»úÊý¾Ý»Ö¸´Èí¼þV2.0
±±ÑÇÓ²Å̼Ïñ»úÊý¾Ý»Ö¸´Èí¼þ V
±±ÑÇvmwareÐéÄâ»úÊý¾Ý»Ö¸´Èí¼þ
±±ÑÇÕÕƬÊý¾Ý»Ö¸´Èí¼þ
±±ÑÇÉãÏñ»úÊý¾Ý»Ö¸´Èí¼þ v2.1
±±ÑÇSybaseÊý¾Ý¿âÐÞ¸´Èí¼þ V2.
raid´ÅÅÌÕóÁÐÓ¦¼±·½°¸
HP EVA4400/6400/8400/P6000
iphone Í¨Ñ¶Â¼¶ªÊ§ÈçºÎ»Ö¸´£¿
xen server ´æ´¢¿â(sr)Ë𻵺ó
RAID6½á¹¹Ô­ÀíÏê½â£¨±±ÑÇÊý¾Ý
AIXÏÂɾ³ýLVºóµÄÏÖ³¡±£»¤ºÍÊý
RAIDË𻵺ó ¶ÔÊý¾ÝµÄÍêÕû±¸·Ý
Äúµ±Ç°µÄλÖãºÊ×Ò³ >> ¼¼ÊõÖÐÐÄ >> Èí¼þÊý¾Ý»Ö¸´ÎÄÀ¸ >> ÕýÎÄ

The structure of the Reiser file system

The structure of the Reiser file system

by Florian Buchholz

The Reiser file system was created by Hans Reiser. The design objectives were to increase performance over the ext2 file system, offer a space efficient file system, and to improve handling of large directories compared to existing file systems. Reiserfs uses balanced trees to store files and directories and it also offers journaling.

This document describes the on-disk structure of the Reiser file system version 3.6. This document does not describe how the file system tree is balanced, how the journaling is performed, or how files and directories are managed within an implementation of the file system.

Blocks

The reiserfs partition is divided into blocks of a fixed size. The blocks are numbered sequentially starting with block 0. There is a maximum number of 2^32 possible blocks in one partition.

The partition starts with the first 64k unused to leave enough room for partition labels or boot loaders. After that follows the superblock. The superblock contains important information about the partition such as the block size and the block numbers of the root and journal nodes. The superblock block number differs depending on the block size, but always starts at byte 65536 of the partition. The default block size for reiserfs under Linux is 4096 bytes. This makes the superblock block number 16. There is only one instance of the superblock for the entire partition.

Directly following the superblock is a block containing a bitmap of free blocks. The number of blocks mapped in the bitmap depends directly on the block size. If a bitmap can map k blocks, then every k-th block will be a new bitmap block.

Block size 4,096 512 1,024 8,192
#blocks in bitmap 32,768 4,096 8,192 65,536
superblock 16 128 64 8
1st bitmap 17 129 65 9
2nd bitmap 32,768 4,096 8,192 65,536
3rd bitmap 65,536 8,192 16,384 131,072
4th bitmap 98,304 12,288 24,576 196,608
...
(assuming that the partition is large enough to have 2nd, 3rd, 4th bitmap)

Following the first bitmap block should be the journal, but the information in the superblock is the authorative source for that information.

The Superblock

The superblock layout
Name Size Description
Block count 4 The number of blocks in the partition
Free blocks 4 The number of free blocks in the partition
Root block 4 The block number of the block containing the root node
Journal block 4 The block number of the block containing the first journal node
Journal device 4 Journal device number (not sure what for)
Orig. journal size 4 Original journal size. Needed when using partition on systems with different default journal sizes.
Journal trans. max 4 The maximum number of blocks in a transaction
Journal magic 4 A random magic number
Journal max batch 4 The maximum number of blocks in a transaction
Journal max commit age 4 Time in seconds of how old an asynchronous commit can be
Journal max trans. age 4 Time in seconds of how old a transaction can be
Blocksize 2 The size in bytes of a block
OID max size 2 The maximum size of the object id array
OID current size 2 The current size of the object id array
State 2 State of the partition: valid (1) or error (2)
Magic string 12 The reiserfs magic string, should be "ReIsEr2Fs"
Hash function code 4 The hash function that is being used to sort names in a directory
Tree Height 2 The current height of the disk tree
Bitmap number 2 The amount of bitmap blocks needed to address each block of the file system
Version 2 The reiserfs version number
Reserved 2  
Inode Generation 4 Number of the current inode generation.

±¾ÐÂÎŹ²13Ò³,µ±Ç°ÔÚµÚ01Ò³  
01  02  03  04  05  06  07  08  09  10  
11  12  13  

ÉÏһƪ£ºSolarisÓ²ÅÌ·ÖÇø½á¹¹
ÏÂһƪ£º¸÷ÀàunixºÍlinux¹ÜÀíÔ±ÃÜÂ붪ʧ½â¾ö·½·¨
·µ»ØÊ×Ò³ | ÁªÏµÎÒÃÇ | ¹ØÓÚÎÒÃÇ | ÕÐƸÐÅÏ¢ | ÓÑÇéÁ´½Ó | ÍøÕ¾µØͼ | ºÏ×÷»ï°é
°æȨËùÓÐ ±±¾©±±ÑÇå·ÐǿƼ¼ÓÐÏÞ¹«Ë¾
È«¹úͳһ¿Í·þÈÈÏߣº4006-505-646
±±¾©×ܲ¿£º±±¾©Êк£µíÇøÓÀ·á»ùµØ·á»ÛÖз7ºÅвÄÁÏ´´Òµ´óÏÃB×ù205ÊÒ
¾©ICP±¸09039053ºÅ

¸+"tw