summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache
diff options
context:
space:
mode:
authorNicholas Swenson <nks@daterainc.com>2013-12-12 21:53:28 +0100
committerKent Overstreet <kmo@daterainc.com>2014-01-29 22:06:42 +0100
commite3b4825b85eab879b618af6ea18529ca7ab9a64f (patch)
tree910d46f5e4dd3ce287ac1b2245107e0946b2d71e /drivers/md/bcache
parentbcache: Minor fixes from kbuild robot (diff)
downloadlinux-e3b4825b85eab879b618af6ea18529ca7ab9a64f.tar.xz
linux-e3b4825b85eab879b618af6ea18529ca7ab9a64f.zip
bcache: bugfix - gc thread now gets woken when cache is full
Signed-off-by: Nicholas Swenson <nks@daterainc.com>
Diffstat (limited to 'drivers/md/bcache')
-rw-r--r--drivers/md/bcache/request.c6
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)
struct data_insert_op *op = container_of(cl, struct data_insert_op, cl);
struct bio *bio = op->bio, *n;
- if (op->bypass)
- return bch_data_invalidate(cl);
-
if (atomic_sub_return(bio_sectors(bio), &op->c->sectors_to_gc) < 0) {
set_gc_sectors(op->c);
wake_up_gc(op->c);
}
+ if (op->bypass)
+ return bch_data_invalidate(cl);
+
/*
* Journal writes are marked REQ_FLUSH; if the original write was a
* flush, it'll wait on the journal write.