diff options
Diffstat (limited to 'drivers/nvdimm/btt.c')
-rw-r--r-- | drivers/nvdimm/btt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 18a2463c2300..c02065aed03d 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -1177,8 +1177,10 @@ static void btt_make_request(struct request_queue *q, struct bio *bio) struct bio_integrity_payload *bip = bio_integrity(bio); struct btt *btt = q->queuedata; 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 @@ -1191,6 +1193,7 @@ static void btt_make_request(struct request_queue *q, struct bio *bio) goto out; } + do_acct = nd_iostat_start(bio, &start); rw = bio_data_dir(bio); bio_for_each_segment(bvec, bio, iter) { unsigned int len = bvec.bv_len; @@ -1208,9 +1211,11 @@ static void btt_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); |