diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-27 07:24:10 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-05-27 05:21:23 -0600 |
commit | 0fd92f89a44d3ba32c1056f3ceaba8f8bdc08712 (patch) | |
tree | 534167689f8952a508ef54f74e4956667492b7bb /drivers/nvdimm/pmem.c | |
parent | 86240d5b6813d6855845959b133d5b4a95c60f92 (diff) | |
download | lwn-0fd92f89a44d3ba32c1056f3ceaba8f8bdc08712.tar.gz lwn-0fd92f89a44d3ba32c1056f3ceaba8f8bdc08712.zip |
nvdimm: use bio_{start,end}_io_acct
Switch dm to use the nicer bio accounting helpers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvdimm/pmem.c')
-rw-r--r-- | drivers/nvdimm/pmem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 2df6994acf83..97f948f8f4e6 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -202,7 +202,9 @@ static blk_qc_t pmem_make_request(struct request_queue *q, struct bio *bio) if (bio->bi_opf & REQ_PREFLUSH) ret = nvdimm_flush(nd_region, bio); - do_acct = nd_iostat_start(bio, &start); + do_acct = blk_queue_io_stat(bio->bi_disk->queue); + if (do_acct) + start = bio_start_io_acct(bio); bio_for_each_segment(bvec, bio, iter) { if (op_is_write(bio_op(bio))) rc = pmem_do_write(pmem, bvec.bv_page, bvec.bv_offset, @@ -216,7 +218,7 @@ static blk_qc_t pmem_make_request(struct request_queue *q, struct bio *bio) } } if (do_acct) - nd_iostat_end(bio, start); + bio_end_io_acct(bio, start); if (bio->bi_opf & REQ_FUA) ret = nvdimm_flush(nd_region, bio); |