]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
f2fs: wake up gc thread immediately when gc_urgent is set
authorSheng Yong <shengyong1@huawei.com>
Sun, 5 Aug 2018 04:45:35 +0000 (12:45 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 13 Aug 2018 17:48:17 +0000 (10:48 -0700)
Fixes: 5b0e95398e2b ("f2fs: introduce sbi->gc_mode to determine the policy")
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/sysfs.c

index f22782a0defe6bc5e52aa13b2f206f1287516afa..cd2e030e47b88db5bb0a8d8dea2c10675efb1da9 100644 (file)
@@ -253,6 +253,7 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
                if (t >= 1) {
                        sbi->gc_mode = GC_URGENT;
                        if (sbi->gc_thread) {
+                               sbi->gc_thread->gc_wake = 1;
                                wake_up_interruptible_all(
                                        &sbi->gc_thread->gc_wait_queue_head);
                                wake_up_discard_thread(sbi, true);