aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/alloc.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-10-24 20:19:26 -0400
committerKent Overstreet <kmo@daterainc.com>2013-11-11 00:56:04 -0500
commit72a44517f3ca3725dc86081d105457df46448679 (patch)
tree247b859af6c4377ab1ea90fd1fd4e64278ccdbbd /drivers/md/bcache/alloc.c
parent35fcd848d72683141052aa9880542461577f2dbe (diff)
bcache: Convert gc to a kthread
We needed a dedicated rescuer workqueue for gc anyways... and gc was conceptually a dedicated thread, just one that wasn't running all the time. Switch it to a dedicated thread to make the code a bit more straightforward. Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/alloc.c')
-rw-r--r--drivers/md/bcache/alloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/bcache/alloc.c b/drivers/md/bcache/alloc.c
index 1b64e662e81b..b9bd5866055d 100644
--- a/drivers/md/bcache/alloc.c
+++ b/drivers/md/bcache/alloc.c
@@ -210,7 +210,7 @@ static void invalidate_buckets_lru(struct cache *ca)
210 * multiple times when it can't do anything 210 * multiple times when it can't do anything
211 */ 211 */
212 ca->invalidate_needs_gc = 1; 212 ca->invalidate_needs_gc = 1;
213 bch_queue_gc(ca->set); 213 wake_up_gc(ca->set);
214 return; 214 return;
215 } 215 }
216 216
@@ -235,7 +235,7 @@ static void invalidate_buckets_fifo(struct cache *ca)
235 235
236 if (++checked >= ca->sb.nbuckets) { 236 if (++checked >= ca->sb.nbuckets) {
237 ca->invalidate_needs_gc = 1; 237 ca->invalidate_needs_gc = 1;
238 bch_queue_gc(ca->set); 238 wake_up_gc(ca->set);
239 return; 239 return;
240 } 240 }
241 } 241 }
@@ -260,7 +260,7 @@ static void invalidate_buckets_random(struct cache *ca)
260 260
261 if (++checked >= ca->sb.nbuckets / 2) { 261 if (++checked >= ca->sb.nbuckets / 2) {
262 ca->invalidate_needs_gc = 1; 262 ca->invalidate_needs_gc = 1;
263 bch_queue_gc(ca->set); 263 wake_up_gc(ca->set);
264 return; 264 return;
265 } 265 }
266 } 266 }