diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-08-15 21:27:19 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-08-29 10:02:47 -0700 |
commit | 5f656541ff6e4f58b4ab5b4ae59badb97a9ff749 (patch) | |
tree | 21b52814f7f3b22ae9752b30bed7f28dd6abb455 /fs/f2fs/segment.c | |
parent | 969d1b180d987c2be02de890d0fff0f66a0e80de (diff) | |
download | op-kernel-dev-5f656541ff6e4f58b4ab5b4ae59badb97a9ff749.zip op-kernel-dev-5f656541ff6e4f58b4ab5b4ae59badb97a9ff749.tar.gz |
f2fs: issue discard commands if gc_urgent is set
It's time to issue all the discard commands, if user sets the idle time.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 1387925..e3922f9 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -21,6 +21,7 @@ #include "f2fs.h" #include "segment.h" #include "node.h" +#include "gc.h" #include "trace.h" #include <trace/events/f2fs.h> @@ -1194,8 +1195,11 @@ static int issue_discard_thread(void *data) if (kthread_should_stop()) return 0; - if (dcc->discard_wake) + if (dcc->discard_wake) { dcc->discard_wake = 0; + if (sbi->gc_thread && sbi->gc_thread->gc_urgent) + mark_discard_range_all(sbi); + } sb_start_intwrite(sbi->sb); |