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

2015-01-26 Thread Keith Busch
On Sun, 25 Jan 2015, Christoph Hellwig wrote: On Fri, Jan 23, 2015 at 03:57:06PM -0800, 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

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

2015-01-26 Thread Keith Busch
On Sun, 25 Jan 2015, Christoph Hellwig wrote: On Fri, Jan 23, 2015 at 03:57:06PM -0800, 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

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

2015-01-25 Thread Christoph Hellwig
On Fri, Jan 23, 2015 at 03:57:06PM -0800, 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

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

2015-01-25 Thread Christoph Hellwig
On Fri, Jan 23, 2015 at 05:50:33PM +, Keith Busch wrote: > No argument against removing the hidden attribute handling, but there > are unadvertised NSID's that have special meaning. Like NSID 0x > means to apply a command to all namespaces. Vendor specific commands > may have other

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

2015-01-25 Thread Christoph Hellwig
On Fri, Jan 23, 2015 at 03:57:06PM -0800, 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 ignore

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

2015-01-25 Thread Christoph Hellwig
On Fri, Jan 23, 2015 at 05:50:33PM +, Keith Busch wrote: No argument against removing the hidden attribute handling, but there are unadvertised NSID's that have special meaning. Like NSID 0x means to apply a command to all namespaces. Vendor specific commands may have other special

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

2015-01-23 Thread Yan Liu
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 ignore nsid in nvme_passthru_cmd structure. Instead it takes the

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

2015-01-23 Thread Keith Busch
On Fri, 23 Jan 2015, Christoph Hellwig wrote: On Fri, Jan 23, 2015 at 04:22:02PM +, Keith Busch wrote: The namespace id should be enforced on block devices, but is there a problem allowing arbitrary commands through the management char device? I have a need for a pure passthrough, but the

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

2015-01-23 Thread Christoph Hellwig
On Fri, Jan 23, 2015 at 04:22:02PM +, Keith Busch wrote: > The namespace id should be enforced on block devices, but is there a > problem allowing arbitrary commands through the management char device? > I have a need for a pure passthrough, but the proposed patch requires > a matching

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

2015-01-23 Thread Keith Busch
On Thu, 22 Jan 2015, Christoph Hellwig wrote: On Thu, Jan 22, 2015 at 04:02:08PM -0800, 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

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

2015-01-23 Thread Keith Busch
On Fri, 23 Jan 2015, Christoph Hellwig wrote: On Fri, Jan 23, 2015 at 04:22:02PM +, Keith Busch wrote: The namespace id should be enforced on block devices, but is there a problem allowing arbitrary commands through the management char device? I have a need for a pure passthrough, but the

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

2015-01-23 Thread Christoph Hellwig
On Fri, Jan 23, 2015 at 04:22:02PM +, Keith Busch wrote: The namespace id should be enforced on block devices, but is there a problem allowing arbitrary commands through the management char device? I have a need for a pure passthrough, but the proposed patch requires a matching namespace

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

2015-01-23 Thread Yan Liu
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 ignore nsid in nvme_passthru_cmd structure. Instead it takes the

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

2015-01-23 Thread Keith Busch
On Thu, 22 Jan 2015, Christoph Hellwig wrote: On Thu, Jan 22, 2015 at 04:02:08PM -0800, 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

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

2015-01-22 Thread Christoph Hellwig
On Thu, Jan 22, 2015 at 04:02:08PM -0800, 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

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

2015-01-22 Thread Yan Liu
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 ignore nsid in nvme_passthru_cmd structure. Instead it takes the

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

2015-01-22 Thread Keith Busch
On Thu, 22 Jan 2015, Christoph Hellwig wrote: On Thu, Jan 22, 2015 at 03:21:28PM +, Keith Busch wrote: But if you really need to restrict namespace access, shouldn't that be enforced on the target side with reservations or similar mechanism? Think for example about containers where we

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

2015-01-22 Thread Christoph Hellwig
On Thu, Jan 22, 2015 at 03:21:28PM +, Keith Busch wrote: > The case I considered was the "hidden" attribute in the NVMe LBA Range > Type feature. It only indicates the storage should be hidden from the OS > for general use, but the host may still use it for special purposes. In > truth, the

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

2015-01-22 Thread Keith Busch
On Thu, 22 Jan 2015, Christoph Hellwig wrote: On Thu, Jan 22, 2015 at 12:47:24AM +, Keith Busch wrote: 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

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

2015-01-22 Thread Keith Busch
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

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

2015-01-22 Thread Christoph Hellwig
On Thu, Jan 22, 2015 at 12:47:24AM +, Keith Busch wrote: > 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

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

2015-01-22 Thread Keith Busch
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

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

2015-01-22 Thread Christoph Hellwig
On Thu, Jan 22, 2015 at 12:47:24AM +, Keith Busch wrote: 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

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

2015-01-22 Thread Christoph Hellwig
On Thu, Jan 22, 2015 at 03:21:28PM +, Keith Busch wrote: The case I considered was the hidden attribute in the NVMe LBA Range Type feature. It only indicates the storage should be hidden from the OS for general use, but the host may still use it for special purposes. In truth, the driver

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

2015-01-22 Thread Keith Busch
On Thu, 22 Jan 2015, Christoph Hellwig wrote: On Thu, Jan 22, 2015 at 12:47:24AM +, Keith Busch wrote: 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

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

2015-01-22 Thread Yan Liu
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 ignore nsid in nvme_passthru_cmd structure. Instead it takes the

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

2015-01-22 Thread Keith Busch
On Thu, 22 Jan 2015, Christoph Hellwig wrote: On Thu, Jan 22, 2015 at 03:21:28PM +, Keith Busch wrote: But if you really need to restrict namespace access, shouldn't that be enforced on the target side with reservations or similar mechanism? Think for example about containers where we

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

2015-01-22 Thread Christoph Hellwig
On Thu, Jan 22, 2015 at 04:02:08PM -0800, 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 ignore

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

2015-01-21 Thread Keith Busch
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

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

2015-01-21 Thread Yan Liu
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

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

2015-01-21 Thread Yan Liu
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

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

2015-01-21 Thread Keith Busch
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