Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59282
b: refs/heads/master
c: 596f138
h: refs/heads/master
v: v3
  • Loading branch information
Jun'ichi Nomura authored and Linus Torvalds committed Jul 12, 2007
1 parent 70f8b62 commit c94a63d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: c95bc206da4bc9838bad826883f8f461a972e441
refs/heads/master: 596f138eede0c113aa655937c8be85fc15ccd61c
5 changes: 4 additions & 1 deletion trunk/drivers/md/dm-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,10 @@ static void do_region(int rw, unsigned int region, struct io_region *where,
* bvec for bio_get/set_region() and decrement bi_max_vecs
* to hide it from bio_add_page().
*/
num_bvecs = (remaining / (PAGE_SIZE >> SECTOR_SHIFT)) + 2;
num_bvecs = dm_sector_div_up(remaining,
(PAGE_SIZE >> SECTOR_SHIFT));
num_bvecs = 1 + min_t(int, bio_get_nr_vecs(where->bdev),
num_bvecs);
bio = bio_alloc_bioset(GFP_NOIO, num_bvecs, io->client->bios);
bio->bi_sector = where->sector + (where->count - remaining);
bio->bi_bdev = where->bdev;
Expand Down

0 comments on commit c94a63d

Please sign in to comment.