Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-24 Thread Christoph Hellwig
On Mon, Jun 20, 2016 at 11:26:39AM -0400, Keith Busch wrote: > This is ATA security, though, so wouldn't ATA also benefit from this? The > payload setup/decoding should then go in a generic library for everyone. In principiple sharing this code would be fine, but right now the actual ATA specific

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-24 Thread Christoph Hellwig
On Mon, Jun 20, 2016 at 11:26:39AM -0400, Keith Busch wrote: > This is ATA security, though, so wouldn't ATA also benefit from this? The > payload setup/decoding should then go in a generic library for everyone. In principiple sharing this code would be fine, but right now the actual ATA specific

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-24 Thread Christoph Hellwig
On Mon, Jun 20, 2016 at 09:46:30AM +0300, Sagi Grimberg wrote: > patch 1: nvme: Add function for NVMe security receive command > patch 2: nvme: Check if drive is locked using ATA Security when scanning > namespaces Agreed.

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-24 Thread Christoph Hellwig
On Mon, Jun 20, 2016 at 09:46:30AM +0300, Sagi Grimberg wrote: > patch 1: nvme: Add function for NVMe security receive command > patch 2: nvme: Check if drive is locked using ATA Security when scanning > namespaces Agreed.

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-24 Thread Christoph Hellwig
On Fri, Jun 24, 2016 at 12:45:08AM -0700, Jethro Beekman wrote: > As you found NVMe points to SPC-4. SPC-4 lists protocol 0xEF "ATA Device > Server > Password Security" as part of the SECURITY PROTOCOL IN command, pointing to > SAT-2. In one SAT-2 draft I could find there is are these sections >

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-24 Thread Christoph Hellwig
On Fri, Jun 24, 2016 at 12:45:08AM -0700, Jethro Beekman wrote: > As you found NVMe points to SPC-4. SPC-4 lists protocol 0xEF "ATA Device > Server > Password Security" as part of the SECURITY PROTOCOL IN command, pointing to > SAT-2. In one SAT-2 draft I could find there is are these sections >

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-24 Thread Jethro Beekman
On 24-06-16 00:37, Christoph Hellwig wrote: > On Sun, Jun 19, 2016 at 04:06:31PM -0700, Jethro Beekman wrote: >> Hi all, >> >> If an NVMe drive is locked with ATA Security, most commands sent to the >> drive >> will fail. This includes commands sent by the kernel upon discovery to probe >> for

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-24 Thread Jethro Beekman
On 24-06-16 00:37, Christoph Hellwig wrote: > On Sun, Jun 19, 2016 at 04:06:31PM -0700, Jethro Beekman wrote: >> Hi all, >> >> If an NVMe drive is locked with ATA Security, most commands sent to the >> drive >> will fail. This includes commands sent by the kernel upon discovery to probe >> for

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-24 Thread Christoph Hellwig
On Mon, Jun 20, 2016 at 08:50:33PM -0700, Jethro Beekman wrote: > >> You're right, I assumed that admin commands can't have namespace ids, but > >> looking at the spec, that's not the case. Turns out there's a problem with > >> the > >> driver then: nvme_ioctl never includes the ns for

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-24 Thread Christoph Hellwig
On Mon, Jun 20, 2016 at 08:50:33PM -0700, Jethro Beekman wrote: > >> You're right, I assumed that admin commands can't have namespace ids, but > >> looking at the spec, that's not the case. Turns out there's a problem with > >> the > >> driver then: nvme_ioctl never includes the ns for

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-24 Thread Christoph Hellwig
On Sun, Jun 19, 2016 at 04:06:31PM -0700, Jethro Beekman wrote: > Hi all, > > If an NVMe drive is locked with ATA Security, most commands sent to the drive > will fail. This includes commands sent by the kernel upon discovery to probe > for partitions. The failing happens in such a way that

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-24 Thread Christoph Hellwig
On Sun, Jun 19, 2016 at 04:06:31PM -0700, Jethro Beekman wrote: > Hi all, > > If an NVMe drive is locked with ATA Security, most commands sent to the drive > will fail. This includes commands sent by the kernel upon discovery to probe > for partitions. The failing happens in such a way that

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-20 Thread Jethro Beekman
On 20-06-16 15:54, Keith Busch wrote: > On Mon, Jun 20, 2016 at 11:21:09AM -0700, Jethro Beekman wrote: >> On 20-06-16 08:26, Keith Busch wrote: >> >> Would this just be a matter of setting req->retries and checking for it in >> nvme_req_needs_retry? How does one keep track of the number of tries

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-20 Thread Jethro Beekman
On 20-06-16 15:54, Keith Busch wrote: > On Mon, Jun 20, 2016 at 11:21:09AM -0700, Jethro Beekman wrote: >> On 20-06-16 08:26, Keith Busch wrote: >> >> Would this just be a matter of setting req->retries and checking for it in >> nvme_req_needs_retry? How does one keep track of the number of tries

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-20 Thread Keith Busch
On Mon, Jun 20, 2016 at 11:21:09AM -0700, Jethro Beekman wrote: > On 20-06-16 08:26, Keith Busch wrote: > > Would this just be a matter of setting req->retries and checking for it in > nvme_req_needs_retry? How does one keep track of the number of tries so far? I just sent a patch out earlier

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-20 Thread Keith Busch
On Mon, Jun 20, 2016 at 11:21:09AM -0700, Jethro Beekman wrote: > On 20-06-16 08:26, Keith Busch wrote: > > Would this just be a matter of setting req->retries and checking for it in > nvme_req_needs_retry? How does one keep track of the number of tries so far? I just sent a patch out earlier

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-20 Thread Jethro Beekman
On 20-06-16 08:26, Keith Busch wrote: > On Sun, Jun 19, 2016 at 04:06:31PM -0700, Jethro Beekman wrote: >> If an NVMe drive is locked with ATA Security, most commands sent to the >> drive >> will fail. This includes commands sent by the kernel upon discovery to probe >> for partitions. The

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-20 Thread Jethro Beekman
On 20-06-16 08:26, Keith Busch wrote: > On Sun, Jun 19, 2016 at 04:06:31PM -0700, Jethro Beekman wrote: >> If an NVMe drive is locked with ATA Security, most commands sent to the >> drive >> will fail. This includes commands sent by the kernel upon discovery to probe >> for partitions. The

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-20 Thread Keith Busch
On Sun, Jun 19, 2016 at 04:06:31PM -0700, Jethro Beekman wrote: > If an NVMe drive is locked with ATA Security, most commands sent to the drive > will fail. This includes commands sent by the kernel upon discovery to probe > for partitions. The failing happens in such a way that trying to do

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-20 Thread Keith Busch
On Sun, Jun 19, 2016 at 04:06:31PM -0700, Jethro Beekman wrote: > If an NVMe drive is locked with ATA Security, most commands sent to the drive > will fail. This includes commands sent by the kernel upon discovery to probe > for partitions. The failing happens in such a way that trying to do

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-20 Thread Sagi Grimberg
Hi all, If an NVMe drive is locked with ATA Security, most commands sent to the drive will fail. This includes commands sent by the kernel upon discovery to probe for partitions. The failing happens in such a way that trying to do anything with the drive (e.g. sending an unlock command;

Re: [PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-20 Thread Sagi Grimberg
Hi all, If an NVMe drive is locked with ATA Security, most commands sent to the drive will fail. This includes commands sent by the kernel upon discovery to probe for partitions. The failing happens in such a way that trying to do anything with the drive (e.g. sending an unlock command;

[PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-19 Thread Jethro Beekman
Hi all, If an NVMe drive is locked with ATA Security, most commands sent to the drive will fail. This includes commands sent by the kernel upon discovery to probe for partitions. The failing happens in such a way that trying to do anything with the drive (e.g. sending an unlock command;

[PATCH 0/3] nvme: Don't add namespaces for locked drives

2016-06-19 Thread Jethro Beekman
Hi all, If an NVMe drive is locked with ATA Security, most commands sent to the drive will fail. This includes commands sent by the kernel upon discovery to probe for partitions. The failing happens in such a way that trying to do anything with the drive (e.g. sending an unlock command;