f2fs: enable fast symlink by utilizing inline data
authorWanpeng Li <wanpeng.li@linux.intel.com>
Thu, 19 Mar 2015 05:23:48 +0000 (13:23 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 10 Apr 2015 22:08:48 +0000 (15:08 -0700)
Fast symlink can utilize inline data flow to avoid using any
i_addr region, since we need to handle many cases such as
truncation, roll-forward recovery, and fsck/dump tools.

Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/inline.c

index d3e0599..375d2c7 100644 (file)
@@ -21,7 +21,7 @@ bool f2fs_may_inline(struct inode *inode)
        if (f2fs_is_atomic_file(inode))
                return false;
 
-       if (!S_ISREG(inode->i_mode))
+       if (!S_ISREG(inode->i_mode) && !S_ISLNK(inode->i_mode))
                return false;
 
        if (i_size_read(inode) > MAX_INLINE_DATA)