Re: [PATCH 1/1] NVMe: Do not take nsid while a passthrough IO command is being issued via a block device file descriptor

From: Keith Busch
Date: Thu Jan 22 2015 - 09:22:34 EST


On Wed, 21 Jan 2015, Yan Liu wrote:
For IO passthrough command, it uses an IO queue associated with the device. Actually, this patch does not modify that part.
This patch is not really focused on io queues; instead, it is more about namespace protection from other namespace's user ios. The patch here doesn't prevent a userÂsubmitting completely arbitraryÂcommands on IO queues. One still can
do it through a char dev file descriptor. However, when a userÂexplicitly chooses a namespace's file descriptor, it is unlikely that she/he tries to issue an io command to a different namespace. Maybe in that case someone should to
use a new admin command.

Oh, I just realized your patch is not for the blk-mq version of this
driver. The mainline kernel uses blk-mq and is a little different in
this path. My mistake, you're right the command works the same as before
using the character device here. In that case, this seems very reasonable,
but doesn't merge upstream.