Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209167
b: refs/heads/master
c: b441a26
h: refs/heads/master
i:
  209165: 30a3c52
  209163: cf7b0eb
  209159: c6f268b
  209151: b53da4c
v: v3
  • Loading branch information
Alasdair G Kergon committed Aug 12, 2010
1 parent 4c9f3f1 commit 8151a19
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 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: 56a67df766039666f61fb15b079f713e44a735ae
refs/heads/master: b441a262e7d1c56fbe21794c91d7a9c83809113f
4 changes: 2 additions & 2 deletions trunk/drivers/md/dm-crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ static int crypt_map(struct dm_target *ti, struct bio *bio,
return DM_MAPIO_REMAPPED;
}

io = crypt_io_alloc(ti, bio, bio->bi_sector - ti->begin);
io = crypt_io_alloc(ti, bio, dm_target_offset(ti, bio->bi_sector));

if (bio_data_dir(io->base_bio) == READ)
kcryptd_queue_io(io);
Expand Down Expand Up @@ -1406,7 +1406,7 @@ static int crypt_merge(struct dm_target *ti, struct bvec_merge_data *bvm,
return max_size;

bvm->bi_bdev = cc->dev->bdev;
bvm->bi_sector = cc->start + bvm->bi_sector - ti->begin;
bvm->bi_sector = cc->start + dm_target_offset(ti, bvm->bi_sector);

return min(max_size, q->merge_bvec_fn(q, bvm, biovec));
}
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/md/dm-delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,13 @@ static int delay_map(struct dm_target *ti, struct bio *bio,
bio->bi_bdev = dc->dev_write->bdev;
if (bio_sectors(bio))
bio->bi_sector = dc->start_write +
(bio->bi_sector - ti->begin);
dm_target_offset(ti, bio->bi_sector);

return delay_bio(dc, dc->write_delay, bio);
}

bio->bi_bdev = dc->dev_read->bdev;
bio->bi_sector = dc->start_read +
(bio->bi_sector - ti->begin);
bio->bi_sector = dc->start_read + dm_target_offset(ti, bio->bi_sector);

return delay_bio(dc, dc->read_delay, bio);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static sector_t linear_map_sector(struct dm_target *ti, sector_t bi_sector)
{
struct linear_c *lc = ti->private;

return lc->start + (bi_sector - ti->begin);
return lc->start + dm_target_offset(ti, bi_sector);
}

static void linear_map_bio(struct dm_target *ti, struct bio *bio)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ static sector_t map_sector(struct mirror *m, struct bio *bio)
{
if (unlikely(!bio->bi_size))
return 0;
return m->offset + (bio->bi_sector - m->ms->ti->begin);
return m->offset + dm_target_offset(m->ms->ti, bio->bi_sector);
}

static void map_bio(struct mirror *m, struct bio *bio)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-stripe.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static int stripe_map(struct dm_target *ti, struct bio *bio,
return DM_MAPIO_REMAPPED;
}

offset = bio->bi_sector - ti->begin;
offset = dm_target_offset(ti, bio->bi_sector);
chunk = offset >> sc->chunk_shift;
stripe = sector_div(chunk, sc->stripes);

Expand Down

0 comments on commit 8151a19

Please sign in to comment.