diff options
author | Chao Yu <yuchao0@huawei.com> | 2016-05-09 07:56:34 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-08-29 21:31:17 -0400 |
commit | 97c1794a5dc160164aa7f161310da15c34d62641 (patch) | |
tree | 0fefd7fa4a372648797f3097e86111d696212291 | |
parent | 5d2b42ede71c9da0bf4248fd2d409918fb065b5f (diff) |
f2fs: enable inline_dentry by default and add noinline_dentry option
Make inline_dentry as default mount option to improve space usage and
IO performance in scenario of numerous small directory.
It adds noinline_dentry mount option, instead.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | Documentation/filesystems/f2fs.txt | 1 | ||||
-rw-r--r-- | fs/f2fs/super.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index ecd808088362..753dd4f96afe 100644 --- a/Documentation/filesystems/f2fs.txt +++ b/Documentation/filesystems/f2fs.txt | |||
@@ -131,6 +131,7 @@ inline_dentry Enable the inline dir feature: data in new created | |||
131 | directory entries can be written into inode block. The | 131 | directory entries can be written into inode block. The |
132 | space of inode block which is used to store inline | 132 | space of inode block which is used to store inline |
133 | dentries is limited to ~3.4k. | 133 | dentries is limited to ~3.4k. |
134 | noinline_dentry Diable the inline dentry feature. | ||
134 | flush_merge Merge concurrent cache_flush commands as much as possible | 135 | flush_merge Merge concurrent cache_flush commands as much as possible |
135 | to eliminate redundant command issues. If the underlying | 136 | to eliminate redundant command issues. If the underlying |
136 | device handles the cache_flush command relatively slowly, | 137 | device handles the cache_flush command relatively slowly, |
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 7f863a645ab1..555217fe43ce 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
@@ -87,6 +87,7 @@ enum { | |||
87 | Opt_inline_xattr, | 87 | Opt_inline_xattr, |
88 | Opt_inline_data, | 88 | Opt_inline_data, |
89 | Opt_inline_dentry, | 89 | Opt_inline_dentry, |
90 | Opt_noinline_dentry, | ||
90 | Opt_flush_merge, | 91 | Opt_flush_merge, |
91 | Opt_noflush_merge, | 92 | Opt_noflush_merge, |
92 | Opt_nobarrier, | 93 | Opt_nobarrier, |
@@ -118,6 +119,7 @@ static match_table_t f2fs_tokens = { | |||
118 | {Opt_inline_xattr, "inline_xattr"}, | 119 | {Opt_inline_xattr, "inline_xattr"}, |
119 | {Opt_inline_data, "inline_data"}, | 120 | {Opt_inline_data, "inline_data"}, |
120 | {Opt_inline_dentry, "inline_dentry"}, | 121 | {Opt_inline_dentry, "inline_dentry"}, |
122 | {Opt_noinline_dentry, "noinline_dentry"}, | ||
121 | {Opt_flush_merge, "flush_merge"}, | 123 | {Opt_flush_merge, "flush_merge"}, |
122 | {Opt_noflush_merge, "noflush_merge"}, | 124 | {Opt_noflush_merge, "noflush_merge"}, |
123 | {Opt_nobarrier, "nobarrier"}, | 125 | {Opt_nobarrier, "nobarrier"}, |
@@ -488,6 +490,9 @@ static int parse_options(struct super_block *sb, char *options) | |||
488 | case Opt_inline_dentry: | 490 | case Opt_inline_dentry: |
489 | set_opt(sbi, INLINE_DENTRY); | 491 | set_opt(sbi, INLINE_DENTRY); |
490 | break; | 492 | break; |
493 | case Opt_noinline_dentry: | ||
494 | clear_opt(sbi, INLINE_DENTRY); | ||
495 | break; | ||
491 | case Opt_flush_merge: | 496 | case Opt_flush_merge: |
492 | set_opt(sbi, FLUSH_MERGE); | 497 | set_opt(sbi, FLUSH_MERGE); |
493 | break; | 498 | break; |
@@ -878,6 +883,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root) | |||
878 | seq_puts(seq, ",noinline_data"); | 883 | seq_puts(seq, ",noinline_data"); |
879 | if (test_opt(sbi, INLINE_DENTRY)) | 884 | if (test_opt(sbi, INLINE_DENTRY)) |
880 | seq_puts(seq, ",inline_dentry"); | 885 | seq_puts(seq, ",inline_dentry"); |
886 | else | ||
887 | seq_puts(seq, ",noinline_dentry"); | ||
881 | if (!f2fs_readonly(sbi->sb) && test_opt(sbi, FLUSH_MERGE)) | 888 | if (!f2fs_readonly(sbi->sb) && test_opt(sbi, FLUSH_MERGE)) |
882 | seq_puts(seq, ",flush_merge"); | 889 | seq_puts(seq, ",flush_merge"); |
883 | if (test_opt(sbi, NOBARRIER)) | 890 | if (test_opt(sbi, NOBARRIER)) |
@@ -975,6 +982,7 @@ static void default_options(struct f2fs_sb_info *sbi) | |||
975 | 982 | ||
976 | set_opt(sbi, BG_GC); | 983 | set_opt(sbi, BG_GC); |
977 | set_opt(sbi, INLINE_DATA); | 984 | set_opt(sbi, INLINE_DATA); |
985 | set_opt(sbi, INLINE_DENTRY); | ||
978 | set_opt(sbi, EXTENT_CACHE); | 986 | set_opt(sbi, EXTENT_CACHE); |
979 | sbi->sb->s_flags |= MS_LAZYTIME; | 987 | sbi->sb->s_flags |= MS_LAZYTIME; |
980 | set_opt(sbi, FLUSH_MERGE); | 988 | set_opt(sbi, FLUSH_MERGE); |