FAT 文件系统中的碎片不会导致 space 浪费吗?

Doesn't fragmentation in FAT file system lead to space wastage?

fragmentation 文章的维基百科指出:

In many cases, fragmentation leads to storage space being "wasted", and in that case the term also refers to the wasted space itself. For other systems (e.g. the FAT file system) the space used to store given data (e.g. files) is the same regardless of the degree of fragmentation (from none to extreme).

这是否意味着 FAT 文件系统不会浪费存储 space?如果是,怎么会这样?

我所知道的大多数 "non-traditional Unix" 和 FAT 文件系统都使用分配位图来识别磁盘上的空闲 space 和某种形式的文件扩展描述符。文件的每个连续区域都需要一个单独的描述符。如果一个文件是整个连续的,它只需要一个范围描述符。

在 FAT 中,文件分配 table 执行位图和描述符合二为一的功能。它不是指示分配的位数组,而是一个包含值(大小取决于 FAT 变体)的数组,指示相应磁盘簇的使用情况(例如,文件的下一个簇、坏磁盘簇)。

在 FAT 中,文件使用的每个簇始终有一个 n 位条目。这就是无论文件大小如何,文件开销都相同的原因。

在位图系统中,开销量可能比 FAT 少。

Does that mean no storage space is wasted in case of FAT file system? If so, how is to so?

这取决于你的观点。可以说,FAT 总是浪费 space。

我认为您会发现 FAT 易于实现,但往往性能相对较差。