diff options
Diffstat (limited to 'drivers/nvdimm/blk.c')
-rw-r--r-- | drivers/nvdimm/blk.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/nvdimm/blk.c b/drivers/nvdimm/blk.c index 5c44e067652f..96ef38ceeceb 100644 --- a/drivers/nvdimm/blk.c +++ b/drivers/nvdimm/blk.c @@ -168,8 +168,10 @@ static void nd_blk_make_request(struct request_queue *q, struct bio *bio) struct bio_integrity_payload *bip; struct nd_blk_device *blk_dev; struct bvec_iter iter; + unsigned long start; struct bio_vec bvec; int err = 0, rw; + bool do_acct; /* * bio_integrity_enabled also checks if the bio already has an @@ -185,6 +187,7 @@ static void nd_blk_make_request(struct request_queue *q, struct bio *bio) bip = bio_integrity(bio); blk_dev = disk->private_data; rw = bio_data_dir(bio); + do_acct = nd_iostat_start(bio, &start); bio_for_each_segment(bvec, bio, iter) { unsigned int len = bvec.bv_len; @@ -196,9 +199,11 @@ static void nd_blk_make_request(struct request_queue *q, struct bio *bio) "io error in %s sector %lld, len %d,\n", (rw == READ) ? "READ" : "WRITE", (unsigned long long) iter.bi_sector, len); - goto out; + break; } } + if (do_acct) + nd_iostat_end(bio, start); out: bio_endio(bio, err); |