Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154254
b: refs/heads/master
c: c927259
h: refs/heads/master
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Jun 22, 2009
1 parent 28ede4f commit 7db5052
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 647c7db14ef9cacc4ccb3683e206b61f0de6dc2b
refs/heads/master: c927259e34e518d913d86f51c71b786a513f94d6
6 changes: 4 additions & 2 deletions trunk/drivers/md/dm-delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ static int delay_ctr(struct dm_target *ti, unsigned int argc, char **argv)
mutex_init(&dc->timer_lock);
atomic_set(&dc->may_delay, 1);

ti->num_flush_requests = 1;
ti->private = dc;
return 0;

Expand Down Expand Up @@ -278,8 +279,9 @@ static int delay_map(struct dm_target *ti, struct bio *bio,

if ((bio_data_dir(bio) == WRITE) && (dc->dev_write)) {
bio->bi_bdev = dc->dev_write->bdev;
bio->bi_sector = dc->start_write +
(bio->bi_sector - ti->begin);
if (bio_sectors(bio))
bio->bi_sector = dc->start_write +
(bio->bi_sector - ti->begin);

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

0 comments on commit 7db5052

Please sign in to comment.