From: Christoph Hellwig <hch@lst.de>
To: Wu Bo <wubo40@huawei.com>
Cc: linfeilong@huawei.com, sagi@grimberg.me,
linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
liuzhiqiang26@huawei.com, axboe@fb.com, kbusch@kernel.org,
hch@lst.de
Subject: Re: [PATCH] nvme/core:disable streams when get stream params failed
Date: Tue, 12 May 2020 18:06:18 +0200 [thread overview]
Message-ID: <20200512160618.GA5403@lst.de> (raw)
In-Reply-To: <1588754221-661597-1-git-send-email-wubo40@huawei.com>
On Wed, May 06, 2020 at 04:37:01PM +0800, Wu Bo wrote:
> After enable nvme streams, then if get stream params failed,
> We should disable streams before return error in
> nvme_configure_directives() function.
>
> Signed-off-by: Wu Bo <wubo40@huawei.com>
> ---
> drivers/nvme/host/core.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index f2adea9..afe1f5a 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -552,8 +552,10 @@ static int nvme_configure_directives(struct nvme_ctrl *ctrl)
> return ret;
>
> ret = nvme_get_stream_params(ctrl, &s, NVME_NSID_ALL);
> - if (ret)
> + if (ret) {
> + nvme_disable_streams(ctrl);
> return ret;
> + }
Please use a out_disable goto label to not duplicate the error
handling with the other case that needs it.
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Wu Bo <wubo40@huawei.com>
Cc: kbusch@kernel.org, axboe@fb.com, hch@lst.de, sagi@grimberg.me,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
liuzhiqiang26@huawei.com, linfeilong@huawei.com
Subject: Re: [PATCH] nvme/core:disable streams when get stream params failed
Date: Tue, 12 May 2020 18:06:18 +0200 [thread overview]
Message-ID: <20200512160618.GA5403@lst.de> (raw)
In-Reply-To: <1588754221-661597-1-git-send-email-wubo40@huawei.com>
On Wed, May 06, 2020 at 04:37:01PM +0800, Wu Bo wrote:
> After enable nvme streams, then if get stream params failed,
> We should disable streams before return error in
> nvme_configure_directives() function.
>
> Signed-off-by: Wu Bo <wubo40@huawei.com>
> ---
> drivers/nvme/host/core.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index f2adea9..afe1f5a 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -552,8 +552,10 @@ static int nvme_configure_directives(struct nvme_ctrl *ctrl)
> return ret;
>
> ret = nvme_get_stream_params(ctrl, &s, NVME_NSID_ALL);
> - if (ret)
> + if (ret) {
> + nvme_disable_streams(ctrl);
> return ret;
> + }
Please use a out_disable goto label to not duplicate the error
handling with the other case that needs it.
next prev parent reply other threads:[~2020-05-12 16:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 8:37 [PATCH] nvme/core:disable streams when get stream params failed Wu Bo
2020-05-06 8:37 ` Wu Bo
2020-05-12 16:06 ` Christoph Hellwig [this message]
2020-05-12 16:06 ` Christoph Hellwig
2020-05-13 6:12 ` Wu Bo
2020-05-13 6:12 ` Wu Bo
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=20200512160618.GA5403@lst.de \
--to=hch@lst.de \
--cc=axboe@fb.com \
--cc=kbusch@kernel.org \
--cc=linfeilong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=liuzhiqiang26@huawei.com \
--cc=sagi@grimberg.me \
--cc=wubo40@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.