reference:  http://e2fsprogs.sourceforge.net/ext2intro.html

reference: http://www.nongnu.org/ext2-doc/index.html

reference: http://www.science.unitn.it/~fiorella/guidelinux/tlk/

Each file is represented by a structure, called an inode. Each inode contains the description of the file: file type, access rights, owners, timestamps, size, pointers to data blocks. The addresses of data blocks allocated to a file are stored in its inode. When a user requests an I/O operation on the file, the kernel code converts the current offset to a block number, uses this number as an index in the block addresses table and reads or writes the physical block.

Directories:

Directories are implemented as a special type of files. Actually, a directory is a file containing a list of entries. Each entry contains an inode number and a file name. When a process uses a pathname, the kernel code searchs in the directories to find the corresponding inode number. After the name has been converted to an inode number, the inode is loaded into memory and is used by subsequent requests.

what happend when a extern stroage was mounted:

When a filesystem is to be mounted, the appropriate mount function is called. This function is responsible for reading the superblock from the disk, initializing its internal variables, and returning a mounted filesystem descriptor to the VFS. After the filesystem is mounted, the VFS functions can use this descriptor to access the physical filesystem routines.

A mounted filesystem descriptor contains several kinds of data: informations that are common to every filesystem types, pointers to functions provided by the physical filesystem kernel code, and private data maintained by the physical filesystem code. The function pointers contained in the filesystem descriptors allow the VFS to access the filesystem internal routines.

Two other types of descriptors are used by the VFS: an inode descriptor and an open file descriptor. Each descriptor contains informations related to files in use and a set of operations provided by the physical filesystem code. While the inode descriptor contains pointers to functions that can be used to act on any file (e.g. createunlink), the file descriptors contains pointer to functions which can only act on open files (e.g. readwrite).

Note:  When such a file is deleted, random data is written in the disk blocks previously allocated to the file. This prevents malicious people from gaining access to the previous content of the file by using a disk editor.

root@IoTP:~# dumpe2fs /dev/mmcblk1p2
dumpe2fs 1.42.13 (17-May-2015)
Filesystem volume name: rootfs
Last mounted on: /
Filesystem UUID: 69277f59-15ba-4705-95eb-b6200ad095dc
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Filesystem flags: unsigned_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 236176
Block count: 944384
Reserved block count: 47219
Free blocks: 753105
Free inodes: 204057
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 230
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8144
Inode blocks per group: 509
Filesystem created: Wed Jan 16 05:11:41 2019
Last mount time: Wed Jan 16 06:05:42 2019
Last write time: Wed Jan 16 06:05:42 2019
Mount count: 6
Maximum mount count: -1
Last checked: Wed Jan 16 05:11:41 2019
Check interval: 0 (<none>)
Lifetime writes: 666 MB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
First orphan inode: 173330
Default directory hash: half_md4
Directory Hash Seed: 32104d28-8e90-4157-9c6a-3a5950fc100a
Journal backup: inode blocks
Journal features: journal_incompat_revoke
Journal size: 64M
Journal length: 16384
Journal sequence: 0x000000a8
Journal start: 9

Group 0: (Blocks 0-32767)
Primary superblock at 0, Group descriptors at 1-1
Reserved GDT blocks at 2-231
Block bitmap at 232 (+232), Inode bitmap at 233 (+233)
Inode table at 234-742 (+234)
8123 free blocks, 8134 free inodes, 1 directories
Free blocks: 752-783, 792-815, 824-847, 856-879, 887-911, 943-975, 1024-1039, 1044-1055, 1057-1073, 1216-1231, 1281-1311, 1327-1359, 1369-1391, 1440-1455, 1497-1503, 1521-1551, 1570-1615, 1618-1647, 1696-1711, 1736-1759, 1780-1807, 1856-1871, 1886-1887, 1898-1935, 1954-1999, 2030-2063, 2094-2127, 2135-2159, 2194-2223, 2228-2255, 2259-2287, 2336-2351, 2356-2367, 2388-2415, 2427-2447, 2484-2511, 2516-2543, 2592-2607, 2725-2751, 2766-2799, 2831-2863, 2870-2895, 2900-2927, 2970-2991, 3022-3055, 3104-3119, 3181-3199, 3214-3247, 3252-3277, 3296-3311, 3328-3347, 3387-3391, 3417-3439, 3455-3514, 3536-3599, 3626-3663, 3712-3791, 3840-3903, 3968-3983, 4124-4223, 4326-4528, 4608-4623, 4813-4847, 5088-5103, 5105-5167, 5200-5215, 5760-5775, 5887, 5910-5935, 5952-5967, 5969-5999, 6291-6303, 6335, 6366-6383, 6385-6418, 6675-6703, 6720-6735, 6757-6799, 6836-6863, 6900-6927, 6962-6991, 7040-7055, 7100-7103, 7136-7151, 7731-7762, 7791-7823, 7872-7887, 7916-7935, 7966-7983, 7988-8015, 8020-8047, 8062-8079, 8159-8175, 8839-8863, 8894-8911, 8933-8964, 9029-9071, 9141-9151, 9183-9199, 9215-9231, 9278-9295, 9344-9359, 9401-9407, 9440-9455, 9536-9551, 9622-9631, 9664-9679, 9744-9759, 9780-9807, 9856-9871, 9936-9951, 9970-9999, 10043-10063, 10098-10127, 10171-10191, 10235-10255, 10296-10319, 10363-10383, 10427-10447, 10496-10511, 10632-10663, 10690-10735, 10784-10799, 10885-10911, 10944-10959, 11002-11007, 11040-11055, 11146-11167, 11200-11215, 11315-11327, 11352-11375, 11404-11439, 11488-11503, 11574-11583, 11616-11631, 11739-11759, 11784-11807, 11840-11855, 12000-12015, 12049-12080, 12145-12159, 12177-12207, 12282-12313, 12368-12399, 12436-12463, 12512-12527, 12603-12623, 12672-12687, 12738-12767, 12800-12815, 12866-12895, 12920-12943, 12978-13007, 13046-13071, 13106-13135, 13179-13199, 13236-13263, 13305-13327, 13376-13391, 13445-13471, 13504-13519, 13647-13679, 13713-13744, 13809-13823, 13829-13871, 13920-13935, 14040-14063, 14088-14111, 14144-14159, 14304-14319, 14341-14372, 14405-14447, 14491-14495, 14528-14543, 14590-14607, 14656-14671, 14726-14751, 14775-14799, 14848-14863, 14900-14911, 14934-14959, 15008-15023, 15123-15135, 15168-15183, 15192-15199, 15235-15279, 15328-15343, 15403-15423, 15442-15471, 15520-15535, 15629-15647, 15672-15695, 15697-15727, 15758-15791, 15822-15855, 15899-15919, 15959-15983, 15993-16015, 16045-16079, 16128-16143, 16170-16191, 16224-16239, 16243-16255, 16320-16335, 16375-16383, 16507-16527, 16534-16559, 16561-16591, 16632-16655, 16660-16687, 16736-16767, 16817-17051, 17132-17151, 17163-17407, 25600-26623, 27329-28671
Free inodes: 11-8144

learning ext2 filesystem notes的更多相关文章

  1. Machine Learning Algorithms Study Notes(3)--Learning Theory

    Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 本系列文章是Andrew Ng 在斯坦福的机器学习课程 CS 22 ...

  2. Machine Learning Algorithms Study Notes(2)--Supervised Learning

    Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 本系列文章是Andrew Ng 在斯坦福的机器学习课程 CS 22 ...

  3. Machine Learning Algorithms Study Notes(1)--Introduction

    Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 目 录 1    Introduction    1 1.1    ...

  4. Machine Learning Algorithms Study Notes(6)—遗忘的数学知识

    机器学习中遗忘的数学知识 最大似然估计( Maximum likelihood ) 最大似然估计,也称为最大概似估计,是一种统计方法,它用来求一个样本集的相关概率密度函数的参数.这个方法最早是遗传学家 ...

  5. Machine Learning Algorithms Study Notes(5)—Reinforcement Learning

    Reinforcement Learning 对于控制决策问题的解决思路:设计一个回报函数(reward function),如果learning agent(如上面的四足机器人.象棋AI程序)在决定 ...

  6. Machine Learning Algorithms Study Notes(4)—无监督学习(unsupervised learning)

    1    Unsupervised Learning 1.1    k-means clustering algorithm 1.1.1    算法思想 1.1.2    k-means的不足之处 1 ...

  7. Deep Learning Workbench Installation Notes

    1. ROS Indigo (30 min) Just flow ROSWiki: http://wiki.ros.org/indigo/Installation/Ubuntu NOW simply ...

  8. lua: Learning Official Doc notes

    dynamically typed vars: basic types: nil, boolean, number, string, function, userdata, thread & ...

  9. Ext FileSystem Family、Ext2、Ext3

    catalog . 简介 . Ext2文件系统 . Ext3文件系统 . 小结 1. 简介 VFS虚拟文件系统接口和数据结构构成了一个框架,各个文件系统的实现都必须在框架内运转,但这并不要求每个文件系 ...

随机推荐

  1. shell下如何删除文件的某一列

    答:cat file | awk '{$1=null;print $0}' (删除第一列)

  2. BZOJ4401: 块的计数 思维题

    Description 小Y最近从同学那里听说了一个十分牛B的高级数据结构——块状树.听说这种数据结构能在sqrt(N)的时间内维护树上的各种信息,十分的高效.当然,无聊的小Y对这种事情毫无兴趣,只是 ...

  3. Sql Server 创建表添加说明

    http://bbs.csdn.net/topics/340184487 在此感谢 提供参考 CREATE TABLE ToPayFee (    Id INT IDENTITY(1,1) PRIMA ...

  4. 解决 Github:failed to add file / to index 问题

    参考: Github:failed to add file / to index 解决 Github:failed to add file / to index 问题 在通过Github for Ma ...

  5. Spring 事物机制总结

    Spring两种事物处理机制,一是声明式事务,二是编程式事务 声明式事物 1)Spring的声明式事务管理在底层是建立在AOP的基础之上的.其本质是对方法前后进行拦截,然后在目标方法开始之前创建或者加 ...

  6. MongoDB(课时5 数据查询)

    3.4.2 数据查询 对于数据的查询操作核心语法: db.集合名称.find({查询条件}, {设置显示的字段}) 范例:没查询条件 db.info.find() 范例:有查询条件,查询出url为&q ...

  7. Qt5_程序发布

    ZC: deploy ==> 部署 1.文件夹platforms 该文件夹 来自 Qt安装目录:F:\ZC_software_installDir\Qt5.3.2_vs2010\5.3\msvc ...

  8. Qt5_自定义处理Windows消息函数

    ZC:(1).“#include <QAbstractNativeEventFilter>”,(2).貌似 返回True(意思是 处理过了) 返回False(意思是还需要继续处理) 1.参 ...

  9. Xcode集成POD教程

    http://www.cocoachina.com/ios/20150410/11526.html COCOAPODS的网站上有很多非常好用的资源,这里来说一下如何把POD集成到我们的Xcode项目中 ...

  10. MySQL函数GROUP_CONCAT() 实现多条数据合并

    group_concat()会计算哪些行属于同一组,将属于同一组的列显示出来,group by指定的列进行分组. 例如: -- 根据物流订单id查询所有物流订单,车源订单,车辆信息(多条数据合并为一条 ...