linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH RFC] f2fs: don't inline compressed inode
@ 2020-03-25  9:27 Chao Yu
  2020-03-25 15:58 ` Jaegeuk Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Chao Yu @ 2020-03-25  9:27 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel

f2fs_may_inline_data() only check compressed flag on current inode
rather than on parent inode, however at this time compressed flag
has not been inherited yet.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---

Jaegeuk,

I'm not sure about this, whether inline_data flag can be compatible with
compress flag, thoughts?

 fs/f2fs/namei.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index f54119da2217..3807d1b4c4bc 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -86,7 +86,8 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)
 	if (test_opt(sbi, INLINE_XATTR))
 		set_inode_flag(inode, FI_INLINE_XATTR);
 
-	if (test_opt(sbi, INLINE_DATA) && f2fs_may_inline_data(inode))
+	if (test_opt(sbi, INLINE_DATA) && f2fs_may_inline_data(inode) &&
+					!f2fs_compressed_file(dir))
 		set_inode_flag(inode, FI_INLINE_DATA);
 	if (f2fs_may_inline_dentry(inode))
 		set_inode_flag(inode, FI_INLINE_DENTRY);
-- 
2.18.0.rc1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH RFC] f2fs: don't inline compressed inode
  2020-03-25  9:27 [f2fs-dev] [PATCH RFC] f2fs: don't inline compressed inode Chao Yu
@ 2020-03-25 15:58 ` Jaegeuk Kim
  2020-03-26  9:35   ` Chao Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Jaegeuk Kim @ 2020-03-25 15:58 UTC (permalink / raw)
  To: Chao Yu; +Cc: linux-kernel, linux-f2fs-devel

On 03/25, Chao Yu wrote:
> f2fs_may_inline_data() only check compressed flag on current inode
> rather than on parent inode, however at this time compressed flag
> has not been inherited yet.

When write() or other allocation happens, it'll be reset.

> 
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> ---
> 
> Jaegeuk,
> 
> I'm not sure about this, whether inline_data flag can be compatible with
> compress flag, thoughts?
> 
>  fs/f2fs/namei.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
> index f54119da2217..3807d1b4c4bc 100644
> --- a/fs/f2fs/namei.c
> +++ b/fs/f2fs/namei.c
> @@ -86,7 +86,8 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)
>  	if (test_opt(sbi, INLINE_XATTR))
>  		set_inode_flag(inode, FI_INLINE_XATTR);
>  
> -	if (test_opt(sbi, INLINE_DATA) && f2fs_may_inline_data(inode))
> +	if (test_opt(sbi, INLINE_DATA) && f2fs_may_inline_data(inode) &&
> +					!f2fs_compressed_file(dir))
>  		set_inode_flag(inode, FI_INLINE_DATA);
>  	if (f2fs_may_inline_dentry(inode))
>  		set_inode_flag(inode, FI_INLINE_DENTRY);
> -- 
> 2.18.0.rc1


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH RFC] f2fs: don't inline compressed inode
  2020-03-25 15:58 ` Jaegeuk Kim
@ 2020-03-26  9:35   ` Chao Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Chao Yu @ 2020-03-26  9:35 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel

On 2020/3/25 23:58, Jaegeuk Kim wrote:
> On 03/25, Chao Yu wrote:
>> f2fs_may_inline_data() only check compressed flag on current inode
>> rather than on parent inode, however at this time compressed flag
>> has not been inherited yet.
> 
> When write() or other allocation happens, it'll be reset.

Yeah, all tests are fine w/o this RFC patch, anyway, will let you know if
I find something incompatible.

Thanks,

> 
>>
>> Signed-off-by: Chao Yu <yuchao0@huawei.com>
>> ---
>>
>> Jaegeuk,
>>
>> I'm not sure about this, whether inline_data flag can be compatible with
>> compress flag, thoughts?
>>
>>  fs/f2fs/namei.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
>> index f54119da2217..3807d1b4c4bc 100644
>> --- a/fs/f2fs/namei.c
>> +++ b/fs/f2fs/namei.c
>> @@ -86,7 +86,8 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)
>>  	if (test_opt(sbi, INLINE_XATTR))
>>  		set_inode_flag(inode, FI_INLINE_XATTR);
>>  
>> -	if (test_opt(sbi, INLINE_DATA) && f2fs_may_inline_data(inode))
>> +	if (test_opt(sbi, INLINE_DATA) && f2fs_may_inline_data(inode) &&
>> +					!f2fs_compressed_file(dir))
>>  		set_inode_flag(inode, FI_INLINE_DATA);
>>  	if (f2fs_may_inline_dentry(inode))
>>  		set_inode_flag(inode, FI_INLINE_DENTRY);
>> -- 
>> 2.18.0.rc1
> .
> 


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-26  9:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25  9:27 [f2fs-dev] [PATCH RFC] f2fs: don't inline compressed inode Chao Yu
2020-03-25 15:58 ` Jaegeuk Kim
2020-03-26  9:35   ` Chao Yu

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).