<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/include/linux/nvme.h, branch v3.15.4</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>Merge git://git.infradead.org/users/willy/linux-nvme</title>
<updated>2014-04-11T23:45:59+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-04-11T23:45:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3e8072d48b2dd0898e99698018b2045f8cd49965'/>
<id>3e8072d48b2dd0898e99698018b2045f8cd49965</id>
<content type='text'>
Pull NVMe driver updates from Matthew Wilcox:
 "Various updates to the NVMe driver.  The most user-visible change is
  that drive hotplugging now works and CPU hotplug while an NVMe drive
  is installed should also work better"

* git://git.infradead.org/users/willy/linux-nvme:
  NVMe: Retry failed commands with non-fatal errors
  NVMe: Add getgeo to block ops
  NVMe: Start-stop nvme_thread during device add-remove.
  NVMe: Make I/O timeout a module parameter
  NVMe: CPU hot plug notification
  NVMe: per-cpu io queues
  NVMe: Replace DEFINE_PCI_DEVICE_TABLE
  NVMe: Fix divide-by-zero in nvme_trans_io_get_num_cmds
  NVMe: IOCTL path RCU protect queue access
  NVMe: RCU protected access to io queues
  NVMe: Initialize device reference count earlier
  NVMe: Add CONFIG_PM_SLEEP to suspend/resume functions
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull NVMe driver updates from Matthew Wilcox:
 "Various updates to the NVMe driver.  The most user-visible change is
  that drive hotplugging now works and CPU hotplug while an NVMe drive
  is installed should also work better"

* git://git.infradead.org/users/willy/linux-nvme:
  NVMe: Retry failed commands with non-fatal errors
  NVMe: Add getgeo to block ops
  NVMe: Start-stop nvme_thread during device add-remove.
  NVMe: Make I/O timeout a module parameter
  NVMe: CPU hot plug notification
  NVMe: per-cpu io queues
  NVMe: Replace DEFINE_PCI_DEVICE_TABLE
  NVMe: Fix divide-by-zero in nvme_trans_io_get_num_cmds
  NVMe: IOCTL path RCU protect queue access
  NVMe: RCU protected access to io queues
  NVMe: Initialize device reference count earlier
  NVMe: Add CONFIG_PM_SLEEP to suspend/resume functions
</pre>
</div>
</content>
</entry>
<entry>
<title>NVMe: Retry failed commands with non-fatal errors</title>
<updated>2014-04-10T21:11:59+00:00</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2014-04-03T22:45:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=edd10d33283899fb15d99a290dcc9ceb3604ca78'/>
<id>edd10d33283899fb15d99a290dcc9ceb3604ca78</id>
<content type='text'>
For commands returned with failed status, queue these for resubmission
and continue retrying them until success or for a limited amount of
time. The final timeout was arbitrarily chosen so requests can't be
retried indefinitely.

Since these are requeued on the nvmeq that submitted the command, the
callbacks have to take an nvmeq instead of an nvme_dev as a parameter
so that we can use the locked queue to append the iod to retry later.

The nvme_iod conviently can be used to track how long we've been trying
to successfully complete an iod request. The nvme_iod also provides the
nvme prp dma mappings, so I had to move a few things around so we can
keep those mappings.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
[fixed checkpatch issue with long line]
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For commands returned with failed status, queue these for resubmission
and continue retrying them until success or for a limited amount of
time. The final timeout was arbitrarily chosen so requests can't be
retried indefinitely.

Since these are requeued on the nvmeq that submitted the command, the
callbacks have to take an nvmeq instead of an nvme_dev as a parameter
so that we can use the locked queue to append the iod to retry later.

The nvme_iod conviently can be used to track how long we've been trying
to successfully complete an iod request. The nvme_iod also provides the
nvme prp dma mappings, so I had to move a few things around so we can
keep those mappings.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
[fixed checkpatch issue with long line]
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NVMe: Make I/O timeout a module parameter</title>
<updated>2014-04-10T21:04:38+00:00</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2014-04-04T17:43:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b355084a891985d4cd0ca23b1a83366af2c4232d'/>
<id>b355084a891985d4cd0ca23b1a83366af2c4232d</id>
<content type='text'>
Increase the default timeout to 30 seconds to match SCSI.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
[use byte instead of ushort]
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Increase the default timeout to 30 seconds to match SCSI.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
[use byte instead of ushort]
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NVMe: CPU hot plug notification</title>
<updated>2014-04-10T21:03:42+00:00</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2014-03-24T16:46:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=33b1e95c90447ea73e37e837ea0268a894919f19'/>
<id>33b1e95c90447ea73e37e837ea0268a894919f19</id>
<content type='text'>
Registers with hot cpu notification to rebalance, and potentially allocate
additional, io queues.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Registers with hot cpu notification to rebalance, and potentially allocate
additional, io queues.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NVMe: per-cpu io queues</title>
<updated>2014-04-10T21:03:15+00:00</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2014-03-24T16:46:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=42f614201e80ff4cfb8b285d7190149a8e1e6cec'/>
<id>42f614201e80ff4cfb8b285d7190149a8e1e6cec</id>
<content type='text'>
The device's IO queues are associated with CPUs, so we can use a per-cpu
variable to map the a qid to a cpu. This provides a convienient way
to optimally assign queues to multiple cpus when the device supports
fewer queues than the host has cpus. The previous implementation may
have assigned these poorly in these situations. This patch addresses
this by sharing queues among cpus that are "close" together and should
have a lower lock contention penalty.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The device's IO queues are associated with CPUs, so we can use a per-cpu
variable to map the a qid to a cpu. This provides a convienient way
to optimally assign queues to multiple cpus when the device supports
fewer queues than the host has cpus. The previous implementation may
have assigned these poorly in these situations. This patch addresses
this by sharing queues among cpus that are "close" together and should
have a lower lock contention penalty.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NVMe: IOCTL path RCU protect queue access</title>
<updated>2014-03-24T12:54:40+00:00</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2014-03-03T23:39:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4f5099af4f3d5f999d8ab7784472d93e810e3912'/>
<id>4f5099af4f3d5f999d8ab7784472d93e810e3912</id>
<content type='text'>
This adds rcu protected access to a queue in the nvme IOCTL path
to fix potential races between a surprise removal and queue usage in
nvme_submit_sync_cmd. The fix holds the rcu_read_lock() here to prevent
the nvme_queue from freeing while this path is executing so it can't
sleep, and so this path will no longer wait for a available command
id should they all be in use at the time a passthrough IOCTL request
is received.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds rcu protected access to a queue in the nvme IOCTL path
to fix potential races between a surprise removal and queue usage in
nvme_submit_sync_cmd. The fix holds the rcu_read_lock() here to prevent
the nvme_queue from freeing while this path is executing so it can't
sleep, and so this path will no longer wait for a available command
id should they all be in use at the time a passthrough IOCTL request
is received.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NVMe: RCU protected access to io queues</title>
<updated>2014-03-24T12:45:57+00:00</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2014-02-21T21:13:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5a92e700af2e5e0e6404988d6a7f2ed3dad3f46f'/>
<id>5a92e700af2e5e0e6404988d6a7f2ed3dad3f46f</id>
<content type='text'>
This adds rcu protected access to nvme_queue to fix a race between a
surprise removal freeing the queue and a thread with open reference on
a NVMe block device using that queue.

The queues do not need to be rcu protected during the initialization or
shutdown parts, so I've added a helper function for raw deferencing
to get around the sparse errors.

There is still a hole in the IOCTL path for the same problem, which is
fixed in a subsequent patch.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds rcu protected access to nvme_queue to fix a race between a
surprise removal freeing the queue and a thread with open reference on
a NVMe block device using that queue.

The queues do not need to be rcu protected during the initialization or
shutdown parts, so I've added a helper function for raw deferencing
to get around the sparse errors.

There is still a hole in the IOCTL path for the same problem, which is
fixed in a subsequent patch.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nvme: don't use PREPARE_WORK</title>
<updated>2014-03-07T15:24:49+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2014-03-07T15:24:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9ca9737444f1a8602f74b85018d881e7e54b5bd1'/>
<id>9ca9737444f1a8602f74b85018d881e7e54b5bd1</id>
<content type='text'>
PREPARE_[DELAYED_]WORK() are being phased out.  They have few users
and a nasty surprise in terms of reentrancy guarantee as workqueue
considers work items to be different if they don't have the same work
function.

nvme_dev-&gt;reset_work is multiplexed with multiple work functions.
Introduce nvme_reset_workfn() which invokes nvme_dev-&gt;reset_workfn and
always use it as the work function and update the users to set the
-&gt;reset_workfn field instead of overriding the work function using
PREPARE_WORK().

It would probably be best to route this with other related updates
through the workqueue tree.

Compile tested.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Cc: linux-nvme@lists.infradead.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PREPARE_[DELAYED_]WORK() are being phased out.  They have few users
and a nasty surprise in terms of reentrancy guarantee as workqueue
considers work items to be different if they don't have the same work
function.

nvme_dev-&gt;reset_work is multiplexed with multiple work functions.
Introduce nvme_reset_workfn() which invokes nvme_dev-&gt;reset_workfn and
always use it as the work function and update the users to set the
-&gt;reset_workfn field instead of overriding the work function using
PREPARE_WORK().

It would probably be best to route this with other related updates
through the workqueue tree.

Compile tested.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Cc: linux-nvme@lists.infradead.org
</pre>
</div>
</content>
</entry>
<entry>
<title>NVMe: Abort timed out commands</title>
<updated>2014-01-28T00:27:53+00:00</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2013-12-10T20:10:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c30341dc3c436cf43508cd44cdfbb3810c38c195'/>
<id>c30341dc3c436cf43508cd44cdfbb3810c38c195</id>
<content type='text'>
Send nvme abort command to io requests that have timed out on an
initialized device. If the command is not returned after another timeout,
schedule the controller for reset.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
[fix endianness issues]
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Send nvme abort command to io requests that have timed out on an
initialized device. If the command is not returned after another timeout,
schedule the controller for reset.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
[fix endianness issues]
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NVMe: Schedule reset for failed controllers</title>
<updated>2014-01-28T00:20:02+00:00</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2013-12-10T20:10:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d4b4ff8e28b474fac0fbfa9cfc40f88b9e41e380'/>
<id>d4b4ff8e28b474fac0fbfa9cfc40f88b9e41e380</id>
<content type='text'>
Schedules a controller reset when it indicates it has a failed status. If
the device does not become ready after a reset, the pci device will be
scheduled for removal.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
[fixed checkpatch issue]
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Schedules a controller reset when it indicates it has a failed status. If
the device does not become ready after a reset, the pci device will be
scheduled for removal.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
[fixed checkpatch issue]
Signed-off-by: Matthew Wilcox &lt;matthew.r.wilcox@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
