bcache: Advertise that flushes are supported
Whoops - bcache's flush/FUA was mostly correct, but flushes get filtered out unless we say we support them... Signed-off-by: Kent Overstreet <kmo@daterainc.com> Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
This commit is contained in:
@@ -488,6 +488,12 @@ static void bch_insert_data_loop(struct closure *cl)
|
||||
bch_queue_gc(op->c);
|
||||
}
|
||||
|
||||
/*
|
||||
* Journal writes are marked REQ_FLUSH; if the original write was a
|
||||
* flush, it'll wait on the journal write.
|
||||
*/
|
||||
bio->bi_rw &= ~(REQ_FLUSH|REQ_FUA);
|
||||
|
||||
do {
|
||||
unsigned i;
|
||||
struct bkey *k;
|
||||
@@ -710,7 +716,7 @@ static struct search *search_alloc(struct bio *bio, struct bcache_device *d)
|
||||
s->task = current;
|
||||
s->orig_bio = bio;
|
||||
s->write = (bio->bi_rw & REQ_WRITE) != 0;
|
||||
s->op.flush_journal = (bio->bi_rw & REQ_FLUSH) != 0;
|
||||
s->op.flush_journal = (bio->bi_rw & (REQ_FLUSH|REQ_FUA)) != 0;
|
||||
s->op.skip = (bio->bi_rw & REQ_DISCARD) != 0;
|
||||
s->recoverable = 1;
|
||||
s->start_time = jiffies;
|
||||
|
Reference in New Issue
Block a user