diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-29 18:40:30 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-29 18:40:30 +0100 |
commit | 72bce45fdecab65936f1e466c5c5107e48f8251e (patch) | |
tree | e5009748ab6136465c812860b7913d06098ed520 /drivers/md/bcache/request.c | |
parent | 0d0c6fddf052ca1e5324297420ed587a95b7be82 (diff) | |
parent | 965abff8d8accdffc4af1b11fcf580e83031330a (diff) |
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-androidlsk-android-13.08
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r-- | drivers/md/bcache/request.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 2f36743ce708..afb9a998a737 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); |