mirror of
https://github.com/torvalds/linux.git
synced 2025-01-01 15:51:46 +00:00
nvme: rename __nvme_revalidate_disk
Rename __nvme_revalidate_disk to nvme_update_ns_info and pass a namespace instead of the gendisk. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
This commit is contained in:
parent
2124f096fb
commit
81382f1730
@ -2076,10 +2076,9 @@ static void nvme_set_chunk_sectors(struct nvme_ns *ns, struct nvme_id_ns *id)
|
|||||||
blk_queue_chunk_sectors(ns->queue, iob);
|
blk_queue_chunk_sectors(ns->queue, iob);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)
|
static int nvme_update_ns_info(struct nvme_ns *ns, struct nvme_id_ns *id)
|
||||||
{
|
{
|
||||||
unsigned lbaf = id->flbas & NVME_NS_FLBAS_LBA_MASK;
|
unsigned lbaf = id->flbas & NVME_NS_FLBAS_LBA_MASK;
|
||||||
struct nvme_ns *ns = disk->private_data;
|
|
||||||
struct nvme_ctrl *ctrl = ns->ctrl;
|
struct nvme_ctrl *ctrl = ns->ctrl;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -2141,7 +2140,7 @@ static int __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
nvme_set_chunk_sectors(ns, id);
|
nvme_set_chunk_sectors(ns, id);
|
||||||
nvme_update_disk_info(disk, ns, id);
|
nvme_update_disk_info(ns->disk, ns, id);
|
||||||
#ifdef CONFIG_NVME_MULTIPATH
|
#ifdef CONFIG_NVME_MULTIPATH
|
||||||
if (ns->head->disk) {
|
if (ns->head->disk) {
|
||||||
nvme_update_disk_info(ns->head->disk, ns, id);
|
nvme_update_disk_info(ns->head->disk, ns, id);
|
||||||
@ -2186,7 +2185,7 @@ static int nvme_validate_ns(struct nvme_ns *ns)
|
|||||||
goto free_id;
|
goto free_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = __nvme_revalidate_disk(ns->disk, id);
|
ret = nvme_update_ns_info(ns, id);
|
||||||
free_id:
|
free_id:
|
||||||
kfree(id);
|
kfree(id);
|
||||||
out:
|
out:
|
||||||
@ -3933,7 +3932,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
|
|||||||
memcpy(disk->disk_name, disk_name, DISK_NAME_LEN);
|
memcpy(disk->disk_name, disk_name, DISK_NAME_LEN);
|
||||||
ns->disk = disk;
|
ns->disk = disk;
|
||||||
|
|
||||||
if (__nvme_revalidate_disk(disk, id))
|
if (nvme_update_ns_info(ns, id))
|
||||||
goto out_put_disk;
|
goto out_put_disk;
|
||||||
if (blk_queue_is_zoned(ns->queue) && nvme_revalidate_zones(ns))
|
if (blk_queue_is_zoned(ns->queue) && nvme_revalidate_zones(ns))
|
||||||
goto out_put_disk;
|
goto out_put_disk;
|
||||||
|
Loading…
Reference in New Issue
Block a user