summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2013-08-04 23:10:15 +0900
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-08-06 22:00:18 +0900
commitd2dc095f4280ad5fdea33769e8e119fd16648426 (patch)
treef97a7bd3a06822c463e678770fb63dab52d0bc94 /fs/f2fs/super.c
parentb59d0bae6ca30c496f298881616258f9cde0d9c6 (diff)
downloadop-kernel-dev-d2dc095f4280ad5fdea33769e8e119fd16648426.zip
op-kernel-dev-d2dc095f4280ad5fdea33769e8e119fd16648426.tar.gz
f2fs: add sysfs entries to select the gc policy
Add sysfs entry gc_idle to control the gc policy. Where gc_idle = 1 corresponds to selecting a cost benefit approach, while gc_idle = 2 corresponds to selecting a greedy approach to garbage collection. The selection is mutually exclusive one approach will work at any point. If gc_idle = 0, then this option is disabled. Cc: Gu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Pankaj Kumar <pankaj.km@samsung.com> Reviewed-by: Gu Zheng <guz.fnst@cn.fujitsu.com> [Jaegeuk Kim: change the select_gc_type() flow slightly] Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index e161a24..94c0e20 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -148,12 +148,14 @@ static struct f2fs_attr f2fs_attr_##_name = { \
F2FS_RW_ATTR(gc_min_sleep_time, min_sleep_time);
F2FS_RW_ATTR(gc_max_sleep_time, max_sleep_time);
F2FS_RW_ATTR(gc_no_gc_sleep_time, no_gc_sleep_time);
+F2FS_RW_ATTR(gc_idle, gc_idle);
#define ATTR_LIST(name) (&f2fs_attr_##name.attr)
static struct attribute *f2fs_attrs[] = {
ATTR_LIST(gc_min_sleep_time),
ATTR_LIST(gc_max_sleep_time),
ATTR_LIST(gc_no_gc_sleep_time),
+ ATTR_LIST(gc_idle),
NULL,
};
OpenPOWER on IntegriCloud