当前位置:网站首页>ext4文件系统打开了DIR_NLINK特性后,link_count超过65000的后使用link_count=1来表示数量不可知
ext4文件系统打开了DIR_NLINK特性后,link_count超过65000的后使用link_count=1来表示数量不可知
2022-07-26 08:55:00 【王万林 Ben】
如下图所示,创建一个tempdir文件夹,然后批量创建子文件夹:
先创建64998个子文件夹,可以看到link_count从2增加到65000个,符合预期;
再创建1个文件夹,查看link_count竟然变成了1;并且将子文件夹数量删掉一些,保持在64998个以内,link_count也没恢复至正确的数值。

查看文件系统类型,是ext4

原理
| 0x1A | __le16 | i_links_count | Hard link count. Normally, ext4 does not permit an inode to have more than 65,000 hard links. This applies to files as well as directories, which means that there cannot be more than 64,998 subdirectories in a directory (each subdirectory's '..' entry counts as a hard link, as does the '.' entry in the directory itself). With the DIR_NLINK feature enabled, ext4 supports more than 64,998 subdirectories by setting this field to 1 to indicate that the number of hard links is not known. |
参考资料
196405 – mkdir mishandles st_nlink in ext4 directory with 64997 subdirectories
边栏推荐
- 【无标题】
- Node-v download and application, ES6 module import and export
- Recurrence of SQL injection vulnerability in the foreground of a 60 terminal security management system
- PAT 甲级 A1076 Forwards on Weibo
- Study notes of automatic control principle --- stability analysis of control system
- 合工大苍穹战队视觉组培训Day5——机器学习,图像识别项目
- [recommended collection] MySQL 30000 word essence summary - query and transaction (III)
- TypeScript版加密工具PasswordEncoder
- Center an element horizontally and vertically
- Dynamic SQL and exceptions of pl/sql
猜你喜欢
![[untitled]](/img/89/c3ab79eb325f0136114a568745924b.png)
[untitled]

Learning notes of automatic control principle - Performance Analysis of continuous time system

Numpy Foundation

优秀的 Verilog/FPGA开源项目介绍(三十零)- 暴力破解MD5

Day06 operation -- addition, deletion, modification and query

对标注文件夹进行清洗

《Datawhale熊猫书》出版了!

NFT与数字藏品到底有何区别?

pl/sql之动态sql与异常

Pop up window in Win 11 opens with a new tab ---firefox
随机推荐
TCP solves the problem of short write
Learning notes of automatic control principle - Performance Analysis of continuous time system
NPM add source and switch source
Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output
03异常处理,状态保持,请求钩子---04大型项目结构与蓝图
Okaleido上线聚变Mining模式,OKA通证当下产出的唯一方式
Database operation topic 1
day06 作业--增删改查
Store a group of positive and negative numbers respectively, and count the number of 0 -- assembly language implementation
Ansible important components (playbook)
合工大苍穹战队视觉组培训Day5——机器学习,图像识别项目
【final关键字的使用】
Day06 homework - skill question 6
Kotlin属性与字段
C # use npoi to operate Excel
Implementation of Prometheus web authentication and alarm
General file upload vulnerability getshell of a digital campus system (penetration test -0day)
Espressif 玩转 编译环境
The effective condition of MySQL joint index and the invalid condition of index
正则表达式:判断是否符合USD格式