* [PATCH 1/2] f2fs: fix to correct invalid batched_trim_sections node
@ 2022-10-21 15:38 Yangtao Li
2022-10-21 15:38 ` [PATCH 2/2] f2fs: remove " Yangtao Li
0 siblings, 1 reply; 3+ messages in thread
From: Yangtao Li @ 2022-10-21 15:38 UTC (permalink / raw)
To: jaegeuk, chao; +Cc: linux-f2fs-devel, linux-kernel, Yangtao Li
commit 377224c47118("f2fs: don't split checkpoint in fstrim") obsolete
batch mode and related sysfs entry, but use wrong name.
Let's fix it to right name.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/f2fs/sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index df27afd71ef4..3005e2783a25 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -488,7 +488,7 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
return -EINVAL;
}
- if (!strcmp(a->attr.name, "trim_sections"))
+ if (!strcmp(a->attr.name, "batched_trim_sections"))
return -EINVAL;
if (!strcmp(a->attr.name, "gc_urgent")) {
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] f2fs: remove batched_trim_sections node
2022-10-21 15:38 [PATCH 1/2] f2fs: fix to correct invalid batched_trim_sections node Yangtao Li
@ 2022-10-21 15:38 ` Yangtao Li
2022-10-25 2:55 ` Chao Yu
0 siblings, 1 reply; 3+ messages in thread
From: Yangtao Li @ 2022-10-21 15:38 UTC (permalink / raw)
To: jaegeuk, chao; +Cc: linux-f2fs-devel, linux-kernel, Yangtao Li
This testing sysfs node has been deprecated for a long time,
let's remove it.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/f2fs/f2fs.h | 3 ---
fs/f2fs/sysfs.c | 5 -----
2 files changed, 8 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index e6355a5683b7..9c480835adab 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1062,9 +1062,6 @@ struct f2fs_sm_info {
/* a threshold to reclaim prefree segments */
unsigned int rec_prefree_segments;
- /* for batched trimming */
- unsigned int trim_sections; /* # of sections to trim */
-
struct list_head sit_entry_set; /* sit entry set list */
unsigned int ipu_policy; /* in-place-update policy */
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 3005e2783a25..926b7a844362 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -488,9 +488,6 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
return -EINVAL;
}
- if (!strcmp(a->attr.name, "batched_trim_sections"))
- return -EINVAL;
-
if (!strcmp(a->attr.name, "gc_urgent")) {
if (t == 0) {
sbi->gc_mode = GC_NORMAL;
@@ -790,7 +787,6 @@ F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, mid_discard_issue_time, mid_discard_
F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, max_discard_issue_time, max_discard_issue_time);
F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, discard_granularity, discard_granularity);
F2FS_RW_ATTR(RESERVED_BLOCKS, f2fs_sb_info, reserved_blocks, reserved_blocks);
-F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, batched_trim_sections, trim_sections);
F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, ipu_policy, ipu_policy);
F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, min_ipu_util, min_ipu_util);
F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, min_fsync_blocks, min_fsync_blocks);
@@ -919,7 +915,6 @@ static struct attribute *f2fs_attrs[] = {
ATTR_LIST(max_discard_issue_time),
ATTR_LIST(discard_granularity),
ATTR_LIST(pending_discard),
- ATTR_LIST(batched_trim_sections),
ATTR_LIST(ipu_policy),
ATTR_LIST(min_ipu_util),
ATTR_LIST(min_fsync_blocks),
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] f2fs: remove batched_trim_sections node
2022-10-21 15:38 ` [PATCH 2/2] f2fs: remove " Yangtao Li
@ 2022-10-25 2:55 ` Chao Yu
0 siblings, 0 replies; 3+ messages in thread
From: Chao Yu @ 2022-10-25 2:55 UTC (permalink / raw)
To: Yangtao Li, jaegeuk; +Cc: linux-f2fs-devel, linux-kernel
On 2022/10/21 23:38, Yangtao Li wrote:
> This testing sysfs node has been deprecated for a long time,
> let's remove it.
Can you please merge this patch w/
[PATCH 1/2] f2fs: fix to correct invalid batched_trim_sections node
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> fs/f2fs/f2fs.h | 3 ---
> fs/f2fs/sysfs.c | 5 -----
> 2 files changed, 8 deletions(-)
>
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index e6355a5683b7..9c480835adab 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -1062,9 +1062,6 @@ struct f2fs_sm_info {
> /* a threshold to reclaim prefree segments */
> unsigned int rec_prefree_segments;
>
> - /* for batched trimming */
> - unsigned int trim_sections; /* # of sections to trim */
> -
> struct list_head sit_entry_set; /* sit entry set list */
>
> unsigned int ipu_policy; /* in-place-update policy */
> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
> index 3005e2783a25..926b7a844362 100644
> --- a/fs/f2fs/sysfs.c
> +++ b/fs/f2fs/sysfs.c
> @@ -488,9 +488,6 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
> return -EINVAL;
> }
>
> - if (!strcmp(a->attr.name, "batched_trim_sections"))
> - return -EINVAL;
> -
> if (!strcmp(a->attr.name, "gc_urgent")) {
> if (t == 0) {
> sbi->gc_mode = GC_NORMAL;
> @@ -790,7 +787,6 @@ F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, mid_discard_issue_time, mid_discard_
> F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, max_discard_issue_time, max_discard_issue_time);
> F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, discard_granularity, discard_granularity);
> F2FS_RW_ATTR(RESERVED_BLOCKS, f2fs_sb_info, reserved_blocks, reserved_blocks);
> -F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, batched_trim_sections, trim_sections);
> F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, ipu_policy, ipu_policy);
> F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, min_ipu_util, min_ipu_util);
> F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, min_fsync_blocks, min_fsync_blocks);
> @@ -919,7 +915,6 @@ static struct attribute *f2fs_attrs[] = {
> ATTR_LIST(max_discard_issue_time),
> ATTR_LIST(discard_granularity),
> ATTR_LIST(pending_discard),
> - ATTR_LIST(batched_trim_sections),
> ATTR_LIST(ipu_policy),
> ATTR_LIST(min_ipu_util),
> ATTR_LIST(min_fsync_blocks),
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-25 2:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21 15:38 [PATCH 1/2] f2fs: fix to correct invalid batched_trim_sections node Yangtao Li
2022-10-21 15:38 ` [PATCH 2/2] f2fs: remove " Yangtao Li
2022-10-25 2:55 ` Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®