linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hch@infradead.org (Christoph Hellwig)
Subject: [PATCH 1/3] nvme: add duplicate_connect option
Date: Thu, 19 Oct 2017 08:20:24 -0700	[thread overview]
Message-ID: <20171019152024.GA4239@infradead.org> (raw)
In-Reply-To: <20171011003512.5946-2-jsmart2021@gmail.com>

> +	{ NVMF_OPT_DUP_CONNECT,		"duplicate_connect=%d"	},

This is a boolean parameter, so please drop the "=%d here".

> +		case NVMF_OPT_DUP_CONNECT:
> +			if (match_int(args, &token)) {
> +				ret = -EINVAL;
> +				goto out;
> +			}
> +			if (token == 0)
> +				opts->duplicate_connect = false;
> +			else if (token == 1)
> +				opts->duplicate_connect = true;
> +			else {
> +				pr_err("Invalid duplicate_connect %d\n", token);
> +				ret = -EINVAL;
> +				goto out;
> +			}
> +			break;

And replace all this code by:

	case NVMF_OPT_DUP_CONNECT:
		opts->duplicate_connect = true;
		break;

That being said I'd be tempted to keep the existing behavior as
the default, and make noduplicates the option.

  reply	other threads:[~2017-10-19 15:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11  0:35 [PATCH 0/3] Add duplicate_connect option for ctlr connect requests James Smart
2017-10-11  0:35 ` [PATCH 1/3] nvme: add duplicate_connect option James Smart
2017-10-19 15:20   ` Christoph Hellwig [this message]
2017-10-19 15:58     ` James Smart
2017-10-11  0:35 ` [PATCH 2/3] nvme_fc: add support for " James Smart
2017-10-19 15:23   ` Christoph Hellwig
2017-10-19 15:59     ` James Smart
2017-10-11  0:35 ` [PATCH/RFC 3/3] nvme rdma: " James Smart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171019152024.GA4239@infradead.org \
    --to=hch@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).