给定特定inode结构的最大文件大小? [英] Maximum file size given a particular inode structure?

查看:200
本文介绍了给定特定inode结构的最大文件大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设UNIX文件系统有一些限制,例如2 KB块和8B磁盘地址.如果inode包含13个直接条目,并且每个都包含一个单,双和三间接条目,那么最大文件大小是多少?

解决方案

这为您解释了此问题:

http://www.cis.temple.edu/~ ingargio/cis307/readings/stable.html

"The maximum size of a file will be 8KB*(10 + 2**10 + 2**20 + 2**30), that is more than 8TB."

将8KB交换为2KB,然后将条目调整为较小的块大小.

2KB*(10 + 2**8 + 2**16 + 2**24)

对于您的问题,我还是不清楚,这13个条目是否包含单打,双打和三重,或者它们是分开的,但这应该很容易调整-只需将表达式中的10更改为13. /p>

我认为我已经正确调整了所有数学公式...仔细检查==希望这不是我为您做的功课;)

Suppose a UNIX file system has some constraints--say, 2 KB blocks and 8B disk addresses. What is the maximum file size if inodes contain 13 direct entries, and one single, double, and triple indirect entry each?

解决方案

This explains it for you:

http://www.cis.temple.edu/~ingargio/cis307/readings/stable.html

"The maximum size of a file will be 8KB*(10 + 2**10 + 2**20 + 2**30), that is more than 8TB."

Swap 8KB for your 2KB, and adjust the entries for the smaller block size.

2KB*(10 + 2**8 + 2**16 + 2**24)

It's not clear to me from your question if the 13 entries include the singles, doubles and triples, or if they are separate, but that should be easy to adjust -- just change the 10 in the expression to a 13.

I think I've adjusted all the math correctly... double check it =| Hope this isn't homework I did for you ;)

这篇关于给定特定inode结构的最大文件大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆