From: Tokunori Ikegami <ikegami.t@gmail.com>
To: Keith Busch <kbusch@kernel.org>
Cc: Chao Shi <coshi036@gmail.com>,
linux-nvme@lists.infradead.org, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>, Jens Axboe <axboe@kernel.dk>,
Tatsuya Sasaki <tatsuya6.sasaki@kioxia.com>,
Maurizio Lombardi <mlombard@arkamax.eu>,
linux-kernel@vger.kernel.org, Sungwoo Kim <iam@sung-woo.kim>,
Dave Tian <daveti@purdue.edu>, Weidong Zhu <weizhu@fiu.edu>
Subject: Re: [PATCH v5] nvme: reject passthrough of driver-managed Set Features
Date: Tue, 26 May 2026 01:49:36 +0900 [thread overview]
Message-ID: <f71e9ae5-921c-4f5b-bb5d-66729396b8fa@gmail.com> (raw)
In-Reply-To: <ahRvhmaMCCqnxV62@kbusch-mbp>
On 2026/05/26 0:49, Keith Busch wrote:
> On Tue, May 26, 2026 at 12:34:03AM +0900, Tokunori Ikegami wrote:
>>> +static bool nvme_cmd_allowed(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
>>> + struct nvme_command *c, unsigned int flags,
>>> + bool open_for_write)
>> The struct nvme_ns does already have the struct nvme_ctrl *ctrl as a member
>> variable as below so seems not necessary to add the function argument struct
>> nvme_ctrl *ctrl.
> This filter is for admin commands, so the 'ns' parameter is NULL for
> this case.
Okay so how about that to use the function argument unsigned int flags
instead with adding the NVME_IOCTL_FABRICS enum definition?
enum {
NVME_IOCTL_VEC = (1 << 0),
NVME_IOCTL_PARTITION = (1 << 1),
};
Note: I mean as possible as we can it seems better to avoid the many
function arguments for the maintainability.
Thank you.
next prev parent reply other threads:[~2026-05-25 16:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-23 22:56 Chao Shi
2026-05-25 15:34 ` Tokunori Ikegami
2026-05-25 15:49 ` Keith Busch
2026-05-25 16:49 ` Tokunori Ikegami [this message]
2026-05-27 14:16 ` Christoph Hellwig
2026-05-27 14:32 ` Keith Busch
2026-05-28 8:43 ` Christoph Hellwig
2026-07-15 8:12 ` Chao S
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=f71e9ae5-921c-4f5b-bb5d-66729396b8fa@gmail.com \
--to=ikegami.t@gmail.com \
--cc=axboe@kernel.dk \
--cc=coshi036@gmail.com \
--cc=daveti@purdue.edu \
--cc=hch@lst.de \
--cc=iam@sung-woo.kim \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mlombard@arkamax.eu \
--cc=sagi@grimberg.me \
--cc=tatsuya6.sasaki@kioxia.com \
--cc=weizhu@fiu.edu \
/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