📄 00000033.htm
字号:
<HTML><HEAD> <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>发信人: yuhj (勇 梦回唐朝), 信区: Linux <BR>标 题: Re: 急问,怎么支持large-file(>2G) <BR>发信站: BBS 水木清华站 (Wed Jan 26 18:09:51 2000) <BR> <BR>最近在kerneltraffic上看到的讨论,我的印象是ext2fs修改为64bit <BR>指针困难不大,但是off_t修改为64bit有很大困难,好像还根POSIX <BR>的定义不严谨有关。具体的细节没有留心,只是个印象, I could <BR>be wrong. <BR> <BR>嗯,下面是原文的讨论: <BR>><I> - why is there a 2G limit? </I><BR> <BR>This should go into some FAQ/HOWTO ... <BR>The limit comes from this line in <linux/ext2_fs.h> <BR>__u32 i_size; /* Size in bytes */ <BR> <BR> <BR>><I> - can the 2G limit be _safely_ increased (to, say, about 5G)? </I><BR>><I> - if so, what changes are needed in the ext2 code to do it? </I><BR> <BR> <BR>You cannot safely change this to __u64, as you'll break the lay-out of <BR>struct ext2_inode, then. About the best proposal I've seen is the one <BR>of Albert Cahalan. You can use another 16 of the reserved bits to go <BR>to an 48 bit inode size. You'd have to make sure you don't use <BR>anything that's used by another system already. <BR> <BR> <BR>I don't recall the details. One possibility is to recycle the fields <BR>for the currently unimplemented fragmentation support, which would <BR>give you enough free bits. Apart from this, it seems the Hurd already <BR>occupies everything else. <BR> <BR> <BR>In order to do this safely, you would have to mark the filesystem <BR>with one of the incompatible flags (s_feature_incompat), and then <BR>support the other size bits all over the place. <BR> <BR> <BR>Good luck, <BR>Martin <BR> <BR> <BR> <BR> <BR>【 在 kxn (烤小牛~信号没糊系统糊了!) 的大作中提到: 】 <BR>∶<I> linux 好像是 ext2fs 的限制吧, 如果 > 2G 有人说会 crash 掉 </I><BR>∶<I> lseek 用的是 off_t , 还是留了一手的, </I><BR> <BR> <BR>-- <BR> <BR> 聚散无常, <BR> 得失随缘。 <BR> <BR> <BR> <BR>※ 修改:·yuhj 於 Jan 26 18:18:00 修改本文·[FROM: 202.204.7.235] <BR>※ 来源:·BBS 水木清华站 smth.org·[FROM: 202.204.7.235] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -