From: Keith Busch <kbusch@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <kch@nvidia.com>,
Kanchan Joshi <joshi.k@samsung.com>,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH 7/9] nvme: assign known effects at controller initialization time
Date: Wed, 14 Dec 2022 09:34:17 -0700 [thread overview]
Message-ID: <Y5n7CVj7b3Jr8dWY@kbusch-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <20221214161347.764071-8-hch@lst.de>
On Wed, Dec 14, 2022 at 05:13:45PM +0100, Christoph Hellwig wrote:
>
> +static int nvme_init_effects(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
> +{
> + int ret;
> +
> + if (id->lpa & NVME_CTRL_LPA_CMD_EFFECTS_LOG) {
> + ret = nvme_get_effects_log(ctrl, NVME_CSI_NVM, &ctrl->effects);
> + if (ret < 0)
> + return ret;
In the unlikely case where ret > 0, like the controller is very
confused, we need to fall through to allocate the default ctrl->effects.
> + } else {
> + ctrl->effects = kzalloc(sizeof(*ctrl->effects), GFP_KERNEL);
> + if (!ctrl->effects)
> + return -ENOMEM;
> + }
next prev parent reply other threads:[~2022-12-14 16:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 16:13 only allow unprivileged passthrough for commands without effects v2 Christoph Hellwig
2022-12-14 16:13 ` [PATCH 1/9] nvmet: use NVME_CMD_EFFECTS_CSUPP instead of open coding it Christoph Hellwig
2022-12-14 16:13 ` [PATCH 2/9] nvmet: set the LBCC bit for commands that modify data Christoph Hellwig
2022-12-14 16:13 ` [PATCH 3/9] nvme: remove nvme_execute_passthru_rq Christoph Hellwig
2022-12-14 16:13 ` [PATCH 4/9] nvmet: refactor passthru fixup code Christoph Hellwig
2022-12-14 16:13 ` [PATCH 5/9] nvmet: allow async passthrough of commands that change logical block contents Christoph Hellwig
2022-12-14 16:13 ` [PATCH 6/9] nvme: only return actual effects from nvme_command_effects Christoph Hellwig
2022-12-14 16:13 ` [PATCH 7/9] nvme: assign known effects at controller initialization time Christoph Hellwig
2022-12-14 16:34 ` Keith Busch [this message]
2022-12-15 13:15 ` Kanchan Joshi
2022-12-14 16:13 ` [PATCH 8/9] nvme: also return I/O command effects from nvme_command_effects Christoph Hellwig
2022-12-14 16:13 ` [PATCH 9/9] nvme: don't allow unprivileged passthrough of commands that have effects Christoph Hellwig
2022-12-15 7:14 ` Kanchan Joshi
2022-12-15 8:18 ` Christoph Hellwig
2022-12-15 8:24 ` Kanchan Joshi
2022-12-15 8:37 ` Christoph Hellwig
2022-12-14 16:36 ` only allow unprivileged passthrough for commands without effects v2 Keith Busch
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=Y5n7CVj7b3Jr8dWY@kbusch-mbp.dhcp.thefacebook.com \
--to=kbusch@kernel.org \
--cc=hch@lst.de \
--cc=joshi.k@samsung.com \
--cc=kch@nvidia.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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.