Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208252
b: refs/heads/master
c: 144d6ed
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and Jens Axboe committed Aug 7, 2010
1 parent 2f7db06 commit 7807970
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98d8c8f40ed72d997e50bc107a5cc1a6cee19e76
refs/heads/master: 144d6ed551ce430084489b198826c89bac5680dc
16 changes: 2 additions & 14 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,20 +1455,9 @@ static int dm_request(struct request_queue *q, struct bio *bio)
return _dm_request(q, bio);
}

/*
* Mark this request as flush request, so that dm_request_fn() can
* recognize.
*/
static void dm_rq_prepare_flush(struct request_queue *q, struct request *rq)
{
rq->cmd_type = REQ_TYPE_LINUX_BLOCK;
rq->cmd[0] = REQ_LB_OP_FLUSH;
}

static bool dm_rq_is_flush_request(struct request *rq)
{
if (rq->cmd_type == REQ_TYPE_LINUX_BLOCK &&
rq->cmd[0] == REQ_LB_OP_FLUSH)
if (rq->cmd_flags & REQ_FLUSH)
return true;
else
return false;
Expand Down Expand Up @@ -1912,8 +1901,7 @@ static struct mapped_device *alloc_dev(int minor)
blk_queue_softirq_done(md->queue, dm_softirq_done);
blk_queue_prep_rq(md->queue, dm_prep_fn);
blk_queue_lld_busy(md->queue, dm_lld_busy);
blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN_FLUSH,
dm_rq_prepare_flush);
blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN_FLUSH, NULL);

md->disk = alloc_disk(1);
if (!md->disk)
Expand Down

0 comments on commit 7807970

Please sign in to comment.