diff options
author | Christoph Hellwig <hch@lst.de> | 2017-01-27 10:30:47 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-27 11:01:45 -0500 |
commit | f73f44eb00cb136990cfb7d40e436c13d7669ec8 (patch) | |
tree | e0a5cc16d9373eec0346538fe073f0c0b08133bf /drivers/md/bcache/request.c | |
parent | c13660a08c8b3bb49def4374bfd414aaaa564662 (diff) |
block: add a op_is_flush helper
This centralizes the checks for bios that needs to be go into the flush
state machine.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r-- | drivers/md/bcache/request.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 76d20875503c..01035e718c1c 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c | |||
@@ -666,7 +666,7 @@ static inline struct search *search_alloc(struct bio *bio, | |||
666 | s->iop.write_prio = 0; | 666 | s->iop.write_prio = 0; |
667 | s->iop.error = 0; | 667 | s->iop.error = 0; |
668 | s->iop.flags = 0; | 668 | s->iop.flags = 0; |
669 | s->iop.flush_journal = (bio->bi_opf & (REQ_PREFLUSH|REQ_FUA)) != 0; | 669 | s->iop.flush_journal = op_is_flush(bio->bi_opf); |
670 | s->iop.wq = bcache_wq; | 670 | s->iop.wq = bcache_wq; |
671 | 671 | ||
672 | return s; | 672 | return s; |