diff options
author | Kiyoshi Ueda <k-ueda@ct.jp.nec.com> | 2009-12-10 18:52:14 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-12-10 18:52:14 -0500 |
commit | 598de40947909e6b948569710383661ecc0ddc8e (patch) | |
tree | 05d342fb20877b9c8944ba9309f46f62094ef021 | |
parent | 90abb8c4cec8f0aa4ce58790542e3cf13071601a (diff) |
dm: use clone in map_request function
This patch changes the argument of map_request() to clone request
from original request. No functional change.
This patch is a preparation for PATCH 9, which needs to use
map_request() for clones sharing an original barrier request.
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
-rw-r--r-- | drivers/md/dm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 73b89afd6565..cf0b455b21ef 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -1495,11 +1495,10 @@ static int dm_prep_fn(struct request_queue *q, struct request *rq) | |||
1495 | return BLKPREP_OK; | 1495 | return BLKPREP_OK; |
1496 | } | 1496 | } |
1497 | 1497 | ||
1498 | static void map_request(struct dm_target *ti, struct request *rq, | 1498 | static void map_request(struct dm_target *ti, struct request *clone, |
1499 | struct mapped_device *md) | 1499 | struct mapped_device *md) |
1500 | { | 1500 | { |
1501 | int r; | 1501 | int r; |
1502 | struct request *clone = rq->special; | ||
1503 | struct dm_rq_target_io *tio = clone->end_io_data; | 1502 | struct dm_rq_target_io *tio = clone->end_io_data; |
1504 | 1503 | ||
1505 | /* | 1504 | /* |
@@ -1576,7 +1575,7 @@ static void dm_request_fn(struct request_queue *q) | |||
1576 | 1575 | ||
1577 | blk_start_request(rq); | 1576 | blk_start_request(rq); |
1578 | spin_unlock(q->queue_lock); | 1577 | spin_unlock(q->queue_lock); |
1579 | map_request(ti, rq, md); | 1578 | map_request(ti, rq->special, md); |
1580 | spin_lock_irq(q->queue_lock); | 1579 | spin_lock_irq(q->queue_lock); |
1581 | } | 1580 | } |
1582 | 1581 | ||