aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/request.c
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2013-06-26 20:25:38 -0400
committerKent Overstreet <kmo@daterainc.com>2013-07-01 17:42:47 -0400
commite49c7c374e7aacd1f04ecbc21d9dbbeeea4a77d6 (patch)
tree3382c6a5512878494e9dfda787e142c3cddae470 /drivers/md/bcache/request.c
parentcecd628d9a9966ed0af1237df5cc5818945fe9f2 (diff)
bcache: FUA fixes
Journal writes need to be marked FUA, not just REQ_FLUSH. And btree node writes have... weird ordering requirements. Signed-off-by: Kent Overstreet <koverstreet@google.com>
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 17bd59704eba..bcdf1f782c3e 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -1035,8 +1035,19 @@ static void request_write(struct cached_dev *dc, struct search *s)
1035 1035
1036 closure_bio_submit(bio, cl, s->d); 1036 closure_bio_submit(bio, cl, s->d);
1037 } else { 1037 } else {
1038 s->op.cache_bio = bio;
1039 bch_writeback_add(dc); 1038 bch_writeback_add(dc);
1039
1040 if (s->op.flush_journal) {
1041 /* Also need to send a flush to the backing device */
1042 s->op.cache_bio = bio_clone_bioset(bio, GFP_NOIO,
1043 dc->disk.bio_split);
1044
1045 bio->bi_size = 0;
1046 bio->bi_vcnt = 0;
1047 closure_bio_submit(bio, cl, s->d);
1048 } else {
1049 s->op.cache_bio = bio;
1050 }
1040 } 1051 }
1041out: 1052out:
1042 closure_call(&s->op.cl, bch_insert_data, NULL, cl); 1053 closure_call(&s->op.cl, bch_insert_data, NULL, cl);