[PATCH] Re: test12-pre6

From: Alexander Viro (viro@math.psu.edu)
Date: Wed Dec 06 2000 - 02:54:17 EST


        ext2_update_inode() marks the filesystems as having large files
if there the file becomes too large for old driver (2.2 one). Unfortunately,
it gets the limit wrong - it's not 2^32, it's 2^31. So we should check
for ->i_size_high being non zero _or_ ->i_size having bit 31 set. Please,
apply.

diff -urN rc12-pre6/fs/ext2/inode.c rc12-pre6-ext2-LFS/fs/ext2/inode.c
--- rc12-pre6/fs/ext2/inode.c Tue Dec 5 02:03:14 2000
+++ rc12-pre6-ext2-LFS/fs/ext2/inode.c Tue Dec 5 15:00:27 2000
@@ -1188,7 +1188,7 @@
                 raw_inode->i_dir_acl = cpu_to_le32(inode->u.ext2_i.i_dir_acl);
         else {
                 raw_inode->i_size_high = cpu_to_le32(inode->i_size >> 32);
- if (raw_inode->i_size_high) {
+ if (raw_inode->i_size_high || (inode->i_size & (1<<31))) {
                         struct super_block *sb = inode->i_sb;
                         struct ext2_super_block *es = sb->u.ext2_sb.s_es;
                         if (!(es->s_feature_ro_compat & cpu_to_le32(EXT2_FEATURE_RO_COMPAT_LARGE_FILE))) {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Dec 07 2000 - 21:00:14 EST