Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+14
+1
drivers/nvme/host/core.c
··· 1980 1980 if (ns->head->disk) { 1981 1981 nvme_update_disk_info(ns->head->disk, ns, id); 1982 1982 blk_queue_stack_limits(ns->head->disk->queue, ns->queue); 1983 + nvme_mpath_update_disk_size(ns->head->disk); 1983 1984 } 1984 1985 #endif 1985 1986 return 0;
+13
drivers/nvme/host/nvme.h
··· 604 604 trace_block_bio_complete(ns->head->disk->queue, req->bio); 605 605 } 606 606 607 + static inline void nvme_mpath_update_disk_size(struct gendisk *disk) 608 + { 609 + struct block_device *bdev = bdget_disk(disk, 0); 610 + 611 + if (bdev) { 612 + bd_set_size(bdev, get_capacity(disk) << SECTOR_SHIFT); 613 + bdput(bdev); 614 + } 615 + } 616 + 607 617 extern struct device_attribute dev_attr_ana_grpid; 608 618 extern struct device_attribute dev_attr_ana_state; 609 619 extern struct device_attribute subsys_attr_iopolicy; ··· 687 677 { 688 678 } 689 679 static inline void nvme_mpath_start_freeze(struct nvme_subsystem *subsys) 680 + { 681 + } 682 + static inline void nvme_mpath_update_disk_size(struct gendisk *disk) 690 683 { 691 684 } 692 685 #endif /* CONFIG_NVME_MULTIPATH */