Skip to content

Commit

Permalink
f2fs: fix to enable ATGC correctly via gc_idle sysfs interface
Browse files Browse the repository at this point in the history
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: 093749e ("f2fs: support age threshold based garbage collection")
Cc: Zhipeng Tan <[email protected]>
Signed-off-by: Jicheng Shao <[email protected]>
Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
chaseyu authored and Jaegeuk Kim committed Jan 25, 2022
1 parent e4544b6 commit 7d19e3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,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;
}
Expand Down

0 comments on commit 7d19e3d

Please sign in to comment.