aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/bcache/request.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-29 18:40:17 +0100
committerMark Brown <broonie@linaro.org>2013-08-29 18:40:17 +0100
commit965abff8d8accdffc4af1b11fcf580e83031330a (patch)
treeae81d9fa54daf543115f4bb791367b94707ee0ae /drivers/md/bcache/request.c
parentf04d4ffdd38dff05670ae34ca334276828012180 (diff)
parent8bf3379a74bc9132751bfa685bad2da318fd59d7 (diff)
Merge tag 'v3.10.10' into linux-linaro-lsk
This is the 3.10.10 stable release
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r--drivers/md/bcache/request.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index 2f36743ce70..afb9a998a73 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -1053,9 +1053,20 @@ static void request_write(struct cached_dev *dc, struct search *s)
trace_bcache_writethrough(s->orig_bio);
closure_bio_submit(bio, cl, s->d);
} else {
- s->op.cache_bio = bio;
trace_bcache_writeback(s->orig_bio);
bch_writeback_add(dc, bio_sectors(bio));
+
+ if (s->op.flush_journal) {
+ /* Also need to send a flush to the backing device */
+ s->op.cache_bio = bio_clone_bioset(bio, GFP_NOIO,
+ dc->disk.bio_split);
+
+ bio->bi_size = 0;
+ bio->bi_vcnt = 0;
+ closure_bio_submit(bio, cl, s->d);
+ } else {
+ s->op.cache_bio = bio;
+ }
}
out:
closure_call(&s->op.cl, bch_insert_data, NULL, cl);