mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] f2fs: make gc_idle sysfs node readable
@ 2022-10-21  8:26 Yangtao Li
  2022-10-25  1:53 ` Chao Yu
  0 siblings, 1 reply; 4+ messages in thread
From: Yangtao Li @ 2022-10-21  8:26 UTC (permalink / raw)
  To: jaegeuk, chao; +Cc: linux-f2fs-devel, linux-kernel, Yangtao Li

Changed a way of showing values of them to use strings.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/f2fs/sysfs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index b4476adea776..555849d4c744 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -332,6 +332,10 @@ static ssize_t f2fs_sbi_show(struct f2fs_attr *a,
 		return sysfs_emit(buf, "%u\n", sbi->compr_new_inode);
 #endif
 
+	if (!strcmp(a->attr.name, "gc_idle"))
+		return sysfs_emit(buf, "%s\n",
+				gc_mode_names[sbi->gc_mode]);
+
 	if (!strcmp(a->attr.name, "gc_urgent"))
 		return sysfs_emit(buf, "%s\n",
 				gc_mode_names[sbi->gc_mode]);
-- 
2.25.1


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

end of thread, other threads:[~2022-10-25  2:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21  8:26 [PATCH] f2fs: make gc_idle sysfs node readable Yangtao Li
2022-10-25  1:53 ` Chao Yu
2022-10-25  2:33   ` [f2fs-dev] " Yangtao Li
2022-10-25  2:51     ` 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®