* [PATCH v3 1/2] f2fs: enable inline data by default
@ 2015-03-24 2:20 Wanpeng Li
2015-03-24 2:20 ` [PATCH v3 2/2] f2fs: enable fast symlink by utilizing inline data Wanpeng Li
0 siblings, 1 reply; 4+ messages in thread
From: Wanpeng Li @ 2015-03-24 2:20 UTC (permalink / raw)
To: Jaegeuk Kim
Cc: Changman Lee, Chao Yu, linux-f2fs-devel, linux-fsdevel,
linux-kernel, Wanpeng Li
Enable inline_data feature by default since it brings us better
performance and space utilization and now has already stable.
Add another option noinline_data to disable it during mount.
Suggested-by: Jaegeuk Kim <jaegeuk@kernel.org>
Suggested-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
---
v2 -> v3:
* reuse F2FS_MOUNT_INLINE_DATA
* fix show both options "inline_data,noinline_data" in ->show_options
v1 -> v2:
* retain inline_data option and enable it by default
* add another noinline_data option
Documentation/filesystems/f2fs.txt | 2 ++
fs/f2fs/super.c | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt
index 48e2123..e9e750e 100644
--- a/Documentation/filesystems/f2fs.txt
+++ b/Documentation/filesystems/f2fs.txt
@@ -144,6 +144,8 @@ extent_cache Enable an extent cache based on rb-tree, it can cache
as many as extent which map between contiguous logical
address and physical address per inode, resulting in
increasing the cache hit ratio.
+noinline_data Disable the inline data feature, inline data feature is
+ enabled by default.
================================================================================
DEBUGFS ENTRIES
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index fc6857f..45aa843 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -58,6 +58,7 @@ enum {
Opt_nobarrier,
Opt_fastboot,
Opt_extent_cache,
+ Opt_noinline_data,
Opt_err,
};
@@ -80,6 +81,7 @@ static match_table_t f2fs_tokens = {
{Opt_nobarrier, "nobarrier"},
{Opt_fastboot, "fastboot"},
{Opt_extent_cache, "extent_cache"},
+ {Opt_noinline_data, "noinline_data"},
{Opt_err, NULL},
};
@@ -372,6 +374,9 @@ static int parse_options(struct super_block *sb, char *options)
case Opt_extent_cache:
set_opt(sbi, EXTENT_CACHE);
break;
+ case Opt_noinline_data:
+ clear_opt(sbi, INLINE_DATA);
+ break;
default:
f2fs_msg(sb, KERN_ERR,
"Unrecognized mount option \"%s\" or missing value",
@@ -596,6 +601,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
seq_puts(seq, ",disable_ext_identify");
if (test_opt(sbi, INLINE_DATA))
seq_puts(seq, ",inline_data");
+ else
+ seq_puts(seq, ",noinline_data");
if (test_opt(sbi, INLINE_DENTRY))
seq_puts(seq, ",inline_dentry");
if (!f2fs_readonly(sbi->sb) && test_opt(sbi, FLUSH_MERGE))
@@ -991,6 +998,7 @@ try_onemore:
sbi->active_logs = NR_CURSEG_TYPE;
set_opt(sbi, BG_GC);
+ set_opt(sbi, INLINE_DATA);
#ifdef CONFIG_F2FS_FS_XATTR
set_opt(sbi, XATTR_USER);
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 2/2] f2fs: enable fast symlink by utilizing inline data
2015-03-24 2:20 [PATCH v3 1/2] f2fs: enable inline data by default Wanpeng Li
@ 2015-03-24 2:20 ` Wanpeng Li
2015-03-24 7:41 ` Wanpeng Li
0 siblings, 1 reply; 4+ messages in thread
From: Wanpeng Li @ 2015-03-24 2:20 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel, linux-fsdevel
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>
---
fs/f2fs/inline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index d3e0599..375d2c7 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -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)
--
2.1.0
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 2/2] f2fs: enable fast symlink by utilizing inline data
2015-03-24 2:20 ` [PATCH v3 2/2] f2fs: enable fast symlink by utilizing inline data Wanpeng Li
@ 2015-03-24 7:41 ` Wanpeng Li
2015-03-24 7:43 ` Wanpeng Li
0 siblings, 1 reply; 4+ messages in thread
From: Wanpeng Li @ 2015-03-24 7:41 UTC (permalink / raw)
To: Jaegeuk Kim
Cc: Changman Lee, Chao Yu, linux-f2fs-devel, linux-fsdevel,
linux-kernel, Wanpeng Li
Ping this one.
On Tue, Mar 24, 2015 at 10:20:28AM +0800, Wanpeng Li wrote:
>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>
>---
> fs/f2fs/inline.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
>index d3e0599..375d2c7 100644
>--- a/fs/f2fs/inline.c
>+++ b/fs/f2fs/inline.c
>@@ -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)
>--
>2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 2/2] f2fs: enable fast symlink by utilizing inline data
2015-03-24 7:41 ` Wanpeng Li
@ 2015-03-24 7:43 ` Wanpeng Li
0 siblings, 0 replies; 4+ messages in thread
From: Wanpeng Li @ 2015-03-24 7:43 UTC (permalink / raw)
To: Jaegeuk Kim
Cc: Changman Lee, Chao Yu, linux-f2fs-devel, linux-fsdevel,
linux-kernel, Wanpeng Li
Just see it merged, sorry for the noise.
On Tue, Mar 24, 2015 at 03:41:59PM +0800, Wanpeng Li wrote:
>Ping this one.
>On Tue, Mar 24, 2015 at 10:20:28AM +0800, Wanpeng Li wrote:
>>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>
>>---
>> fs/f2fs/inline.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
>>index d3e0599..375d2c7 100644
>>--- a/fs/f2fs/inline.c
>>+++ b/fs/f2fs/inline.c
>>@@ -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)
>>--
>>2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-24 7:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-24 2:20 [PATCH v3 1/2] f2fs: enable inline data by default Wanpeng Li
2015-03-24 2:20 ` [PATCH v3 2/2] f2fs: enable fast symlink by utilizing inline data Wanpeng Li
2015-03-24 7:41 ` Wanpeng Li
2015-03-24 7:43 ` Wanpeng Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).