All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Yan Liu <yan@purestorage.com>
Cc: Matthew Wilcox <willy@linux.intel.com>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] NVMe: Do not take nsid while a passthrough IO command is being issued via a block device file descriptor
Date: Thu, 22 Jan 2015 00:47:24 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LNX.2.00.1501220035170.15481@localhost.lm.intel.com> (raw)
In-Reply-To: <1421886503-25276-1-git-send-email-yan@purestorage.com>

On Wed, 21 Jan 2015, Yan Liu wrote:
> When a passthrough IO command is issued with a specific block device file descriptor. It should be applied at
> the namespace which is associated with that block device file descriptor. This patch makes such passthrough
> command ingore nsid in nvme_passthru_cmd structure. Instead it takes the namespace ID asscoiated with the
> block device descriptor.
>
> Signed-off-by: Yan Liu <yan@purestorage.com>

Oh it doesn't look like you tested this through the character
handle. You've got it set to use the admin queue's request_queue for IO
passthrough commands, so that can't be right.

The IOCTL's purpose was to let someone submit completely arbitrary
commands on IO queues. This technically shouldn't even need a namespace
handle, but we don't have a request_queue associated to IO queues without
one like the admin queue has. In fact, we ought to fix that so we can
issue IO commands without namespaces.

Anyway, namespaces may be hidden or some vendor special NSID trickery,
who knows. Point is we don't want to tie the passthrough command's NSID
down to the namespace providing the request_queue. If it is your intention
to use that NSID, you can get the NSID using the NVME_IOCTL_ID prior to
setting up the passthrough command.

WARNING: multiple messages have this Message-ID (diff)
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 1/1] NVMe: Do not take nsid while a passthrough IO command is being issued via a block device file descriptor
Date: Thu, 22 Jan 2015 00:47:24 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LNX.2.00.1501220035170.15481@localhost.lm.intel.com> (raw)
In-Reply-To: <1421886503-25276-1-git-send-email-yan@purestorage.com>

On Wed, 21 Jan 2015, Yan Liu wrote:
> When a passthrough IO command is issued with a specific block device file descriptor. It should be applied at
> the namespace which is associated with that block device file descriptor. This patch makes such passthrough
> command ingore nsid in nvme_passthru_cmd structure. Instead it takes the namespace ID asscoiated with the
> block device descriptor.
>
> Signed-off-by: Yan Liu <yan at purestorage.com>

Oh it doesn't look like you tested this through the character
handle. You've got it set to use the admin queue's request_queue for IO
passthrough commands, so that can't be right.

The IOCTL's purpose was to let someone submit completely arbitrary
commands on IO queues. This technically shouldn't even need a namespace
handle, but we don't have a request_queue associated to IO queues without
one like the admin queue has. In fact, we ought to fix that so we can
issue IO commands without namespaces.

Anyway, namespaces may be hidden or some vendor special NSID trickery,
who knows. Point is we don't want to tie the passthrough command's NSID
down to the namespace providing the request_queue. If it is your intention
to use that NSID, you can get the NSID using the NVME_IOCTL_ID prior to
setting up the passthrough command.

  reply	other threads:[~2015-01-22  0:47 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22  0:28 [PATCH 1/1] NVMe: Do not take nsid while a passthrough IO command is being issued via a block device file descriptor Yan Liu
2015-01-22  0:28 ` Yan Liu
2015-01-22  0:47 ` Keith Busch [this message]
2015-01-22  0:47   ` Keith Busch
2015-01-22  8:45   ` Christoph Hellwig
2015-01-22  8:45     ` Christoph Hellwig
2015-01-22 15:21     ` Keith Busch
2015-01-22 15:21       ` Keith Busch
2015-01-22 15:49       ` Christoph Hellwig
2015-01-22 15:49         ` Christoph Hellwig
2015-01-22 16:58         ` Keith Busch
2015-01-22 16:58           ` Keith Busch
     [not found]   ` <CADMsRTZjajAj682a5FH-AmpphoQ4vw5QxqnJiGEQ+Jg_f7TvoA@mail.gmail.com>
2015-01-22 14:22     ` Keith Busch
2015-01-22 14:22       ` Keith Busch
2015-01-23  0:02 Yan Liu
2015-01-23  0:02 ` Yan Liu
2015-01-23  7:57 ` Christoph Hellwig
2015-01-23  7:57   ` Christoph Hellwig
2015-01-23 16:22   ` Keith Busch
2015-01-23 16:22     ` Keith Busch
2015-01-23 17:27     ` Christoph Hellwig
2015-01-23 17:27       ` Christoph Hellwig
2015-01-23 17:50       ` Keith Busch
2015-01-23 17:50         ` Keith Busch
2015-01-25 14:41         ` Christoph Hellwig
2015-01-25 14:41           ` Christoph Hellwig
2015-01-23 23:57 Yan Liu
2015-01-23 23:57 ` Yan Liu
2015-01-25 14:59 ` Christoph Hellwig
2015-01-25 14:59   ` Christoph Hellwig
2015-01-26 18:02   ` Keith Busch
2015-01-26 18:02     ` 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=alpine.LNX.2.00.1501220035170.15481@localhost.lm.intel.com \
    --to=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=willy@linux.intel.com \
    --cc=yan@purestorage.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.