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>
このコミットが含まれているのは:
Kent Overstreet
2013-06-26 17:25:38 -07:00
committed by Kent Overstreet
コミット e49c7c374e
3個のファイルの変更35行の追加5行の削除

ファイルの表示

@@ -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);