* [f2fs-dev] [PATCH] f2fs: convert to use MIN_DISCARD_GRANULARITY macro
@ 2022-12-17 5:24 Yangtao Li via Linux-f2fs-devel
2023-01-11 13:34 ` Chao Yu
2023-01-11 19:20 ` patchwork-bot+f2fs
0 siblings, 2 replies; 3+ messages in thread
From: Yangtao Li via Linux-f2fs-devel @ 2022-12-17 5:24 UTC (permalink / raw)
To: jaegeuk, chao; +Cc: Yangtao Li, linux-kernel, linux-f2fs-devel
Commit 1cd2e6d54435 ("f2fs: define MIN_DISCARD_GRANULARITY macro")
introduce it, let's convert to use MIN_DISCARD_GRANULARITY macro.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/f2fs/segment.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 25ddea478fc1..c95a9683f950 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1610,9 +1610,9 @@ static unsigned int __wait_all_discard_cmd(struct f2fs_sb_info *sbi,
return __wait_discard_cmd_range(sbi, dpolicy, 0, UINT_MAX);
/* wait all */
- __init_discard_policy(sbi, &dp, DPOLICY_FSTRIM, 1);
+ __init_discard_policy(sbi, &dp, DPOLICY_FSTRIM, MIN_DISCARD_GRANULARITY);
discard_blks = __wait_discard_cmd_range(sbi, &dp, 0, UINT_MAX);
- __init_discard_policy(sbi, &dp, DPOLICY_UMOUNT, 1);
+ __init_discard_policy(sbi, &dp, DPOLICY_UMOUNT, MIN_DISCARD_GRANULARITY);
discard_blks += __wait_discard_cmd_range(sbi, &dp, 0, UINT_MAX);
return discard_blks;
@@ -1695,7 +1695,8 @@ static int issue_discard_thread(void *data)
if (sbi->gc_mode == GC_URGENT_HIGH ||
!f2fs_available_free_memory(sbi, DISCARD_CACHE))
- __init_discard_policy(sbi, &dpolicy, DPOLICY_FORCE, 1);
+ __init_discard_policy(sbi, &dpolicy, DPOLICY_FORCE,
+ MIN_DISCARD_GRANULARITY);
else
__init_discard_policy(sbi, &dpolicy, DPOLICY_BG,
dcc->discard_granularity);
--
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] 3+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: convert to use MIN_DISCARD_GRANULARITY macro
2022-12-17 5:24 [f2fs-dev] [PATCH] f2fs: convert to use MIN_DISCARD_GRANULARITY macro Yangtao Li via Linux-f2fs-devel
@ 2023-01-11 13:34 ` Chao Yu
2023-01-11 19:20 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2023-01-11 13:34 UTC (permalink / raw)
To: Yangtao Li, jaegeuk; +Cc: linux-kernel, linux-f2fs-devel
On 2022/12/17 13:24, Yangtao Li wrote:
> Commit 1cd2e6d54435 ("f2fs: define MIN_DISCARD_GRANULARITY macro")
> introduce it, let's convert to use MIN_DISCARD_GRANULARITY macro.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.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] 3+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: convert to use MIN_DISCARD_GRANULARITY macro
2022-12-17 5:24 [f2fs-dev] [PATCH] f2fs: convert to use MIN_DISCARD_GRANULARITY macro Yangtao Li via Linux-f2fs-devel
2023-01-11 13:34 ` Chao Yu
@ 2023-01-11 19:20 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+f2fs @ 2023-01-11 19:20 UTC (permalink / raw)
To: Yangtao Li; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Sat, 17 Dec 2022 13:24:48 +0800 you wrote:
> Commit 1cd2e6d54435 ("f2fs: define MIN_DISCARD_GRANULARITY macro")
> introduce it, let's convert to use MIN_DISCARD_GRANULARITY macro.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> fs/f2fs/segment.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Here is the summary with links:
- [f2fs-dev] f2fs: convert to use MIN_DISCARD_GRANULARITY macro
https://git.kernel.org/jaegeuk/f2fs/c/f08142bc3a60
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
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:[~2023-01-11 19:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-17 5:24 [f2fs-dev] [PATCH] f2fs: convert to use MIN_DISCARD_GRANULARITY macro Yangtao Li via Linux-f2fs-devel
2023-01-11 13:34 ` Chao Yu
2023-01-11 19:20 ` patchwork-bot+f2fs
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).