提交 1fcc02f6 编写于 作者: C Chao Yu 提交者: Zheng Zengkai

f2fs: fix to enable ATGC correctly via gc_idle sysfs interface

stable inclusion
from stable-v5.10.110
commit 2b5d41bcf28f5d8b3c7806d6e353970014d29927
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2b5d41bcf28f5d8b3c7806d6e353970014d29927

--------------------------------

[ Upstream commit 7d19e3da ]

It needs to assign sbi->gc_mode with GC_IDLE_AT rather than GC_AT when
user tries to enable ATGC via gc_idle sysfs interface, fix it.

Fixes: 093749e2 ("f2fs: support age threshold based garbage collection")
Cc: Zhipeng Tan <tanzhipeng@hust.edu.cn>
Signed-off-by: NJicheng Shao <shaojicheng@hust.edu.cn>
Signed-off-by: NChao Yu <chao@kernel.org>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 420e250b
...@@ -386,7 +386,7 @@ static ssize_t __sbi_store(struct f2fs_attr *a, ...@@ -386,7 +386,7 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
} else if (t == GC_IDLE_AT) { } else if (t == GC_IDLE_AT) {
if (!sbi->am.atgc_enabled) if (!sbi->am.atgc_enabled)
return -EINVAL; return -EINVAL;
sbi->gc_mode = GC_AT; sbi->gc_mode = GC_IDLE_AT;
} else { } else {
sbi->gc_mode = GC_NORMAL; sbi->gc_mode = GC_NORMAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册