diff options
author | Jens Axboe <axboe@kernel.dk> | 2020-07-16 08:58:14 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-07-16 08:58:14 -0600 |
commit | 1f273e255b285282707fa3246391f66e9dc4178f (patch) | |
tree | 3a2528b0441658f0c8208048c04c7cd81d029383 /drivers/nvme/host/nvme.h | |
parent | 579dd91ab3a5446b148e7f179b6596b270dace46 (diff) | |
parent | 05b29021fba5e725dd385151ef00b6340229b500 (diff) |
Merge branch 'nvme-5.8' of git://git.infradead.org/nvme into block-5.8block-5.8-2020-07-17
Pull NVMe fix from Christoph.
* 'nvme-5.8' of git://git.infradead.org/nvme:
nvme: explicitly update mpath disk capacity on revalidation
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r-- | drivers/nvme/host/nvme.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 2ef8d501e2a8..1de3f9b827aa 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -604,6 +604,16 @@ static inline void nvme_trace_bio_complete(struct request *req, trace_block_bio_complete(ns->head->disk->queue, req->bio); } +static inline void nvme_mpath_update_disk_size(struct gendisk *disk) +{ + struct block_device *bdev = bdget_disk(disk, 0); + + if (bdev) { + bd_set_size(bdev, get_capacity(disk) << SECTOR_SHIFT); + bdput(bdev); + } +} + extern struct device_attribute dev_attr_ana_grpid; extern struct device_attribute dev_attr_ana_state; extern struct device_attribute subsys_attr_iopolicy; @@ -679,6 +689,9 @@ static inline void nvme_mpath_wait_freeze(struct nvme_subsystem *subsys) static inline void nvme_mpath_start_freeze(struct nvme_subsystem *subsys) { } +static inline void nvme_mpath_update_disk_size(struct gendisk *disk) +{ +} #endif /* CONFIG_NVME_MULTIPATH */ #ifdef CONFIG_NVM |