Skip to contentSkip to conversation

ramfs lfs limit

PATCH Andrea Arcangeli 3 participants 4 messages May 21, 2004

lore
Share & tools
lore
#0 lore raw

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 super
 	struct 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;
#1 lore raw

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 super
 	struct 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

#2 lore raw
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 super
 	struct 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.

#3 lore raw
In reply to Andrea Arcangeli
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 super
 	struct 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