diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-12-18 00:08:10 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-12-18 00:08:10 +0100 |
commit | c44ef859ceff45db1c72f9ccbfae96843c4b1501 (patch) | |
tree | c97d8cab54f9d62faa5a5713298418ab93a452e0 /drivers/nvdimm/nd.h | |
parent | device-dax: fix private mapping restriction, permit read-only (diff) | |
parent | dax: add region 'id', 'size', and 'align' attributes (diff) | |
download | linux-c44ef859ceff45db1c72f9ccbfae96843c4b1501.tar.xz linux-c44ef859ceff45db1c72f9ccbfae96843c4b1501.zip |
Merge branch 'for-4.10/libnvdimm' into libnvdimm-for-next
Diffstat (limited to 'drivers/nvdimm/nd.h')
-rw-r--r-- | drivers/nvdimm/nd.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h index d3b2fca8deec..35dd75057e16 100644 --- a/drivers/nvdimm/nd.h +++ b/drivers/nvdimm/nd.h @@ -238,6 +238,7 @@ int nvdimm_set_config_data(struct nvdimm_drvdata *ndd, size_t offset, void *buf, size_t len); long nvdimm_clear_poison(struct device *dev, phys_addr_t phys, unsigned int len); +void nvdimm_set_aliasing(struct device *dev); struct nd_btt *to_nd_btt(struct device *dev); struct nd_gen_sb { @@ -377,10 +378,17 @@ static inline bool nd_iostat_start(struct bio *bio, unsigned long *start) if (!blk_queue_io_stat(disk->queue)) return false; - __nd_iostat_start(bio, start); + *start = jiffies; + generic_start_io_acct(bio_data_dir(bio), + bio_sectors(bio), &disk->part0); return true; } -void nd_iostat_end(struct bio *bio, unsigned long start); +static inline void nd_iostat_end(struct bio *bio, unsigned long start) +{ + struct gendisk *disk = bio->bi_bdev->bd_disk; + + generic_end_io_acct(bio_data_dir(bio), &disk->part0, start); +} static inline bool is_bad_pmem(struct badblocks *bb, sector_t sector, unsigned int len) { |