Skip to content

Commit

Permalink
nvme-fabrics: centralize discovery controller defaults
Browse files Browse the repository at this point in the history
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: Hannes Reinecke <hare@suse.com>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Hannes Reinecke authored and Christoph Hellwig committed May 25, 2018
1 parent ffecb0b commit 461fbc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/nvme/host/fabrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 461fbc8

Please sign in to comment.