<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/block/elevator.c, branch linux-2.6.28.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2008-12-03T11:41:26+00:00</updated>
<entry>
<title>block: internal dequeue shouldn't start timer</title>
<updated>2008-12-03T11:41:26+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2008-12-03T11:41:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=53a08807c01989c6847bb135d8d43f61c5dfdda5'/>
<id>urn:sha1:53a08807c01989c6847bb135d8d43f61c5dfdda5</id>
<content type='text'>
blkdev_dequeue_request() and elv_dequeue_request() are equivalent and
both start the timeout timer.  Barrier code dequeues the original
barrier request but doesn't passes the request itself to lower level
driver, only broken down proxy requests; however, as the original
barrier code goes through the same dequeue path and timeout timer is
started on it.  If barrier sequence takes long enough, this timer
expires but the low level driver has no idea about this request and
oops follows.

Timeout timer shouldn't have been started on the original barrier
request as it never goes through actual IO.  This patch unexports
elv_dequeue_request(), which has no external user anyway, and makes it
operate on elevator proper w/o adding the timer and make
blkdev_dequeue_request() call elv_dequeue_request() and add timer.
Internal users which don't pass the request to driver - barrier code
and end_that_request_last() - are converted to use
elv_dequeue_request().

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Mike Anderson &lt;andmike@linux.vnet.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: add timer on blkdev_dequeue_request() not elv_next_request()</title>
<updated>2008-11-06T07:41:55+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2008-10-30T07:32:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2920ebbd65f3e80c318adf5191ac0987142bda80'/>
<id>urn:sha1:2920ebbd65f3e80c318adf5191ac0987142bda80</id>
<content type='text'>
Block queue supports two usage models - one where block driver peeks
at the front of queue using elv_next_request(), processes it and
finishes it and the other where block driver peeks at the front of
queue, dequeue the request using blkdev_dequeue_request() and finishes
it.  The latter is more flexible as it allows the driver to process
multiple commands concurrently.

These two inconsistent usage models affect the block layer
implementation confusing.  For some, elv_next_request() is considered
the issue point while others consider blkdev_dequeue_request() the
issue point.

Till now the inconsistency mostly affect only accounting, so it didn't
really break anything seriously; however, with block layer timeout,
this inconsistency hits hard.  Block layer considers
elv_next_request() the issue point and adds timer but SCSI layer
thinks it was just peeking and when the request can't process the
command right away, it's just left there without further processing.
This makes the request dangling on the timer list and, when the timer
goes off, the request which the SCSI layer and below think is still on
the block queue ends up in the EH queue, causing various problems - EH
hang (failed count goes over busy count and EH never wakes up),
WARN_ON() and oopses as low level driver trying to handle the unknown
command, etc. depending on the timing.

As SCSI midlayer is the only user of block layer timer at the moment,
moving blk_add_timer() to elv_dequeue_request() fixes the problem;
however, this two usage models definitely need to be cleaned up in the
future.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: only call -&gt;request_fn when the queue is not stopped</title>
<updated>2008-10-17T06:46:57+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2008-10-14T07:51:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=80a4b58e36b63d7b0b592beb1bd6410aadeeb63c'/>
<id>urn:sha1:80a4b58e36b63d7b0b592beb1bd6410aadeeb63c</id>
<content type='text'>
Callers should use either blk_run_queue/__blk_run_queue, or
blk_start_queueing() to invoke request handling instead of calling
-&gt;request_fn() directly as that does not take the queue stopped
flag into account.

Also add appropriate comments on the above functions to detail
their usage.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: simplify string handling in elv_iosched_store()</title>
<updated>2008-10-17T06:46:57+00:00</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-10-14T06:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ee2e992cc28553f6c4dd1ab5483c8733c393626b'/>
<id>urn:sha1:ee2e992cc28553f6c4dd1ab5483c8733c393626b</id>
<content type='text'>
strlcpy() guarantees the dest buffer is NULL teminated.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: change elevator to use __blk_end_request()</title>
<updated>2008-10-09T06:56:21+00:00</updated>
<author>
<name>Kiyoshi Ueda</name>
<email>k-ueda@ct.jp.nec.com</email>
</author>
<published>2008-10-01T14:13:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=99cd3386f290eaf61f2b7596d5a4cc2007771174'/>
<id>urn:sha1:99cd3386f290eaf61f2b7596d5a4cc2007771174</id>
<content type='text'>
This patch converts elevator to use __blk_end_request() directly
so that end_{queued|dequeued}_request() can be removed.
Related 'uptodate' arguments is converted to 'error'.

Signed-off-by: Kiyoshi Ueda &lt;k-ueda@ct.jp.nec.com&gt;
Signed-off-by: Jun'ichi Nomura &lt;j-nomura@ce.jp.nec.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: Add interface to abort queued requests</title>
<updated>2008-10-09T06:56:13+00:00</updated>
<author>
<name>Mike Anderson</name>
<email>andmike@linux.vnet.ibm.com</email>
</author>
<published>2008-09-13T18:31:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=11914a53d2ec2974a565311af327b8983d8c820d'/>
<id>urn:sha1:11914a53d2ec2974a565311af327b8983d8c820d</id>
<content type='text'>
Signed-off-by: Mike Anderson &lt;andmike@linux.vnet.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: unify request timeout handling</title>
<updated>2008-10-09T06:56:13+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2008-09-14T12:55:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=242f9dcb8ba6f68fcd217a119a7648a4f69290e9'/>
<id>urn:sha1:242f9dcb8ba6f68fcd217a119a7648a4f69290e9</id>
<content type='text'>
Right now SCSI and others do their own command timeout handling.
Move those bits to the block layer.

Instead of having a timer per command, we try to be a bit more clever
and simply have one per-queue. This avoids the overhead of having to
tear down and setup a timer for each command, so it will result in a lot
less timer fiddling.

Signed-off-by: Mike Anderson &lt;andmike@linux.vnet.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: use linux/uaccess.h in elevator.c instead of asm variant</title>
<updated>2008-10-09T06:56:09+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2008-08-26T07:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0835da67c11e879ed5dc23160934d8970470a2ce'/>
<id>urn:sha1:0835da67c11e879ed5dc23160934d8970470a2ce</id>
<content type='text'>
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>drop vmerge accounting</title>
<updated>2008-10-09T06:56:03+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2008-08-15T08:20:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5df97b91b5d7ed426034fcc84cb6e7cf682b8838'/>
<id>urn:sha1:5df97b91b5d7ed426034fcc84cb6e7cf682b8838</id>
<content type='text'>
Remove hw_segments field from struct bio and struct request. Without virtual
merge accounting they have no purpose.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>Allow elevators to sort/merge discard requests</title>
<updated>2008-10-09T06:56:02+00:00</updated>
<author>
<name>David Woodhouse</name>
<email>David.Woodhouse@intel.com</email>
</author>
<published>2008-08-09T15:42:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e17fc0a1ccf88f6d4dcb363729f3141b0958c325'/>
<id>urn:sha1:e17fc0a1ccf88f6d4dcb363729f3141b0958c325</id>
<content type='text'>
But blkdev_issue_discard() still emits requests which are interpreted as
soft barriers, because naïve callers might otherwise issue subsequent
writes to those same sectors, which might cross on the queue (if they're
reallocated quickly enough).

Callers still _can_ issue non-barrier discard requests, but they have to
take care of queue ordering for themselves.

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
</feed>
