summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2018-05-07 14:22:40 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2018-05-31 11:31:51 -0700
commit5b0e95398e2bcc18e871758221cc712be4a0a39a (patch)
tree742796c086e1192d1ec64c9c5c82b8ae59d50239 /fs/f2fs/f2fs.h
parent107a805de87ec071dab602071c14e67b98b0c519 (diff)
downloadlinux-5b0e95398e2bcc18e871758221cc712be4a0a39a.tar.bz2
f2fs: introduce sbi->gc_mode to determine the policy
This is to avoid sbi->gc_thread pointer access. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 24eab9622ad1..72b9cd71d2fc 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1067,6 +1067,13 @@ enum {
};
enum {
+ GC_NORMAL,
+ GC_IDLE_CB,
+ GC_IDLE_GREEDY,
+ GC_URGENT,
+};
+
+enum {
WHINT_MODE_OFF, /* not pass down write hints */
WHINT_MODE_USER, /* try to pass down hints given by users */
WHINT_MODE_FS, /* pass down hints with F2FS policy */
@@ -1197,6 +1204,7 @@ struct f2fs_sb_info {
struct mutex gc_mutex; /* mutex for GC */
struct f2fs_gc_kthread *gc_thread; /* GC thread */
unsigned int cur_victim_sec; /* current victim section num */
+ unsigned int gc_mode; /* current GC state */
/* threshold for gc trials on pinned files */
u64 gc_pin_file_threshold;