Re: ext2fs 2GiB file size limit

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: frantisek holop
Date: Friday, December 10, 2010 - 9:11 am

hmm, on Wed, Dec 08, 2010 at 12:47:06PM +0100, Peter J. Philipp said that

you left out the interesting bit :]

                        if (fs->e2fs.e2fs_rev <= E2FS_REV0) {
                                /* Linux automagically upgrades to REV1 here! */
                                return (EFBIG);
                        }

there was a funny chicken-egg problem with this.
the e2fsprogs' mkfs.ext2 does not set 'large_file'
by default either, but as the linux kernel "automagically
upgrades to REV1" whenever a process tries to write a bigger
file for the first time, it is not really a problem.

but naturally, people with linux background trying to use
ext2fs on different systems get to know about this flag after
lot of hair pulling.

i have asked Theodore in the past to enable this feature
by default, but looks like it never happened.

i think it could save a lot of time and sanity if the
openbsd kernel emitted a dmesg when someone tries
to write a bigger file..

Index: ext2fs_inode.c
===================================================================
RCS file: /cvs/src/sys/ufs/ext2fs/ext2fs_inode.c,v
retrieving revision 1.43
diff -u -r1.43 ext2fs_inode.c
--- ext2fs_inode.c      23 Nov 2008 23:52:35 -0000      1.43
+++ ext2fs_inode.c      10 Dec 2010 16:09:33 -0000
@@ -83,6 +83,8 @@

                         if (fs->e2fs.e2fs_rev <= E2FS_REV0) {
                                 /* Linux automagically upgrades to REV1 here! */
+                               log(LOG_NOTICE,
+                                   "ext2fs revision does not support large files\n");
                                 return (EFBIG);
                         }
                         if (!(fs->e2fs.e2fs_features_rocompat

-f
-- 
life is lived forwards, but understood backwards.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ext2fs 2GiB file size limit, LEVAI Daniel, (Wed Dec 8, 1:23 am)
Re: ext2fs 2GiB file size limit, Guillaume Dualé, (Wed Dec 8, 1:35 am)
Re: ext2fs 2GiB file size limit, LEVAI Daniel, (Wed Dec 8, 1:59 am)
Re: ext2fs 2GiB file size limit, Guillaume Dualé, (Wed Dec 8, 2:42 am)
Re: ext2fs 2GiB file size limit, LEVAI Daniel, (Wed Dec 8, 3:09 am)
Re: ext2fs 2GiB file size limit, Peter J. Philipp, (Wed Dec 8, 4:47 am)
Re: ext2fs 2GiB file size limit, LEVAI Daniel, (Wed Dec 8, 4:57 am)
Re: ext2fs 2GiB file size limit, frantisek holop, (Fri Dec 10, 9:11 am)