summaryrefslogtreecommitdiff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-11-12 15:00:38 +0900
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-12-23 10:18:00 +0900
commit7ac8c3b051ed3a3e71df72a7ffc44e14cc5c2bae (patch)
tree8a4f45d41c50b2f21b5bd2991ea879016c6d0fbc /fs/f2fs/super.c
parentb29555505d81e496fdbd125190c8043f3c09a83c (diff)
f2fs: add a sysfs entry to control max_discards
If frequent small discards are issued to the device, the performance would be degraded significantly. So, this patch adds a sysfs entry to control the number of discards to be issued during a checkpoint procedure. By default, f2fs does not issue any small discards, which means max_discards is zero. 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 e9aa3f79f425..a022412c66ea 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -175,6 +175,7 @@ F2FS_RW_ATTR(GC_THREAD, f2fs_gc_kthread, gc_max_sleep_time, max_sleep_time);
F2FS_RW_ATTR(GC_THREAD, f2fs_gc_kthread, gc_no_gc_sleep_time, no_gc_sleep_time);
F2FS_RW_ATTR(GC_THREAD, f2fs_gc_kthread, gc_idle, gc_idle);
F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, reclaim_segments, rec_prefree_segments);
+F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, max_small_discards, max_discards);
#define ATTR_LIST(name) (&f2fs_attr_##name.attr)
static struct attribute *f2fs_attrs[] = {
@@ -183,6 +184,7 @@ static struct attribute *f2fs_attrs[] = {
ATTR_LIST(gc_no_gc_sleep_time),
ATTR_LIST(gc_idle),
ATTR_LIST(reclaim_segments),
+ ATTR_LIST(max_small_discards),
NULL,
};