Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mistranslation - Chapter 40 File System Implementation #14

Open
lanranranM opened this issue Sep 4, 2023 · 0 comments
Open

Mistranslation - Chapter 40 File System Implementation #14

lanranranM opened this issue Sep 4, 2023 · 0 comments

Comments

@lanranranM
Copy link

Hi, I think there is a misunderstanding in 40.6 写入磁盘.
每次写入文件在逻辑上会 导致 5 个 I/O:一个读取数据位图(然后更新以标记新分配的块被使用),一个写入位图(将 它的新状态存入磁盘),再是两次读取,然后写入 inode(用新块的位置更新),最后一次写 入真正的数据块本身。

The original text here is "Thus, each write to a file logically generates five I/Os: one to read the data bitmap (which is then updated to mark the newly-allocated block as used), one to write the bitmap (to reflect its new state to disk), two more to read and then write the inode (which is updated with the new block’s location), and finally one to write the actual block itself."

I believe the correct translation should be "另外两次访问,读取和写入inode". The "two more" here means one read and one write rather than two reads plus one write as there are 5 I/Os per write as mentioned before. The last paragraph also confirms that "each allocating write costs 5 I/Os: a pair to read and update the inode, another pair to read and update the data bitmap, and then finally the write of the data itself."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant