summaryrefslogtreecommitdiff
path: root/fs/f2fs/gc.h
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2021-03-27 12:57:06 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2021-03-31 04:48:56 +0300
commit5911d2d1d1a38b26585383478bd71d9254e48bdf (patch)
treecbddc45a5994ba68705f931392f9d7051a3e9eff /fs/f2fs/gc.h
parent823d13e12b6cbaef2f6e5d63c648643e7bc094dd (diff)
downloadlinux-5911d2d1d1a38b26585383478bd71d9254e48bdf.tar.xz
f2fs: introduce gc_merge mount option
In this patch, we will add two new mount options: "gc_merge" and "nogc_merge", when background_gc is on, "gc_merge" option can be set to let background GC thread to handle foreground GC requests, it can eliminate the sluggish issue caused by slow foreground GC operation when GC is triggered from a process with limited I/O and CPU resources. Original idea is from Xiang. Signed-off-by: Gao Xiang <xiang@kernel.org> Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.h')
-rw-r--r--fs/f2fs/gc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/gc.h b/fs/f2fs/gc.h
index 0c8dae12dc51..3fe145e8e594 100644
--- a/fs/f2fs/gc.h
+++ b/fs/f2fs/gc.h
@@ -42,6 +42,12 @@ struct f2fs_gc_kthread {
/* for changing gc mode */
unsigned int gc_wake;
+
+ /* for GC_MERGE mount option */
+ wait_queue_head_t fggc_wq; /*
+ * caller of f2fs_balance_fs()
+ * will wait on this wait queue.
+ */
};
struct gc_inode_list {