Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 461fbc8f authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Christoph Hellwig
Browse files

nvme-fabrics: centralize discovery controller defaults



When connecting to the discovery controller we have certain defaults
to observe, so centralize them to avoid inconsistencies due to argument
ordering.

Signed-off-by: default avatarHannes Reinecke <hare@suse.com>
Reviewed-by: default avatarJames Smart <james.smart@broadcom.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent ffecb0b4
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -689,10 +689,6 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
			opts->discovery_nqn =
				!(strcmp(opts->subsysnqn,
					 NVME_DISC_SUBSYS_NAME));
			if (opts->discovery_nqn) {
				opts->kato = 0;
				opts->nr_io_queues = 0;
			}
			break;
		case NVMF_OPT_TRADDR:
			p = match_strdup(args);
@@ -851,6 +847,10 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
		}
	}

	if (opts->discovery_nqn) {
		opts->kato = 0;
		opts->nr_io_queues = 0;
	}
	if (ctrl_loss_tmo < 0)
		opts->max_reconnects = -1;
	else