if (!test_bit(R10BIO_Uptodate, &r10_bio->state))
                bio->bi_status = BLK_STS_IOERR;
 
+       if (blk_queue_io_stat(bio->bi_bdev->bd_disk->queue))
+               bio_end_io_acct(bio, r10_bio->start_time);
        bio_endio(bio);
        /*
         * Wake up any possible resync thread that waits for the device
        }
        slot = r10_bio->read_slot;
 
+       if (blk_queue_io_stat(bio->bi_bdev->bd_disk->queue))
+               r10_bio->start_time = bio_start_io_acct(bio);
        read_bio = bio_clone_fast(bio, gfp, &mddev->bio_set);
 
        r10_bio->devs[slot].bio = read_bio;
                r10_bio->master_bio = bio;
        }
 
+       if (blk_queue_io_stat(bio->bi_bdev->bd_disk->queue))
+               r10_bio->start_time = bio_start_io_acct(bio);
        atomic_set(&r10_bio->remaining, 1);
        md_bitmap_startwrite(mddev->bitmap, r10_bio->sector, r10_bio->sectors, 0);