Commit 28e18d01 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Jens Axboe

block: set REQ_TYPE_FS on flush requests

the block layer doesn't set rq->cmd_type on flush requests. By
definition, it should be REQ_TYPE_FS (the lower layers build a command
and interpret the result of it, that is, the block layer doesn't know
the details).
Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 3b06c21e
...@@ -134,6 +134,7 @@ static void queue_flush(struct request_queue *q, unsigned which) ...@@ -134,6 +134,7 @@ static void queue_flush(struct request_queue *q, unsigned which)
} }
blk_rq_init(q, rq); blk_rq_init(q, rq);
rq->cmd_type = REQ_TYPE_FS;
rq->cmd_flags = REQ_HARDBARRIER | REQ_FLUSH; rq->cmd_flags = REQ_HARDBARRIER | REQ_FLUSH;
rq->rq_disk = q->bar_rq.rq_disk; rq->rq_disk = q->bar_rq.rq_disk;
rq->end_io = end_io; rq->end_io = end_io;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment