diff options
author | Gleb Natapov <gleb@redhat.com> | 2013-10-17 10:04:47 -0400 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-10-17 10:41:49 -0400 |
commit | 13acfd5715144518232d8e29acf7c76ef1b089d8 (patch) | |
tree | 093c4311a737210bbdd3d1919f8193cb5f017241 /drivers/md/bcache/request.c | |
parent | d570142674890fe10b3d7d86aa105e3dfce1ddfa (diff) | |
parent | 34ec4de42be5006abdd8d0c08b306ffaa64d0d5d (diff) |
Powerpc KVM work is based on a commit after rc4.
Merging master into next to satisfy the dependencies.
Conflicts:
arch/arm/kvm/reset.c
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r-- | drivers/md/bcache/request.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 786a1a4f74d8..b6a74bcbb08f 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c | |||
@@ -996,17 +996,19 @@ static void request_write(struct cached_dev *dc, struct search *s) | |||
996 | closure_bio_submit(bio, cl, s->d); | 996 | closure_bio_submit(bio, cl, s->d); |
997 | } else { | 997 | } else { |
998 | bch_writeback_add(dc); | 998 | bch_writeback_add(dc); |
999 | s->op.cache_bio = bio; | ||
999 | 1000 | ||
1000 | if (s->op.flush_journal) { | 1001 | if (bio->bi_rw & REQ_FLUSH) { |
1001 | /* Also need to send a flush to the backing device */ | 1002 | /* Also need to send a flush to the backing device */ |
1002 | s->op.cache_bio = bio_clone_bioset(bio, GFP_NOIO, | 1003 | struct bio *flush = bio_alloc_bioset(0, GFP_NOIO, |
1003 | dc->disk.bio_split); | 1004 | dc->disk.bio_split); |
1004 | 1005 | ||
1005 | bio->bi_size = 0; | 1006 | flush->bi_rw = WRITE_FLUSH; |
1006 | bio->bi_vcnt = 0; | 1007 | flush->bi_bdev = bio->bi_bdev; |
1007 | closure_bio_submit(bio, cl, s->d); | 1008 | flush->bi_end_io = request_endio; |
1008 | } else { | 1009 | flush->bi_private = cl; |
1009 | s->op.cache_bio = bio; | 1010 | |
1011 | closure_bio_submit(flush, cl, s->d); | ||
1010 | } | 1012 | } |
1011 | } | 1013 | } |
1012 | out: | 1014 | out: |