ramfs lfs limit
Hi Andrew,
this fixes the 2G limit on ramfs
fs/ramfs/inode.c renamed from fs/ramfs/inode.c.~1~ +1 -0
@@ -181,6 +181,7 @@ static int ramfs_fill_super(struct superstruct inode * inode;struct dentry * root; + sb->s_maxbytes =MAX_LFS_FILESIZE ; sb->s_blocksize =PAGE_CACHE_SIZE ; sb->s_blocksize_bits =PAGE_CACHE_SHIFT ; sb->s_magic =RAMFS_MAGIC ;
fs/ramfs/inode.c static int ramfs_fill_super(struct super · line 184
Quoted 11 lines · Andrea Arcangeli
Hi Andrew,
this fixes the 2G limit on ramfs
fs/ramfs/inode.c renamed from fs/ramfs/inode.c.~1~ +1
-0@@ -181,6 +181,7 @@ static int ramfs_fill_super(struct superstruct inode * inode;struct dentry * root; + sb->s_maxbytes =MAX_LFS_FILESIZE ;
Why don't we change the default in alloc_super() instead?
We should not default to "lame" :)
Jeff
Quoted 11 lines · Jeff Garzik
Quoted 10 lines · Andrea Arcangeli
Hi Andrew,
this fixes the 2G limit on ramfs
fs/ramfs/inode.c renamed from fs/ramfs/inode.c.~1~ +0
-0@@ -181,6 +181,7 @@ static int ramfs_fill_super(struct superstruct inode * inode;struct dentry * root;
Quoted 6 lines
fs/ramfs/inode.c static int ramfs_fill_super(struct super · line 184
Quoted 1 line
fs/ramfs/inode.c renamed from fs/ramfs/inode.c.~1~ +1
-0+ sb->s_maxbytes =MAX_LFS_FILESIZE ;Why don't we change the default in
alloc_super()instead?We should not default to "lame" :)
we default to "lame" to protect the lame filesystems from malfunctioning ;), this was extremely intentional in the early days, now less but it's still intentional. We may change that someday but defaulting to safe when there's no downside doesn't sound that urgent to change.
Quoted 7 lines · Andrea Arcangeli
Hi Andrew,
this fixes the 2G limit on ramfs
fs/ramfs/inode.c static int ramfs_fill_super(struct super · line 187
Quoted 7 lines
fs/ramfs/inode.c renamed from fs/ramfs/inode.c.~1~ +1
-0@@ -181,6 +181,7 @@ static int ramfs_fill_super(struct superstruct inode * inode;struct dentry * root; + sb->s_maxbytes =MAX_LFS_FILESIZE ; sb->s_blocksize =PAGE_CACHE_SIZE ; sb->s_blocksize_bits =PAGE_CACHE_SHIFT ; sb->s_magic =RAMFS_MAGIC ;
yep - fixed this for RHEL3 half a year ago but forgot about it. It works well, people are using multi-GB ramfs instances without problems.
Ingo