diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2012-12-21 15:23:39 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2012-12-21 15:23:39 -0500 |
commit | ddbd658f6446a35e4d6ba84812fd71023320cae2 (patch) | |
tree | 6c5bf9fd1cab10d20c21eb8582a5cc73f1bccc85 /drivers/md/dm-stripe.c | |
parent | 42bc954f2a4525c9034667dedc9bd1c342208013 (diff) |
dm: move target request nr to dm_target_io
This patch moves target_request_nr from map_info to dm_target_io and
makes it accessible with dm_bio_get_target_request_nr.
This patch is a preparation for the next patch that removes map_info.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-stripe.c')
-rw-r--r-- | drivers/md/dm-stripe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index e2f876539743..4e7ba82146c0 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c | |||
@@ -279,13 +279,13 @@ static int stripe_map(struct dm_target *ti, struct bio *bio, | |||
279 | unsigned target_request_nr; | 279 | unsigned target_request_nr; |
280 | 280 | ||
281 | if (bio->bi_rw & REQ_FLUSH) { | 281 | if (bio->bi_rw & REQ_FLUSH) { |
282 | target_request_nr = map_context->target_request_nr; | 282 | target_request_nr = dm_bio_get_target_request_nr(bio); |
283 | BUG_ON(target_request_nr >= sc->stripes); | 283 | BUG_ON(target_request_nr >= sc->stripes); |
284 | bio->bi_bdev = sc->stripe[target_request_nr].dev->bdev; | 284 | bio->bi_bdev = sc->stripe[target_request_nr].dev->bdev; |
285 | return DM_MAPIO_REMAPPED; | 285 | return DM_MAPIO_REMAPPED; |
286 | } | 286 | } |
287 | if (unlikely(bio->bi_rw & REQ_DISCARD)) { | 287 | if (unlikely(bio->bi_rw & REQ_DISCARD)) { |
288 | target_request_nr = map_context->target_request_nr; | 288 | target_request_nr = dm_bio_get_target_request_nr(bio); |
289 | BUG_ON(target_request_nr >= sc->stripes); | 289 | BUG_ON(target_request_nr >= sc->stripes); |
290 | return stripe_map_discard(sc, bio, target_request_nr); | 290 | return stripe_map_discard(sc, bio, target_request_nr); |
291 | } | 291 | } |