f2fs: enhance on-disk inode structure scalability
[sfrench/cifs-2.6.git] / fs / f2fs / super.c
index 2d236384f9381ee900d6c288640f35a97910a27d..b30097190605661dbae4ca71de1fcef17f322c64 100644 (file)
@@ -447,8 +447,6 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb)
        /* Will be used by directory only */
        fi->i_dir_level = F2FS_SB(sb)->dir_level;
 
-       fi->i_inline_reserved = DEF_INLINE_RESERVED_SIZE;
-
        return &fi->vfs_inode;
 }
 
@@ -1306,9 +1304,16 @@ static const struct export_operations f2fs_export_ops = {
 
 static loff_t max_file_blocks(void)
 {
-       loff_t result = (DEF_ADDRS_PER_INODE - F2FS_INLINE_XATTR_ADDRS);
+       loff_t result = 0;
        loff_t leaf_count = ADDRS_PER_BLOCK;
 
+       /*
+        * note: previously, result is equal to (DEF_ADDRS_PER_INODE -
+        * F2FS_INLINE_XATTR_ADDRS), but now f2fs try to reserve more
+        * space in inode.i_addr, it will be more safe to reassign
+        * result as zero.
+        */
+
        /* two direct node blocks */
        result += (leaf_count * 2);