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.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/block/osdblk.c b/drivers/block/osdblk.c
index 6cd8b705b11b..2284b4f05c62 100644
--- a/drivers/block/osdblk.c
+++ b/drivers/block/osdblk.c
@@ -310,7 +310,8 @@ static void osdblk_rq_fn(struct request_queue *q)
310 break; 310 break;
311 311
312 /* filter out block requests we don't understand */ 312 /* filter out block requests we don't understand */
313 if (!blk_fs_request(rq) && !blk_barrier_rq(rq)) { 313 if (rq->cmd_type != REQ_TYPE_FS &&
314 !(rq->cmd_flags & REQ_HARDBARRIER)) {
314 blk_end_request_all(rq, 0); 315 blk_end_request_all(rq, 0);
315 continue; 316 continue;
316 } 317 }
@@ -322,7 +323,7 @@ static void osdblk_rq_fn(struct request_queue *q)
322 * driver-specific, etc. 323 * driver-specific, etc.
323 */ 324 */
324 325
325 do_flush = (rq->special == (void *) 0xdeadbeefUL); 326 do_flush = rq->cmd_flags & REQ_FLUSH;
326 do_write = (rq_data_dir(rq) == WRITE); 327 do_write = (rq_data_dir(rq) == WRITE);
327 328
328 if (!do_flush) { /* osd_flush does not use a bio */ 329 if (!do_flush) { /* osd_flush does not use a bio */
@@ -379,14 +380,6 @@ static void osdblk_rq_fn(struct request_queue *q)
379 } 380 }
380} 381}
381 382
382static void osdblk_prepare_flush(struct request_queue *q, struct request *rq)
383{
384 /* add driver-specific marker, to indicate that this request
385 * is a flush command
386 */
387 rq->special = (void *) 0xdeadbeefUL;
388}
389
390static void osdblk_free_disk(struct osdblk_device *osdev) 383static void osdblk_free_disk(struct osdblk_device *osdev)
391{ 384{
392 struct gendisk *disk = osdev->disk; 385 struct gendisk *disk = osdev->disk;
@@ -446,7 +439,7 @@ static int osdblk_init_disk(struct osdblk_device *osdev)
446 blk_queue_stack_limits(q, osd_request_queue(osdev->osd)); 439 blk_queue_stack_limits(q, osd_request_queue(osdev->osd));
447 440
448 blk_queue_prep_rq(q, blk_queue_start_tag); 441 blk_queue_prep_rq(q, blk_queue_start_tag);
449 blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH, osdblk_prepare_flush); 442 blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH);
450 443
451 disk->queue = q; 444 disk->queue = q;
452 445