Commit 598de409 authored by Kiyoshi Ueda's avatar Kiyoshi Ueda Committed by Alasdair G Kergon

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: default avatarKiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: default avatarJun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent 90abb8c4
...@@ -1495,11 +1495,10 @@ static int dm_prep_fn(struct request_queue *q, struct request *rq) ...@@ -1495,11 +1495,10 @@ static int dm_prep_fn(struct request_queue *q, struct request *rq)
return BLKPREP_OK; return BLKPREP_OK;
} }
static void map_request(struct dm_target *ti, struct request *rq, static void map_request(struct dm_target *ti, struct request *clone,
struct mapped_device *md) struct mapped_device *md)
{ {
int r; int r;
struct request *clone = rq->special;
struct dm_rq_target_io *tio = clone->end_io_data; struct dm_rq_target_io *tio = clone->end_io_data;
/* /*
...@@ -1576,7 +1575,7 @@ static void dm_request_fn(struct request_queue *q) ...@@ -1576,7 +1575,7 @@ static void dm_request_fn(struct request_queue *q)
blk_start_request(rq); blk_start_request(rq);
spin_unlock(q->queue_lock); spin_unlock(q->queue_lock);
map_request(ti, rq, md); map_request(ti, rq->special, md);
spin_lock_irq(q->queue_lock); spin_lock_irq(q->queue_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment