[PATCH 3/3] nvmet: include all configured ports in the discovery log page

Christoph Hellwig hch at lst.de
Thu Apr 7 08:41:27 PDT 2022


On Thu, Apr 07, 2022 at 12:48:08PM +0200, Hannes Reinecke wrote:
> +		if (req->port->disc_subsys == nvmet_disc_subsys) {
> +			/*
> +			 * Present information about the port to which
> +			 * the controller is connected.
> +			 */
> +			if (r != req->port)
> +				continue;
> +		} else {
> +			/*
> +			 * If a per-port discovery subsystem is used present
> +			 * information about all ports into which the
> +			 * same discovery subsystem is linked.
> +			 */
> +			if (ctrl->subsys != r->disc_subsys)
> +				continue;
> +		}

Please factor this logic in a helper given that it is also used
by discovery_log_entries (and to document the logic a bit better).



More information about the Linux-nvme mailing list