block: set REQ_TYPE_FS on flush requests
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Fri, 9 Jul 2010 00:38:24 +0000 (09:38 +0900)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 7 Aug 2010 16:52:40 +0000 (18:52 +0200)
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: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/blk-barrier.c

index 557f69360b6a027285b2507c8ad139c8ecea31c2..d95a1440e29dab5a84fd9f3a1cf90e341c55871f 100644 (file)
@@ -134,6 +134,7 @@ static void queue_flush(struct request_queue *q, unsigned which)
        }
 
        blk_rq_init(q, rq);
+       rq->cmd_type = REQ_TYPE_FS;
        rq->cmd_flags = REQ_HARDBARRIER | REQ_FLUSH;
        rq->rq_disk = q->bar_rq.rq_disk;
        rq->end_io = end_io;