forked from Minki/linux
block-5.8-2020-07-17
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAl8RyJEQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgprqMD/0XjNPFOhtaRgJ5PZaWxRTrUm9RBKZZ41f/ 93qG/71370bkdzeZNmZ9WVIUmJmGwMWWJEMKJXLVetr/iEhoi6cqyyOcvnkavtbI luecsgftYwo5Pt+I3OHUzXlSdD48Fv/JNOMx9kFMwMrVZsxAnfEJLXdPiG/au/Og 4lAS2Witn3mrMM/nttSpY25GcglJX1VxmhmLJdU5ljeiEXE3OLmvE/rPgvx3an9i k0glhIF+nAq/CzZFR7hgyO8KhRhQWBqO7sHOg4ZN7b2/K+Lc3QztACq6TnPRVqXL ATmbqddcHVC9ykbQGmPkzU0pGF2F9n7lQrM7xWHI5HP0R0mOKrF9jFMnQjwtpt42 0syGs8gGSHV2lOrQLcD27ybS0EFGv6oDV5rMjuw0Cg5IM0Fqy+ujAicrCqvDWdrX smFT+qaovI8PZV2Jo18YKzmKpR67dpdYIIdMjorrBYV7PFOLMVqbaJ+zxfWsoyZ+ SLNpOosa+FtSHSrFUud+7zKmeDkHkXTgW/A3fY695l9kgxLZWrvzpA3z5Q/iTeEb prM1Qd+Nkku5tSwvhnMhw4kN726zUHS9hZ4+upV2A31LMifof4ARkfqE2X5dd787 8HorZTfr6TQ4wU9rAtlj+zTBEZDhtxjHkjUHgnO7Xc7UuhbxW8VdUAdHGMDFtdvc bjATySTpHw== =INlC -----END PGP SIGNATURE----- Merge tag 'block-5.8-2020-07-17' of git://git.kernel.dk/linux-block into master Pull block fix from Jens Axboe: "Single NVMe multipath capacity fix" * tag 'block-5.8-2020-07-17' of git://git.kernel.dk/linux-block: nvme: explicitly update mpath disk capacity on revalidation
This commit is contained in:
commit
c9ea87dc6c
@ -1980,6 +1980,7 @@ static int __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)
|
||||
if (ns->head->disk) {
|
||||
nvme_update_disk_info(ns->head->disk, ns, id);
|
||||
blk_queue_stack_limits(ns->head->disk->queue, ns->queue);
|
||||
nvme_mpath_update_disk_size(ns->head->disk);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user