aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/osdblk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/osdblk.c')
-rw-r--r--drivers/block/osdblk.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/block/osdblk.c b/drivers/block/osdblk.c
index 819002ba3433..9639565a9a6a 100644
--- a/drivers/block/osdblk.c
+++ b/drivers/block/osdblk.c
@@ -323,7 +323,7 @@ static void osdblk_rq_fn(struct request_queue *q)
323 * driver-specific, etc. 323 * driver-specific, etc.
324 */ 324 */
325 325
326 do_flush = (rq->special == (void *) 0xdeadbeefUL); 326 do_flush = rq->cmd_flags & REQ_FLUSH;
327 do_write = (rq_data_dir(rq) == WRITE); 327 do_write = (rq_data_dir(rq) == WRITE);
328 328
329 if (!do_flush) { /* osd_flush does not use a bio */ 329 if (!do_flush) { /* osd_flush does not use a bio */
@@ -380,14 +380,6 @@ static void osdblk_rq_fn(struct request_queue *q)
380 } 380 }
381} 381}
382 382
383static void osdblk_prepare_flush(struct request_queue *q, struct request *rq)
384{
385 /* add driver-specific marker, to indicate that this request
386 * is a flush command
387 */
388 rq->special = (void *) 0xdeadbeefUL;
389}
390
391static void osdblk_free_disk(struct osdblk_device *osdev) 383static void osdblk_free_disk(struct osdblk_device *osdev)
392{ 384{
393 struct gendisk *disk = osdev->disk; 385 struct gendisk *disk = osdev->disk;
@@ -447,7 +439,7 @@ static int osdblk_init_disk(struct osdblk_device *osdev)
447 blk_queue_stack_limits(q, osd_request_queue(osdev->osd)); 439 blk_queue_stack_limits(q, osd_request_queue(osdev->osd));
448 440
449 blk_queue_prep_rq(q, blk_queue_start_tag); 441 blk_queue_prep_rq(q, blk_queue_start_tag);
450 blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH, osdblk_prepare_flush); 442 blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH, NULL);
451 443
452 disk->queue = q; 444 disk->queue = q;
453 445