[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dfc051bb-71ca-035c-b945-ad298aa5e1ae@kernel.org>
Date: Tue, 25 Oct 2022 09:53:17 +0800
From: Chao Yu <chao@...nel.org>
To: Yangtao Li <frank.li@...o.com>, jaegeuk@...nel.org
Cc: linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] f2fs: make gc_idle sysfs node readable
On 2022/10/21 16:26, Yangtao Li wrote:
> Changed a way of showing values of them to use strings.
This change breaks forward compatibility of gc_idle interface.
Thanks,
>
> Signed-off-by: Yangtao Li <frank.li@...o.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]);
Powered by blists - more mailing lists