首页 | 公司简介 | 数据恢复 | 成功案例 | 技术中心 | 客户服务 | 服务报价 | 联系我们 | 技术论坛  
 
  北京总部: 4006-505-808
  上 海 部: 021-58358765
  深 圳 部: 0755-83692929
  浙 江 部: 13666673722
  广 州 部: 020-83821091
  重 庆 部: 023-86870422
  福 建 部: 0591-83300680
  哈尔滨部: 13946167430
  其它地区: 4006-505-808

中国联通信息平台-HP-UX数据恢
中国石油管理局-Oracle数据库恢
工商银行山东分行-AIX删除LV数
濮阳市地方税务局-CHKDSK后数据
台湾HD公司-FreeBSD Nas无法启
promise乔鼎硬盘阵列数据恢复成
IBM EXP300 磁盘阵列数据恢复成
NAS 8100无法挂载数据卷

RAID损坏后 对数据的完整备份
LINUX FSCK数据出错灾难应急方
误删除、误格式化数据灾难应急
误GHOST、误一键恢复灾难应急方
磁盘未被格式化,是否格式化数据
raid磁盘阵列OFFLINE后的应急方
硬盘出现异响应急处理
您当前的位置:首页 >> 技术中心 >> 软件数据恢复文栏 >> 正文

The structure of the Reiser file system

Other operating systems might have additional file types. Only regular files and directories have other items associated with the stat item. In all the other cases the stat item makes up the entire file.

The "rdev" field applies to special files that are not regular files (S_IFREG), directories (S_IFDIR), or links (S_IFLNK). In those cases, the field holds the device number (or socket number) belonging to the file. The "generation" field applies to the other cases and denotes the inode generation number for the file/directory/link (see above for superblock inode generation field' description). The "first" field doesn't seem to be used in version 2 anymore.

Example:

The following example shows the stat item denoted by key {2, 14, 0, 0} from the item header example above:

00000000 ff 43 05 00 03 00 00 00 50 00 00 00 00 00 00 00  ÿC......P.......
00000010 00 00 00 00 00 00 00 00 2d 1c 17 3f 34 94 ff 3e  ........-..?4.ÿ>
00000020 34 94 ff 3e 01 00 00 00 00 00 00 00              4.ÿ>........

Example of an stat item version 2

Mode: 0x43ff -- type: directory, sticky bit set, 777 permissions
Reserved: 5
Num. links: 3
Size: 80 bytes
UID: 0
GID: 0
Atime: Thu Jul 17 16:59:09 2003
Mtime: Sun Jun 29 20:36:52 2003
Ctime: Sun Jun 29 20:36:52 2003
Blocks: 1
First: 0

Directory Items
Directory items describe a directory. If there are too many entries in a directory to be contained in one directory item, it will span across several directory items, using the offset value of the key. Directory items are made up of directory headers and file names. Just like leaf nodes, the free space (if there is any) is located in the middle of the item. The structure of a directory item is as follows:

Structure of a directory item

Directory headers contain an offset, the first two parts of the referenced item's key (directory id and object id), the location of the name within the block, and a status field.

Structure of a directory header

Name Size Description
Offset 4 Hash value and generation number
Dir ID 4 object id of the referenced item's parent directory
Object ID 4 object id of the referenced item
Location 2 offset of name within the item
State 2 bit 0 indicates that item contains stat data (not used)
bit 2 whether entry is visible (bit set) or hidden

The file names are simple zero-terminated ASCII strings. File name entries seem to be 8-byte aligned, but the information in the directory headers should be the authorative source for the start of the name (and implicitly the end by looking at the previous header entry). The "offset" field is aptly misnamed as it contains a hash value of the file name. Bits 7 through 30 of the field contains the actual hash value and bits 0 through 6 a generation number in case two file names within a directory hash to the same value. Bit 31 seems to be unused. The hash value is used to actually search for file and directory names in reiserfs, and the directory items are sorted by the offset value. Three different hash functions are possible: keyed tea hash, rupasov hash, and r5 hash. The purpose of the hash function is to create different values for different strings with as little collisions as possible. In the Linux implementation of reiserfs, the r5 hash seems to be the default.

本新闻共13页,当前在第07页  
01  02  03  04  05  06  07  08  09  10  
11  12  13  

上一篇:Solaris硬盘分区结构
下一篇:各类unix和linux管理员密码丢失解决方法
返回首页 | 联系我们 | 关于我们 | 招聘信息 | 友情链接 | 网站地图 | 合作伙伴
版权所有 北京北亚数据恢复中心
24小时免费咨询电话:4006-505-808 或 800-810-5880
中关村部:北京市海淀区中关村大街11号E世界A座832B室
皂君庙部:北京市海淀区学院南路68号吉安大厦C座(汇智楼)528室
京ICP备06061795