* [f2fs-dev] [PATCH -next] f2fs: remove redundant check in f2fs_sanity_check_cluster
@ 2022-09-01 7:19 Zhang Qilong via Linux-f2fs-devel
2022-09-06 2:58 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Qilong via Linux-f2fs-devel @ 2022-09-01 7:19 UTC (permalink / raw)
To: jaegeuk, chao; +Cc: linux-f2fs-devel
It have checked "compressed" at the entry of
f2fs_sanity_check_cluster, just remove the
redundant check for better performance here.
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
fs/f2fs/compress.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 6baaff4c52ba..c16bab5bd600 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -912,17 +912,15 @@ bool f2fs_sanity_check_cluster(struct dnode_of_data *dn)
reason = "[C|*|C|*]";
goto out;
}
- if (compressed) {
- if (!__is_valid_data_blkaddr(blkaddr)) {
- if (!cluster_end)
- cluster_end = i;
- continue;
- }
- /* [COMPR_ADDR, NULL_ADDR or NEW_ADDR, valid_blkaddr] */
- if (cluster_end) {
- reason = "[C|N|N|V]";
- goto out;
- }
+ if (!__is_valid_data_blkaddr(blkaddr)) {
+ if (!cluster_end)
+ cluster_end = i;
+ continue;
+ }
+ /* [COMPR_ADDR, NULL_ADDR or NEW_ADDR, valid_blkaddr] */
+ if (cluster_end) {
+ reason = "[C|N|N|V]";
+ goto out;
}
}
return false;
--
2.25.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] 2+ messages in thread
* Re: [f2fs-dev] [PATCH -next] f2fs: remove redundant check in f2fs_sanity_check_cluster
2022-09-01 7:19 [f2fs-dev] [PATCH -next] f2fs: remove redundant check in f2fs_sanity_check_cluster Zhang Qilong via Linux-f2fs-devel
@ 2022-09-06 2:58 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2022-09-06 2:58 UTC (permalink / raw)
To: Zhang Qilong, jaegeuk; +Cc: linux-f2fs-devel
On 2022/9/1 15:19, Zhang Qilong wrote:
> It have checked "compressed" at the entry of
> f2fs_sanity_check_cluster, just remove the
> redundant check for better performance here.
>
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
_______________________________________________
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] 2+ messages in thread
end of thread, other threads:[~2022-09-06 2:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 7:19 [f2fs-dev] [PATCH -next] f2fs: remove redundant check in f2fs_sanity_check_cluster Zhang Qilong via Linux-f2fs-devel
2022-09-06 2:58 ` 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).