ext4: Enable extent format for symlink. From: "Aneesh Kumar K.V" This patch enable extent format for normal symlink. Extent format enables to refere file system blocks > 32 bits. Enabling extent format for symlink enables to have symlink block beyond 2**32 blocks. We still don't enable extent format for fast symlink. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" --- fs/ext4/ialloc.c | 4 ++-- fs/ext4/namei.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) Index: linux-2.6.25-rc3/fs/ext4/ialloc.c =================================================================== --- linux-2.6.25-rc3.orig/fs/ext4/ialloc.c 2008-03-03 17:23:45.000000000 -0800 +++ linux-2.6.25-rc3/fs/ext4/ialloc.c 2008-03-04 11:52:54.000000000 -0800 @@ -842,8 +842,8 @@ got: goto fail_free_drop; } if (test_opt(sb, EXTENTS)) { - /* set extent flag only for directory and file */ - if (S_ISDIR(mode) || S_ISREG(mode)) { + /* set extent flag only for diretory, file and normal symlink*/ + if (S_ISDIR(mode) || S_ISREG(mode) || S_ISLNK(mode)) { EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL; ext4_ext_tree_init(handle, inode); err = ext4_update_incompat_feature(handle, sb, Index: linux-2.6.25-rc3/fs/ext4/namei.c =================================================================== --- linux-2.6.25-rc3.orig/fs/ext4/namei.c 2008-03-03 17:23:48.000000000 -0800 +++ linux-2.6.25-rc3/fs/ext4/namei.c 2008-03-04 11:52:54.000000000 -0800 @@ -2222,6 +2222,8 @@ retry: goto out_stop; } } else { + /* clear the extent format for fast symlink */ + EXT4_I(inode)->i_flags &= ~EXT4_EXTENTS_FL; inode->i_op = &ext4_fast_symlink_inode_operations; memcpy((char*)&EXT4_I(inode)->i_data,symname,l); inode->i_size = l-1;