当前位置:网站首页>Ext file system mechanism principle
Ext file system mechanism principle
2022-07-03 11:10:00 【MrPeng1991】
https://blog.csdn.net/li_wen01/article/details/105313344
There are many types of file systems ,ext234,windows On NTFS, The CD-ROM file system iso9660,MAC Hybrid file systems HFS, Network file system NFS,Oracle R & D btrfs, Old fashioned FAT/FAT32 etc. .
1 The components of the file system
block appear
Read and write at the bottom of the hard disk io One sector at a time , If you want to read and write a lot of files , It must be slow in sectors , Consumption performance , So hard drives use a concept called logical blocks . Logical blocks are logical , The disk drive is responsible for maintenance and operation , It is not physically partitioned like a sector , The size of a logical block may contain one or more sectors , Each logical block has a unique address , be called LBA Logic Block Address. With logical blocks , The disk controller operates on data in logical blocks , Read and write one logic block at a time , The disk controller knows how to translate logical blocks into corresponding sectors and read and write data .
here we are Linux Operating system hierarchy , A read / write unit, also known as a block, is provided through the file system , The size of the file system data block is generally 1024bytes,1k,2048bytes 2k, or 4096bytes 4k, File system data block is also a logical concept , File system level maintenance , The logical data block of the disk is maintained by the disk controller , File system io The manager knows how to translate its data block into the address of the data block maintained by the disk LBA. For those who use the file system io In terms of operation , For example, reading and writing documents , these io The basic unit of is the data block on the file system , Read and write one file system block at a time . For example, when you need to read one or more blocks , File system io The manager first calculates which disk data blocks these file system blocks correspond to , That is to calculate LBA, Then tell the disk controller which blocks to read , The disk controller translates these blocks into sector addresses , Then read the data from the sector , Then, these sector data are reorganized and written into memory through the hard disk controller .
This article is about file system , Naturally, the focus is on the file system rather than the disk , So what will happen later block Both mean to add the data block of your system , instead of , Logical blocks maintained by disk .
file system block The appearance of makes the reading and writing performance on the file system level greatly improved , And a lot less debris . But its side effect is that it can waste space . Because the file system uses block It's a read-write unit , Even if only 1k size , Will also occupy one block, The rest of the space is completely wasted . Under some business requirements, a large number of small files may be stored , This time a lot of space is wasted .
Despite its shortcomings , But the advantages are obvious enough , Nowadays, hard drives are cheap and performance oriented , Use block It must be .
bmap
边栏推荐
- ByteDance layoffs, test engineers were almost destroyed: how terrible is the routine behind the recruitment of large factories?
- POI excel 单元格换行
- Qt:qss custom qstatusbar instance
- My understanding of testing (summarized by senior testers)
- Que se passe - t - il ensuite pour ceux qui se sont concentrés sur les tests automatisés?
- What are the strengths of "testers"?
- 文件上传下载测试点
- File upload and download test point
- Tencent micro app to get wechat user information
- Qt:qss custom qpprogressbar instance
猜你喜欢
. Net core - a queuing system for wechat official account
12. Nacos server service registration of source code analysis of Nacos service registration
Comment réaliser des tests automatisés pour les tests logiciels embarqués?
Some abilities can't be learned from work. Look at this article, more than 90% of peers
2021 reading summary (continuously updating)
Game test related tests a hero's skills (spring moves are asked more questions)
What is the salary level of 17k? Let's take a look at the whole interview process of post-95 Test Engineers
Do you really need automated testing?
Redis notes 01: Introduction
EPS电动转向系统分析
随机推荐
EPS电动转向系统分析
BI技巧丨权限轴
Latest sales volume of pinduoduo
公司里只有一个测试是什么体验?听听他们怎么说吧
Software testing (test case) writing: vulgar, native and skillful
月薪过万的测试员,是一种什么样的生活状态?
15 software testing Trends Worthy of attention
17K薪资要什么水平?来看看95后测试工程师的面试全过程…
【蓝桥杯选拔赛真题44】Scratch消灭骷髅军团 少儿编程scratch蓝桥杯选拔赛真题讲解
How did I grow up in the past eight years as a test engineer of meituan? I hope technicians can gain something after reading it
测试理论概述
软件测试必学基本理论知识——APP测试
one hot 独热码
"Core values of testing" and "super complete learning guide for 0 basic software testing" summarized by test engineers for 8 years
I, a tester from a large factory, went to a state-owned enterprise with a 50% pay cut. I regret it
Basic theoretical knowledge of software testing -- app testing
11. Provider service registration of Nacos service registration source code analysis
数据库增量备份 - DB INCR DB FULL
文件上传下载测试点
redis那些事儿