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. cron表达式增加一段时间变为新的表达式

    cron表达式是使用任务调度经常使用的表达式了.对于通常的简单任务,我们只需要一条cron表达式就能满足.但是有的时候任务也可以很复杂. 最近我遇到了一个问题,一条任务在开始的时候要触发A方法,在结束 ...

  2. Python3基础 A类作为B类的实例变量

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  3. 【第三十一章】 elk(2)- 第二种架构(最常用架构)

    参考:http://linuxg.blog.51cto.com/4410110/1761757 最常用架构: 一.安装redis 1.下载:http://redis.io/download 2.解压后 ...

  4. [bzoj1571][Usaco2009 Open]滑雪课Ski

    题目描述 Farmer John 想要带着 Bessie 一起在科罗拉多州一起滑雪.很不幸,Bessie滑雪技术并不精湛. Bessie了解到,在滑雪场里,每天会提供S(0<=S<=100 ...

  5. each遍历小结

    JQ中的遍历函数 (逐个加工函数) 格式: $(‘.box p’).each(function(index,element){ })也可以写成 $.each(‘.box p’,function(ind ...

  6. Unity3D学习笔记(二十五):文件操作

    文件是什么? 存储在硬盘上的最后的节点. 文件夹是什么? 文件的上级单位称为文件夹. 文件夹的基本结构? 文件夹是层级化结构的,对于同级的文件夹不可以重名,父文件夹和子文件夹可以同名> IO:I ...

  7. Unity3D学习笔记(二十一):InputFiled、Dropdown、Scroll Rect、Mask

    InputFiled组件(输入框) Text Component(显示内容):显示输入内容的Text的组件 Text(输入内容):输入的文本内容 Character Limit:字符数量限值,0是无限 ...

  8. input标签type=button时,如何禁用和开启按钮

    本文为博主原创,未经允许不得转载: <input id="exportCameraButton" type="button" class="bt ...

  9. mybatis 问题

    applicationContext.xml报错https://bbs.csdn.net/topics/392184546MyBatis SqlSessionFactory的几种常见创建方式https ...

  10. Python写ROS 订阅与发布程序

    1. 编写talker代码 vim ..../src/talker.py #!/usr/bin/env python # license removed for brevity import rosp ...