开发者

When writing to a file, does all the pages in memory map to contiguous disk blocks in the Disk?

开发者_如何转开发

I am interested in knowing how the Filesystem actually writes the files to disk? Does it write it in all contiguous blocks and store the starting block# and device# in the file as metadata? If they are not stored as contiguous blocks (which I think is the case) then how does it determine the disk blocks so that the read times are optimized?


That's entirely filesystem dependent, there is no general answer.

Here's a good presentation: ext3 on-disk layout for the EXT3 filesystem. Others might do it similarly, or completely differently. Have a look at The structure of the Reiser file system for the reiserfs 3.6 layout.

For a rather different approach, look at XFS on-disk specification.

The ext2 disk organization could probably be described as a "classic" way of doing things that could be found in other filesystems (including its successors).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜