diff options
author | Kent Overstreet <koverstreet@google.com> | 2013-06-27 00:25:38 (GMT) |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-07-01 21:42:47 (GMT) |
commit | e49c7c374e7aacd1f04ecbc21d9dbbeeea4a77d6 (patch) | |
tree | 3382c6a5512878494e9dfda787e142c3cddae470 /drivers/md/bcache/request.c | |
parent | cecd628d9a9966ed0af1237df5cc5818945fe9f2 (diff) | |
download | linux-e49c7c374e7aacd1f04ecbc21d9dbbeeea4a77d6.tar.xz |
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.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 17bd597..bcdf1f7 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) closure_bio_submit(bio, cl, s->d); } else { - s->op.cache_bio = bio; bch_writeback_add(dc); + + 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); |