Lines Matching refs:gc_th
30 struct f2fs_gc_kthread *gc_th = sbi->gc_thread; in gc_thread_func() local
34 wait_ms = gc_th->min_sleep_time; in gc_thread_func()
47 increase_sleep_time(gc_th, &wait_ms); in gc_thread_func()
68 increase_sleep_time(gc_th, &wait_ms); in gc_thread_func()
74 decrease_sleep_time(gc_th, &wait_ms); in gc_thread_func()
76 increase_sleep_time(gc_th, &wait_ms); in gc_thread_func()
82 wait_ms = gc_th->no_gc_sleep_time; in gc_thread_func()
93 struct f2fs_gc_kthread *gc_th; in start_gc_thread() local
97 gc_th = kmalloc(sizeof(struct f2fs_gc_kthread), GFP_KERNEL); in start_gc_thread()
98 if (!gc_th) { in start_gc_thread()
103 gc_th->min_sleep_time = DEF_GC_THREAD_MIN_SLEEP_TIME; in start_gc_thread()
104 gc_th->max_sleep_time = DEF_GC_THREAD_MAX_SLEEP_TIME; in start_gc_thread()
105 gc_th->no_gc_sleep_time = DEF_GC_THREAD_NOGC_SLEEP_TIME; in start_gc_thread()
107 gc_th->gc_idle = 0; in start_gc_thread()
109 sbi->gc_thread = gc_th; in start_gc_thread()
113 if (IS_ERR(gc_th->f2fs_gc_task)) { in start_gc_thread()
114 err = PTR_ERR(gc_th->f2fs_gc_task); in start_gc_thread()
115 kfree(gc_th); in start_gc_thread()
124 struct f2fs_gc_kthread *gc_th = sbi->gc_thread; in stop_gc_thread() local
125 if (!gc_th) in stop_gc_thread()
127 kthread_stop(gc_th->f2fs_gc_task); in stop_gc_thread()
128 kfree(gc_th); in stop_gc_thread()
132 static int select_gc_type(struct f2fs_gc_kthread *gc_th, int gc_type) in select_gc_type() argument
136 if (gc_th && gc_th->gc_idle) { in select_gc_type()
137 if (gc_th->gc_idle == 1) in select_gc_type()
139 else if (gc_th->gc_idle == 2) in select_gc_type()