diff options
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm.c | 1 | ||||
-rw-r--r-- | drivers/md/raid5.c | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 7e469260fe5e..9a0bdad9ad8f 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -611,6 +611,7 @@ static void dec_pending(struct dm_io *io, int error) | |||
611 | queue_io(md, bio); | 611 | queue_io(md, bio); |
612 | } else { | 612 | } else { |
613 | /* done with normal IO or empty flush */ | 613 | /* done with normal IO or empty flush */ |
614 | trace_block_bio_complete(md->queue, bio, io_error); | ||
614 | bio_endio(bio, io_error); | 615 | bio_endio(bio, io_error); |
615 | } | 616 | } |
616 | } | 617 | } |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 24909eb13fec..f4e87bfc7567 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -184,6 +184,8 @@ static void return_io(struct bio *return_bi) | |||
184 | return_bi = bi->bi_next; | 184 | return_bi = bi->bi_next; |
185 | bi->bi_next = NULL; | 185 | bi->bi_next = NULL; |
186 | bi->bi_size = 0; | 186 | bi->bi_size = 0; |
187 | trace_block_bio_complete(bdev_get_queue(bi->bi_bdev), | ||
188 | bi, 0); | ||
187 | bio_endio(bi, 0); | 189 | bio_endio(bi, 0); |
188 | bi = return_bi; | 190 | bi = return_bi; |
189 | } | 191 | } |
@@ -3914,6 +3916,8 @@ static void raid5_align_endio(struct bio *bi, int error) | |||
3914 | rdev_dec_pending(rdev, conf->mddev); | 3916 | rdev_dec_pending(rdev, conf->mddev); |
3915 | 3917 | ||
3916 | if (!error && uptodate) { | 3918 | if (!error && uptodate) { |
3919 | trace_block_bio_complete(bdev_get_queue(raid_bi->bi_bdev), | ||
3920 | raid_bi, 0); | ||
3917 | bio_endio(raid_bi, 0); | 3921 | bio_endio(raid_bi, 0); |
3918 | if (atomic_dec_and_test(&conf->active_aligned_reads)) | 3922 | if (atomic_dec_and_test(&conf->active_aligned_reads)) |
3919 | wake_up(&conf->wait_for_stripe); | 3923 | wake_up(&conf->wait_for_stripe); |
@@ -4382,6 +4386,8 @@ static void make_request(struct mddev *mddev, struct bio * bi) | |||
4382 | if ( rw == WRITE ) | 4386 | if ( rw == WRITE ) |
4383 | md_write_end(mddev); | 4387 | md_write_end(mddev); |
4384 | 4388 | ||
4389 | trace_block_bio_complete(bdev_get_queue(bi->bi_bdev), | ||
4390 | bi, 0); | ||
4385 | bio_endio(bi, 0); | 4391 | bio_endio(bi, 0); |
4386 | } | 4392 | } |
4387 | } | 4393 | } |
@@ -4758,8 +4764,11 @@ static int retry_aligned_read(struct r5conf *conf, struct bio *raid_bio) | |||
4758 | handled++; | 4764 | handled++; |
4759 | } | 4765 | } |
4760 | remaining = raid5_dec_bi_active_stripes(raid_bio); | 4766 | remaining = raid5_dec_bi_active_stripes(raid_bio); |
4761 | if (remaining == 0) | 4767 | if (remaining == 0) { |
4768 | trace_block_bio_complete(bdev_get_queue(raid_bio->bi_bdev), | ||
4769 | raid_bio, 0); | ||
4762 | bio_endio(raid_bio, 0); | 4770 | bio_endio(raid_bio, 0); |
4771 | } | ||
4763 | if (atomic_dec_and_test(&conf->active_aligned_reads)) | 4772 | if (atomic_dec_and_test(&conf->active_aligned_reads)) |
4764 | wake_up(&conf->wait_for_stripe); | 4773 | wake_up(&conf->wait_for_stripe); |
4765 | return handled; | 4774 | return handled; |