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

Hannes Reinecke hare at suse.de
Thu Apr 7 10:25:48 PDT 2022


On 4/7/22 17:41, Christoph Hellwig wrote:
> 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).

Sure, will do.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare at suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



More information about the Linux-nvme mailing list