gpt4 book ai didi

filesystems - 文件系统 block 大小

转载 作者:行者123 更新时间:2023-12-03 12:50:27 24 4
gpt4 key购买 nike

文件系统块大小的意义是什么?如果我的文件系统块大小设置为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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com