diff options
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/bcache/request.c | 8 | ||||
-rw-r--r-- | drivers/md/bcache/super.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index b6e74d3c8faf..786a1a4f74d8 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c | |||
@@ -488,6 +488,12 @@ static void bch_insert_data_loop(struct closure *cl) | |||
488 | bch_queue_gc(op->c); | 488 | bch_queue_gc(op->c); |
489 | } | 489 | } |
490 | 490 | ||
491 | /* | ||
492 | * Journal writes are marked REQ_FLUSH; if the original write was a | ||
493 | * flush, it'll wait on the journal write. | ||
494 | */ | ||
495 | bio->bi_rw &= ~(REQ_FLUSH|REQ_FUA); | ||
496 | |||
491 | do { | 497 | do { |
492 | unsigned i; | 498 | unsigned i; |
493 | struct bkey *k; | 499 | struct bkey *k; |
@@ -710,7 +716,7 @@ static struct search *search_alloc(struct bio *bio, struct bcache_device *d) | |||
710 | s->task = current; | 716 | s->task = current; |
711 | s->orig_bio = bio; | 717 | s->orig_bio = bio; |
712 | s->write = (bio->bi_rw & REQ_WRITE) != 0; | 718 | s->write = (bio->bi_rw & REQ_WRITE) != 0; |
713 | s->op.flush_journal = (bio->bi_rw & REQ_FLUSH) != 0; | 719 | s->op.flush_journal = (bio->bi_rw & (REQ_FLUSH|REQ_FUA)) != 0; |
714 | s->op.skip = (bio->bi_rw & REQ_DISCARD) != 0; | 720 | s->op.skip = (bio->bi_rw & REQ_DISCARD) != 0; |
715 | s->recoverable = 1; | 721 | s->recoverable = 1; |
716 | s->start_time = jiffies; | 722 | s->start_time = jiffies; |
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index cff2d182dfb0..728fdc673f31 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c | |||
@@ -806,6 +806,8 @@ static int bcache_device_init(struct bcache_device *d, unsigned block_size, | |||
806 | set_bit(QUEUE_FLAG_NONROT, &d->disk->queue->queue_flags); | 806 | set_bit(QUEUE_FLAG_NONROT, &d->disk->queue->queue_flags); |
807 | set_bit(QUEUE_FLAG_DISCARD, &d->disk->queue->queue_flags); | 807 | set_bit(QUEUE_FLAG_DISCARD, &d->disk->queue->queue_flags); |
808 | 808 | ||
809 | blk_queue_flush(q, REQ_FLUSH|REQ_FUA); | ||
810 | |||
809 | return 0; | 811 | return 0; |
810 | } | 812 | } |
811 | 813 | ||