没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
The Second Extended File System
Internal Layout
Dave Poirier
instinc@gmail.com
The Second Extended File SystemInternal Layout
by Dave Poirier
Copyright © 2001-2011 Dave Poirier
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license can be acquired electronically from http://www.fsf.org/licenses/fdl.html or by writing to 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
Table of Contents
About this book ....................................................................................................................................... vii
1. Historical Background ..........................................................................................................................1
2. Definitions...............................................................................................................................................2
2.1. Blocks..........................................................................................................................................2
2.2. Block Groups ..............................................................................................................................3
2.3. Directories...................................................................................................................................3
2.4. Inodes ..........................................................................................................................................4
2.5. Superblocks.................................................................................................................................4
2.6. Symbolic Links ...........................................................................................................................5
3. Disk Organization..................................................................................................................................7
3.1. Superblock ..................................................................................................................................8
3.1.1. s_inodes_count .............................................................................................................10
3.1.2. s_blocks_count .............................................................................................................10
3.1.3. s_r_blocks_count..........................................................................................................10
3.1.4. s_free_blocks_count .....................................................................................................11
3.1.5. s_free_inodes_count .....................................................................................................11
3.1.6. s_first_data_block.........................................................................................................11
3.1.7. s_log_block_size ..........................................................................................................11
3.1.8. s_log_frag_size.............................................................................................................11
3.1.9. s_blocks_per_group......................................................................................................12
3.1.10. s_frags_per_group ......................................................................................................12
3.1.11. s_inodes_per_group....................................................................................................12
3.1.12. s_mtime ......................................................................................................................12
3.1.13. s_wtime.......................................................................................................................12
3.1.14. s_mnt_count ...............................................................................................................13
3.1.15. s_max_mnt_count.......................................................................................................13
3.1.16. s_magic.......................................................................................................................13
3.1.17. s_state .........................................................................................................................13
3.1.18. s_errors .......................................................................................................................13
3.1.19. s_minor_rev_level ......................................................................................................14
3.1.20. s_lastcheck..................................................................................................................14
3.1.21. s_checkinterval ...........................................................................................................14
3.1.22. s_creator_os................................................................................................................14
3.1.23. s_rev_level..................................................................................................................14
3.1.24. s_def_resuid................................................................................................................15
3.1.25. s_def_resgid................................................................................................................15
3.1.26. s_first_ino ...................................................................................................................15
3.1.27. s_inode_size ...............................................................................................................15
3.1.28. s_block_group_nr .......................................................................................................15
3.1.29. s_feature_compat........................................................................................................16
3.1.30. s_feature_incompat.....................................................................................................16
3.1.31. s_feature_ro_compat ..................................................................................................17
3.1.32. s_uuid .........................................................................................................................17
3.1.33. s_volume_name..........................................................................................................17
3.1.34. s_last_mounted ...........................................................................................................17
iii
3.1.35. s_algo_bitmap.............................................................................................................18
3.1.36. s_prealloc_blocks .......................................................................................................18
3.1.37. s_prealloc_dir_blocks.................................................................................................18
3.1.38. s_journal_uuid ............................................................................................................18
3.1.39. s_journal_inum ...........................................................................................................19
3.1.40. s_journal_dev..............................................................................................................19
3.1.41. s_last_orphan..............................................................................................................19
3.1.42. s_hash_seed ................................................................................................................19
3.1.43. s_def_hash_version ....................................................................................................19
3.1.44. s_default_mount_options ...........................................................................................19
3.1.45. s_first_meta_bg...........................................................................................................19
3.2. Block Group Descriptor Table ..................................................................................................19
3.2.1. bg_block_bitmap ..........................................................................................................20
3.2.2. bg_inode_bitmap ..........................................................................................................20
3.2.3. bg_inode_table .............................................................................................................21
3.2.4. bg_free_blocks_count...................................................................................................21
3.2.5. bg_free_inodes_count...................................................................................................21
3.2.6. bg_used_dirs_count......................................................................................................21
3.2.7. bg_pad ..........................................................................................................................21
3.2.8. bg_reserved...................................................................................................................21
3.3. Block Bitmap ............................................................................................................................21
3.4. Inode Bitmap.............................................................................................................................22
3.5. Inode Table................................................................................................................................22
3.5.1. i_mode ..........................................................................................................................23
3.5.2. i_uid..............................................................................................................................24
3.5.3. i_size.............................................................................................................................24
3.5.4. i_atime ..........................................................................................................................24
3.5.5. i_ctime ..........................................................................................................................24
3.5.6. i_mtime.........................................................................................................................24
3.5.7. i_dtime..........................................................................................................................25
3.5.8. i_gid..............................................................................................................................25
3.5.9. i_links_count ................................................................................................................25
3.5.10. i_blocks.......................................................................................................................25
3.5.11. i_flags .........................................................................................................................25
3.5.12. i_osd1 .........................................................................................................................26
3.5.13. i_block ........................................................................................................................26
3.5.14. i_generation ................................................................................................................27
3.5.15. i_file_acl .....................................................................................................................27
3.5.16. i_dir_acl......................................................................................................................27
3.5.17. i_faddr.........................................................................................................................28
3.5.18. Inode i_osd2 Structure................................................................................................28
3.6. Locating an Inode......................................................................................................................30
4. Directory Structure..............................................................................................................................32
4.1. Linked List Directory................................................................................................................32
4.1.1. inode .............................................................................................................................32
4.1.2. rec_len ..........................................................................................................................32
4.1.3. name_len.......................................................................................................................33
iv
4.1.4. file_type ........................................................................................................................33
4.1.5. name .............................................................................................................................34
4.1.6. Sample Directory..........................................................................................................34
4.2. Indexed Directory Format .........................................................................................................36
4.2.1. Indexed Directory Root ................................................................................................36
4.2.2. Indexed Directory Entry ...............................................................................................37
4.2.3. Lookup Algorithm ........................................................................................................39
4.2.4. Insert Algorithm ...........................................................................................................39
4.2.5. Splitting ........................................................................................................................39
4.2.6. Key Collisions ..............................................................................................................40
4.2.7. Hash Function...............................................................................................................40
4.2.8. Performance..................................................................................................................41
5. File Attributes ......................................................................................................................................43
5.1. Standard Attributes....................................................................................................................43
5.1.1. SUID, SGID and -rwxrwxrwx......................................................................................43
5.1.2. File Size ........................................................................................................................43
5.1.3. Owner and Group .........................................................................................................43
5.2. Extended Attributes...................................................................................................................43
5.2.1. Extended Attribute Block Layout.................................................................................44
5.2.2. Extended Attribute Block Header.................................................................................44
5.2.3. Attribute Entry Header .................................................................................................46
5.3. Behaviour Control Flags ...........................................................................................................47
5.3.1. EXT2_SECRM_FL - Secure Deletion .........................................................................47
5.3.2. EXT2_UNRM_FL - Record for Undelete....................................................................48
5.3.3. EXT2_COMPR_FL - Compressed File .......................................................................48
5.3.4. EXT2_SYNC_FL - Synchronous Updates...................................................................48
5.3.5. EXT2_IMMUTABLE_FL - Immutable File................................................................48
5.3.6. EXT2_APPEND_FL - Append Only ...........................................................................48
5.3.7. EXT2_NODUMP_FL - Do No Dump/Delete..............................................................48
5.3.8. EXT2_NOATIME_FL - Do Not Update .i_atime........................................................48
5.3.9. EXT2_DIRTY_FL - Dirty ............................................................................................49
5.3.10. EXT2_COMPRBLK_FL - Compressed Blocks ........................................................49
5.3.11. EXT2_NOCOMPR_FL - Access Raw Compressed Data..........................................49
5.3.12. EXT2_ECOMPR_FL - Compression Error ...............................................................49
5.3.13. EXT2_BTREE_FL - B-Tree Format Directory..........................................................49
5.3.14. EXT2_INDEX_FL - Hash Indexed Directory............................................................49
5.3.15. EXT2_IMAGIC_FL -.................................................................................................49
5.3.16. EXT2_JOURNAL_DATA_FL - Journal File Data.....................................................49
5.3.17. EXT2_RESERVED_FL - Reserved ...........................................................................50
A. Credits..................................................................................................................................................51
v
剩余57页未读,继续阅读
资源评论
SinceY2015
- 粉丝: 5
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- SSCMS登录模块需要的JS文件
- JSP网络购物中心毕业设计(源代码+论文).rar
- 白盒测试报告.docx
- 基于LM5117芯片评估开发板硬件参考设计(原理图+PCB)+中英文数据手册资料.zip
- 照片批量重命名软件(文件批量修改图片文件名)
- app.apk
- 人工智能(AI)是计算机科学的一个分支,旨在开发和应用能够模拟、延伸和扩展人类智能的理论、方法和技术,包括机器人、语言识别、图像
- 嵌入式与物联网开发是当今信息技术领域的两大重要分支,它们相互交织,共同推动着智能化时代的进步 嵌入式开发主要关注在嵌入式操作
- 网络安全,这一看似高深莫测的领域,实则与我们每个人的生活息息相关
- 毕业设计基于深度学习的视觉问答系统源码+文档说明+答辩PPT.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功