<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block, branch v3.19</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=v3.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-01-28T13:12:02Z</updated>
<entry>
<title>rbd: drop parent_ref in rbd_dev_unprobe() unconditionally</title>
<updated>2015-01-28T13:12:02Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@redhat.com</email>
</author>
<published>2015-01-19T09:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e69b8d414f948c242ad9f3eb2b7e24fba783dbbd'/>
<id>urn:sha1:e69b8d414f948c242ad9f3eb2b7e24fba783dbbd</id>
<content type='text'>
This effectively reverts the last hunk of 392a9dad7e77 ("rbd: detect
when clone image is flattened").

The problem with parent_overlap != 0 condition is that it's possible
and completely valid to have an image with parent_overlap == 0 whose
parent state needs to be cleaned up on unmap.  The next commit, which
drops the "clone image now standalone" logic, opens up another window
of opportunity to hit this, but even without it

    # cat parent-ref.sh
    #!/bin/bash
    rbd create --image-format 2 --size 1 foo
    rbd snap create foo@snap
    rbd snap protect foo@snap
    rbd clone foo@snap bar
    rbd resize --allow-shrink --size 0 bar
    rbd resize --size 1 bar
    DEV=$(rbd map bar)
    rbd unmap $DEV

leaves rbd_device/rbd_spec/etc and rbd_client along with ceph_client
hanging around.

My thinking behind calling rbd_dev_parent_put() unconditionally is that
there shouldn't be any requests in flight at that point in time as we
are deep into unmap sequence.  Hence, even if rbd_dev_unparent() caused
by flatten is delayed by in-flight requests, it will have finished by
the time we reach rbd_dev_unprobe() caused by unmap, thus turning
unconditional rbd_dev_parent_put() into a no-op.

Fixes: http://tracker.ceph.com/issues/10352

Cc: stable@vger.kernel.org # 3.11+
Signed-off-by: Ilya Dryomov &lt;idryomov@redhat.com&gt;
Reviewed-by: Josh Durgin &lt;jdurgin@redhat.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</content>
</entry>
<entry>
<title>rbd: fix rbd_dev_parent_get() when parent_overlap == 0</title>
<updated>2015-01-28T13:11:51Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@redhat.com</email>
</author>
<published>2015-01-19T15:13:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ae43e9d05eb4bd324155292f889fbd001c4faea8'/>
<id>urn:sha1:ae43e9d05eb4bd324155292f889fbd001c4faea8</id>
<content type='text'>
The comment for rbd_dev_parent_get() said

    * We must get the reference before checking for the overlap to
    * coordinate properly with zeroing the parent overlap in
    * rbd_dev_v2_parent_info() when an image gets flattened.  We
    * drop it again if there is no overlap.

but the "drop it again if there is no overlap" part was missing from
the implementation.  This lead to absurd parent_ref values for images
with parent_overlap == 0, as parent_ref was incremented for each
img_request and virtually never decremented.

Fix this by leveraging the fact that refresh path calls
rbd_dev_v2_parent_info() under header_rwsem and use it for read in
rbd_dev_parent_get(), instead of messing around with atomics.  Get rid
of barriers in rbd_dev_v2_parent_info() while at it - I don't see what
they'd pair with now and I suspect we are in a pretty miserable
situation as far as proper locking goes regardless.

Cc: stable@vger.kernel.org # 3.11+
Signed-off-by: Ilya Dryomov &lt;idryomov@redhat.com&gt;
Reviewed-by: Josh Durgin &lt;jdurgin@redhat.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
</content>
</entry>
<entry>
<title>NVMe: cq_vector should be signed</title>
<updated>2015-01-15T22:19:10Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@fb.com</email>
</author>
<published>2015-01-15T22:19:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6222d1721dd7d533b43747642419a8ff78ad6f99'/>
<id>urn:sha1:6222d1721dd7d533b43747642419a8ff78ad6f99</id>
<content type='text'>
This was inadvertently dropped from an earlier commit, otherwise
the check against cq_vector == -1 to prevent double free doesn't
make any sense.

Fixes: 2b25d981790b
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Fix locking on abort handling</title>
<updated>2015-01-08T16:02:23Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2015-01-08T01:55:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7a509a6b07dd5a08d91f8a7e0cccb9a6438ce439'/>
<id>urn:sha1:7a509a6b07dd5a08d91f8a7e0cccb9a6438ce439</id>
<content type='text'>
The queues and device need to be locked when messing with them.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Start and stop h/w queues on reset</title>
<updated>2015-01-08T16:02:20Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2015-01-08T01:55:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c9d3bf8810514b1d32b49254a8f3485f36380eed'/>
<id>urn:sha1:c9d3bf8810514b1d32b49254a8f3485f36380eed</id>
<content type='text'>
This freezes and stops all the queues on device shutdown and restarts
them on resume. This fixes hotplug and reset issues when the controller
is actively being used.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Command abort handling fixes</title>
<updated>2015-01-08T16:02:18Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2015-01-08T01:55:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cef6a948271d5437f96e731878f2e9cb8c9820b7'/>
<id>urn:sha1:cef6a948271d5437f96e731878f2e9cb8c9820b7</id>
<content type='text'>
Aborts all requeued commands prior to killing the request_queue. For
commands that time out on a dying request queue, set the "Do Not Retry"
bit on the command status so the command cannot be requeued. Finanally, if
the driver is requested to abort a command it did not start, do nothing.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Admin queue removal handling</title>
<updated>2015-01-08T16:02:08Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2015-01-08T01:55:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0fb59cbc5f133207535b25ec7d16fba24d549ee2'/>
<id>urn:sha1:0fb59cbc5f133207535b25ec7d16fba24d549ee2</id>
<content type='text'>
This protects admin queue access on shutdown. When the controller is
disabled, the queue is frozen to prevent new entry, and unfrozen on
resume, and fixes cq_vector signedness to not suspend a queue twice.

Since unfreezing the queue makes it available for commands, it requires
the queue be initialized, so this moves this part after that.

Special handling is done when the device is unresponsive during
shutdown. This can be optimized to not require subsequent commands to
timeout, but saving that fix for later.

This patch also removes the kill signals in this path that were left-over
artifacts from the blk-mq conversion and no longer necessary.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Reference count admin queue usage</title>
<updated>2015-01-08T16:00:32Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2015-01-08T01:55:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ea191d2f36b0f577ce5377c3e72aedc34282969d'/>
<id>urn:sha1:ea191d2f36b0f577ce5377c3e72aedc34282969d</id>
<content type='text'>
Since there is no gendisk associated with the admin queue, the driver
needs to hold a reference to it until all open references to the
controller are closed.

This also combines queue cleanup with freeing the tag set since these
should not be separate.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>NVMe: Start all requests</title>
<updated>2015-01-08T16:00:29Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2015-01-08T01:55:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c917dfe52834979610d45022226445d1dc7c67d8'/>
<id>urn:sha1:c917dfe52834979610d45022226445d1dc7c67d8</id>
<content type='text'>
Once the nvme callback is set for a request, the driver can start it
and make it available for timeout handling. For timed out commands on a
device that is not initialized, this fixes potential deadlocks that can
occur on startup and shutdown when a device is unresponsive since they
can now be cancelled.

Asynchronous requests do not have any expected timeout, so these are
using the new "REQ_NO_TIMEOUT" request flags.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>block: fix checking return value of blk_mq_init_queue</title>
<updated>2015-01-02T17:32:02Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2015-01-02T14:25:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=35b489d32fcc37e8735f41aa794b24cf9d1e74f5'/>
<id>urn:sha1:35b489d32fcc37e8735f41aa794b24cf9d1e74f5</id>
<content type='text'>
Check IS_ERR_OR_NULL(return value) instead of just return value.

Signed-off-by: Ming Lei &lt;ming.lei@canonical.com&gt;

Reduced to IS_ERR() by me, we never return NULL.
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
</feed>
