<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/nvme, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-03-03T21:43:10Z</updated>
<entry>
<title>nvme: fix max_segments integer truncation</title>
<updated>2016-03-03T21:43:10Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-03-02T17:07:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=45686b6198bd824f083ff5293f191d78db9d708a'/>
<id>urn:sha1:45686b6198bd824f083ff5293f191d78db9d708a</id>
<content type='text'>
The block layer uses an unsigned short for max_segments.  The way we
calculate the value for NVMe tends to generate very large 32-bit values,
which after integer truncation may lead to a zero value instead of
the desired outcome.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reported-by: Jeff Lien &lt;Jeff.Lien@hgst.com&gt;
Tested-by: Jeff Lien &lt;Jeff.Lien@hgst.com&gt;
Reviewed-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>nvme: set queue limits for the admin queue</title>
<updated>2016-03-03T21:42:50Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-03-02T17:07:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da35825d9a091a7a1d5824c8468168e2658333ff'/>
<id>urn:sha1:da35825d9a091a7a1d5824c8468168e2658333ff</id>
<content type='text'>
Factor out a helper to set all the device specific queue limits and apply
them to the admin queue in addition to the I/O queues.  Without this the
command size on the admin queue is arbitrarily low, and the missing
other limitations are just minefields waiting for victims.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reported-by: Jeff Lien &lt;Jeff.Lien@hgst.com&gt;
Tested-by: Jeff Lien &lt;Jeff.Lien@hgst.com&gt;
Reviewed-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Fix 0-length integrity payload</title>
<updated>2016-03-03T21:42:50Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2016-02-24T16:15:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e9fc63d682dbbef17921aeb00d03fd52d6735ffd'/>
<id>urn:sha1:e9fc63d682dbbef17921aeb00d03fd52d6735ffd</id>
<content type='text'>
A user could send a passthrough IO command with a metadata pointer to a
namespace without metadata. With metadata length of 0, kmalloc returns
ZERO_SIZE_PTR. Since that is not NULL, the driver would have set this as
the bio's integrity payload, which causes an access fault on completion.

This patch ignores the users metadata buffer if the namespace format
does not support separate metadata.

Reported-by: Stephen Bates &lt;stephen.bates@microsemi.com&gt;
Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Don't allow unsupported flags</title>
<updated>2016-03-03T21:42:50Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2016-02-24T16:15:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=63088ec7c8eadfe08b96127a41b385ec9742dace'/>
<id>urn:sha1:63088ec7c8eadfe08b96127a41b385ec9742dace</id>
<content type='text'>
The command flags can change the meaning of other fields in the command
that the driver is not prepared to handle. Specifically, the user could
passthrough an SGL flag, causing the controller to misinterpret the PRP
list the driver created, potentially corrupting memory or data.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Reviewed-by: Jon Derrick &lt;jonathan.derrick@intel.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Move error handling to failed reset handler</title>
<updated>2016-03-03T21:42:50Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2016-02-24T16:15:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69d9a99c258eb1d6478fd9608a2070890797eed7'/>
<id>urn:sha1:69d9a99c258eb1d6478fd9608a2070890797eed7</id>
<content type='text'>
This moves failed queue handling out of the namespace removal path and
into the reset failure path, fixing a hanging condition if the controller
fails or link down during del_gendisk. Previously the driver had to see
the controller as degraded prior to calling del_gendisk to setup the
queues to fail. But, if the controller happened to fail after this,
there was no task to end outstanding requests.

On failure, all namespace states are set to dead. This has capacity
revalidate to 0, and ends all new requests with error status.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Simplify device reset failure</title>
<updated>2016-03-03T21:42:49Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2016-02-24T16:15:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f58944e265d4ebe47216a5d7488aee3928823d30'/>
<id>urn:sha1:f58944e265d4ebe47216a5d7488aee3928823d30</id>
<content type='text'>
A reset failure schedules the device to unbind from the driver through
the pci driver's remove. This cleans up all intialization, so there is
no need to duplicate the potentially racy cleanup.

To help understand why a reset failed, the status is logged with the
existing warning message.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Fix namespace removal deadlock</title>
<updated>2016-03-03T21:42:49Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2016-02-24T16:15:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=646017a612e72f19bd9f991fe25287a149c5f627'/>
<id>urn:sha1:646017a612e72f19bd9f991fe25287a149c5f627</id>
<content type='text'>
This patch makes nvme namespace removal lockless. It is up to the caller
to ensure no active namespace scanning is occuring. To ensure no scan
work occurs, the nvme pci driver adds a removing state to the controller
device to avoid queueing scan work during removal. The work is flushed
after setting the state, so no new scan work can be queued.

The lockless removal allows the driver to cleanup a namespace
request_queue if the controller fails during removal. Previously this
could deadlock trying to acquire the namespace mutex in order to handle
such events.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Use IDA for namespace disk naming</title>
<updated>2016-03-03T21:42:49Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2016-02-24T16:15:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=075790ebba4a1eb297f9875e581b55c0382b1f3d'/>
<id>urn:sha1:075790ebba4a1eb297f9875e581b55c0382b1f3d</id>
<content type='text'>
A namespace may be detached from a controller, but a user may be holding
a reference to it. Attaching a new namespace with the same NSID will create
duplicate names when using the NSID to name the disk.

This patch uses an IDA that is released only when the last reference is
released instead of using the namespace ID.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Don't unmap controller registers on reset</title>
<updated>2016-03-03T21:42:49Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2016-02-24T16:15:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b00a726a9fd82ddd4c10344e46f0d371e1674303'/>
<id>urn:sha1:b00a726a9fd82ddd4c10344e46f0d371e1674303</id>
<content type='text'>
Unmapping the registers on reset or shutdown is not necessary. Keeping
the mapping simplifies reset handling.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Rate limit nvme IO warnings</title>
<updated>2016-02-12T15:10:31Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2016-02-11T20:05:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f8e68a7c9af5f8047f7f8295874bedf306063709'/>
<id>urn:sha1:f8e68a7c9af5f8047f7f8295874bedf306063709</id>
<content type='text'>
We don't need to spam the kernel logs with thousands of IO cancelling
messages. We can infer all IO's are being cancelled with fewer, or
even none at all. This patch rate limits the message and uses the debug
log level as it is mainly used for testing purposes.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
</feed>
