diff options
author | Nicholas Swenson <nks@daterainc.com> | 2013-12-12 15:53:28 -0500 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2014-01-29 16:06:42 -0500 |
commit | e3b4825b85eab879b618af6ea18529ca7ab9a64f (patch) | |
tree | 910d46f5e4dd3ce287ac1b2245107e0946b2d71e /drivers/md | |
parent | 3572324af0f4ef877545e5a17bd3e788551f166a (diff) |
bcache: bugfix - gc thread now gets woken when cache is full
Signed-off-by: Nicholas Swenson <nks@daterainc.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/bcache/request.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index fcdb59f9ca91..675229b93718 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c | |||
@@ -354,14 +354,14 @@ static void bch_data_insert_start(struct closure *cl) | |||
354 | struct data_insert_op *op = container_of(cl, struct data_insert_op, cl); | 354 | struct data_insert_op *op = container_of(cl, struct data_insert_op, cl); |
355 | struct bio *bio = op->bio, *n; | 355 | struct bio *bio = op->bio, *n; |
356 | 356 | ||
357 | if (op->bypass) | ||
358 | return bch_data_invalidate(cl); | ||
359 | |||
360 | if (atomic_sub_return(bio_sectors(bio), &op->c->sectors_to_gc) < 0) { | 357 | if (atomic_sub_return(bio_sectors(bio), &op->c->sectors_to_gc) < 0) { |
361 | set_gc_sectors(op->c); | 358 | set_gc_sectors(op->c); |
362 | wake_up_gc(op->c); | 359 | wake_up_gc(op->c); |
363 | } | 360 | } |
364 | 361 | ||
362 | if (op->bypass) | ||
363 | return bch_data_invalidate(cl); | ||
364 | |||
365 | /* | 365 | /* |
366 | * Journal writes are marked REQ_FLUSH; if the original write was a | 366 | * Journal writes are marked REQ_FLUSH; if the original write was a |
367 | * flush, it'll wait on the journal write. | 367 | * flush, it'll wait on the journal write. |