Skip to contentSkip to conversation

f2fs: fix to enable ATGC correctly via gc_idle sysfs interface

PATCH New Chao Yu 1 participant 1 message Jan 18, 2022 F2FS file system

lore
Share & tools
lore

Chao Yu

author maintainer
#0 lore raw

PATCH 1/1 f2fs: fix to enable ATGC correctly via gc_idle sysfs interface

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 093749e296e2 ("f2fs: support age threshold based garbage collection")
Cc Zhipeng Tan <[email protected]>
---
 fs/f2fs/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/sysfs.c +1 -1
index f8a14b1e2ef7..699f97610e8a 100644
@@ -482,7 +482,7 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
 		} else if (t == GC_IDLE_AT) {
 			if (!sbi->am.atgc_enabled)
 				return -EINVAL;
-			sbi->gc_mode = GC_AT;
+			sbi->gc_mode = GC_IDLE_AT;
 		} else {
 			sbi->gc_mode = GC_NORMAL;
 		}
Signature · 8 lines
2.25.1



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel