[PATCH 12/21] nvme: move common logic into nvme_update_ns_info
Christoph Hellwig
hch at lst.de
Thu Feb 29 05:40:03 PST 2024
On Thu, Feb 29, 2024 at 03:30:22PM +0200, Max Gurtovoy wrote:
>> + /*
>> + * If probing fails due an unsupported feature, hide the block device,
>> + * but still allow other access.
>> + */
>> + if (ret == -ENODEV) {
>> + ns->disk->flags |= GENHD_FL_HIDDEN;
>> + set_bit(NVME_NS_READY, &ns->flags);
>> + ret = 0;
>> + }
>> +
>> + if (!ret && nvme_ns_head_multipath(ns->head)) {
>> + blk_mq_freeze_queue(ns->head->disk->queue);
>> + if (!(ns->disk->flags & GENHD_FL_HIDDEN))
>> + nvme_init_integrity(ns->head->disk, ns->head);
>
> the logic in "nvme_update_ns_info_generic()" today is to hide also
> ns->head->disk..
Indeed, that got lost.
>
>
>> + set_capacity_and_notify(ns->head->disk, get_capacity(ns->disk));
>> + set_disk_ro(ns->head->disk, nvme_ns_is_readonly(ns, info));
>> + nvme_mpath_revalidate_paths(ns);
>> + blk_stack_limits(&ns->head->disk->queue->limits,
>> + &ns->queue->limits, 0);
>> + disk_update_readahead(ns->head->disk);
>
> we don't call disk_update_readahead() in "nvme_update_ns_info_generic()"
> today..
Yes, but it's harmless as it just propagates the limits from the
queue_limits to the bdi. That beeing said I've failed to send out a
last patch that actually removes it by switching to the queue_limits_set
API for the multipath node as well.
More information about the Linux-nvme
mailing list