filesystems - 文件系统 block 大小

标签 filesystems size block significance

文件系统块大小的意义是什么?如果我的文件系统块大小设置为8K,是否意味着所有读/写I / O都将以8K大小发生?因此,如果我的应用程序想读取偏移量4097处的16个字节,那么将从偏移量4096开始的4K块将被读取?

在这种情况下,写工作如何?假设我要写64个字节。

最佳答案

你是对的。块大小是文件系统的工作单位。每次读取和写入均以块大小的整数倍完成。

块大小也是文件在磁盘上可以拥有的最小大小。如果块大小为16字节,则文件大小为16字节的文件将占据磁盘上的整个块。

"Practical file system design"指出:

Block: The smallest unit writable by a disk or file system. Everything a file system does is composed of operations done on blocks. A file system block is always the same size as or larger (in integer multiples) than the disk block size.

关于filesystems - 文件系统 block 大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8537579/

相关文章:

java - 在 Windows 上规范化路径时,Java 是否需要支持 ERROR_NO_MORE_FILES?

linux - Hadoop HDFS : DateNode directory on system partition?

c++ - 在 C++ 程序上调整宽度

c++ - 编辑并继续使用 C++?最好使用 Code::Blocks?

perl - 用于 Perl 单元测试的模拟文件系统

linux - git 没有在 `.git` 文件夹中的新目录上保留 setgid 位?

html - 当鼠标悬停效果发生在图像上时,段落向上移动

C++ 使用 Const int 定义数组

html - Drupal View Ticker 模块 CSS

java - 通过字节 block 比较两个文件java