* [f2fs-dev] [PATCH] f2fs: get rid of f2fs_inode_synced from f2fs_iget
@ 2022-07-21 4:53 Yufen Yu via Linux-f2fs-devel
2022-07-22 2:53 ` Jaegeuk Kim
0 siblings, 1 reply; 3+ messages in thread
From: Yufen Yu via Linux-f2fs-devel @ 2022-07-21 4:53 UTC (permalink / raw)
To: jaegeuk, chao; +Cc: linux-f2fs-devel
If f2fs_iget cannot search inode from inode cache, it will read
the inode from disk. The processing of read from disk and init inode
should not dirty the inode, as the commit 530e07042002 ("f2fs:
don't mark compressed inode dirty during f2fs_iget()").
Thus, we can remove the unnecessary f2fs_inode_synced().
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
---
fs/f2fs/inode.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index fc55f5bd1fcc..ce87b66c6dfe 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -562,7 +562,6 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino)
return inode;
bad_inode:
- f2fs_inode_synced(inode);
iget_failed(inode);
trace_f2fs_iget_exit(inode, ret);
return ERR_PTR(ret);
--
2.31.1
_______________________________________________
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] f2fs: get rid of f2fs_inode_synced from f2fs_iget
2022-07-21 4:53 [f2fs-dev] [PATCH] f2fs: get rid of f2fs_inode_synced from f2fs_iget Yufen Yu via Linux-f2fs-devel
@ 2022-07-22 2:53 ` Jaegeuk Kim
2022-07-24 13:48 ` Chao Yu
0 siblings, 1 reply; 3+ messages in thread
From: Jaegeuk Kim @ 2022-07-22 2:53 UTC (permalink / raw)
To: Yufen Yu; +Cc: linux-f2fs-devel
On 07/21, Yufen Yu wrote:
> If f2fs_iget cannot search inode from inode cache, it will read
> the inode from disk. The processing of read from disk and init inode
> should not dirty the inode, as the commit 530e07042002 ("f2fs:
> don't mark compressed inode dirty during f2fs_iget()").
f2fs_truncate can make this?
552 if (file_should_truncate(inode) &&
553 !is_sbi_flag_set(sbi, SBI_POR_DOING)) {
554 ret = f2fs_truncate(inode);
555 if (ret)
556 goto bad_inode;
>
> Thus, we can remove the unnecessary f2fs_inode_synced().
>
> Signed-off-by: Yufen Yu <yuyufen@huawei.com>
> ---
> fs/f2fs/inode.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
> index fc55f5bd1fcc..ce87b66c6dfe 100644
> --- a/fs/f2fs/inode.c
> +++ b/fs/f2fs/inode.c
> @@ -562,7 +562,6 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino)
> return inode;
>
> bad_inode:
> - f2fs_inode_synced(inode);
> iget_failed(inode);
> trace_f2fs_iget_exit(inode, ret);
> return ERR_PTR(ret);
> --
> 2.31.1
_______________________________________________
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] f2fs: get rid of f2fs_inode_synced from f2fs_iget
2022-07-22 2:53 ` Jaegeuk Kim
@ 2022-07-24 13:48 ` Chao Yu
0 siblings, 0 replies; 3+ messages in thread
From: Chao Yu @ 2022-07-24 13:48 UTC (permalink / raw)
To: Jaegeuk Kim, Yufen Yu; +Cc: linux-f2fs-devel
On 2022/7/22 10:53, Jaegeuk Kim wrote:
> On 07/21, Yufen Yu wrote:
>> If f2fs_iget cannot search inode from inode cache, it will read
>> the inode from disk. The processing of read from disk and init inode
>> should not dirty the inode, as the commit 530e07042002 ("f2fs:
>> don't mark compressed inode dirty during f2fs_iget()").
>
> f2fs_truncate can make this?
>
> 552 if (file_should_truncate(inode) &&
> 553 !is_sbi_flag_set(sbi, SBI_POR_DOING)) {
> 554 ret = f2fs_truncate(inode);
> 555 if (ret)
> 556 goto bad_inode;
__recover_inline_status() can also dirty inode?
Thanks,
>
>
>>
>> Thus, we can remove the unnecessary f2fs_inode_synced().
>>
>> Signed-off-by: Yufen Yu <yuyufen@huawei.com>
>> ---
>> fs/f2fs/inode.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
>> index fc55f5bd1fcc..ce87b66c6dfe 100644
>> --- a/fs/f2fs/inode.c
>> +++ b/fs/f2fs/inode.c
>> @@ -562,7 +562,6 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino)
>> return inode;
>>
>> bad_inode:
>> - f2fs_inode_synced(inode);
>> iget_failed(inode);
>> trace_f2fs_iget_exit(inode, ret);
>> return ERR_PTR(ret);
>> --
>> 2.31.1
_______________________________________________
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:[~2022-07-24 13:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-21 4:53 [f2fs-dev] [PATCH] f2fs: get rid of f2fs_inode_synced from f2fs_iget Yufen Yu via Linux-f2fs-devel
2022-07-22 2:53 ` Jaegeuk Kim
2022-07-24 13:48 ` 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).